├── .eslintrc.js
├── .gitignore
├── LICENSE
├── README.md
├── app.js
├── app.json
├── app.wxss
├── components
├── category-tab
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── daily-item
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── daily-tab
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── follow-tab
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── news-tab
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── recommend-item
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── recommend-tab
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
└── topic-tab
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── images
├── home_ic_img_avatar.png
├── home_ic_mine_normal.png
├── home_ic_mine_selected.png
├── home_ic_normal.png
└── home_ic_selected.png
├── miniprogram_npm
├── lin-ui
│ ├── action-sheet
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── album
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.wxs
│ │ └── index.wxss
│ ├── arc-popup
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── avatar
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── badge
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── behaviors
│ │ ├── computeOffset.js
│ │ ├── countdown.js
│ │ ├── hover.js
│ │ ├── rules.js
│ │ ├── scrollCenter.js
│ │ ├── transition.js
│ │ ├── validator.js
│ │ ├── watchShow.js
│ │ └── zIndex.js
│ ├── button
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── calendar
│ │ ├── calendar.wxml
│ │ ├── components
│ │ │ ├── day
│ │ │ │ ├── index.js
│ │ │ │ ├── index.json
│ │ │ │ ├── index.wxml
│ │ │ │ ├── index.wxs
│ │ │ │ └── index.wxss
│ │ │ ├── header
│ │ │ │ ├── index.js
│ │ │ │ ├── index.json
│ │ │ │ ├── index.wxml
│ │ │ │ └── index.wxss
│ │ │ └── mounth
│ │ │ │ ├── index.js
│ │ │ │ ├── index.json
│ │ │ │ ├── index.wxml
│ │ │ │ ├── index.wxs
│ │ │ │ └── index.wxss
│ │ ├── config.js
│ │ ├── dete.js
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.wxs
│ │ ├── index.wxss
│ │ ├── util.js
│ │ └── utils.wxs
│ ├── capsule-bar
│ │ ├── icons
│ │ │ ├── capsule-left-black.png
│ │ │ ├── capsule-left-white.png
│ │ │ ├── capsule-right-black.png
│ │ │ └── capsule-right-white.png
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── card
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── checkbox-group
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── checkbox
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── circle
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── collapse-item
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── collapse
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── combined-tabs
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── common
│ │ └── async-validator
│ │ │ ├── index.js
│ │ │ ├── messages.js
│ │ │ ├── rule
│ │ │ ├── enum.js
│ │ │ ├── index.js
│ │ │ ├── pattern.js
│ │ │ ├── range.js
│ │ │ ├── required.js
│ │ │ ├── type.js
│ │ │ └── whitespace.js
│ │ │ ├── util.js
│ │ │ └── validator
│ │ │ ├── array.js
│ │ │ ├── boolean.js
│ │ │ ├── date.js
│ │ │ ├── enum.js
│ │ │ ├── float.js
│ │ │ ├── index.js
│ │ │ ├── integer.js
│ │ │ ├── method.js
│ │ │ ├── number.js
│ │ │ ├── object.js
│ │ │ ├── pattern.js
│ │ │ ├── regexp.js
│ │ │ ├── required.js
│ │ │ ├── string.js
│ │ │ └── type.js
│ ├── core
│ │ ├── behaviors
│ │ │ └── doNothingBehavior.js
│ │ └── utils
│ │ │ ├── data-util.js
│ │ │ ├── event-bus.js
│ │ │ ├── event-util.js
│ │ │ ├── node-util.js
│ │ │ └── pixel-util.js
│ ├── countdown
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── counter
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── custom-tab-bar
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── dialog
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── error-tip
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── filter
│ │ ├── array.wxs
│ │ ├── classnames.wxs
│ │ ├── is.wxs
│ │ ├── object.wxs
│ │ ├── string.wxs
│ │ └── zero-padding.wxs
│ ├── form-item
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── form
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── grid-item
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── grid
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── icon
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── image-clipper-tools
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── image-clipper
│ │ ├── calculate.js
│ │ ├── images
│ │ │ ├── close.png
│ │ │ ├── photo.png
│ │ │ ├── rotate-along.png
│ │ │ ├── rotate-inverse.png
│ │ │ └── sure.png
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── image-picker
│ │ ├── image
│ │ │ └── add.png
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── index-anchor
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── index-list
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── input
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── list
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── loading
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── loadmore
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── mask
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── message
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── notice-bar
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── popup
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── price
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── progress
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── radio-group
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── radio
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── rate
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── search-bar
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── segment-item
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── segment
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── skeleton
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── slide-view
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── spin
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── status-show
│ │ ├── image
│ │ │ ├── address.png
│ │ │ ├── cart.png
│ │ │ ├── data.png
│ │ │ ├── error.png
│ │ │ ├── network.png
│ │ │ ├── order.png
│ │ │ ├── product.png
│ │ │ └── success.png
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── step
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── steps
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── sticky-item
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── sticky
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── tab-bar
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── tabpanel
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── tabs
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── tag
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── textarea
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── toast
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── transition
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── utils
│ │ ├── device-util.js
│ │ └── util.js
│ └── water-flow
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
└── moment
│ ├── index.js
│ └── index.js.map
├── package-lock.json
├── package.json
├── pages
├── category-detail
│ ├── category-detail.js
│ ├── category-detail.json
│ ├── category-detail.wxml
│ └── category-detail.wxss
├── home
│ ├── home.js
│ ├── home.json
│ ├── home.wxml
│ └── home.wxss
├── mine
│ ├── mime.js
│ ├── mime.json
│ ├── mime.wxml
│ └── mime.wxss
├── news-detail
│ ├── news-detail.js
│ ├── news-detail.json
│ ├── news-detail.wxml
│ └── news-detail.wxss
├── topic-detail
│ ├── topic-detail.js
│ ├── topic-detail.json
│ ├── topic-detail.wxml
│ └── topic-detail.wxss
└── video-detail
│ ├── video-detail.js
│ ├── video-detail.json
│ ├── video-detail.wxml
│ └── video-detail.wxss
├── project.config.json
├── sitemap.json
└── utils
└── util.js
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Eslint config file
3 | * Documentation: https://eslint.org/docs/user-guide/configuring/
4 | * Install the Eslint extension before using this feature.
5 | */
6 | module.exports = {
7 | env: {
8 | es6: true,
9 | browser: true,
10 | node: true,
11 | },
12 | ecmaFeatures: {
13 | modules: true,
14 | },
15 | parserOptions: {
16 | ecmaVersion: 2018,
17 | sourceType: 'module',
18 | },
19 | globals: {
20 | wx: true,
21 | App: true,
22 | Page: true,
23 | getCurrentPages: true,
24 | getApp: true,
25 | Component: true,
26 | requirePlugin: true,
27 | requireMiniProgram: true,
28 | },
29 | // extends: 'eslint:recommended',
30 | rules: {},
31 | }
32 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows
2 | [Dd]esktop.ini
3 | Thumbs.db
4 | $RECYCLE.BIN/
5 |
6 | # macOS
7 | .DS_Store
8 | .fseventsd
9 | .Spotlight-V100
10 | .TemporaryItems
11 | .Trashes
12 |
13 | # Node.js
14 | node_modules/
15 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 fmtjava
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | // app.js
2 | App({
3 | onLaunch() {
4 | // 展示本地存储能力
5 | const logs = wx.getStorageSync('logs') || []
6 | logs.unshift(Date.now())
7 | wx.setStorageSync('logs', logs)
8 |
9 | // 登录
10 | wx.login({
11 | success: res => {
12 | // 发送 res.code 到后台换取 openId, sessionKey, unionId
13 | }
14 | })
15 | },
16 | globalData: {
17 | userInfo: null
18 | },
19 | gBaseUrl:"http://baobab.kaiyanapp.com/api/"
20 | })
21 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/home/home",
4 | "pages/mine/mime",
5 | "pages/category-detail/category-detail",
6 | "pages/video-detail/video-detail",
7 | "pages/news-detail/news-detail",
8 | "pages/topic-detail/topic-detail"
9 | ],
10 | "usingComponents": {
11 | "l-icon": "/miniprogram_npm/lin-ui/icon/index",
12 | "l-loadmore": "/miniprogram_npm/lin-ui/loadmore/index"
13 | },
14 | "window": {
15 | "backgroundTextStyle": "light",
16 | "navigationBarBackgroundColor": "#fff",
17 | "navigationBarTitleText": "Weixin",
18 | "navigationBarTextStyle": "black"
19 | },
20 | "tabBar": {
21 | "borderStyle": "white",
22 | "selectedColor": "#000000",
23 | "position": "bottom",
24 | "color": "#9a9a9a",
25 | "list": [
26 | {
27 | "text": "首页",
28 | "pagePath": "pages/home/home",
29 | "iconPath": "/images/home_ic_normal.png",
30 | "selectedIconPath": "/images/home_ic_selected.png"
31 | },
32 | {
33 | "text": "我的",
34 | "pagePath": "pages/mine/mime",
35 | "iconPath": "/images/home_ic_mine_normal.png",
36 | "selectedIconPath": "/images/home_ic_mine_selected.png"
37 | }
38 | ]
39 | },
40 | "style": "v2",
41 | "sitemapLocation": "sitemap.json"
42 | }
--------------------------------------------------------------------------------
/app.wxss:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/components/category-tab/index.js:
--------------------------------------------------------------------------------
1 |
2 | const app = getApp()
3 |
4 | Component({
5 | /**
6 | * 组件的属性列表
7 | */
8 | properties: {
9 |
10 | },
11 |
12 | /**
13 | * 组件的初始数据
14 | */
15 | data: {
16 | categoryList:[]
17 | },
18 |
19 | /**
20 | * 组件的方法列表
21 | */
22 | methods: {
23 | onRefresh(){
24 | wx.request({
25 | url: app.gBaseUrl + 'v4/categories',
26 | success:(res)=>{
27 | this.setData({
28 | categoryList:res.data
29 | })
30 | wx.stopPullDownRefresh()
31 | },
32 | fail:(res)=>{
33 | wx.showToast({
34 | icon:'error',
35 | title: res.errMsg,
36 | })
37 | }
38 | })
39 | },
40 | go2CategoryDetail(event){
41 | const category = this.data.categoryList[event.detail.index]
42 | wx.navigateTo({
43 | url: '/pages/category-detail/category-detail?id=' + category.id + "&headerImage=" + category.headerImage + "&name=" + category.name + "&description=" + category.description,
44 | })
45 | }
46 | },
47 | attached: function() {
48 | this.onRefresh()
49 | },
50 | })
51 |
--------------------------------------------------------------------------------
/components/category-tab/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "l-grid":"/miniprogram_npm/lin-ui/grid/index",
5 | "l-grid-item":"/miniprogram_npm/lin-ui/grid-item/index"
6 | }
7 | }
--------------------------------------------------------------------------------
/components/category-tab/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #{{item.name}}
5 |
6 |
--------------------------------------------------------------------------------
/components/category-tab/index.wxss:
--------------------------------------------------------------------------------
1 |
2 | .category-container{
3 | margin-top: 100rpx;
4 | margin-left: 10rpx;
5 | margin-right: 10rpx;
6 | }
7 |
8 | .l-grid-item{
9 | display: flex;
10 | justify-content: center;
11 | align-items: center;
12 | flex-direction: column;
13 | padding: 8rpx 8rpx;
14 | box-sizing: border-box
15 | }
16 | .category-img{
17 | width: 100%;
18 | height: 400rpx;
19 | border-radius: 8rpx;
20 | }
21 |
22 | .category-text{
23 | position: absolute;
24 | color: #ffffff;
25 | font-size: 44rpx;
26 | font-weight: bold;
27 | }
--------------------------------------------------------------------------------
/components/daily-item/index.js:
--------------------------------------------------------------------------------
1 | // components/daily/daily.js
2 | Component({
3 | /**
4 | * 组件的属性列表
5 | */
6 | properties: {
7 | item:Object
8 | },
9 |
10 | /**
11 | * 组件的初始数据
12 | */
13 | data: {
14 |
15 | },
16 |
17 | /**
18 | * 组件的方法列表
19 | */
20 | methods: {
21 | go2VideoDetail(event){
22 | const itemJsonStr = encodeURIComponent(JSON.stringify(this.properties.item))
23 | wx.navigateTo({
24 | url: '/pages/video-detail/video-detail?item=' + itemJsonStr,
25 | })
26 | }
27 | }
28 | })
29 |
--------------------------------------------------------------------------------
/components/daily-item/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 |
5 | }
6 | }
--------------------------------------------------------------------------------
/components/daily-item/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{item.data.category}}
8 |
9 |
10 |
11 | {{item.videoTimeText}}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | {{item.data.title}}
21 | {{item.data.author === null ? item.data.author.name : item.data.tags[0].name}}
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/components/daily-tab/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "daily-item":"/components/daily-item/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/components/daily-tab/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | {{item.data.text}}
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/components/daily-tab/index.wxss:
--------------------------------------------------------------------------------
1 | .container{
2 | display: flex;
3 | flex-direction: column;
4 | }
5 |
6 | .banner-swiper{
7 | margin-top: 100rpx;
8 | width: 100%;
9 | height: 400rpx;
10 | padding-left: 30rpx;
11 | padding-right: 30rpx;
12 | box-sizing: border-box;
13 | }
14 |
15 | .banner-swiper-item{
16 | width: 100%;
17 | border-radius: 8rpx;
18 | }
19 |
20 | .banner-image{
21 | width: 100%;
22 | border-radius: 8rpx;
23 | }
24 |
25 | .title-container{
26 | display: flex;
27 | align-items: center;
28 | justify-content: center;
29 | margin-top: 20rpx;
30 | }
31 |
32 | .title{
33 | font-size: 36rpx;
34 | color: #000000DD;
35 | font-weight: bold;
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/components/follow-tab/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/components/follow-tab/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | {{followItem.data.category}}
18 |
19 | {{followItem.data.title}}
20 | {{followItem.releaseTimeStr}}
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/components/news-tab/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/components/news-tab/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{item.data.text}}
4 |
5 |
6 |
7 | {{titleItem}}
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/components/news-tab/index.wxss:
--------------------------------------------------------------------------------
1 | /* components/news-tab/index.wxss */
2 | .container{
3 | display: flex;
4 | flex-direction: column;
5 | margin-top: 100rpx;
6 | }
7 | .title{
8 | margin-top: 10rpx;
9 | margin-left: 20rpx;
10 | color: #000000DD;
11 | font-size: 44rpx;
12 | font-weight: bold;
13 | }
14 |
15 | .card{
16 | display: flex;
17 | flex-direction: column;
18 | background-color: #EDEDED;
19 | margin: 20rpx;
20 | padding-bottom: 20rpx;
21 | border-radius: 8rpx;
22 | }
23 |
24 | .image{
25 | width: 100%;
26 | height: 280rpx;
27 | border-top-left-radius: 8rpx;
28 | border-top-right-radius: 8rpx;
29 | margin-bottom: 10rpx;
30 | }
31 |
32 | .content{
33 | margin-left: 20rpx;
34 | margin-right: 20rpx;
35 | margin-top: 10rpx;
36 | font-size: 24rpx;
37 | color: #333333;
38 | }
--------------------------------------------------------------------------------
/components/recommend-item/index.js:
--------------------------------------------------------------------------------
1 | // components/recommend-item/index.js
2 | Component({
3 | /**
4 | * 组件的属性列表
5 | */
6 | properties: {
7 | data:Object
8 | },
9 |
10 | /**
11 | * 组件的初始数据
12 | */
13 | data: {
14 |
15 | },
16 |
17 | /**
18 | * 组件的方法列表
19 | */
20 | methods: {
21 | go2Recommend(event){
22 | const contentData = this.data.data.data.content
23 | const recommendData = contentData.data;
24 | if(contentData.type === 'video'){
25 | console.log('video')
26 | wx.previewMedia({
27 | sources: [{url:recommendData.playUrl,
28 | type:'video',
29 | poster:recommendData.cover.feed}],
30 | })
31 | }else{
32 | if(recommendData.urls === null ||recommendData.urls.legnth === 0){
33 | wx.previewImage({
34 | urls: [recommendData.url],
35 | })
36 | }else{
37 | wx.previewImage({
38 | urls: recommendData.urls,
39 | })
40 | }
41 | }
42 | }
43 | }
44 | })
45 |
--------------------------------------------------------------------------------
/components/recommend-item/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "l-card":"/miniprogram_npm/lin-ui/card/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/components/recommend-item/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{data.data.content.data.description}}
5 |
6 |
7 |
8 | {{data.data.content.data.owner.nickname}}
9 |
10 |
11 |
12 | {{data.data.content.data.consumption.collectionCount}}
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/components/recommend-item/index.wxss:
--------------------------------------------------------------------------------
1 | .container{
2 | width: 100%;
3 | position: relative;
4 | }
5 | .card-container {
6 | width: 100%;
7 | padding: 0rpx;
8 | margin-bottom: 20rpx;
9 | }
10 |
11 | .head-img {
12 | border-top-left-radius: 8rpx;
13 | border-top-right-radius: 8rpx;
14 | }
15 |
16 | .icon{
17 | position: absolute;
18 | top: 10rpx;
19 | right: 10rpx;
20 | }
21 |
22 | .description {
23 | color: #000000DD;
24 | font-size: 28rpx;
25 | overflow: hidden;
26 | text-overflow: ellipsis;
27 | display: -webkit-box;
28 | -webkit-line-clamp: 2;
29 | -webkit-box-orient: vertical;
30 | margin: 20rpx;
31 | }
32 |
33 | .bottom-container {
34 | display: flex;
35 | flex-direction: row;
36 | justify-content: space-between;
37 | margin: 20rpx;
38 | }
39 |
40 | .owner {
41 | display: flex;
42 | flex-direction: row;
43 | align-items: center;
44 | }
45 |
46 | .avatar {
47 | width: 48rpx;
48 | height: 48rpx;
49 | border-radius: 50%;
50 | }
51 |
52 | .nickname {
53 | margin-left: 10rpx;
54 | width: 160rpx;
55 | font-size: 24rpx;
56 | }
57 |
58 | .like-text {
59 | margin-left: 6rpx;
60 | font-size: 24rpx;
61 | }
--------------------------------------------------------------------------------
/components/recommend-tab/index.js:
--------------------------------------------------------------------------------
1 | const app = getApp()
2 |
3 | Component({
4 | /**
5 | * 组件的属性列表
6 | */
7 | properties: {
8 |
9 | },
10 |
11 | /**
12 | * 组件的初始数据
13 | */
14 | data: {
15 | nextPageUrl:""
16 | },
17 |
18 | /**
19 | * 组件的方法列表
20 | */
21 | methods: {
22 | onRefresh(){
23 | wx.request({
24 | url: app.gBaseUrl + 'v7/community/tab/rec',
25 | success:(res)=>{
26 | const nextPageUrl = res.data.nextPageUrl
27 | let itemList = res.data.itemList
28 | itemList = itemList.filter((value)=> value.type !== 'horizontalScrollCard')
29 |
30 | this.data.nextPageUrl = nextPageUrl
31 |
32 | wx.lin.renderWaterFlow(itemList, true)
33 | wx.stopPullDownRefresh()
34 | },
35 | fail:(res)=>{
36 | wx.showToast({
37 | icon:'error',
38 | title: res.errMsg,
39 | })
40 | }
41 | })
42 | },
43 | onLoadMore(){
44 | if(this.data.nextPageUrl === null){
45 | return
46 | }
47 | wx.request({
48 | url: this.data.nextPageUrl,
49 | success:(res)=>{
50 | const nextPageUrl = res.data.nextPageUrl
51 | let itemList = res.data.itemList
52 |
53 | this.data.nextPageUrl = nextPageUrl
54 |
55 | wx.lin.renderWaterFlow(itemList, false)
56 | },
57 | fail:(res)=>{
58 | wx.showToast({
59 | icon:'error',
60 | title: res.errMsg,
61 | })
62 | }
63 | })
64 | },
65 | },
66 | attached: function() {
67 | this.onRefresh()
68 | },
69 | })
70 |
--------------------------------------------------------------------------------
/components/recommend-tab/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "recommend-item":"/components/recommend-item/index",
5 | "l-water-flow":"/miniprogram_npm/lin-ui/water-flow/index"
6 | }
7 | }
--------------------------------------------------------------------------------
/components/recommend-tab/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/components/recommend-tab/index.wxss:
--------------------------------------------------------------------------------
1 | .container{
2 | margin-left: 20rpx;
3 | margin-right: 20rpx;
4 | margin-top: 100rpx;
5 | }
--------------------------------------------------------------------------------
/components/topic-tab/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/components/topic-tab/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/components/topic-tab/index.wxss:
--------------------------------------------------------------------------------
1 | /* components/topic-tab/index.wxss */
2 | .container{
3 | display: flex;
4 | flex-direction: column;
5 | margin-top: 100rpx;
6 | margin-left: 20rpx;
7 | margin-right: 20rpx;
8 | }
9 | .image{
10 | width: 100%;
11 | height: 400rpx;
12 | border-radius: 8rpx;
13 | margin-top: 10rpx;
14 | }
15 |
16 | .line{
17 | height: 1px;
18 | background-color: #0000001F;
19 | margin-top: 20rpx;
20 | margin-bottom: 10rpx;
21 | }
--------------------------------------------------------------------------------
/images/home_ic_img_avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/images/home_ic_img_avatar.png
--------------------------------------------------------------------------------
/images/home_ic_mine_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/images/home_ic_mine_normal.png
--------------------------------------------------------------------------------
/images/home_ic_mine_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/images/home_ic_mine_selected.png
--------------------------------------------------------------------------------
/images/home_ic_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/images/home_ic_normal.png
--------------------------------------------------------------------------------
/images/home_ic_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/images/home_ic_selected.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/action-sheet/index.js:
--------------------------------------------------------------------------------
1 | import zIndex from"../behaviors/zIndex";import hover from"../behaviors/hover";Component({behaviors:[zIndex,hover],externalClasses:["l-class-title","l-class-item","l-class-cancel","l-title-class","l-item-class","l-cancel-class"],properties:{locked:Boolean,showCancel:Boolean,show:Boolean,itemList:Array,cancelText:{type:String,value:"取消"},title:String,zIndex:{type:Number,value:777},openApi:{type:Boolean,value:!0}},data:{success:"",fail:"",isIphoneX:!1},attached(){this.data.openApi&&this.initActionSheet(),this.initUIAdapter()},pageLifetimes:{show(){this.data.openApi&&this.initActionSheet()}},methods:{initUIAdapter(){wx.getSystemInfo({success:e=>{this.setData({isIphoneX:"iPhone X"===e.model})}})},initActionSheet(){wx.lin=wx.lin||{},wx.lin.showActionSheet=(e={})=>{const{itemList:t=[],success:s=null,fail:i=null,title:a="",locked:l=!1,cancelText:n="取消",showCancel:c=!1}=e;return this.setData({itemList:t.slice(0,10),success:s,fail:i,title:a,locked:l,cancelText:n,showCancel:c,show:!0}),this}},handleClickItem(e){const{success:t}=this.data;t&&t({...e.currentTarget.dataset}),this.triggerEvent("linitemtap",{...e.currentTarget.dataset},{bubbles:!0,composed:!0}),this._hideActionSheet()},_showActionSheet(){this.setData({show:!0})},_hideActionSheet(){this.setData({show:!1})},handleClickCancel(){const{fail:e}=this.data;e&&e({errMsg:"showactionsheet:fail cancel"}),this.triggerEvent("lincancel",{errMsg:"showactionsheet:fail cancel"},{bubbles:!0,composed:!0}),this._hideActionSheet()},handleClickPopUp(){this.data.locked||this.handleClickCancel()}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/action-sheet/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index","l-popup":"../popup/index","l-button":"../button/index"} }
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/action-sheet/index.wxss:
--------------------------------------------------------------------------------
1 | .l-action-sheet{background:#f7f7f7}.l-item-button{height:88rpx;line-height:88rpx;text-align:center;background:#fff;border-bottom:2rpx solid #f3f3f3;font-size:28rpx;color:#45526b;display:flex;align-items:center;justify-content:center;width:100%;overflow:hidden}.l-cancel{margin-top:12rpx}.l-cancel-x .l-item-button{padding-bottom:44rpx}.l-image-button>.l-button-text{margin-left:20rpx}.list-hover{opacity:.8}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/album/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/album/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | +{{urls.length-maxNumber}}
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/album/index.wxss:
--------------------------------------------------------------------------------
1 | .container{display:grid}.vertical{height:360rpx}.parent{display:inline-grid;grid-template-columns:repeat(auto-fill)}.child{box-sizing:border-box;background-color:#fff;flex:0 0 44%;height:100px;border:1px solid red;margin-top:4%;margin-left:2%;margin-right:2%}.dimback{background:#000}.dim{opacity:.6}.imageContainer{position:relative}.imageContainer:last-child>.text{color:#fff;font-weight:700;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:larger}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/arc-popup/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-popup":"../popup/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/arc-popup/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/arc-popup/index.wxss:
--------------------------------------------------------------------------------
1 | .container-arc-popup{width:100%}.arc-popup{overflow:hidden;width:100%;background:#fff}.content-arc-popup{padding:30rpx;box-sizing:border-box}.header-popup{width:100%;z-index:999}.header-popup.fixed{position:sticky;top:0;background-color:#fff}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/avatar/index.js:
--------------------------------------------------------------------------------
1 | Component({externalClasses:["l-class","l-class-text","l-text-class"],properties:{icon:String,iconColor:{type:String,value:"#3963BC"},iconSize:{type:String,value:"28"},text:String,src:String,openData:{type:Array,observer:"_initOpenData"},shape:{type:String,value:"circle"},mode:{type:String,value:"scaleToFill"},size:{type:Number,value:120},placement:{type:String,value:"right"}},data:{_isHaveUserNickName:!1,_isHaveUserAvatarUrl:!1,_iconSize:"",_iconColor:"#ffffff"},methods:{_initOpenData:function(e){this._isHaveUserAvatarUrl(e),this._isHaveUserNickName(e)},_isHaveUserAvatarUrl:function(e){this.setData({_isHaveUserAvatarUrl:-1!==e.indexOf("userAvatarUrl")})},_isHaveUserNickName:function(e){this.setData({_isHaveUserNickName:-1!==e.indexOf("userNickName")})},tapAvatar:function(e){this.triggerEvent("lintap",e,{bubbles:!0,composed:!0})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/avatar/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index"} }
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/avatar/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{text}}
11 |
12 |
13 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/avatar/index.wxss:
--------------------------------------------------------------------------------
1 | .l-avatar{display:inline-flex;justify-content:center;align-items:center}.l-avatar-image{flex:1;display:inline-flex;justify-content:center;align-items:center;background:#ccc;overflow:hidden}.l-avatar-text{display:inline-block;height:max-content;width:max-content;font-size:28rpx;color:#45526b;line-height:40px}.open-data{width:100%;height:100%}.l-avatar-text .l-avatar-text-text,.l-avatar-text .open-data{font-size:inherit;color:inherit;line-height:inherit}.l-square{border-radius:8rpx}.l-circle{border-radius:50%}.l-placement-left,.l-placement-right{align-items:center;justify-content:center}.l-placement-left{margin-right:24rpx;flex-direction:row-reverse}.l-placement-left .l-avatar-text{margin-right:24rpx}.l-placement-right{flex-direction:row}.l-placement-right .l-avatar-text{margin-left:24rpx}.l-placement-top{flex-direction:column-reverse}.l-placement-top .l-avatar-text{margin-bottom:12rpx}.l-placement-bottom{flex-direction:column}.l-placement-bottom .l-avatar-text{margin-top:12rpx}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/badge/index.js:
--------------------------------------------------------------------------------
1 | import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-class-self","l-self-class"],behaviors:[validator],properties:{dot:{type:Boolean,value:!1},shape:{type:String,value:"horn",options:["horn","circle"]},value:{type:String,value:"0"},mode:{type:String,value:"number",options:["number","text"]},maxCount:{type:Number,value:99},numberType:{type:String,value:"overflow",options:["overflow","limit","ellipsis"]},show:{type:Boolean,value:!0}},data:{finalCount:0},observers:{value:function(){this.finalCount()}},methods:{finalCount(){isNaN(Number(this.data.value))||"text"===this.data.mode?this.setData({finalCount:this.data.value}):this.switchType()},switchType(){switch(this.data.numberType){case"overflow":this.setData({finalCount:Number(this.data.value)>Number(this.data.maxCount)?this.data.maxCount+"+":this.data.value});break;case"ellipsis":this.setData({finalCount:Number(this.data.value)>Number(this.data.maxCount)?"...":this.data.value});break;case"limit":this.setData({finalCount:Number(this.data.value)>999?Number(this.data.value)>=9999?Math.floor(this.data.value/1e4*100)/100+"w":Math.floor(this.data.value/1e3*100)/100+"k":this.data.value});break;default:this.setData({finalCount:Number(this.data.value)})}},handleTap(){this.triggerEvent("lintap",{},{bubbles:!0,composed:!0})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/badge/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/badge/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{finalCount}}
6 |
7 |
8 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/badge/index.wxss:
--------------------------------------------------------------------------------
1 | .l-badge{position:relative;display:inline-block;line-height:1;vertical-align:middle}.l-badge-content{max-width:650rpx;left:70%;background-color:#ff474b;color:#fff;position:absolute;font-size:20rpx;display:inline-block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:center;box-sizing:border-box;z-index:10;letter-spacing:.5rpx}.l-badge-content-horn{height:28rpx;min-width:54rpx;padding:0 8rpx;border-radius:14rpx 14rpx 14rpx 0rpx;line-height:28rpx;top:-10rpx}.l-badge-content-circle{height:32rpx;min-width:32rpx;padding:0 10rpx;border-radius:16rpx;line-height:32rpx;top:-10rpx}.l-badge-dot{height:16rpx;width:16rpx;transform:translateX(50%);border-radius:50%;background-color:#ff474b;position:absolute;top:-4rpx;right:0rpx}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/behaviors/computeOffset.js:
--------------------------------------------------------------------------------
1 | export default Behavior({behaviors:[],properties:{},data:{distance:0},attached(){this.offsetMargin()},methods:{offsetMargin(){const{windowHeight:t,screenHeight:e}=wx.getSystemInfoSync();this.setData({distance:e-t})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/behaviors/hover.js:
--------------------------------------------------------------------------------
1 | export default Behavior({behaviors:[],properties:{isHover:{type:Boolean,value:!0}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/behaviors/rules.js:
--------------------------------------------------------------------------------
1 | import Schema from"../common/async-validator/index";import validator from"../behaviors/validator";export default Behavior({behaviors:[validator],properties:{rules:{optionalTypes:[Object,Array],value:[]},tipType:{type:String,value:"toast",options:["toast","message","text"]}},data:{schema:"",tipFun:{message:"showMessage",toast:"showToast"},tipContent:{message:"content",toast:"title"},errorText:"",errors:[]},methods:{initRules(){const{rules:t}=this.data;t&&("[object Object]"===Object.prototype.toString.call(t)&&(this.data.rules=[t]),this.data.rules.forEach(t=>{t.trigger?"string"!=typeof t.trigger||(t.trigger=[t.trigger]):t.trigger=[]}))},getNeedValidateRule(t){const e=this.data.name,{rules:a}=this.data;if(!a)return;const r=t?a.filter(e=>e.trigger.indexOf(t)>-1):a,s=new Schema({[e]:r});return this.setData({schema:s}),r},validatorData(t,e){const{tipType:a,tipFun:r,tipContent:s}=this.data;this.getNeedValidateRule(e)&&(Object.getOwnPropertyNames(t).forEach(e=>{""===t[e]&&(t[e]=void 0)}),this.data.schema.validate(t,t=>{if(this.setData({errors:t||[]}),this.triggerEvent("linvalidate",{errors:t,isError:!!t}),t&&a){const e=r[a],i=s[a];return"text"===a?(this.setData({errorText:t[0].message}),t):wx.lin&&wx.lin[e]?(wx.lin[e]&&wx.lin[e]({[i]:t[0].message,duration:1500,mask:!1}),t):(wx.showToast({icon:"none",title:`请在页面内引入${a}组件`}),t)}!t&&a&&this.setData({errorText:""})}))}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/behaviors/scrollCenter.js:
--------------------------------------------------------------------------------
1 | export default Behavior({methods:{getRect(e,t=!1){return new Promise((r,o)=>{const s=wx.createSelectorQuery().in(this);(t?s.selectAll(e):s.select(e)).boundingClientRect(e=>{if(!e)return o("找不到元素");r(e)}).exec()})},queryScrollNode(e,t,r="width"){if(t<0)return;const o=e[t];this.getRect(".l-tabsscroll").then(s=>{if(!s)return console.error("找不到元素");const c=s[r];let n=e.slice(0,t).reduce((e,t)=>e+t[r],0);n+=(o[r]-c)/2,"width"===r?this.setData({transformX:n,transformY:0}):this.setData({transformX:0,transformY:n})}).catch(e=>{console.error(e)})},queryMultipleNodes(){const{placement:e,currentIndex:t}=this.data;this.getRect(".l-tabs-item",!0).then(r=>{-1!==["top","bottom"].indexOf(e)?this.queryScrollNode(r,t):this.queryScrollNode(r,t,"height")}).catch(e=>{console.error(e)})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/behaviors/validator.js:
--------------------------------------------------------------------------------
1 | export default Behavior({definitionFilter(e){const{properties:o}=e;Object.keys(o).forEach(e=>{const{options:t}=o[e];t&&(o[e].observer=function(o){!t.includes(o)&&o&&console.error(`${e}: ${o} must be in the [${t}]`)})})}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/behaviors/watchShow.js:
--------------------------------------------------------------------------------
1 | export default Behavior({observers:{show:function(t){t&&this.changeStatus(),t||this.setData({status:t})}},methods:{changeStatus(){this.setData({status:!0}),this.data.timer&&clearTimeout(this.data.timer),this.data.timer=setTimeout(()=>{this.setData({status:!1}),this.data.success&&this.data.success(),this.data.timer=null},this.properties.duration)}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/behaviors/zIndex.js:
--------------------------------------------------------------------------------
1 | export default Behavior({behaviors:[],properties:{zIndex:{type:Number,value:777}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/button/index.js:
--------------------------------------------------------------------------------
1 | import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-label-class","l-hover-class","l-img-class","l-icon-class"],behaviors:[validator],properties:{name:{type:String,value:"lin"},type:{type:String,value:"default",options:["warning","success","error","default"]},plain:Boolean,size:{type:String,value:"medium",options:["medium","large","mini","long"]},shape:{type:String,value:"circle",options:["square","circle","semicircle"]},disabled:{type:Boolean,value:!1},special:{type:Boolean,value:!1},loading:{type:Boolean,value:!1},width:Number,height:Number,icon:String,image:String,bgColor:String,iconColor:String,iconSize:String,openType:String,appParameter:String,lang:String,hoverStopPropagation:Boolean,hoverStartTime:{type:Number,value:20},hoverStayTime:{type:Number,value:70},sessionFrom:{type:String,value:""},sendMessageTitle:String,sendMessagePath:String,sendMessageImg:String,showMessageCard:Boolean,formType:String,disabledHover:{type:Boolean,value:!1}},methods:{handleTap(){if(this.data.disabled||this.data.loading)return!1;this.triggerEvent("lintap",{},{bubbles:!0,composed:!0})},openTypeEvent(e){this.triggerEvent(e.type,e.detail,{})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/button/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/calendar.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{confirmText}}
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/components/day/index.js:
--------------------------------------------------------------------------------
1 | Component({data:{},properties:{text:null,topInfo:null,bottomInfo:null,type:null,color:{type:String,value:""}},methods:{}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/components/day/index.json:
--------------------------------------------------------------------------------
1 | {"component":true}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/components/day/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ topInfo }}
4 | {{ text }}
5 | {{ bottomInfo }}
6 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/components/day/index.wxs:
--------------------------------------------------------------------------------
1 | function getDayStyle(type, color) {
2 | var style = [];
3 |
4 | if (color) {
5 | if (
6 | type === 'start' ||
7 | type === 'end' ||
8 | type === 'selected'
9 | ) {
10 | style.push(['background', color]);
11 | } else if (type === 'middle') {
12 | style.push(['color', color]);
13 | // style.push(['background', color]);
14 | // style.push(['opacity', '0.1']);
15 | }
16 | }
17 |
18 | return style
19 | .map(function(item) {
20 | return item.join(':');
21 | })
22 | .join(';');
23 | }
24 |
25 | module.exports = {
26 | getDayStyle: getDayStyle,
27 | };
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/components/day/index.wxss:
--------------------------------------------------------------------------------
1 | .calendar-day-container{display:flex;flex-direction:column;height:100%;align-items:center;position:relative;color:#666}.calendar-day-container.selected{background-color:#3963bc;color:#fff;border-radius:8rpx}.calendar-day-container.start{background-color:#3963bc;color:#fff;border-radius:8rpx}.calendar-day-container.end{background-color:#3963bc;color:#fff;border-radius:8rpx}.calendar-day-container.disabled{color:#c8c9cc;cursor:default;background:#fff}.calendar-day-container.middle{color:#3963bc}.calendar-day-container.middle::after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:.1;content:''}.calendar-day-container .top{height:24rpx;line-height:24rpx;font-size:16rpx}.calendar-day-container .text{flex:1;font-size:32rpx}.calendar-day-container .bottom{height:24rpx;line-height:24rpx;font-size:16rpx}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/components/header/index.js:
--------------------------------------------------------------------------------
1 | Component({data:{weekdays:["日","一","二","三","四","五","六"]},properties:{title:{type:String,value:"日期选择"},subTitle:String,showTitle:Boolean,showSubtitle:Boolean},methods:{}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/components/header/index.json:
--------------------------------------------------------------------------------
1 | {"component":true}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/components/header/index.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/components/header/index.wxss:
--------------------------------------------------------------------------------
1 | .calendar-header-container .calendar-header-container_title{text-align:center;padding:20rpx 0;font-size:36rpx;line-height:44rpx}.calendar-header-container .calendar-header-container_subtitle{text-align:center;font-size:36rpx;line-height:44rpx;margin-bottom:30rpx}.calendar-header-container .calendar-header__weekdays{display:flex;justify-content:center;align-items:center;margin:0 20rpx;padding:10rpx 0;border-bottom:1rpx solid #f3f3f3}.calendar-header-container .calendar-header__weekdays .calendar-header__weekday{width:14.285%;text-align:center}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/components/mounth/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"day":"../day/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/components/mounth/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{ computed.formatMonthTitle(date) }}
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/components/mounth/index.wxs:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | function formatMonthTitle(date) {
4 | date = getDate(date);
5 | return date.getFullYear() + '年' + (date.getMonth() + 1) + '月';
6 | }
7 |
8 |
9 |
10 | module.exports = {
11 | formatMonthTitle: formatMonthTitle
12 | };
13 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/components/mounth/index.wxss:
--------------------------------------------------------------------------------
1 | .calendar-mounth-container{color:#333;display:flex;flex-direction:column}.calendar-mounth-container .title{text-align:center;font-weight:800}.calendar-mounth-container .calendar-day-container{display:flex;flex-wrap:wrap}.calendar-mounth-container .calendar-day-container .calendar-day-wrap{width:14.285%}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/config.js:
--------------------------------------------------------------------------------
1 | export const TYPE_SINGLE="single";export const TYPE_RANGE="range";export const TYPE_MULTIPLE="multiple";
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/dete.js:
--------------------------------------------------------------------------------
1 | const formatFlags={format:function(t,e){let a;const r={"y+":(e=new Date(e)).getFullYear().toString(),"M+":(e.getMonth()+1).toString(),"d+":e.getDate().toString()};for(let e in r)a=new RegExp("("+e+")").exec(t),a&&(t=t.replace(a[1],1===a[1].length?r[e]:this.padZero(r[e],a[1].length)));return t},padZero(t,e){let a=t;for(let r=0;r
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/index.wxs:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | var utils = require('./utils.wxs');
3 |
4 | function getMonths(minDate, maxDate) {
5 | var months = [];
6 | var cursor = getDate(minDate);
7 |
8 | cursor.setDate(1);
9 |
10 | do {
11 | months.push(cursor.getTime());
12 | cursor.setMonth(cursor.getMonth() + 1);
13 | } while (utils.compareMonth(cursor, getDate(maxDate)) !== 1);
14 |
15 | return months;
16 | }
17 |
18 | function getButtonDisabled(type, currentDate) {
19 | if (currentDate == null) {
20 | return true;
21 | }
22 |
23 | if (type === 'range') {
24 | return !currentDate[0] || !currentDate[1];
25 | }
26 |
27 | if (type === 'multiple') {
28 | return !currentDate.length;
29 | }
30 |
31 | return !currentDate;
32 | }
33 |
34 | module.exports = {
35 | getMonths: getMonths,
36 | getButtonDisabled: getButtonDisabled
37 | };
38 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/index.wxss:
--------------------------------------------------------------------------------
1 | .calendar-container{display:flex;height:1000rpx;flex-direction:column;background-color:#fff}.calendar-container .calendar-body-wrap{flex:1;overflow:auto;padding:0 20rpx;width:auto}.bottom-button{padding:0!important;padding-bottom:constant(safe-area-inset-bottom)!important;padding-bottom:env(safe-area-inset-bottom)!important;box-sizing:content-box!important}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/util.js:
--------------------------------------------------------------------------------
1 | export function getMonthEndDay(t,e){return new Date(t,e,0).getDate()}export function isTimeTemp(t){return/^\d+(\.\d+)?$/.test(t)}export function getDate(t){return isTimeTemp(t)&&(t=parseInt(t)),t=new Date(t)}export function getDayByOffset(t,e){return(t=new Date(t)).setDate(t.getDate()+e),t}export function compareMonth(t,e){t instanceof Date||(t=getDate(t)),e instanceof Date||(e=getDate(e));const n=t.getFullYear(),a=e.getFullYear(),o=t.getMonth(),r=e.getMonth();return n===a?o===r?0:o>r?1:-1:n>a?1:-1}export function compareDay(t,e){t instanceof Date||(t=getDate(t)),e instanceof Date||(e=getDate(e));const n=compareMonth(t,e);if(0===n){const n=t.getDate(),a=e.getDate();return n===a?0:n>a?1:-1}return n}export function calcDateNum(t){const e=new Date(t[0]).getTime();return(new Date(t[1]).getTime()-e)/864e5+1}export function copyDates(t){return Array.isArray(t)?t.map(t=>null===t?t:new Date(t)):new Date(t)}export function getTime(t){return Array.isArray(t)?t.map(t=>t instanceof Date?t.getTime():t):t instanceof Date?t.getTime():t}export function formatMonthTitle(t){return t instanceof Date||(t=new Date(t)),`${t.getFullYear()}年${t.getMonth()+1}月`}export function getMonths(t,e){const n=[],a=new Date(t);a.setDate(1);do{n.push(a.getTime()),a.setMonth(a.getMonth()+1)}while(1!==compareMonth(a,e));return n}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/calendar/utils.wxs:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | function getMonthEndDay(year, month) {
3 | return getDate(year, month - 1, 0).getDate();
4 | }
5 | function compareMonth(date1, date2) {
6 | date1 = getDate(date1);
7 | date2 = getDate(date2);
8 |
9 | var year1 = date1.getFullYear();
10 | var year2 = date2.getFullYear();
11 | var month1 = date1.getMonth();
12 | var month2 = date2.getMonth();
13 |
14 | if (year1 === year2) {
15 | return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;
16 | }
17 |
18 | return year1 > year2 ? 1 : -1;
19 | }
20 |
21 | module.exports = {
22 | getMonthEndDay: getMonthEndDay,
23 | compareMonth: compareMonth
24 | };
25 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/capsule-bar/icons/capsule-left-black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/capsule-bar/icons/capsule-left-black.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/capsule-bar/icons/capsule-left-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/capsule-bar/icons/capsule-left-white.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/capsule-bar/icons/capsule-right-black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/capsule-bar/icons/capsule-right-black.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/capsule-bar/icons/capsule-right-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/capsule-bar/icons/capsule-right-white.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/capsule-bar/index.json:
--------------------------------------------------------------------------------
1 | {"component":true}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/capsule-bar/index.wxss:
--------------------------------------------------------------------------------
1 | .container{position:relative}.container .capsule-bar{width:100%;position:fixed;display:flex;flex-direction:column;top:0;left:0;z-index:999}.container .capsule-bar .status-bar{width:100%}.container .capsule-bar .title-bar{width:100%;display:flex;align-items:center;justify-content:center;margin-top:-4rpx;padding-top:4rpx;box-sizing:border-box}.container .capsule-bar .title-bar .title{font-size:36rpx;font-weight:700}.container .capsule-bar .capsule-button{border-radius:99999px;display:flex;align-items:center;border:1px solid rgba(0,0,0,.1);position:fixed}.container .capsule-bar .capsule-button .icon-wrapper-hover-black{background-color:rgba(0,0,0,.36)}.container .capsule-bar .capsule-button .icon-wrapper-hover-white{background-color:rgba(255,255,255,.339)}.container .capsule-bar .capsule-button .icon-wrapper{display:flex;justify-content:center;align-items:center}.container .capsule-bar .capsule-button .icon-wrapper .icon-left{display:block;width:20rpx;height:34rpx}.container .capsule-bar .capsule-button .icon-wrapper .icon-right{display:block;width:38rpx;height:34rpx}.container .capsule-bar .capsule-button .line{height:18px;width:1px;line-height:1;background-color:rgba(255,255,255,.25)}.container .content-container{width:100%;position:absolute;left:0}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/card/index.js:
--------------------------------------------------------------------------------
1 | import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-img-class","l-title-class"],options:{multipleSlots:!0},behaviors:[validator],properties:{image:String,title:String,describe:String,plaintext:Boolean,full:Boolean,position:{type:String,value:"left",options:["left","right"]},type:{type:String,value:"primary",options:["primary","avatar","cover"]},imageMode:{type:String,value:"scaleToFill"}},data:{},methods:{}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/card/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/card/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{title}}
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | {{title}}
15 | {{describe}}
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/checkbox-group/index.js:
--------------------------------------------------------------------------------
1 | import eventBus from"../core/utils/event-bus";import rules from"../behaviors/rules";Component({behaviors:["wx://form-field",rules],externalClasses:["l-class","l-error-text","l-error-text-class"],relations:{"../checkbox/index":{type:"child",linked(e){this.init(e)},linkChanged(){},unlinked(){}}},properties:{placement:{type:String,value:"column"},maxSelected:{type:Number,value:null},minSelected:{type:Number,value:null}},data:{},attached(){let{minSelected:e,maxSelected:t}=this.properties;this.checkMax(e,t)},methods:{init(e){void 0===this._keys&&(this._keys={}),void 0===this._selected&&(this._selected={}),this.checkDefaultItem(e),this.checkedKeyRepeat(e)},checkedKeyRepeat(e){let{key:t}=e.properties;if(this._keys[t])throw new Error("keys有重复元素, checkbox的key属性不能重复:"+t);this._keys[t]=!0},checkDefaultItem(e){const{key:t,checked:l,cell:s}=e.properties;l&&(this._selected[t]={...s,checked:!0,value:t})},checkMax(e,t){if(null!==e&&e<0)throw new Error("最小选择个数必须大于等于0");if(null!==t&&t<0)throw new Error("最多选择个数必须大于0");if(null!==t&&null!==e&&e>=t)throw new Error("最多选择个数必须大于最小选择个数")},onEmitEventHandle(e){e.checked?this.addSelect(e):this.removeSelect(e.key),this.validatorData({[this.data.name]:Object.values(this._selected)}),this.triggerEvent("linchange",e,{bubbles:!0,composed:!0}),eventBus.emit("lin-form-change-"+this.id,this.id)},onEmitOverflowHandle(e){this.triggerEvent("linout",e,{bubbles:!0,composed:!0})},removeSelect(e){delete this._selected[e]},addSelect(e){let{key:t,...l}=e;this._selected[t]={...l,value:t}},getValues(){return Object.values(this._selected)},reset(){this._selected={};return this.getRelationNodes("../checkbox/index").forEach(e=>e.setData({checked:!1}))}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/checkbox-group/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-error-tip":"../error-tip/index","l-checkbox":"../checkbox/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/checkbox-group/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/checkbox-group/index.wxss:
--------------------------------------------------------------------------------
1 | .checkbox-group{flex-wrap:wrap}.checkbox-group-row{display:flex;flex-direction:row}.checkbox-group-column{display:flex;flex-direction:column}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/checkbox/index.js:
--------------------------------------------------------------------------------
1 | Component({behaviors:["wx://form-field"],externalClasses:["l-class","l-disabled-class","l-icon-class"],relations:{"../checkbox-group/index":{type:"parent"}},options:{multipleSlots:!0},properties:{placement:{type:String,value:"left"},custom:{type:Boolean,value:!1},key:{type:String,value:""},cell:{type:Object,value:{}},size:{type:String,value:"38rpx"},disabled:{type:Boolean,value:!1},selectColor:{type:String,value:"#3963BC"},disabledColor:{type:String,value:"#ccc"},color:{type:String,value:"#ccc"},checked:{type:Boolean,value:!1}},data:{parentPlacement:""},ready(){const e=this.getRelationNodes("../checkbox-group/index")[0];let{placement:t}=e.properties;this.setData({parentPlacement:t})},methods:{onCheckboxChangeTap(){if(this.properties.disabled||this.data.parentDisabled)return;const e=this.getRelationNodes("../checkbox-group/index")[0];if(this.properties.checked){if(this.isOverflow("minSelected"))return}else if(this.isOverflow("maxSelected"))return;const t={checked:!this.properties.checked,key:this.properties.key,cell:this.properties.cell};e&&e.onEmitEventHandle(t)},isOverflow(e){const t=this.getRelationNodes("../checkbox-group/index")[0],l=t.properties[e];if(!l)return!1;const i=Object.values(t._selected).length;let o="minSelected"===e?i<=l:i>=l;if(o){let i="minSelected"===e?"min_selected":"max_selected";t.onEmitOverflowHandle&&t.onEmitOverflowHandle({key:this.properties.key,limitNumber:l,type:"overflow_"+i})}return o}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/checkbox/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-button":"../button/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/checkbox/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/checkbox/index.wxss:
--------------------------------------------------------------------------------
1 | .label{display:flex;flex:1;align-items:center;font-size:30rpx;color:#333;width:100%;box-sizing:border-box}.label-left{flex-direction:row}.label-right{flex-direction:row-reverse;justify-content:space-between}.label-disabled{color:#ccc}.label-placement-row{padding-right:30rpx}.checkbox-left{margin-right:20rpx}.checkbox-right{margin-left:20rpx}.iconfont{font-family:iconfont!important;display:inline-flex;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMMAAsAAAAABxgAAAK9AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBeIFdATYCJAMMCwgABCAFhG0HQBstBlGUzMkA2c8E020e0uBCKA1ReoTOr2jhX60Fez8evvb7nbu7X40GSTTS8S6aRBOpkCB1plMyIWkJb/+nLTemUXn+tjy1proDbGd+u9OXhuW20ygDQoJwOPhjfw50kxP0dlsW4tKSEtLyKhWqIpT/3MKy5KTZgMvpr8TnWZbTWts2jgmYYEBjDHuKrEQCzjUF2R2BWvJ9Am0LeioHm9MVtBXOskC8RIED7VJMUaRiU6i37C3iHV4zvaZPKG/x5+OfLdoktcxZe/S89mH27bv8VD0phAT5ch5Ih8jYBApx3eq7Uktzm2rahqZu1oO6IqSlklVFLDMN9YP+8RJR55R2wSrNJ775IoLvWEgggzoKDoFYipp4U38JhsVnsZqMDSLDTR9O5v6lxM+emWKnJ0j1WkJfv81PpvtdvqfbrTPuXw1+/Yswbx81bvFu4GNdLq7/WnYQrkR7OT7DTrwSHIOw0QhHGI+BEQb/TCiV/n/7MQFAQ9mO3iwSi9Gz9MCEpIu0tWgZiFkilLN8tRFgA1SnfMgz8o0Kgo9Q+Gcx3f/tTgFfe45JtDoVFO7QvAt/8FflYE8xlY49F13my+xAtjTRk6ASOahCOaGxn+mGGVxKaJrlSBrmkTUtkoWziZqOLdQ1baNtw/Zwx4SoidLCuneCMPSBpO8T2dAXWTjfqJnzi7ph1NB2EdwzO5Yj6oaEHCUf3UeMPM6N59RuUn6m4DZ1pKiMuTckZZTE8WBULW4pJ1liQ3kXTFQNGuEMN+QxSlPGQjgmTwehajEdDk3biwYeZ9C1TxCHIj7keoQiHpYz4XDVrb3/jARupRzS09AQv0FEKRodjQ2MAHKry6GGR2FTuhOYUMpAhmAZtCEekro5hor2WTHiUQPhhExhasgGGVQ32N6Q/UCp1ILzXI4UOYrOQ0he4vKDxXk7twIAAAAA') format('woff2')}.icon-unselect:before{content:"\e727"}.icon-select:before{content:"\e725"}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/circle/index.js:
--------------------------------------------------------------------------------
1 | Component({externalClasses:["l-value-class"],properties:{percent:{type:Number,value:0},outerDiameter:{type:Number,value:220},innerDiameter:{type:Number,value:170},activeColor:{type:String},backgroundColor:{type:String,value:"#EBEBEB"},innerColor:{type:String,value:"#FFFFFF"},active:{type:Boolean,value:!1},duration:{type:Number,value:30},showValue:{type:Boolean,value:!1},valueColor:{type:String},valueSize:{type:Number,value:25}},options:{multipleSlots:!0,pureDataPattern:/^_/},data:{displayPercent:0},observers:{percent:async function(e){if(e>100)this.setData({percent:100});else if(e<0)this.setData({percent:0});else if(this.data.active){let t=this.data.displayPercent;if(te)for(;t>e;)await this.sleep(this.data.duration),t-=1,this.setData({displayPercent:t})}else this.setData({displayPercent:e})},outerDiameter:function(e){enew Promise(t=>{setTimeout(t,e)})}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/circle/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/circle/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{displayPercent}}%
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/circle/index.wxss:
--------------------------------------------------------------------------------
1 | .sector{position:relative;border-radius:50%;overflow:hidden;display:flex;justify-content:center;align-items:center}.sx1,.sx2{position:absolute;top:0;left:0}.sx1{z-index:1}.sx2{z-index:2}.sx_t{border-radius:50%;z-index:3;display:flex;flex-direction:row;justify-content:center;align-items:center}.sector1{background:#3963bc}.sector2 .sx1,.sector2 .sx2{background:#3963bc;transform:rotate(180deg)}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/collapse-item/index.js:
--------------------------------------------------------------------------------
1 | import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-class","l-title-class","l-body-class"],relations:{"../collapse/index":{type:"parent"}},options:{multipleSlots:!0,pureDataPattern:/^_/},properties:{itemId:{type:String,value:"default"},title:{type:String,value:"默认标题"},customTitle:{type:Boolean,value:!1},disable:{type:Boolean,value:!1},animationTime:{type:String,value:"0.3"}},data:{bodyHeight:"0",isExpandContent:!1,_idDefault:-1},methods:{async onTapTitle(){if(this.data.disable)return;let t=this.getRelationNodes("../collapse/index");await t[0].onTapCollapseItem(this)},async foldContent(){const t=await nodeUtil.getNodeRectFromComponent(this,".container-body-wrapper");this.data.isExpandContent?(this.setData({bodyHeight:t.height+"px"}),setTimeout(()=>{this.setData({isExpandContent:!1,bodyHeight:"0px"})},20)):this.setData({isExpandContent:!1,bodyHeight:"0px"})},async expandContent(){const t=await nodeUtil.getNodeRectFromComponent(this,".container-body-wrapper");this.setData({isExpandContent:!0,bodyHeight:t.height+"px"})},onTransitionend(){this.data.isExpandContent&&this.setData({bodyHeight:"auto"})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/collapse-item/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-list":"../list/index","l-icon":"../icon/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/collapse-item/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/collapse-item/index.wxss:
--------------------------------------------------------------------------------
1 | .container{display:flex;flex-direction:column;width:100%;box-sizing:border-box}.container-title{display:flex;justify-content:space-between;padding:10rpx;align-items:center;font-size:32rpx;color:#333}.container-title-l-icon{transition:.3s}.container-body{width:100%;color:#888;box-sizing:border-box;font-size:28rpx;transition:height .3s ease-in-out;overflow:hidden}.container-body-wrapper{position:relative;padding:10rpx}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/collapse/index.js:
--------------------------------------------------------------------------------
1 | Component({options:{pureDataPattern:/^_/},relations:{"../collapse-item/index":{type:"child",linked:function(){this._setAllItemId()},linkChanged:function(){this._setAllItemId()},unlinked:function(){this._setAllItemId()}}},lifetimes:{ready:function(){this.updateView()}},properties:{type:{type:String,value:"normal"},expandItemId:{type:Array,value:[]}},data:{_expandItems:[]},observers:{expandItemId:function(){this.updateView()}},methods:{async updateView(){let t;t="accordion"===this.data.type?this.data.expandItemId.slice(0,1):this.data.expandItemId;let e=this.getRelationNodes("../collapse-item/index");for(let a=0;a-1&&!d.isExpandContent?await this.setCollapseItemStatus(d,!0):(d.isExpandContent||"accordion"===this.data.type)&&await this.setCollapseItemStatus(d,!1)}},async onTapCollapseItem(t){"accordion"===this.data.type&&await this.foldAllExpandItem(t),this.setCollapseItemStatus(t,!t.data.isExpandContent),t.data.isExpandContent?this.triggerEvent("linfold",{id:t.data.itemId?t.data.itemId:t.data._idDefault}):this.triggerEvent("linexpand",{id:t.data.itemId?t.data.itemId:t.data._idDefault})},async setCollapseItemStatus(t,e){if(e)t.expandContent(),this.data._expandItems.push(t);else{await t.foldContent();for(let e=0;e{t.data._idDefault=e})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/collapse/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/collapse/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/collapse/index.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/collapse/index.wxss
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/combined-tabs/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index","l-badge":"../badge/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/messages.js:
--------------------------------------------------------------------------------
1 | export function newMessages(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone(){const s=JSON.parse(JSON.stringify(this));return s.clone=this.clone,s}}}export const messages=newMessages();
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/rule/enum.js:
--------------------------------------------------------------------------------
1 | import*as util from"../util";const ENUM="enum";function enumerable(e,u,n,m,r){e.enum=Array.isArray(e.enum)?e.enum:[],-1===e.enum.indexOf(u)&&m.push(util.format(r.messages.enum,e.fullField,e.enum.join(", ")))}export default enumerable;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/rule/index.js:
--------------------------------------------------------------------------------
1 | import required from"./required.js";import whitespace from"./whitespace.js";import type from"./type.js";import range from"./range.js";import enumRule from"./enum.js";import pattern from"./pattern.js";export default{required:required,whitespace:whitespace,type:type,range:range,enum:enumRule,pattern:pattern};
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/rule/pattern.js:
--------------------------------------------------------------------------------
1 | import*as util from"../util";function pattern(t,e,a,p,n){if(t.pattern)if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(e)||p.push(util.format(n.messages.pattern.mismatch,t.fullField,e,t.pattern));else if("string"==typeof t.pattern){new RegExp(t.pattern.replace(/^\/|\/$/g,"")).test(e)||p.push(util.format(n.messages.pattern.mismatch,t.fullField,e,t.pattern))}}export default pattern;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/rule/range.js:
--------------------------------------------------------------------------------
1 | import*as util from"../util";function range(e,l,n,m,t){const u="number"==typeof e.len,r="number"==typeof e.min,a="number"==typeof e.max,i=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;let s=l,f=null;const o="number"==typeof l,g="string"==typeof l,p=Array.isArray(l);if(o?f="number":g?f="string":p&&(f="array"),!f)return!1;p&&(s=l.length),g&&(s=l.replace(i,"_").length),u?s!==e.len&&m.push(util.format(t.messages[f].len,e.fullField,e.len)):r&&!a&&se.max?m.push(util.format(t.messages[f].max,e.fullField,e.max)):r&&a&&(se.max)&&m.push(util.format(t.messages[f].range,e.fullField,e.min,e.max))}export default range;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/rule/required.js:
--------------------------------------------------------------------------------
1 | import*as util from"../util";function required(e,r,i,u,t,l){!e.required||i.hasOwnProperty(e.field)&&!util.isEmptyValue(r,l||e.type)||u.push(util.format(t.messages.required,e.fullField))}export default required;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/rule/type.js:
--------------------------------------------------------------------------------
1 | import*as util from"../util";import required from"./required";const pattern={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},types={integer:e=>types.number(e)&&parseInt(e,10)===e,float:e=>types.number(e)&&!types.integer(e),array:e=>Array.isArray(e),regexp(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:e=>"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear,number:e=>!isNaN(e)&&""!==e,object:e=>"object"==typeof e&&!types.array(e),method:e=>"function"==typeof e,email:e=>"string"==typeof e&&!!e.match(pattern.email)&&e.length<255,url:e=>"string"==typeof e&&!!e.match(pattern.url),hex:e=>"string"==typeof e&&!!e.match(pattern.hex)};function type(e,t,r,a,f){if(e.required&&void 0===t)return void required(e,t,r,a,f);const p=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(p)>-1?types[p](t)||a.push(util.format(f.messages.types[p],e.fullField,e.type)):p&&typeof t!==e.type&&a.push(util.format(f.messages.types[p],e.fullField,e.type))}export default type;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/rule/whitespace.js:
--------------------------------------------------------------------------------
1 | import*as util from"../util";function whitespace(t,e,s,i,a){(/^\s+$/.test(e)||""===e)&&i.push(util.format(a.messages.whitespace,t.fullField))}export default whitespace;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/validator/array.js:
--------------------------------------------------------------------------------
1 | import rules from"../rule/index.js";import{isEmptyValue}from"../util";function array(r,e,a,u,i){const t=[];if(r.required||!r.required&&u.hasOwnProperty(r.field)){if(isEmptyValue(e,"array")&&!r.required)return a();rules.required(r,e,u,t,i,"array"),isEmptyValue(e,"array")||(rules.type(r,e,u,t,i),rules.range(r,e,u,t,i))}a(t)}export default array;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/validator/boolean.js:
--------------------------------------------------------------------------------
1 | import{isEmptyValue}from"../util";import rules from"../rule/index.js";function boolean(e,r,i,u,o){const t=[];if(e.required||!e.required&&u.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,u,t,o),void 0!==r&&rules.type(e,r,u,t,o)}i(t)}export default boolean;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/validator/date.js:
--------------------------------------------------------------------------------
1 | import rules from"../rule/index.js";import{isEmptyValue}from"../util";function date(e,r,t,i,u){const l=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return t();if(rules.required(e,r,i,l,u),!isEmptyValue(r)){let t;t="number"==typeof r?new Date(r):r,rules.type(e,t,i,l,u),t&&rules.range(e,t.getTime(),i,l,u)}}t(l)}export default date;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/validator/enum.js:
--------------------------------------------------------------------------------
1 | import rules from"../rule/index.js";import{isEmptyValue}from"../util";const ENUM="enum";function enumerable(e,r,u,i,t){const l=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return u();rules.required(e,r,i,l,t),r&&rules.enum(e,r,i,l,t)}u(l)}export default enumerable;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/validator/float.js:
--------------------------------------------------------------------------------
1 | import rules from"../rule/index.js";import{isEmptyValue}from"../util";function floatFn(e,r,i,u,t){const l=[];if(e.required||!e.required&&u.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,u,l,t),void 0!==r&&(rules.type(e,r,u,l,t),rules.range(e,r,u,l,t))}i(l)}export default floatFn;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/validator/index.js:
--------------------------------------------------------------------------------
1 | import string from"./string";import method from"./method";import number from"./number";import boolean from"./boolean";import regexp from"./regexp";import integer from"./integer";import float from"./float";import array from"./array";import object from"./object";import enumValidator from"./enum";import pattern from"./pattern";import date from"./date";import required from"./required";import type from"./type";export default{string:string,method:method,number:number,boolean:boolean,regexp:regexp,integer:integer,float:float,array:array,object:object,enum:enumValidator,pattern:pattern,date:date,url:type,hex:type,email:type,required:required};
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/validator/integer.js:
--------------------------------------------------------------------------------
1 | import rules from"../rule/index.js";import{isEmptyValue}from"../util";function integer(e,r,i,u,t){const l=[];if(e.required||!e.required&&u.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,u,l,t),void 0!==r&&(rules.type(e,r,u,l,t),rules.range(e,r,u,l,t))}i(l)}export default integer;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/validator/method.js:
--------------------------------------------------------------------------------
1 | import rules from"../rule/index.js";import{isEmptyValue}from"../util";function method(e,r,i,t,u){const o=[];if(e.required||!e.required&&t.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,t,o,u),void 0!==r&&rules.type(e,r,t,o,u)}i(o)}export default method;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/validator/number.js:
--------------------------------------------------------------------------------
1 | import rules from"../rule/index.js";import{isEmptyValue}from"../util";function number(e,r,u,i,t){const l=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return u();rules.required(e,r,i,l,t),void 0!==r&&(rules.type(e,r,i,l,t),rules.range(e,r,i,l,t))}u(l)}export default number;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/validator/object.js:
--------------------------------------------------------------------------------
1 | import rules from"../rule/index.js";import{isEmptyValue}from"../util";function object(e,r,i,t,u){const o=[];if(e.required||!e.required&&t.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,t,o,u),void 0!==r&&rules.type(e,r,t,o,u)}i(o)}export default object;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/validator/pattern.js:
--------------------------------------------------------------------------------
1 | import rules from"../rule/index.js";import{isEmptyValue}from"../util";function pattern(r,e,t,i,u){const n=[];if(r.required||!r.required&&i.hasOwnProperty(r.field)){if(isEmptyValue(e,"string")&&!r.required)return t();rules.required(r,e,i,n,u),isEmptyValue(e,"string")||rules.pattern(r,e,i,n,u)}t(n)}export default pattern;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/validator/regexp.js:
--------------------------------------------------------------------------------
1 | import rules from"../rule/index.js";import{isEmptyValue}from"../util";function regexp(e,r,i,u,t){const l=[];if(e.required||!e.required&&u.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,u,l,t),isEmptyValue(r)||rules.type(e,r,u,l,t)}i(l)}export default regexp;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/validator/required.js:
--------------------------------------------------------------------------------
1 | import rules from"../rule/index.js";function required(r,e,u,i,o){const t=[],a=Array.isArray(e)?"array":typeof e;rules.required(r,e,i,t,o,a),u(t)}export default required;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/validator/string.js:
--------------------------------------------------------------------------------
1 | import rules from"../rule/index.js";import{isEmptyValue}from"../util";function string(e,r,i,t,s){const u=[];if(e.required||!e.required&&t.hasOwnProperty(e.field)){if(isEmptyValue(r,"string")&&!e.required)return i();rules.required(e,r,t,u,s,"string"),isEmptyValue(r,"string")||(rules.type(e,r,t,u,s),rules.range(e,r,t,u,s),rules.pattern(e,r,t,u,s),!0===e.whitespace&&rules.whitespace(e,r,t,u,s))}i(u)}export default string;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/common/async-validator/validator/type.js:
--------------------------------------------------------------------------------
1 | import rules from"../rule/index.js";import{isEmptyValue}from"../util";function type(e,r,t,i,u){const p=e.type,l=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(r,p)&&!e.required)return t();rules.required(e,r,i,l,u,p),isEmptyValue(r,p)||rules.type(e,r,i,l,u)}t(l)}export default type;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/core/behaviors/doNothingBehavior.js:
--------------------------------------------------------------------------------
1 | export default Behavior({methods:{doNothing(){}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/core/utils/data-util.js:
--------------------------------------------------------------------------------
1 | class DataUtil{setDiffData(t,a){const e={};Object.keys(a).forEach(s=>{t.data[s]!==a[s]&&(e[s]=a[s])}),Object.keys(e).length&&t.setData(e)}}const dataUtil=new DataUtil;export default dataUtil;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/core/utils/event-bus.js:
--------------------------------------------------------------------------------
1 | function EventBusClass(){this.msgQueues={}}EventBusClass.prototype={on:function(s,e){Object.prototype.hasOwnProperty.call(this.msgQueues,s)?"function"==typeof this.msgQueues[s]?this.msgQueues[s]=[this.msgQueues[s],e]:this.msgQueues[s]=[...this.msgQueues[s],e]:this.msgQueues[s]=e},one:function(s,e){this.msgQueues[s]=e},emit:function(s,e){Object.prototype.hasOwnProperty.call(this.msgQueues,s)&&("function"==typeof this.msgQueues[s]?this.msgQueues[s](e):this.msgQueues[s].map(s=>{s(e)}))},off:function(s){Object.prototype.hasOwnProperty.call(this.msgQueues,s)&&delete this.msgQueues[s]}};const EventBus=new EventBusClass;export default EventBus;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/core/utils/event-util.js:
--------------------------------------------------------------------------------
1 | class EventUtil{emit(e,t,l){e.triggerEvent(t,l,{bubbles:!0,composed:!0,capturePhase:!0})}}const eventUtil=new EventUtil;export default eventUtil;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/core/utils/node-util.js:
--------------------------------------------------------------------------------
1 | class NodeUtil{async getNodeRectFromComponent(e,t){return await new Promise(o=>{e.createSelectorQuery().select(t).boundingClientRect(e=>{o(e)}).exec()})}async getNodesRectFromComponent(e,t){return await new Promise(o=>{e.createSelectorQuery().selectAll(t).boundingClientRect(e=>{o(e)}).exec()})}async getNodeFieldsFromComponent(e,t,o){return await new Promise(n=>{e.createSelectorQuery().select(t).fields(o,e=>{n(e)}).exec()})}}const nodeUtil=new NodeUtil;export default nodeUtil;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/core/utils/pixel-util.js:
--------------------------------------------------------------------------------
1 | class PixelUtil{constructor(t){this.systemInfo=t}px2rpx(t){return 750/this.systemInfo.screenWidth*t}rpx2px(t){return t/750*this.systemInfo.screenWidth}}const pixelUtil=new PixelUtil(wx.getSystemInfoSync());export default pixelUtil;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/countdown/index.js:
--------------------------------------------------------------------------------
1 | import countDownBehaviors from"../behaviors/countdown";Component({externalClasses:["l-class","l-class-time","l-time-class"],behaviors:[countDownBehaviors],properties:{doneText:{type:String,value:"已结束"}},methods:{}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/countdown/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{} }
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/countdown/index.wxml:
--------------------------------------------------------------------------------
1 |
2 | {{item.value}}{{item.name}}
3 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/countdown/index.wxss:
--------------------------------------------------------------------------------
1 | .l-countdown{font-size:28rpx;line-height:40px}.l-countdown-item{display:inline-block;color:inherit}.l-countdown-time{display:inline-flex;width:56rpx;height:56rpx;background:#45526b;border-radius:4rpx;color:#fff;align-items:center;justify-content:center;margin:0 16rpx}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/counter/index.js:
--------------------------------------------------------------------------------
1 | import eventUtil from"../core/utils/event-util";Component({externalClasses:["l-class","l-symbol-class","l-count-class","l-disabled-class"],properties:{count:{type:Number,value:1},max:{type:Number,value:9999},min:{type:Number,value:1},step:{type:Number,value:1},disabled:Boolean,iconSize:String,iconColor:String},data:{focus:!1},observers:{count:function(t){eventUtil.emit(this,"linchange",{count:t})},"count,min,max":function(){this.valueRange(this.data.count,"parameter")}},methods:{doNothing(t){const{type:e}=t.currentTarget.dataset;eventUtil.emit(this,"linout",{type:e,way:"icon"})},onCount(){this.setData({focus:!0})},onBlur(t){let{value:e}=t.detail;setTimeout(()=>{this.blurCount(Number(e),()=>{eventUtil.emit(this,"lintap",{count:this.data.count,type:"blur"})})},50)},blurCount(t,e){t&&this.valueRange(t),e&&e()},valueRange(t,e="input"){const{count:n,min:a,max:i}=this.data;"parameter"===e&&t>i&&console.error(`Counter 组件:初始值 ${n} 大于了最大值 ${i},请注意修正`),"parameter"===e&&ti&&eventUtil.emit(this,"linout",{type:"overflow_max",way:e}),ti?i:t){this.setData({focus:!1})})},onTapChange(t){const e=t.currentTarget.dataset.changeType,{count:n,step:a,min:i,max:o}=this.data;let s;"add"===e?s=n+a>o?o:n+a:"reduce"===e&&(s=n-a
2 |
3 |
4 |
5 |
6 | {{count}}
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/custom-tab-bar/index.js:
--------------------------------------------------------------------------------
1 | Component({properties:{position:{type:String,value:"bottom"},show:{type:Boolean,value:!0},selected:{type:Number,value:0},color:{type:String,value:"#707070"},selectedColor:{type:String,value:"3963BC"},borderStyle:{type:String,value:"#f6f6f6"},backgroundColor:{type:String,value:"#fff"},backgroundImg:{type:String,value:""},fontSize:{type:Number,value:24},isRedirectToTab:{type:Boolean,value:!0},isNav:{type:Boolean,value:!0},list:{type:Array,value:[]}},data:{},attached(){},methods:{switchTab(t){const e=t.currentTarget.dataset,a=e.path;this.data.isNav&&(this.data.isRedirectToTab,wx.switchTab({url:a})),this.showItem(e.index)},show(){this.setData({show:!0})},hide(){this.setData({show:!1})},showItem(t){this.setData({selected:t});let e={idx:t,path:this.route};this.triggerEvent("lintap",e,{bubbles:!0,composed:!0})},showRedDot(t){const e=`list[${t}].redDot`;this.setData({[e]:!0})},hideRedDot(t){const e=`list[${t}].redDot`;this.setData({[e]:!1})},setTabBarBadge(t,e){const a=`list[${t}].badge`;this.setData({[a]:e})},removeTabBarBadge(t){const e=`list[${t}].badge`;this.setData({[e]:""})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/custom-tab-bar/index.json:
--------------------------------------------------------------------------------
1 | {"component":true}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/custom-tab-bar/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{item.text}}
10 |
11 | {{item.badge}}
12 |
13 |
14 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/custom-tab-bar/index.wxss:
--------------------------------------------------------------------------------
1 | .tab-bar{position:relative;height:110rpx;width:750rpx;background:#fff;display:flex;flex-direction:row;background-position:center center;background-size:100% 100%;padding-bottom:env(safe-area-inset-bottom)}.tab-bar-bottom{position:fixed!important;bottom:0;left:0;right:0}.tab-bar-border{position:absolute;left:0;top:0;width:100%;display:flex;flex-direction:row;height:1rpx;background:#f6f6f6;box-shadow:0 -1px 3px 1px #f6f6f6}.tab-bar-item{position:relative;flex:1;text-align:center;display:flex;justify-content:center;align-items:center;flex-direction:column}.item-circle{width:120rpx;height:60rpx;background-color:#fff;border-radius:200rpx 200rpx 0 0;border-bottom:none;background:#fff;position:absolute;top:-40rpx;box-shadow:0 -1px 1px 0 #f6f6f6}.tab-bar-item-image{width:64rpx;height:64rpx}.tab-bar-item view{font-size:24rpx}.reddot{height:20rpx;width:20rpx;background:red;border-radius:50%;position:absolute;top:15rpx;margin-left:25rpx}.badge{height:32rpx;line-height:32rpx;padding:0rpx 6rpx;background:red;border-radius:16rpx;position:absolute;font-size:18rpx;color:#fff;top:10rpx;margin-left:25rpx;box-sizing:border-box}.center-circle{height:100rpx;width:100rpx;border-radius:50%;position:absolute;top:-30rpx}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/dialog/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-popup":"../popup/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/dialog/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{title}}
5 |
6 |
7 | {{content}}
8 |
9 |
10 | {{cancelText}}
11 | {{confirmText}}
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/dialog/index.wxss:
--------------------------------------------------------------------------------
1 | .dialog-container{display:flex;flex-direction:column;align-items:center;width:520rpx;background:#fff;border-radius:12rpx}.dialog-title{font-size:32rpx;font-family:PingFangSC-Regular;color:#45526b;line-height:44rpx;margin-top:30rpx;padding:0 25rpx;text-align:center}.dialog-content{font-size:28rpx;font-family:PingFangSC-Regular;line-height:40rpx;margin-top:30rpx;margin-bottom:30rpx;display:flex;flex-direction:column;align-items:center;padding:0 25rpx}.dialog-btn-group{width:100%;height:80rpx;display:flex;flex-direction:row;justify-content:space-between;align-items:center}.dialog-btn-cancel{font-size:28rpx;height:80rpx;width:259rpx;border-right:2rpx solid #f3f3f3;display:flex;flex-direction:row;align-items:center;justify-content:center;border-top:2rpx solid #f3f3f3}.dialog-btn-confirm{font-size:28rpx;flex:1;color:#3963bc;height:80rpx;display:flex;flex-direction:row;align-items:center;justify-content:center;border-top:2rpx solid #f3f3f3}.active{color:#3683d6}.leave{color:#45526b}.group-hover{opacity:.8}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/error-tip/index.js:
--------------------------------------------------------------------------------
1 | Component({externalClasses:["l-error-text","l-error-text-class"],properties:{errorText:String},data:{},methods:{}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/error-tip/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{} }
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/error-tip/index.wxml:
--------------------------------------------------------------------------------
1 | {{errorText}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/error-tip/index.wxss:
--------------------------------------------------------------------------------
1 | .error-text{font-size:22rpx;color:#f4516c;margin-right:20rpx;line-height:2}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/filter/classnames.wxs:
--------------------------------------------------------------------------------
1 | var is = require('./is.wxs');
2 | var object = require('./object.wxs');
3 |
4 | function apply(fun, args) {
5 | return args.map(function (item) {
6 | return fun(item)
7 | })
8 | }
9 |
10 | function classnames() {
11 | var classes = [];
12 | for (var i = 0; i < arguments.length; i++) {
13 | var arg = arguments[i];
14 | if (!arg) continue;
15 | if (is.isString(arg) || is.isNumber(arg)) {
16 | classes.push(arg);
17 | } else if (is.isArray(arg) && arg.length) {
18 | var inner = apply(classnames, arg);
19 | if (inner) {
20 | classes.push(inner);
21 | }
22 | } else if (is.isObject(arg)) {
23 | object.keys(arg).forEach(function (key) {
24 | if (arg[key]) {
25 | classes.push(key);
26 | }
27 | })
28 | }
29 | }
30 | return classes.join(' ');
31 | }
32 |
33 | module.exports = classnames;
34 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/filter/is.wxs:
--------------------------------------------------------------------------------
1 | var TYPE = {
2 | NULL: 'null',
3 | UNDEFINED: 'undefined',
4 | NUMBER: 'Number',
5 | STRING: 'String',
6 | BOOLEAN: 'Boolean',
7 | OBJECT: 'Object',
8 | FUNCTION: 'Function',
9 | ARRAY: 'Array',
10 | DATE: 'Date',
11 | REGEXP: 'RegExp'
12 | }
13 |
14 | function isUndefined(val) {
15 | return TYPE.UNDEFINED === typeof val;
16 | }
17 |
18 | function isNull(val) {
19 | return val === TYPE.NULL;
20 | }
21 |
22 | function _jadgeFun(val, type) {
23 | if (isUndefined(val) || isNull(val)) return false;
24 | return TYPE[type] === val.constructor;
25 | }
26 |
27 | function isNumber(val) {
28 | return _jadgeFun(val, 'NUMBER');
29 | }
30 |
31 | function isString(val) {
32 | return _jadgeFun(val, 'STRING');
33 | }
34 |
35 | function isBoolean(val) {
36 | return _jadgeFun(val, 'BOOLEAN');
37 | }
38 |
39 | function isObject(val) {
40 | return _jadgeFun(val, 'OBJECT');
41 | }
42 |
43 | function isFunction(val) {
44 | return _jadgeFun(val, 'FUNCTION');
45 | }
46 |
47 | function isArray(val) {
48 | return _jadgeFun(val, 'ARRAY');
49 | }
50 |
51 | function isDate(val) {
52 | return _jadgeFun(val, 'DATE');
53 | }
54 |
55 | function isRegExp(val) {
56 | return _jadgeFun(val, 'REGEXP');
57 | }
58 |
59 | module.exports = {
60 | isNull: isNull,
61 | isUndefined: isUndefined,
62 | isNumber: isNumber,
63 | isString: isString,
64 | isBoolean: isBoolean,
65 | isObject: isObject,
66 | isFunction: isFunction,
67 | isArray: isArray,
68 | isDate: isDate,
69 | isRegExp: isRegExp
70 | }
71 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/filter/object.wxs:
--------------------------------------------------------------------------------
1 | var REGEXP = getRegExp('{|}|"', 'g');
2 |
3 | function keys(obj) {
4 | return JSON.stringify(obj)
5 | .replace(REGEXP, '')
6 | .split(',')
7 | .map(function(item) {
8 | return item.split(':')[0];
9 | });
10 | }
11 |
12 | module.exports.keys = keys;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/filter/zero-padding.wxs:
--------------------------------------------------------------------------------
1 | function zeroPadding(num, length = 2) {
2 | if((num + "").length >= length) {
3 | return num;
4 | }
5 | return zeroPadding("0" + num, length)
6 | }
7 |
8 | module.exports = zeroPadding;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/form-item/index.js:
--------------------------------------------------------------------------------
1 | import rules from"../behaviors/rules";Component({options:{multipleSlots:!0},externalClasses:["l-form-item-class","l-form-label-class","l-form-content-class","l-error-text-class"],behaviors:[rules],relations:{"../form/index":{type:"parent",linked:function(){},linkChanged:function(){},unlinked:function(){}}},properties:{label:String,labelPlacement:{type:String,value:"row"},alignItems:{type:String,value:"start"},labelWidth:{type:String,value:"auto"},labelSlot:{type:Boolean,value:!1},name:{type:String,value:""}},data:{isRequired:!1},attached(){this.initRules(),this.isRequired()},methods:{isRequired(){this.data.rules.forEach(e=>{e.required&&this.setData({isRequired:!0})})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/form-item/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-error-tip":"../error-tip/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/form-item/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{label}}
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/form-item/index.wxss:
--------------------------------------------------------------------------------
1 | .form-item-container{display:flex;border-bottom:1px solid #eee;color:#777;padding:0 20rpx;position:relative}.form-item-container.textHeight{margin-bottom:44rpx}.form-item-container.label-column{align-items:left;flex-direction:column}.form-item-container.label-column .label-text{line-height:44rpx}.form-item-container.label-row{align-items:center;flex-direction:row}.form-item-container.label-row .label-text{line-height:88rpx}.form-item-container .label-text{display:flex;line-height:88rpx}.form-item-container .label-text-column-start{justify-content:flex-start}.form-item-container .label-text-column-end{justify-content:flex-end}.form-item-container .label-text-column-center{justify-content:center}.form-item-container .label-text-row-start{justify-content:flex-start}.form-item-container .label-text-row-end{justify-content:flex-end}.form-item-container .label-text-row-center{justify-content:center}.form-item-container .label-content{flex:1}.form-item-container .label-text-required::before{display:inline-block;margin-right:4px;color:#f5222d;font-family:SimSun,sans-serif;content:'*'}.error-text{text-align:right;line-height:44rpx;color:#f56c6c;font-size:12px;position:absolute;top:100%;left:0;padding-left:24rpx}.row{display:none!important}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/form/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{} }
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/form/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/form/index.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/form/index.wxss
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/grid-item/index.js:
--------------------------------------------------------------------------------
1 | import dataUtil from"../core/utils/data-util";Component({relations:{"../grid/index":{type:"parent"}},externalClasses:["l-grid-item","l-grid-item-class"],properties:{key:String,cell:{type:Object,value:{}}},data:{index:0,isHover:!0},attached(){},observers:{key:function(){const t=this.getRelationNodes("../grid/index")[0];t&&(t.setData({gridItems:[],childNum:0}),t.initGrids())}},lifetimes:{ready(){const t=this.getRelationNodes("../grid/index")[0];t&&dataUtil.setDiffData(this,{isHover:t.data.isHover})}},methods:{tapGridItem(){this.triggerEvent("linitemtap",{...this.data},{bubbles:!0,composed:!0})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/grid-item/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/grid-item/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/grid-item/index.wxss:
--------------------------------------------------------------------------------
1 | .grid-item {
2 | display: flex;
3 | justify-content: center;
4 | align-items: center;
5 | flex-direction: column;
6 | padding: 32rpx 16rpx;
7 | box-sizing: border-box
8 | }
9 |
10 | .l-gird-item-hover {
11 | opacity: .8
12 | }
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/grid/index.js:
--------------------------------------------------------------------------------
1 | import hover from"../behaviors/hover";Component({options:{multipleSlots:!0},behaviors:[hover],relations:{"../grid-item/index":{type:"child",linked(){this.initGrids()},unlinked(){this.initGrids()}}},externalClasses:["l-class","l-class-grid","l-grid-class"],properties:{rowNum:{type:String,value:3},showBorder:Boolean,showColBorder:Boolean,showRowBorder:Boolean},data:{gridItems:[],childNum:0,currentIndex:-1,currentCell:-1},ready(){this.initGrids()},lifetimes:{show(){}},methods:{initGrids(){let e=this.getRelationNodes("../grid-item/index");if(this.data.childNum===e.length)return;const t=e.map((e,t)=>(e.setData({index:t}),{index:t,key:e.data.key,cell:e.data.cell}));this.setData({gridItems:t,childNum:e.length})},tapGridItem(e){const{gridIndex:t}=e.target.dataset;this.setData({currentIndex:t,currentCell:this.data.gridItems[t].cell})},tapGrid(){this.triggerEvent("lintap",{index:this.data.currentIndex,cell:this.data.currentCell},{bubbles:!0,composed:!0}),this.setData({currentIndex:-1,currentCell:-1})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/grid/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-grid-item":"../grid-item/index"} }
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/grid/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/grid/index.wxss:
--------------------------------------------------------------------------------
1 | .l-grid {
2 | display: flex;
3 | width: inherit;
4 | flex-wrap: wrap
5 | }
6 |
7 | .l-grid .l-grid-item {
8 | display: flex;
9 | justify-content: center;
10 | flex-direction: column;
11 | text-align: center;
12 | box-sizing: border-box;
13 | border-style: solid;
14 | border-color: #ededed;
15 | border-width: 0
16 | }
17 |
18 | .l-grid .center-grid {
19 | border-bottom-width: 2rpx
20 | }
21 |
22 | .l-grid .side-grid {
23 | border-right-width: 2rpx
24 | }
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/icon/index.js:
--------------------------------------------------------------------------------
1 | Component({externalClasses:["l-class"],options:{addGlobalClass:!0},properties:{name:String,color:{type:String,value:"#3963bc"},size:{type:String,value:"40"}},ready:function(){this.properties.name||console.error("请传入Icon组件的name属性")},methods:{}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/icon/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{} }
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/icon/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/image-clipper-tools/index.js:
--------------------------------------------------------------------------------
1 | Component({relations:{"../image-clipper/index":{type:"parent"}},externalClasses:["l-class"],properties:{zIndex:{type:Number,value:999},lockWidth:{type:Boolean,value:!1},lockHeight:{type:Boolean,value:!1},lockRatio:{type:Boolean,value:!1},disableScale:{type:Number,value:!1},disableRotate:{type:Number,value:!1},limitMove:{type:Boolean,value:!1}},data:{formColor:"#3963bc",lockWidthValue:!1,lockHeightValue:!1,lockRatioValue:!0,disableScaleValue:!1,disableRotateValue:!1,limitMoveValue:!1},methods:{bindSwitchChange:async function(e){const a=e.detail.value,l=e.currentTarget.dataset.type;let t=this.getRelationNodes("../image-clipper/index")[0];await t.setData({[l]:a})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/image-clipper-tools/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/image-clipper-tools/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 锁定裁剪框宽
5 |
6 |
7 |
8 | 锁定裁剪框高
9 |
10 |
11 |
12 | 锁定裁剪框比例
13 |
14 |
15 |
16 | 限制移动范围
17 |
18 |
19 |
20 | 禁止缩放
21 |
22 |
23 |
24 | 禁止旋转
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/image-clipper-tools/index.wxss:
--------------------------------------------------------------------------------
1 | .tools-container{width:100%;padding:20rpx 40rpx;box-sizing:border-box}.tools-container .tools-form{margin-top:20rpx;display:flex;flex-wrap:wrap;color:#fff}.tools-container .tools-form .slider-wrapper{display:flex;align-items:center}.tools-container .tools-form .tools-switch{transform:scale(.7)}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/image-clipper/images/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/image-clipper/images/close.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/image-clipper/images/photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/image-clipper/images/photo.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/image-clipper/images/rotate-along.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/image-clipper/images/rotate-along.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/image-clipper/images/rotate-inverse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/image-clipper/images/rotate-inverse.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/image-clipper/images/sure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/image-clipper/images/sure.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/image-clipper/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/image-picker/image/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/image-picker/image/add.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/image-picker/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"styleIsolation":"apply-shared","usingComponents":{"l-icon":"../icon/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/image-picker/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/index-anchor/index.js:
--------------------------------------------------------------------------------
1 | import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-anchor-class"],options:{multipleSlots:!0,pureDataPattern:/^_/},relations:{"../index-list/index":{type:"parent"}},data:{anchorSlot:{height:-1},anchor:{height:0},anchorText:"",anchorStyle:"",anchorWrapperStyle:""},lifetimes:{attached(){this.parseAnchorSlotRect()}},methods:{async parseAnchorSlotRect(){const t=await nodeUtil.getNodeRectFromComponent(this,".anchor-slot");t?this.setData({"anchorSlot.height":t.height}):this.setData({"anchorSlot.height":0})},async parseAnchorRect(){const t=await nodeUtil.getNodeRectFromComponent(this,".anchor");t&&this.setData({"anchor.height":t.height})},setFixed(t,e){const a=`\n position:fixed;\n top:${t}rpx;\n `,o=`height:${e}px;`;this.setData({anchorStyle:a,anchorWrapperStyle:o})},setRelative(t){const e=`\n position:relative;\n transform: translate3d(0, ${t}px, 0);\n `;this.setData({anchorStyle:e})},clearStyle(){this.setData({anchorStyle:"",anchorWrapperStyle:""})},isRelative(){return this.data.anchorStyle.indexOf("relative")>0},isFixed(){return this.data.anchorStyle.indexOf("fixed")>0}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/index-anchor/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-index-list":"../index-list/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/index-anchor/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{anchorText}}
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/index-anchor/index.wxss:
--------------------------------------------------------------------------------
1 | .anchor-wrapper{width:100%}.anchor-wrapper .anchor{width:100%}.anchor-wrapper .anchor-default{width:100%;background-color:#f7f8fa;display:flex;align-items:center;padding:8rpx 0 8rpx 30rpx;font-size:26rpx;font-weight:700;color:#323132;box-sizing:border-box}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/index-list/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/index-list/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/index-list/index.wxss:
--------------------------------------------------------------------------------
1 | .index-list .sidebar{font-size:24rpx;position:fixed;right:30rpx;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center}.index-list .sidebar-item{width:40rpx;height:40rpx;border-radius:50%;display:flex;justify-content:center;align-items:center;margin-top:8rpx}.index-list .sidebar-item-active{color:#fff;background-color:#3963bc}.index-list .tip{width:90rpx;height:90rpx;background-color:#d8d8d8;border-radius:90px 90px 0;display:flex;justify-content:center;align-items:center;position:absolute;left:-160rpx;transform:rotate(-45deg) translateY(-35%)}.index-list .tip-text{font-size:30rpx;transform:rotate(45deg)}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/input/index.js:
--------------------------------------------------------------------------------
1 | import eventBus from"../core/utils/event-bus.js";import validator from"../behaviors/validator";import rules from"../behaviors/rules";Component({options:{multipleSlots:!0},behaviors:["wx://form-field",validator,rules],externalClasses:["l-class","l-label-class","l-error-text","l-error-text-class","l-input-class","l-row-class"],properties:{label:String,hideLabel:Boolean,labelCustom:Boolean,showRow:{type:Boolean,value:!0},required:Boolean,placeholder:String,type:{type:String,value:"text",options:["text","idcard","digit","password","number"]},value:String,colon:Boolean,focus:Boolean,clear:Boolean,maxlength:{type:Number,value:140},width:{type:Number,value:null},labelWidth:{type:Number,value:200},labelLayout:{type:String,value:"left",options:["left","right"]},disabled:Boolean,placeholderStyle:String,showEye:{type:Boolean,value:!1},adjustPosition:{type:Boolean,value:!0}},data:{},attached(){},methods:{handleInputChange(e){const{detail:t={}}=e,{value:a=""}=t;this.setData({value:a}),eventBus.emit("lin-form-change-"+this.id,this.id),this.triggerEvent("lininput",e.detail)},handleInputFocus(e){this.triggerEvent("linfocus",e.detail)},handleInputBlur(e){this.validatorData({[this.data.name]:e.detail.value}),eventBus.emit("lin-form-blur-"+this.id,this.id),this.triggerEvent("linblur",e.detail)},handleInputConfirm(e){const{detail:t={}}=e,{value:a=""}=t;this.setData({value:a}),this.triggerEvent("linconfirm",e.detail)},onClearTap(e){this.setData({value:""}),this.triggerEvent("linclear",e.detail)},getValues(){return this.data.value},reset(){this.setData({value:""})},onTapEyeIcon(){const e=this.data.type;"text"===e?this.setData({type:"password"}):"password"===e&&this.setData({type:"text"})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/input/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index","l-error-tip":"../error-tip/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/input/index.wxss:
--------------------------------------------------------------------------------
1 | .form-item{position:relative;font-size:28rpx;color:#333;height:88rpx;display:flex;flex-direction:row;align-items:center;padding-right:25rpx;box-sizing:border-box}.row{position:absolute;bottom:0;right:0;height:2rpx;width:730rpx;background:#f3f3f3}.text-require{color:#e23;vertical-align:middle}.form-label{display:flex;flex-direction:row;align-items:center;height:88rpx;padding-left:25rpx;padding-right:15rpx;box-sizing:border-box}.disabled{color:#9a9a9a!important}.mask{position:absolute;z-index:999;height:100%;width:100%}.form-label-right{justify-content:flex-end}.form-label-left{justify-content:flex-start}.input{height:100%;line-height:100%;flex:1}.close{height:36rpx;width:36rpx;background:#ddd;display:flex;flex-direction:row;align-items:center;justify-content:center;border-radius:50%;margin-right:20rpx}.pls-class{color:#9a9a9a}.hideLabel{padding-left:25rpx}.l-eye{padding:10rpx}.l-eye-text{color:#3963bc!important}.l-eye-password{color:rgba(57,99,188,.6)!important}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/list/index.js:
--------------------------------------------------------------------------------
1 | import hover from"../behaviors/hover";Component({behaviors:[hover],relations:{"../list/index":{type:"parent",linked(){},linkChanged(){},unlinked(){}}},options:{multipleSlots:!0},externalClasses:["l-class","l-class-icon","l-icon-class","l-class-image","l-image-class","l-class-right","l-right-class","l-class-content","l-content-class","l-class-desc","l-desc-class","l-link-icon-class"],properties:{icon:String,iconColor:{type:String,value:"#3963BC"},iconSize:{type:String,value:"28"},image:String,title:String,desc:String,tagPosition:{type:String,value:"left"},tagContent:String,tagShape:{type:String,value:"square"},tagColor:String,tagPlain:Boolean,badgePosition:{type:String,value:"left"},dotBadge:Boolean,badgeCount:Number,badgeMaxCount:{type:Number,value:99},badgeCountType:{type:String,value:"overflow"},rightDesc:String,gap:Number,leftGap:Number,rightGap:Number,isLink:{type:Boolean,value:!0},linkType:{type:String,value:"navigateTo"},url:String},methods:{tapcell:function(e){const{linkType:t,url:l}=e.currentTarget.dataset;l&&wx[t]({url:l}),this.triggerEvent("lintap",{e:e},{bubbles:!0,composed:!0})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/list/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index","l-badge":"../badge/index","l-tag":"../tag/index"} }
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/list/index.wxss:
--------------------------------------------------------------------------------
1 | .l-list{width:100%;min-height:88rpx;display:flex;justify-content:space-between;align-items:center;color:#333;font-size:28rpx;border-bottom:1px solid #f3f3f3;box-sizing:border-box}.l-list-hover{opacity:.8}.l-list .left-section{display:flex;justify-content:space-between;align-items:center}.l-list .left-section .l-icon{margin-right:20rpx}.l-list .left-section .l-desc{color:#d1d3d7;font-size:24rpx}.l-list .left-section .cell-tag{margin-left:20rpx}.l-list .left-section .l-image{width:44rpx;height:44rpx;margin-right:20rpx}.l-list .right-section{display:flex;justify-content:space-between;align-items:center;line-height:1.2}.l-list .right-section .l-text{margin-right:20rpx}.l-list .right-section .cell-tag{margin-right:20rpx}.l-list .badge-right{border-radius:28rpx;min-width:28rpx;left:-20rpx;right:auto;top:0;bottom:0;transform:translate(-100%,2rpx)}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/loading/index.js:
--------------------------------------------------------------------------------
1 | import computeOffset from"../behaviors/computeOffset";import validator from"../behaviors/validator";Component({behaviors:[computeOffset,validator],externalClasses:["l-container-class","l-class"],properties:{show:{type:Boolean,value:!1},opacity:{type:String,value:"1"},bgColor:String,zIndex:{type:String,value:"776"},type:{type:String,value:"rotate",options:["flash","flip","change","rotate","circle"]},color:{type:String,value:""},size:{type:String,value:"medium"},custom:Boolean,fullScreen:Boolean},attached(){this._init()},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showLoading=e=>{const{custom:t=!1,fullScreen:o=!1,color:i="",type:a="rotate",size:s="medium",opacity:l="1"}={...e};this.setData({custom:t,fullScreen:o,color:i,type:a,size:s,opacity:l,show:!0})},wx.lin.hideLoading=()=>{this.setData({show:!1})}},doNothingMove(){}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/loading/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/loadmore/index.js:
--------------------------------------------------------------------------------
1 | import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-loading-class","l-end-class","l-line-class"],options:{multipleSlots:!0},behaviors:[validator],properties:{show:Boolean,custom:Boolean,line:Boolean,color:String,size:{type:String,value:"28"},type:{type:String,value:"loading",options:["loading","end"]},endText:{type:String,value:"我是有底线的~"},loadingText:{type:String,value:"加载中..."}},data:{},attached(){this._init()},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showLoadmore=e=>{const{custom:o=!1,line:t=!1,color:i="",size:l="28",type:a="loading",endText:n="我是有底线的",loadingText:s="加载中..."}={...e};this.setData({custom:o,line:t,color:i,size:l,type:a,endText:n,loadingText:s,show:!0})},wx.lin.hideLoadmore=()=>{this.setData({show:!1})}},onLoadmore(){this.triggerEvent("lintap",{},{bubbles:!0,composed:!0})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/loadmore/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-loading":"../loading/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/loadmore/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | {{loadingText}}
14 | {{endText}}
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/loadmore/index.wxss:
--------------------------------------------------------------------------------
1 | .loadmore-container{display:flex;flex-direction:column;background-color:transparent}.loading{display:flex;flex-direction:row;width:100%;height:72rpx;align-items:center;justify-content:center;background-color:transparent}.loading .loading-view:nth-child(2){margin-left:36rpx}.loading-text{color:#bbb;font-size:28rpx;margin:0 12rpx}.line{width:80rpx;height:2rpx;background-color:#d1d3d7}.rotate{border-radius:50%;animation:rotate .7s linear infinite;height:28rpx;width:28rpx;border-top:4rpx solid #bbb;border-right:4rpx solid transparent!important;border-bottom:4rpx solid #bbb;border-left:4rpx solid #bbb;margin-left:12rpx}@keyframes rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/mask/index.js:
--------------------------------------------------------------------------------
1 | import zIndex from"../behaviors/zIndex";Component({behaviors:[zIndex],externalClasses:["l-class","l-mask-class"],properties:{show:{type:Boolean,value:!1},opacity:{optionalTypes:[String,Number],value:.4},zIndex:{type:Number,value:99},center:{type:Boolean,value:!1},locked:{type:Boolean,value:!0},fullScreen:{type:String,value:""},NavColor:{type:String,value:""}},data:{},methods:{doNothingMove(){},onMaskTap(){!0!==this.data.locked&&this.setData({show:!1}),this.triggerEvent("lintap",!0,{bubbles:!0,composed:!0})}},attached:function(){}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/mask/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/mask/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/mask/index.wxss:
--------------------------------------------------------------------------------
1 | .container-mask{position:fixed;top:0;left:0;width:100%;height:100%;transition:all .3s}.mask-bg{height:100%;width:100%;background:#fff;z-index:99}.mask-content{display:inline-block;z-index:101;overflow:hidden}.center{display:flex;flex-direction:row;align-items:center;justify-content:center}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/message/index.js:
--------------------------------------------------------------------------------
1 | import zIndex from"../behaviors/zIndex";import watchShow from"../behaviors/watchShow";import validator from"../behaviors/validator";Component({behaviors:[zIndex,watchShow,validator],externalClasses:["l-class","l-image-class","l-class-image"],properties:{show:Boolean,icon:String,iconColor:{type:String,value:"#fff"},iconSize:{type:String,value:"28"},image:String,content:String,type:{type:String,value:"primary",options:["primary","warning","success","error"]},duration:{type:Number,value:1500},openApi:{type:Boolean,value:!0},top:{type:Number,value:0}},data:{status:!1},observers:{icon:function(){}},attached(){this.initMessage()},pageLifetimes:{show(){this.initMessage()}},methods:{initMessage(){wx.lin=wx.lin||{},wx.lin.showMessage=(t={})=>{const{content:e="",icon:i="",image:a="",type:s="primary",duration:o=1500,success:n=null,top:r=0}=t;return this.data.success=n,this.setData({content:e,icon:i,image:a,duration:o,type:s,top:r}),this.changeStatus(),this},wx.lin.hideMessage=()=>{this.setData({status:!1})}}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/message/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/message/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{content}}
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/message/index.wxss:
--------------------------------------------------------------------------------
1 | .l-message{width:750rpx;height:0;border-radius:0rpx 0rpx 16rpx 16rpx;display:flex;justify-content:center;align-items:center;position:fixed;left:50%;font-size:28rpx;color:#fff;opacity:0;box-shadow:0rpx 6rpx 16rpx 0rpx rgba(217,212,191,.5);transform:translateX(-50%) translateZ(0) translateY(-100%);transition:all .4s ease-in-out}.l-message-success{background-color:#34bfa3}.l-message-error{background-color:#f4516c}.l-message-warning{background-color:#ffe57f;color:#333}.l-message-primary{background-color:#3963bc}.l-message-show{transform:translateX(-50%) translateZ(0) translateY(0);height:72rpx;opacity:1}.l-message-image{width:30rpx;height:30rpx;margin-right:15rpx}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/notice-bar/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/notice-bar/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{item}}
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/notice-bar/index.wxss:
--------------------------------------------------------------------------------
1 | .l-noticebar{display:flex;height:72rpx;width:750rpx;line-height:72rpx;font-size:28rpx;color:#3963bc;background-color:#dfedff;overflow:hidden;box-shadow:0 2px 5px 0 rgba(218,224,233,.4);border-radius:0 0 8px 8px}.l-noticebar-icon{display:flex;margin-left:20rpx;margin-right:18rpx;align-items:center}.l-noticebar-icon+.l-noticebar-content-wrap-view{margin-left:5rpx}.l-noticebar-operation{display:flex;margin-right:16rpx;margin-left:8rpx;align-items:center}.l-noticebar-content-wrap{display:flex;margin-left:5rpx;flex:1;height:72rpx;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.l-noticebar-content-wrap .l-noticebar-content{position:absolute;transition-duration:20s}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/popup/index.js:
--------------------------------------------------------------------------------
1 | import zIndex from"../behaviors/zIndex";import validator from"../behaviors/validator";import eventUtil from"../core/utils/event-util";import doNothing from"../core/behaviors/doNothingBehavior";Component({behaviors:[zIndex,validator,doNothing],externalClasses:["l-bg-class","l-panel-class","l-class"],properties:{show:{type:Boolean,value:!1},animation:{type:Boolean,value:!0},transition:{type:Boolean,value:null},contentAlign:{type:String,value:"center",options:["top","right","left","bottom","center"]},direction:{type:String,value:null,options:["top","right","left","bottom","center"]},locked:{type:Boolean,value:!1}},attached(){this._init()},pageLifetimes:{show(){this._init()}},data:{status:"hide"},observers:{show(t){t&&this.setData({status:"show"})}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showPopup=t=>{console.warn("wx.lin 方法已废弃,请使用开放函数代替 https://doc.mini.talelin.com/start/open-function.html"),this.linShow(t)},wx.lin.hidePopup=()=>{console.warn("wx.lin 方法已废弃,请使用开放函数代替 https://doc.mini.talelin.com/start/open-function.html"),this.linHide()}},onPopupTap(){!0!==this.data.locked&&this._hidePopup(),eventUtil.emit(this,"lintap")},_hidePopup(){this.data.animation?(this.setData({status:"hide"}),setTimeout(()=>{this.setData({show:!1})},300)):this.setData({show:!1,status:"hide"})},linShow(t){const{zIndex:i=99,animation:o=!0,contentAlign:e="center",locked:n=!1}={...t};this.setData({zIndex:i,animation:o,contentAlign:e,locked:n,show:!0})},linHide(){this._hidePopup()}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/popup/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/popup/index.wxml:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/price/index.js:
--------------------------------------------------------------------------------
1 | import validator from"../behaviors/validator";Component({externalClasses:["l-deleted-class","l-unit-class","l-value-class","l-class","l-decimal-class","l-dot-class"],behaviors:[validator],properties:{unit:{type:String,value:"¥"},size:{type:String,value:"28"},color:{type:String,value:"#3963BC"},bold:{type:String,value:"500"},unitColor:String,unitSize:String,unitBold:String,value:{type:String,value:"0.00"},mode:{type:String,value:"number",options:["number","text"]},valueColor:String,valueSize:String,valueBold:String,deleted:Boolean,delColor:String,reserveDigit:{type:Number,value:2},autofix:Boolean},data:{priceInteger:{type:String,value:"0"},priceDecimal:{type:String,value:"00"}},observers:{value:function(){this.reserveNumber()}},methods:{reserveNumber(){this.setData({priceInteger:null,priceDecimal:null});const e=Number(this.data.value);if(!(isNaN(Number(e))||"text"===this.data.mode)&&this.data.autofix){const t=e.toFixed(this.data.reserveDigit).toString().split(".");this._setPrice(t)}else{const e=this.data.value.split(".");this._setPrice(e)}},_setPrice(e){if(1===e.length)this.setData({priceInteger:e[0]});else{if(2!==e.length)throw"price 格式有误,请仔细检查!";this.setData({priceInteger:e[0],priceDecimal:e[1]})}}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/price/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/price/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{unit}}
4 |
5 | {{priceInteger}}{{priceDecimal?'.':''}}{{priceDecimal?priceDecimal:''}}
6 |
7 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/price/index.wxss:
--------------------------------------------------------------------------------
1 | .price-del{text-decoration:line-through!important}.price-container{display:inline-block;text-align:center;color:#3963bc;font-size:28rpx}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/progress/index.js:
--------------------------------------------------------------------------------
1 | import{px2rpx}from"../utils/util.js";import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-text-class","l-active-class","l-background-class"],behaviors:[validator],properties:{percent:{type:Number,value:0},strokeWidth:{type:Number,value:12},borderRadius:{type:Number,value:6},activeColor:{type:String},backgroundColor:{type:String,value:"#EBEBEB"},showInfo:{type:Boolean,value:!1},textPosition:{type:String,value:"right",options:["left","right"]},textColor:{type:String},interval:{type:Number,value:20},active:{type:Boolean,value:!1},duration:{type:Number,value:30}},options:{multipleSlots:!0,pureDataPattern:/^_/},data:{_slotWidth:0,_slotHeight:0,_progressWidth:0,_progressHeight:0,_marginBottom:0,marginLeft:0,marginTop:0,_useSlot:!1},observers:{"_slotWidth, _slotHeight, _progressWidth, _progressHeight, percent,_useSlot":function(t,e,r,i,s,a){if(a){const a=-(e-i)/2,o=(r-t)*s/100;this.setData({marginTop:a,marginLeft:o})}}},lifetimes:{attached(){this.data.percent>100&&this.setData({percent:100});wx.createSelectorQuery().in(this).select(".slot").boundingClientRect(t=>{let e=this.data._useSlot;t.width&&(e=!0),this.setData({_useSlot:e,_slotWidth:px2rpx(t.width),_slotHeight:px2rpx(t.height)})}).exec();wx.createSelectorQuery().in(this).select(".progress").boundingClientRect(t=>{this.setData({_progressHeight:px2rpx(t.height),_progressWidth:px2rpx(t.width)})}).exec();const t=this.data.percent;let e=0;this.data.active&&setInterval(()=>{e
3 |
4 | {{percent}}%
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | {{percent}}%
15 |
16 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/progress/index.wxss:
--------------------------------------------------------------------------------
1 | .container{display:flex;flex-direction:row;align-items:center}.progress{position:relative;width:100%;transition:all .25s ease-in-out}.percent{position:absolute;z-index:1}.active{background-color:#3963bc}.text{color:#3963bc;font-size:30rpx}.background{position:absolute;width:100%}.header{position:absolute!important;z-index:2}.slot{position:absolute;z-index:2}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/radio-group/index.js:
--------------------------------------------------------------------------------
1 | import eventBus from"../core/utils/event-bus";import rules from"../behaviors/rules";Component({externalClasses:["l-class","l-error-text","l-error-text-class"],behaviors:["wx://form-field",rules],relations:{"../radio/index":{type:"child",linked(){this.init()},linkChanged(){},unlinked(){this.init()}}},properties:{current:{type:String},noneChecked:{type:Boolean,value:!0},placement:{type:String,value:"column"}},data:{currentLength:0},methods:{checkedKeyRepeat(e){let t=e.map(e=>e.data.key);const r=this.isRepeat(t);if(!1!==r)throw new Error("keys有重复元素, radio的key属性不能重复:"+r)},isRepeat(e){let t={};for(let r in e){if(t[e[r]])return e[r];t[e[r]]=!0}return!1},init(){const e=this.getRelationNodes("../radio/index");this.checkedKeyRepeat(e),this.onChangeHandle(e)},onChangeHandle(e){e.forEach(e=>{let t=this.properties.current===e.data.key;e.setChecked(t,e.data.key)})},onEmitEventHandle(e,t){this.properties.current=t?e.key:null;const r=this.getRelationNodes("../radio/index");this.onChangeHandle(r),Object.assign(e,{currentKey:this.properties.current}),this.validatorData({[this.data.name]:this.data.current}),this.triggerEvent("linchange",e,{bubbles:!0,composed:!0}),eventBus.emit("lin-form-change-"+this.id,this.id)},getValues(){return this.data.current},reset(){this.data.current=""}},observers:{current:function(){this.init()}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/radio-group/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-error-tip":"../error-tip/index","l-radio":"../radio/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/radio-group/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/radio-group/index.wxss:
--------------------------------------------------------------------------------
1 | .radio-group{width:100%}.radio-group-row{display:flex;flex-direction:row}.radio-group-column{display:flex;flex-direction:column}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/radio/index.js:
--------------------------------------------------------------------------------
1 | Component({externalClasses:["l-class","l-disabled-class"],behaviors:["wx://form-field"],relations:{"../radio-group/index":{type:"parent"}},properties:{key:String,cell:Object,size:{type:String,value:"38rpx"},disabled:{type:Boolean},custom:Boolean,color:{type:String,value:"#ccc"},selectColor:{type:String,value:"#3963BC"},disabledColor:{type:String,value:"#ccc"},placement:{type:String,value:"left"},transition:{type:Boolean,value:!0}},data:{checked:!1},methods:{setChecked(e){this.setData({checked:e})},onRadioChangeTap(){if(this.properties.disabled)return;const e=this.getRelationNodes("../radio-group/index")[0],t=e.properties.noneChecked;let r=!0;if(this.isCurrentSelectedKey(e)&&(r=!1,!t))return;const i=!this.data.checked;this.data.checked=i;const s={checked:i,key:this.properties.key,cell:this.properties.cell};e&&e.onEmitEventHandle(s,r)},isCurrentSelectedKey(e){return e.properties.current===this.properties.key}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/radio/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/radio/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/radio/index.wxss:
--------------------------------------------------------------------------------
1 | .label{display:flex;flex:1;align-items:center;font-size:30rpx;color:#333;width:100%}.label-left{flex-direction:row}.label-right{flex-direction:row-reverse;justify-content:space-between}.label-disabled{color:#ccc}.radio{margin-right:20rpx}.iconfont{font-family:iconfont!important;display:inline-flex;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMMAAsAAAAABwQAAAK9AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBaIFyATYCJAMMCwgABCAFhG0HOxs9BsgekiQlqiBBkCKqgBDbFA9f+72eu7sf0SUKUEYCjq8CJBWhqlrpakx5POtO5RtaczeTEm4dEZ0nl3vZ/P4QsbZQwBuhkJZZe0ElkSkAzf+5nN4oP2/Mb1kucw086gUYBxToHtgmK5FAPIXhtYt1GOcJtC1qIDsxOz1Aq6DTAvGYpZNAm4sqilRoCvWatUW8V9NMb9Mt4F34/firLbQktYzOPXN3MgNGfhz/9uXVatVlHyGbzw1pExlbgEJcrfWep4izWxTahlppdgJ1RUhzJaqKUGrq6zv94yWijtZ3wRo06aZkroDgZ58ENGRb3WvkdwEvYZyONecufVjvlP/yCN9e6dcv/syKok+S/ILg5fk4v+4VjvzShk88ZPlDX7WRthx5hXV881Hg5krDX9Z84j7MqK4cjZR1JuLFnjJtMX7ePssP3xVQnfFiKPkScCUeVTcdonq0qYhT/P/M8y4Q5ZkuBeY3m1/gqWk5FFo2LcA/s72GnXZzDSQAVPNPvhv+Qobg0R/V/2uDnX/NTgHftl/fyIRqAfkuAJr34wv+r6xnVzEV1JaLLnWltj9bvld3AmI5oEKDYy/j9bPeaUIzJ5MgaViArGkJLdQtqOnYhrqmfWjbZNncMYEpRGlhwxaBMHQNSd8HyIbqaKE+Q83cH9QNQwFtZ2OyZ8dKsPpjjJIEZWBqDrLpUpFyHEQfNboQPZVP4qwiZPsQ5tgEbG1qKRYsqIjwHAu4abqNEApSuFSAZnIZyudLsIxLWZQmTQwh5b7mZqruTU3pUgHoHcOQJALJgFLmQKy0kiLK70/oS593QWhT8pJwC6kh7INgHHZ4qFWTlh6oRVvsRbqXazjTaG0IggJRsJICyExGIXl5JVC5flQWkkY0YUaky/o0s15UX23T+vrC9x2ANrogR4ocRfNNkUP5u9SpAwsAAAAA') format('woff2')}.icon-unselect:before{content:"\e6a1"}.icon-select:before{content:"\e73a"}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/rate/index.js:
--------------------------------------------------------------------------------
1 | import eventBus from"../core/utils/event-bus";Component({externalClasses:["l-class","l-class-icon","l-class-image","l-icon-class","l-image-class"],options:{multipleSlots:!0},properties:{count:{type:Number,value:5},score:{type:Number,value:0},size:{type:String,value:"36"},disabled:Boolean,activeColor:{type:String,value:"#FF5252"},inActiveColor:{type:String,value:"#FFE5E5"},name:{type:String,value:"favor-fill"},activeImage:String,inActiveImage:String,itemGap:{type:Number,value:10}},data:{},methods:{handleClick(e){if(this.data.disabled)return;const{index:t}=e.currentTarget.dataset;this.setData({score:t+1}),this.triggerEvent("linchange",{score:t+1}),eventBus.emit("lin-form-change-"+this.id,this.id)},getValues(){return this.data.score},reset(){this.setData({score:0})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/rate/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index"} }
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/rate/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/rate/index.wxss:
--------------------------------------------------------------------------------
1 | .l-rate,.l-rate-star{display:inline-flex}.l-rate-star{position:relative}.icon-checked{position:absolute;overflow:hidden;display:flex}.image-item{width:80rpx;height:80rpx}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/search-bar/index.js:
--------------------------------------------------------------------------------
1 | import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-container-class","l-placeholder-class","l-icon-class","l-input-class","l-cancel-class"],behaviors:[validator],options:{multipleSlots:!0},properties:{confirmType:{type:String,value:"search"},placeholder:String,cancelText:{type:String,value:"取消"},frontText:String,custom:Boolean,value:String,type:String,icon:{type:String,value:"research"},iconColor:{type:String,value:"#bdbdbd"},iconSize:{type:String,value:"28"},bgColor:{type:String,value:"#f3f3f3"},showCancel:{type:Boolean,value:!0},shape:{type:String,value:"primary",options:["circle","primary"]},textAlign:{type:String,value:"left",options:["left","right"]},focus:Boolean,clear:{type:Boolean,value:!0},maxlength:{type:Number,value:140},disabled:Boolean,placeholderStyle:String},data:{},methods:{onCancel(){this.triggerEvent("lincancel",{},{bubbles:!0,composed:!0})},handleInputChange(e){const{detail:t={}}=e,{value:l=""}=t;this.setData({value:l}),this.triggerEvent("linchange",t)},handleInputFocus(e){this.triggerEvent("linfocus",e.detail)},handleInputBlur(e){this.triggerEvent("linblur",e.detail)},handleInputConfirm(e){const{detail:t={}}=e,{value:l=""}=t;this.setData({value:l}),this.triggerEvent("linconfirm",t)},onClearTap(e){this.setData({value:""}),this.triggerEvent("linclear",e.detail,{bubbles:!0,composed:!0})},handleTapFrontText(e){this.triggerEvent("linfronttap",e.detail)}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/search-bar/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-input":"../input/index","l-icon":"../icon/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/search-bar/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{frontText}}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | {{cancelText}}
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/search-bar/index.wxss:
--------------------------------------------------------------------------------
1 | .search-bar{display:flex;flex-direction:row;align-items:center;padding:0 20rpx;box-sizing:border-box;width:100%}.search-input{height:60rpx;background-color:#f3f3f3;display:flex;flex-direction:row;flex:1;align-items:center;padding-left:30rpx;box-sizing:border-box}.search-input-primary{border-radius:8rpx}.search-input-circle{border-radius:30rpx}.cancel{font-size:28rpx;color:#666;display:flex;align-items:center;width:60rpx;justify-content:center;height:60rpx;margin-left:15rpx}.input{height:40rpx;line-height:40rpx;flex:1;margin-left:15rpx;font-size:28rpx;color:#666}.input-center{text-align:center}.input-left{text-align:left}.close-wrap{padding:10rpx}.close{height:30rpx;width:30rpx;background:#ddd;display:flex;align-items:center;justify-content:center;border-radius:50%;padding-top:3rpx;box-sizing:border-box;margin-right:15rpx}.pls-class{color:#bdbdbd;font-size:28rpx}.icon-container{display:flex;flex-direction:row;align-items:center;margin-right:15rpx}.city{font-size:28rpx;color:#333;margin-right:10rpx}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/segment-item/index.js:
--------------------------------------------------------------------------------
1 | Component({options:{multipleSlots:!0},relations:{"../segment/index":{type:"parent",linked(){},unlinked(){}}},properties:{tab:String,key:String,icon:String,iconSize:{type:String,value:"20"},image:Object,picPlacement:{type:String,value:"top"},dotBadge:Boolean,badgeCount:{type:Number},badgeMaxCount:{type:Number,value:99},badgeCountType:{type:String,value:"overflow"}},observers:{"**":function(e){this.updateData(e)}},data:{},methods:{updateData(e){let t=this.getRelationNodes("../segment/index")[0];if(!t)return;const a=t.data.tabList;if(!(a&&a.length>0))return;const n=a.findIndex(e=>e.key===this.data.key);a[n]=e,t.setData({tabList:a},()=>{t.data.scrollable&&t.queryMultipleNodes()})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/segment-item/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{} }
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/segment-item/index.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/segment-item/index.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/segment-item/index.wxss
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/segment/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index","l-badge":"../badge/index","l-segment-item":"../segment-item/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/skeleton/index.js:
--------------------------------------------------------------------------------
1 | import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-title-class","l-avatar-class","l-row-class"],behaviors:[validator],properties:{loading:{type:Boolean,value:!0},title:{type:Boolean,value:!0},paragraph:{type:Boolean,value:!0},active:{type:Boolean,value:!0},avatar:Boolean,titleWidth:String,avatarSize:String,avatarShape:{type:String,value:"circle",options:["circle","square"]},rowsWidth:{type:Array,optionalTypes:[Array,String],value:"60%"},rowsHeight:{type:Array,optionalTypes:[Array,String],value:"34rpx"},rows:Number},observers:{"rows,rowsWidth,rowsHeight":function(t,a,e){this._getResult(t,a,"rowsW","100%"),this._getResult(t,e,"rowsH","34rpx"),this._toRows(t)}},data:{},methods:{_arrRepeat(t,a){const e=[];for(let r=0;r
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/skeleton/index.wxss:
--------------------------------------------------------------------------------
1 | .l-skeleton-container{width:100%;display:flex;flex-direction:row;box-sizing:border-box}.l-skeleton-avatar{height:72rpx;width:72rpx;margin-right:20rpx}.l-skeleton-avatar-circle{border-radius:50%}.l-skeleton-right{display:flex;flex-direction:column;flex:1}.l-skeleton-title{width:100%;height:34rpx}.l-skeleton-title-container{height:72rpx;width:50%;display:flex;align-items:center}.l-skeleton-rows{margin-top:20rpx}.bg{background:linear-gradient(90deg,#f2f2f2 25%,#e6e6e6 37%,#f2f2f2 63%);background-size:400% 100%}.active{animation:loading 1.4s ease infinite}@keyframes loading{0%{background-position:100% 50%}100%{background-position:0 50%}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/slide-view/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/slide-view/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/slide-view/index.wxss:
--------------------------------------------------------------------------------
1 | .movable-content{display:flex;direction:row;overflow:hidden}.container{overflow:hidden}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/spin/index.js:
--------------------------------------------------------------------------------
1 | Component({externalClasses:["l-class"],properties:{color:String,show:Boolean,type:{type:String,value:"flash"},custom:Boolean,size:{type:String,value:"default"}},methods:{}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/spin/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/spin/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/status-show/image/address.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/status-show/image/address.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/status-show/image/cart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/status-show/image/cart.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/status-show/image/data.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/status-show/image/data.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/status-show/image/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/status-show/image/error.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/status-show/image/network.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/status-show/image/network.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/status-show/image/order.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/status-show/image/order.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/status-show/image/product.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/status-show/image/product.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/status-show/image/success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/status-show/image/success.png
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/status-show/index.js:
--------------------------------------------------------------------------------
1 | Component({externalClasses:["l-class","l-image-class","l-button-class","l-describe-class"],properties:{show:Boolean,type:{type:String,value:"success",observer:"_changeStatus"},image:String,describe:String,buttonText:String,bgColor:{type:String,value:"#fff"},fullScreen:{type:Boolean,value:!0},openApi:{type:Boolean,value:!0},custom:{type:Boolean,value:!1}},data:{},attached(){this._changeStatus(),this.data.openApi&&this._init()},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showStatusShow=e=>{const{type:t="success",image:a="",describe:s="",buttonText:i="",bgColor:r="#fff",fullScreen:o=!0}={...e};this.setData({show:!0,type:t,image:a,describe:s,buttonText:i,bgColor:r,fullScreen:o})},wx.lin.hideStatusShow=()=>{this.setData({show:!1})}},_changeStatus(){const e=this.data.type;if(e)switch(e){case"success":this.setData({typeImage:"image/success.png",typeText:"操作成功~"});break;case"error":this.setData({typeImage:"image/error.png",typeText:"操作失败~"});break;case"cart":this.setData({typeImage:"image/cart.png",typeText:"购物车空空如也,去逛逛吧~"});break;case"order":this.setData({typeImage:"image/order.png",typeText:"您暂时还没有订单哦~"});break;case"network":this.setData({typeImage:"image/network.png",typeText:"糟糕!网络错误~"});break;case"address":this.setData({typeImage:"image/address.png",typeText:"您暂时还没有地址哦~"});break;case"product":this.setData({typeImage:"image/product.png",typeText:"暂时还没有商品哦~~"});break;case"data":this.setData({typeImage:"image/data.png",typeText:"暂时还没有相关数据哦~~"});break;default:console.warn(e+" is not a valid value")}},tapStatusShow(){this.triggerEvent("lincorvertap",{},{bubbles:!0,composed:!0})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/status-show/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-button":"../button/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/status-show/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{describe}}
9 | {{typeText}}
10 |
11 | {{buttonText}}
12 |
13 |
14 | 重新加载
15 |
16 |
17 | 去逛逛
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/status-show/index.wxss:
--------------------------------------------------------------------------------
1 | .l-status-container{background-color:#fff;flex-direction:column;display:flex;justify-content:center}.content{position:fixed;top:0;left:0;background:#fff;height:100%;width:100%}.ad-img{width:198rpx!important;height:204rpx!important}.top-img{width:264rpx;height:204rpx}.left-img{width:120rpx;height:184rpx}.image_margin_top{margin-top:-250rpx}.status-text{font-size:30rpx;color:#45526b;margin-top:40rpx}.button_margin_top{margin-top:80rpx}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/step/index.js:
--------------------------------------------------------------------------------
1 | Component({externalClasses:["l-class","l-step-class","l-title-class","l-describe-class","l-line-class"],options:{multipleSlots:!0},relations:{"../steps/index":{type:"parent"}},properties:{icon:String,title:String,describe:String,iconSize:{type:Number,value:24},iconColor:String,custom:Boolean},data:{},methods:{updateDataChange(e){this.setData({...e})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/step/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/steps/index.js:
--------------------------------------------------------------------------------
1 | import validator from"../behaviors/validator";Component({externalClasses:["l-class"],behaviors:[validator],options:{multipleSlots:!0},relations:{"../step/index":{type:"child",linked(){this._initSteps()},unlinked(){this._initSteps()}}},properties:{direction:{type:String,value:"row",options:["row","column"]},activeIndex:{type:Number,value:0},color:String,stepMinHeight:{type:String,value:"120"},status:{type:String,value:"process",options:["process","error"]},dot:Boolean,reverse:Boolean},observers:{activeIndex:function(){this._initSteps()}},data:{},methods:{_initSteps(){wx.createSelectorQuery().in(this).select(".steps-container").boundingClientRect().exec(e=>{let t=this.getRelationNodes("../step/index");this.data.length=t.length,this.data.length>0&&t.forEach((t,i)=>{t.updateDataChange({index:i,...this.data,stepsWidth:e[0].width})})})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/steps/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index","l-step":"../step/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/steps/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/steps/index.wxss:
--------------------------------------------------------------------------------
1 | .steps-container{display:flex;width:100%}.steps-container-row{flex-direction:row}.steps-container-row-reverse{flex-direction:row-reverse}.steps-container-column{flex-direction:column}.steps-container-column-reverse{flex-direction:column-reverse}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/sticky-item/index.js:
--------------------------------------------------------------------------------
1 | import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-class","l-header-wrapper-class","l-header-class","l-header-sticky-class","l-body-class"],options:{multipleSlots:!0},relations:{"../sticky/index":{type:"parent"}},properties:{top:{type:Number,value:0}},data:{mode:void 0,index:void 0,isFixedTop:!1,stickyItemTop:0,stickyItemHeight:0,stickyItemWrapperHeight:void 0},lifetimes:{ready:function(){const t=this.getParentComponent().data.mode;this.setData({mode:t})}},methods:{updateStickyItemPosition(t){const e=this.getParentComponent(),{index:i,stickyItemTop:s,stickyItemHeight:o,top:a}=this.data,n=t>s-a&&t
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/sticky-item/index.wxss:
--------------------------------------------------------------------------------
1 | .l-sticky-item{display:flex;flex-direction:column}.l-sticky-wrapper{overflow:visible}.l-sticky-item-header{width:100%}.l-sticky-item-header-fixed{position:fixed;top:0}@supports (position:sticky){.l-sticky-item-header-sticky{position:sticky}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/sticky/index.js:
--------------------------------------------------------------------------------
1 | import validator from"../behaviors/validator";Component({externalClasses:["l-class"],behaviors:[validator],relations:{"../sticky-item/index":{type:"child",linked(){this.checkSupportCssSticky().then(t=>{t||this.updateStickyItemsSizeData()}).catch(t=>{console.error(t)})},linkChanged(){this.checkSupportCssSticky().then(t=>{t||this.updateStickyItemsSizeData()}).catch(t=>{console.error(t)})},unlinked(){this.checkSupportCssSticky().then(t=>{t||this.updateStickyItemsSizeData()}).catch(t=>{console.error(t)})}}},properties:{mode:{type:String,value:"js",options:["js","css"]},scrollTop:Number},observers:{scrollTop:function(){this.checkSupportCssSticky().then(t=>{t||this.updateStickyItemsPosition()}).catch(t=>{console.error(t)})}},lifetimes:{attached(){this.checkSupportCssSticky().then(t=>{t||this.initSticky()}).catch(t=>{console.error(t)})}},methods:{initSticky(){wx.lin=wx.lin||{},wx.lin.flushSticky=()=>{this.updateStickyItemsSizeData()},wx.lin.setScrollTop=t=>{this.data.scrollTop=t,this.checkSupportCssSticky().then(t=>{t||this.updateStickyItemsPosition()}).catch(t=>{console.error(t)})}},updateStickyItemsPosition(){const t=this.getStickyItemNodes();for(let e of t)e.updateStickyItemPosition(this.data.scrollTop)},updateStickyItemsSizeData(){this.getStickyItemNodes().forEach((t,e)=>{t.updateStickyItemBaseData(e)})},getStickyItemNodes(){return this.getRelationNodes("../sticky-item/index")},checkSupportCssSticky(){return new Promise(t=>{const e=this.getStickyItemNodes();0===e.length&&t(!1),wx.createSelectorQuery().in(e[0]).select(".l-sticky-item-header").fields({computedStyle:["position"]}).exec(e=>{null===e[0]?t(!1):t("sticky"===e[0].position)})})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/sticky/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/sticky/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/sticky/index.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fmtjava/wx_eyepetizer/d5b643349e8abcf05a6d89309e51bb02fbd9906c/miniprogram_npm/lin-ui/sticky/index.wxss
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/tab-bar/index.js:
--------------------------------------------------------------------------------
1 | import eventUtil from"../core/utils/event-util";Component({properties:{bgColor:{type:String,value:null},bgImg:{type:String,value:null},selectedIndex:{type:Number,value:0},list:{type:Array,value:[]},textSelectedColor:{type:String,value:"#3963bc"},textColor:{type:String,value:"#666"}},pageLifetimes:{show:function(){this.parseCurrentPage()}},methods:{parseCurrentPage(){const t="/"+getCurrentPages()[0].route,e=this.data.list;let i;for(let a=0;a
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{item.text}}
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/tab-bar/index.wxss:
--------------------------------------------------------------------------------
1 | .lu-tab-bar{left:0;right:0;bottom:0;position:fixed;z-index:9999;width:750rpx;height:106rpx;display:flex;background-color:#fff;background-size:100% 100%;background-repeat:no-repeat;padding-bottom:constant(safe-area-inset-bottom)!important;padding-bottom:env(safe-area-inset-bottom)!important}.lu-tab-bar__item-wrapper{display:flex;height:100%;justify-content:center;padding-bottom:constant(safe-area-inset-bottom)!important;padding-bottom:env(safe-area-inset-bottom)!important}.lu-tab-bar__item-container{display:flex;flex-direction:column;align-items:center;justify-content:center}.lu-tab-bar__item-image{display:block;width:52rpx;height:52rpx}.lu-tab-bar__item-text{margin-top:4rpx;font-size:24rpx;line-height:1}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/tabpanel/index.js:
--------------------------------------------------------------------------------
1 | Component({relations:{"../tabs/index":{type:"parent",linked:function(t){!this.data.parent&&this.setData({parent:t})}},"../combined-tabs/index":{type:"parent",linked:function(t){!this.data.parent&&this.setData({parent:t})}}},properties:{tab:String,subTab:String,subKey:String,key:String,icon:String,iconSize:{type:String,value:"20"},image:Object,picPlacement:{type:String,value:"top"},dotBadge:{type:Boolean,value:!1},badgeCount:{type:Number},badgeMaxCount:{type:Number,value:99},badgeCountType:{type:String,value:"overflow"}},observers:{"**":function(t){this.updateData(t)}},data:{isCurrent:!1,index:0,parent:null},methods:{updateData(){let t=this.data.parent;t&&t.initTabs()}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/tabpanel/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/tabpanel/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/tabpanel/index.wxss:
--------------------------------------------------------------------------------
1 | .l-tabpanel-content{width:100%;height:100%}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/tabs/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index","l-badge":"../badge/index","l-tabpanel":"../tabpanel/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/tag/index.js:
--------------------------------------------------------------------------------
1 | import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-select-class","l-image-class"],behaviors:[validator],properties:{name:String,cell:Object,type:{type:String,value:"touch",options:["reading","touch"]},bgColor:String,fontColor:String,disable:Boolean,shape:{type:String,value:"square",options:["square","circle"]},select:Boolean,plain:Boolean,size:{type:String,value:"medium",options:["large","medium","mini","super-mini"]},location:{type:String,value:"left",options:["left","right"]},icon:String,iconSize:{type:String,value:"20"},iconColor:{type:String,value:"#3683D6"},image:String,iconStyle:{type:String,value:"size:20;color:#3683D6"},height:Number},methods:{handleTap(){if(this.data.disable)return;let e={name:this.data.name,cell:this.data.cell,select:this.data.select};this.triggerEvent("lintap",e,{bubbles:!0,composed:!0})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/tag/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/tag/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/tag/index.wxss:
--------------------------------------------------------------------------------
1 | .l-tag{display:inline-flex;justify-content:center;align-items:center;color:#fff;background-color:#3963bc}.l-tag-touch{min-width:80rpx}.l-tag-super-mini{height:32rpx;font-size:20rpx}.l-tag-mini{height:42rpx;font-size:20rpx}.l-tag-medium{height:50rpx;font-size:24rpx;letter-spacing:2rpx}.l-tag-large{height:60rpx;font-size:24rpx;letter-spacing:2rpx}.l-tag-super-mini-square{border-radius:2rpx;padding:0 6rpx}.l-tag-mini-square{border-radius:2rpx;padding:0 12rpx}.l-tag-medium-square{border-radius:2rpx;padding:0 16rpx}.l-tag-large-square{border-radius:2rpx;padding:0 18rpx}.l-tag-super-mini-circle{border-radius:16rpx;padding:0 12rpx}.l-tag-mini-circle{border-radius:21rpx;padding:0 16rpx}.l-tag-medium-circle{border-radius:25rpx;padding:0 20rpx}.l-tag-large-circle{border-radius:30rpx;padding:0 24rpx}.l-tag-plain{background-color:#fff;color:#3963bc;border:2rpx solid #3963bc}.l-tag-plain-super-mini{height:28rpx;font-size:20rpx}.l-tag-plain-mini{height:38rpx;font-size:20rpx}.l-tag-plain-medium{height:46rpx;font-size:24rpx;letter-spacing:2rpx}.l-tag-plain-large{height:56rpx;font-size:24rpx;letter-spacing:2rpx}.l-tag-disable{background-color:#dee2e6;color:#fff;border-color:#dee2e6}.select{background-color:#3963bc;color:#fff}.content{display:inline-flex;align-items:center;justify-content:center}.content-l{display:inline-flex;flex-direction:row-reverse;align-items:center;justify-content:center}.tag-image-mini{width:20rpx;height:20rpx}.tag-image-large{width:24rpx;height:24rpx}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/textarea/index.js:
--------------------------------------------------------------------------------
1 | import rules from"../behaviors/rules";import eventBus from"../core/utils/event-bus";Component({behaviors:["wx://form-field",rules],externalClasses:["l-class","l-error-text","l-error-text-class","l-inner-class"],properties:{placeholder:{type:String,value:""},value:{type:String,value:""},focus:{type:Boolean,value:!1},maxlength:{type:Number,value:140},indicator:{type:Boolean,value:!0},autoHeight:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1},border:{type:Boolean,value:!0},rules:{type:Object},placeholderStyle:{type:String,value:""},cursorSpacing:{type:Number,value:0}},data:{},attached(){this.initRules()},methods:{handleInputChange(e){const{detail:t={}}=e,{value:a=""}=t;this.setData({value:a}),eventBus.emit("lin-form-change-"+this.id,this.id),this.triggerEvent("lininput",e.detail)},handleInputFocus(e){this.triggerEvent("linfocus",e.detail)},handleInputBlur(e){this.validatorData({[this.data.name]:e.detail.value}),eventBus.emit("lin-form-blur-"+this.id,this.id),this.triggerEvent("linblur",e.detail)},handleInputConfirm(e){this.triggerEvent("linconfirm",e.detail)},getValues(){return this.data.value},reset(){this.data.value=""}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/textarea/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index","l-error-tip":"../error-tip/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/textarea/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/textarea/index.wxss:
--------------------------------------------------------------------------------
1 | .form-item{position:relative;font-size:28rpx;color:#333;width:100%;display:flex;flex-direction:column;align-items:center;box-sizing:border-box}.disabled{color:#9a9a9a!important}.mask{position:absolute;z-index:999;height:100%;width:100%}.textarea{width:100%;box-sizing:border-box;font-size:28rpx;color:#333;height:200rpx;line-height:40rpx;flex:1;min-height:88rpx}.textarea-auto-height{width:100%;box-sizing:border-box;font-size:28rpx;color:#333}.default-border{position:relative;font-size:28rpx;color:#333;width:100%;display:flex;flex-direction:column;align-items:center;box-sizing:border-box;padding:25rpx}.border{border-radius:4rpx;border:1rpx solid #d8dee5}.pls-class{color:#9a9a9a}.indicator{width:95%;text-align:right;margin-bottom:15rpx;color:#9a9a9a}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/toast/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index","l-mask":"../mask/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/toast/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{ title }}
8 |
9 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/toast/index.wxss:
--------------------------------------------------------------------------------
1 | .container{position:fixed}.containerNoMask{left:50%;top:50%;transform:translate(-50%,-50%)}.containerShowMask{height:100%;width:100%;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:999}.container .toast-bg{height:100%;width:100%;background:rgba(255,255,255,.5);position:absolute;top:0;left:0}.container .toast-top{flex-direction:column-reverse}.container .toast-right{flex-direction:row}.container .toast-bottom{flex-direction:column}.container .toast-left{flex-direction:row-reverse}.container .toast{display:flex;align-items:center;justify-content:center;max-width:400rpx;min-width:280rpx;min-height:88rpx;background:rgba(0,0,0,.7);border-radius:12rpx;color:#fff;font-size:28rpx;line-height:40rpx;box-sizing:border-box;padding:30rpx 50rpx;z-index:999}.container .toast .toast-icon{margin-top:20rpx;margin-bottom:20rpx}.container .toast .toast-icon-loading{animation:loading-fadein 1.5s linear 0s infinite}.container .toast .toast-text{display:inline-block;text-align:center}.container .toast .toast-text-right{display:inline-block;text-align:center;margin-left:20rpx}.container .toast .toast-text-left{display:inline-block;text-align:center;margin-right:20rpx}.container .toast .toast-text-top{margin-bottom:10rpx}@keyframes loading-fadein{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/transition/index.js:
--------------------------------------------------------------------------------
1 | import transition from"../behaviors/transition";Component({behaviors:[transition(!0)],externalClasses:["l-class","l-enter-class","l-enter-active-class","l-enter-to-class","l-leave-class","l-leave-active-class","l-leave-to-class"],methods:{}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/transition/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"l-icon":"../icon/index","l-mask":"../mask/index"}}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/transition/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/transition/index.wxss:
--------------------------------------------------------------------------------
1 | .l-transition{transition-timing-function:ease}.l-fade-enter-active,.l-fade-leave-active{transition-property:opacity}.l-fade-enter,.l-fade-leave-to{opacity:0}.l-fade-down-enter-active,.l-fade-down-leave-active,.l-fade-left-enter-active,.l-fade-left-leave-active,.l-fade-right-enter-active,.l-fade-right-leave-active,.l-fade-up-enter-active,.l-fade-up-leave-active{transition-property:opacity,transform}.l-fade-up-enter,.l-fade-up-leave-to{transform:translate3d(0,100%,0);opacity:0}.l-fade-down-enter,.l-fade-down-leave-to{transform:translate3d(0,-100%,0);opacity:0}.l-fade-left-enter,.l-fade-left-leave-to{transform:translate3d(-100%,0,0);opacity:0}.l-fade-right-enter,.l-fade-right-leave-to{transform:translate3d(100%,0,0);opacity:0}.l-slide-down-enter-active,.l-slide-down-leave-active,.l-slide-left-enter-active,.l-slide-left-leave-active,.l-slide-right-enter-active,.l-slide-right-leave-active,.l-slide-up-enter-active,.l-slide-up-leave-active{transition-property:transform}.l-slide-up-enter,.l-slide-up-leave-to{transform:translate3d(0,100%,0)}.l-slide-down-enter,.l-slide-down-leave-to{transform:translate3d(0,-100%,0)}.l-slide-left-enter,.l-slide-left-leave-to{transform:translate3d(-100%,0,0)}.l-slide-right-enter,.l-slide-right-leave-to{transform:translate3d(100%,0,0)}
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/utils/device-util.js:
--------------------------------------------------------------------------------
1 | class DeviceUtil{constructor(t){this.systemInfo=t}px2rpx(t){return 750/this.systemInfo.windowWidth*t}rpx2px(t){return this.systemInfo.windowWidth/750*t}getNavigationBarHeight(){return this.getTitleBarHeight()+this.getStatusBarHeight()}getStatusBarHeight(){return this.px2rpx(this.systemInfo.statusBarHeight)}getTitleBarHeight(){const t=this.systemInfo.statusBarHeight,e=wx.getMenuButtonBoundingClientRect(),i=e.top-t;return this.px2rpx(2*i+e.height)}}const deviceUtil=new DeviceUtil(wx.getSystemInfoSync());export default deviceUtil;
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/utils/util.js:
--------------------------------------------------------------------------------
1 | const promisic=function(n){return function(t={}){return new Promise((c,r)=>{const s=Object.assign(t,{success:n=>{c(n)},fail:n=>{r(n)}});n(s)})}},px2rpx=function(n){const{screenWidth:t}=wx.getSystemInfoSync();return 750/t*n};export{promisic,px2rpx};
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/water-flow/index.js:
--------------------------------------------------------------------------------
1 | import eventUtil from"../core/utils/event-util";Component({properties:{columnGap:{type:String,value:"20rpx"}},data:{data:[],leftData:[],rightData:[]},attached(){this._init()},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.renderWaterFlow=(t=[],e=!1,a)=>{if("[object Array]"!==Object.prototype.toString.call(t))return console.error("[data]参数类型错误,渲染失败"),!1;this.setData({data:t}),e&&(this.data.leftData=[],this.data.rightData=[]),this._select(t,e).then(()=>{a&&a()}).catch(t=>{console.error(t)})}},_select(t,e){const a=wx.createSelectorQuery().in(this);return this.columnNodes=a.selectAll("#left, #right"),new Promise(a=>{this._render(t,0,e,()=>{a()})})},_render(t,e,a,i){(t.length>e||a)&&0!==this.data.data.length?this.columnNodes.boundingClientRect().exec(h=>{const r=h[0];this.data.leftHeight=r[0].height,this.data.rightHeight=r[1].height,this.data.leftHeight<=this.data.rightHeight||a?this.data.leftData.push(t[e]):this.data.rightData.push(t[e]),this.setData({leftData:this.data.leftData,rightData:this.data.rightData},()=>{this._render(t,++e,!1,i)})}):i&&i()},onTapItem(t){eventUtil.emit(this,"linitemtap",{item:t.currentTarget.dataset.item})}}});
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/water-flow/index.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{},"componentGenerics":{"l-water-flow-item":true} }
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/water-flow/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/miniprogram_npm/lin-ui/water-flow/index.wxss:
--------------------------------------------------------------------------------
1 | .water-flow-container{display:flex;width:100%;box-sizing:border-box;background:0 0}.water-column{flex:1}
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "open-eyes",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": ".eslintrc.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "lin-ui": "^0.9.5",
13 | "momen": "^0.0.1-security",
14 | "moment": "^2.29.1"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/pages/category-detail/category-detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "daily-item":"/components/daily-item/index"
4 | }
5 | }
--------------------------------------------------------------------------------
/pages/category-detail/category-detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{name}}
6 | {{description}}
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/pages/category-detail/category-detail.wxss:
--------------------------------------------------------------------------------
1 | .container{
2 | display: flex;
3 | flex-direction: column;
4 | }
5 |
6 | .head-container{
7 | display: flex;
8 | flex-direction: column;
9 | align-items: center;
10 | justify-content: center;
11 | }
12 |
13 | .headerImage{
14 | width: 100%;
15 | height: 400rpx;
16 | }
17 |
18 | .category-container{
19 | display: flex;
20 | flex-direction: column;
21 | align-items: center;
22 | justify-content: center;
23 | position: absolute;
24 | }
25 |
26 | .category-name{
27 | color: #ffffff;
28 | font-size: 44rpx;
29 | font-weight: bold;
30 | }
31 |
32 | .category-desc{
33 | color: #ffffff;
34 | font-size: 24rpx;
35 | margin-top: 10rpx;
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/pages/home/home.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "l-tabs":"/miniprogram_npm/lin-ui/tabs/index",
4 | "l-tabpanel":"/miniprogram_npm/lin-ui/tabpanel/index",
5 | "l-segment":"/miniprogram_npm/lin-ui/segment/index",
6 | "l-segment-item":"/miniprogram_npm/lin-ui/segment-item/index",
7 | "daily-tab":"/components/daily-tab/index",
8 | "follow-tab":"/components/follow-tab/index",
9 | "category-tab":"/components/category-tab/index",
10 | "topic-tab":"/components/topic-tab/index",
11 | "news-tab":"/components/news-tab/index",
12 | "recommend-tab":"/components/recommend-tab/index"
13 | },
14 | "enablePullDownRefresh": true,
15 | "backgroundTextStyle": "dark",
16 | "navigationBarTitleText": "首页"
17 | }
--------------------------------------------------------------------------------
/pages/home/home.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/pages/home/home.wxss:
--------------------------------------------------------------------------------
1 | .container {
2 | display: flex;
3 | flex-direction: column;
4 | }
5 |
6 | .segment {
7 | position: fixed;
8 | top: 0rpx;
9 | z-index: 99;
10 | background: #fff;
11 | width: 100%;
12 | z-index: 999;
13 | }
14 |
15 | .swiper{
16 | height: 100%;
17 | }
--------------------------------------------------------------------------------
/pages/mine/mime.js:
--------------------------------------------------------------------------------
1 | // pages/mine/mime.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/pages/mine/mime.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "l-avatar":"/miniprogram_npm/lin-ui/avatar/index"
4 | },
5 | "navigationBarTitleText": "我的"
6 | }
--------------------------------------------------------------------------------
/pages/mine/mime.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 我的收藏
4 | 我的关注
5 | 我的浏览
6 |
7 |
--------------------------------------------------------------------------------
/pages/mine/mime.wxss:
--------------------------------------------------------------------------------
1 | .container{
2 | display: flex;
3 | flex-direction: column;
4 | align-items: center;
5 | }
6 |
7 | .avatar{
8 | margin-top: 60rpx;
9 | }
10 |
11 | .setting-text{
12 | font-size: 30rpx;
13 | color: #333333;
14 | margin-top: 80rpx;
15 | }
--------------------------------------------------------------------------------
/pages/news-detail/news-detail.js:
--------------------------------------------------------------------------------
1 | // pages/news-detail/news-detail.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | url:''
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 | const url = options.url
16 | this.setData({
17 | url:decodeURIComponent(url)
18 | })
19 | },
20 |
21 | /**
22 | * 生命周期函数--监听页面初次渲染完成
23 | */
24 | onReady: function () {
25 |
26 | },
27 |
28 | /**
29 | * 生命周期函数--监听页面显示
30 | */
31 | onShow: function () {
32 |
33 | },
34 |
35 | /**
36 | * 生命周期函数--监听页面隐藏
37 | */
38 | onHide: function () {
39 |
40 | },
41 |
42 | /**
43 | * 生命周期函数--监听页面卸载
44 | */
45 | onUnload: function () {
46 |
47 | },
48 |
49 | /**
50 | * 页面相关事件处理函数--监听用户下拉动作
51 | */
52 | onPullDownRefresh: function () {
53 |
54 | },
55 |
56 | /**
57 | * 页面上拉触底事件的处理函数
58 | */
59 | onReachBottom: function () {
60 |
61 | },
62 |
63 | /**
64 | * 用户点击右上角分享
65 | */
66 | onShareAppMessage: function () {
67 |
68 | },
69 | })
--------------------------------------------------------------------------------
/pages/news-detail/news-detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/news-detail/news-detail.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/news-detail/news-detail.wxss:
--------------------------------------------------------------------------------
1 | /* pages/news-detail/news-detail.wxss */
--------------------------------------------------------------------------------
/pages/topic-detail/topic-detail.js:
--------------------------------------------------------------------------------
1 | import moment from '../../miniprogram_npm/moment/index.js';
2 |
3 | const app = getApp()
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | topDetail:{}
11 | },
12 |
13 | /**
14 | * 生命周期函数--监听页面加载
15 | */
16 | onLoad: function (options) {
17 | const id = options.id
18 | wx.request({
19 | url: app.gBaseUrl + "v3/lightTopics/internal/" + id,
20 | success:(res)=>{
21 | wx.setNavigationBarTitle({
22 | title: res.data.brief,
23 | })
24 | this.setData({
25 | topDetail:res.data
26 | })
27 | },
28 | fail:(res)=>{
29 | wx.showToast({
30 | icon:'error',
31 | title: res.errMsg,
32 | })
33 | }
34 | })
35 | },
36 |
37 | /**
38 | * 生命周期函数--监听页面初次渲染完成
39 | */
40 | onReady: function () {
41 |
42 | },
43 |
44 | /**
45 | * 生命周期函数--监听页面显示
46 | */
47 | onShow: function () {
48 |
49 | },
50 |
51 | /**
52 | * 生命周期函数--监听页面隐藏
53 | */
54 | onHide: function () {
55 |
56 | },
57 |
58 | /**
59 | * 生命周期函数--监听页面卸载
60 | */
61 | onUnload: function () {
62 |
63 | },
64 |
65 | /**
66 | * 页面相关事件处理函数--监听用户下拉动作
67 | */
68 | onPullDownRefresh: function () {
69 |
70 | },
71 |
72 | /**
73 | * 页面上拉触底事件的处理函数
74 | */
75 | onReachBottom: function () {
76 |
77 | },
78 |
79 | /**
80 | * 用户点击右上角分享
81 | */
82 | onShareAppMessage: function () {
83 |
84 | }
85 | })
--------------------------------------------------------------------------------
/pages/topic-detail/topic-detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "daily-item":"/components/daily-item/index"
4 | }
5 | }
--------------------------------------------------------------------------------
/pages/topic-detail/topic-detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{topDetail.text}}
5 |
6 | {{topDetail.brief}}
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/pages/topic-detail/topic-detail.wxss:
--------------------------------------------------------------------------------
1 | /* pages/topic-detail/topic-detail.wxss */
2 | .container{
3 | display: flex;
4 | flex-direction: column;
5 | }
6 |
7 | .head-container{
8 | display: flex;
9 | flex-direction: column;
10 | position: relative;
11 | }
12 |
13 | .head-image{
14 | width: 100%;
15 | height: 500rpx;
16 | }
17 |
18 | .brief-container{
19 | display: flex;
20 | position: absolute;
21 | background-color: #ffffff;
22 | height: 100rpx;
23 | border-radius: 8rpx;
24 | border: 1px solid #eeeeee;
25 | left: 40rpx;
26 | top: 460rpx;
27 | right: 40rpx;
28 | justify-content: center;
29 | align-items: center;
30 | }
31 |
32 | .brief{
33 | font-size: 28rpx;
34 | color: #000000;
35 | font-weight: bold;
36 | }
37 |
38 | .des-text{
39 | font-size: 24rpx;
40 | color: #9a9a9a;
41 | padding-left: 40rpx;
42 | padding-right: 40rpx;
43 | padding-top: 80rpx;
44 | padding-bottom: 20rpx;
45 | }
46 |
47 | .head-space{
48 | height: 10rpx;
49 | background-color: #eeeeee;
50 | }
--------------------------------------------------------------------------------
/pages/video-detail/video-detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/sitemap.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3 | "rules": [{
4 | "action": "allow",
5 | "page": "*"
6 | }]
7 | }
--------------------------------------------------------------------------------
/utils/util.js:
--------------------------------------------------------------------------------
1 | function formatDateMsByMS(millisecond) {
2 | return moment(new Date(millisecond)).format('mm:ss');
3 | }
4 |
5 | export {formatDateMsByMS}
--------------------------------------------------------------------------------