├── static
├── .gitkeep
├── vant-weapp
│ ├── common
│ │ ├── style
│ │ │ ├── var.wxss
│ │ │ ├── mixins
│ │ │ │ ├── clearfix.wxss
│ │ │ │ ├── ellipsis.wxss
│ │ │ │ └── hairline.wxss
│ │ │ ├── clearfix.wxss
│ │ │ ├── ellipsis.wxss
│ │ │ └── hairline.wxss
│ │ ├── color.js
│ │ ├── color.d.ts
│ │ ├── component.d.ts
│ │ ├── utils.d.ts
│ │ ├── utils.js
│ │ ├── index.wxss
│ │ └── component.js
│ ├── area
│ │ ├── index.d.ts
│ │ ├── index.wxss
│ │ ├── index.json
│ │ └── index.wxml
│ ├── card
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.js
│ │ ├── index.wxss
│ │ └── index.wxml
│ ├── cell
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.js
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── col
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.js
│ │ └── index.wxss
│ ├── icon
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.js
│ │ └── index.wxml
│ ├── info
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.js
│ │ └── index.wxss
│ ├── rate
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
│ ├── row
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
│ ├── tab
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
│ ├── tabs
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ └── index.wxml
│ ├── tag
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.wxss
│ │ └── index.js
│ ├── badge
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.wxss
│ │ └── index.js
│ ├── button
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.js
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── checkbox
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.wxss
│ │ └── index.js
│ ├── collapse
│ │ ├── index.d.ts
│ │ ├── index.wxss
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.js
│ ├── dialog
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── dialog.d.ts
│ │ ├── dialog.js
│ │ └── index.wxml
│ ├── field
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ └── index.wxss
│ ├── loading
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.js
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── nav-bar
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.js
│ │ └── index.wxml
│ ├── notify
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── notify.d.ts
│ │ ├── index.wxml
│ │ ├── notify.js
│ │ └── index.js
│ ├── overlay
│ │ ├── index.d.ts
│ │ ├── index.wxss
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.js
│ ├── panel
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.js
│ │ └── index.wxml
│ ├── picker
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── shared.js
│ │ ├── shared.d.ts
│ │ ├── index.wxss
│ │ └── index.wxml
│ ├── popup
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.js
│ │ └── index.wxss
│ ├── progress
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxs
│ │ ├── index.wxss
│ │ ├── index.js
│ │ └── index.wxml
│ ├── radio-group
│ │ ├── index.wxml
│ │ ├── index.d.ts
│ │ ├── index.wxss
│ │ ├── index.json
│ │ └── index.js
│ ├── radio
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
│ ├── search
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.js
│ │ └── index.wxml
│ ├── slider
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ └── index.wxml
│ ├── stepper
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── steps
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.js
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── switch
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.wxss
│ │ └── index.js
│ ├── tabbar
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
│ ├── toast
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.js
│ │ ├── index.wxss
│ │ ├── toast.d.ts
│ │ ├── index.wxml
│ │ └── toast.js
│ ├── action-sheet
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.js
│ │ └── index.wxml
│ ├── badge-group
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
│ ├── cell-group
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
│ ├── checkbox-group
│ │ ├── index.d.ts
│ │ ├── index.wxml
│ │ ├── index.wxss
│ │ ├── index.json
│ │ └── index.js
│ ├── collapse-item
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ └── index.wxml
│ ├── goods-action
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.js
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── notice-bar
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ └── index.wxml
│ ├── picker-column
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ └── index.wxml
│ ├── submit-bar
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
│ ├── swipe-cell
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ └── index.wxml
│ ├── switch-cell
│ │ ├── index.d.ts
│ │ ├── index.wxss
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.js
│ ├── tabbar-item
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
│ ├── transition
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.js
│ │ └── index.wxss
│ ├── tree-select
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ └── index.wxml
│ ├── datetime-picker
│ │ ├── index.d.ts
│ │ ├── index.wxss
│ │ ├── index.json
│ │ └── index.wxml
│ ├── goods-action-button
│ │ ├── index.d.ts
│ │ ├── index.wxss
│ │ ├── index.json
│ │ ├── index.js
│ │ └── index.wxml
│ ├── goods-action-icon
│ │ ├── index.d.ts
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.js
│ │ └── index.wxml
│ ├── mixins
│ │ ├── basic.d.ts
│ │ ├── link.d.ts
│ │ ├── touch.d.ts
│ │ ├── button.d.ts
│ │ ├── open-type.d.ts
│ │ ├── observer
│ │ │ ├── behavior.d.ts
│ │ │ ├── props.d.ts
│ │ │ ├── index.d.ts
│ │ │ ├── props.js
│ │ │ ├── index.js
│ │ │ └── behavior.js
│ │ ├── transition.d.ts
│ │ ├── safe-area.d.ts
│ │ ├── link.js
│ │ ├── button.js
│ │ ├── basic.js
│ │ ├── open-type.js
│ │ ├── touch.js
│ │ └── safe-area.js
│ └── wxs
│ │ ├── array.wxs
│ │ ├── object.wxs
│ │ ├── utils.wxs
│ │ ├── bem.wxs
│ │ └── memoize.wxs
├── tabs
│ ├── home.png
│ ├── list.png
│ ├── mine.png
│ ├── home-active.png
│ ├── list-active.png
│ └── mine-active.png
└── images
│ └── user.png
├── src
├── pages
│ ├── mine
│ │ ├── store.js
│ │ ├── main.json
│ │ ├── main.js
│ │ └── index.vue
│ ├── rank
│ │ ├── store.js
│ │ ├── main.json
│ │ └── main.js
│ ├── movice
│ │ ├── store.js
│ │ └── main.js
│ ├── rankList
│ │ ├── store.js
│ │ └── main.js
│ ├── moviceDetail
│ │ ├── store.js
│ │ ├── main.json
│ │ └── main.js
│ ├── moviceList
│ │ ├── store.js
│ │ └── main.js
│ ├── logs
│ │ ├── main.json
│ │ ├── main.js
│ │ └── index.vue
│ ├── counter
│ │ ├── main.js
│ │ ├── store.js
│ │ └── index.vue
│ └── index
│ │ └── main.js
├── main.js
├── components
│ ├── LoadingComponent.vue
│ ├── GradeStar.vue
│ ├── MoviceLabel.vue
│ └── OrderCard.vue
├── assets
│ └── style
│ │ ├── base.scss
│ │ └── mixin.scss
├── utils
│ └── index.js
├── App.vue
└── app.json
├── config
├── prod.env.js
├── dev.env.js
└── index.js
├── will_delete
└── 微信图片_20190718103234.jpg
├── .postcssrc.js
├── .editorconfig
├── .gitignore
├── project.swan.json
├── package.swan.json
├── index.html
├── .babelrc
└── project.config.json
/static/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/pages/mine/store.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/pages/rank/store.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/pages/movice/store.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/pages/rankList/store.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/pages/moviceDetail/store.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/pages/moviceList/store.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/vant-weapp/common/style/var.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/vant-weapp/area/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/card/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/cell/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/col/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/icon/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/info/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/rate/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/row/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/tab/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/tabs/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/tag/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/badge/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/button/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/checkbox/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/collapse/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/common/style/mixins/clearfix.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/vant-weapp/common/style/mixins/ellipsis.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/vant-weapp/common/style/mixins/hairline.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/vant-weapp/dialog/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/field/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/loading/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/nav-bar/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/notify/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/overlay/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/panel/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/picker/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/popup/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/progress/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/radio-group/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/radio/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/search/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/slider/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/stepper/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/steps/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/switch/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/tabbar/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/toast/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/action-sheet/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/badge-group/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/cell-group/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/checkbox-group/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/checkbox-group/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/collapse-item/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/goods-action/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/notice-bar/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/picker-column/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/radio-group/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/submit-bar/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/swipe-cell/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/switch-cell/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/tabbar-item/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/transition/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/tree-select/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/datetime-picker/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/goods-action-button/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/goods-action-icon/index.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/tab/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/static/vant-weapp/tag/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/static/vant-weapp/area/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';
--------------------------------------------------------------------------------
/static/vant-weapp/col/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant-weapp/collapse/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';
--------------------------------------------------------------------------------
/static/vant-weapp/loading/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/static/vant-weapp/row/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant-weapp/stepper/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/src/pages/mine/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "我的"
3 | }
--------------------------------------------------------------------------------
/src/pages/rank/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "榜单"
3 | }
--------------------------------------------------------------------------------
/static/vant-weapp/cell-group/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/static/vant-weapp/collapse/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant-weapp/info/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/basic.d.ts:
--------------------------------------------------------------------------------
1 | export declare const basic: void;
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/link.d.ts:
--------------------------------------------------------------------------------
1 | export declare const link: void;
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/touch.d.ts:
--------------------------------------------------------------------------------
1 | export declare const touch: void;
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/picker-column/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/static/vant-weapp/progress/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant-weapp/radio-group/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';
--------------------------------------------------------------------------------
/static/vant-weapp/slider/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant-weapp/tabbar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant-weapp/transition/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | NODE_ENV: '"production"'
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/logs/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "查看启动日志"
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant-weapp/badge-group/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant-weapp/checkbox-group/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';
--------------------------------------------------------------------------------
/static/vant-weapp/datetime-picker/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';
--------------------------------------------------------------------------------
/static/vant-weapp/goods-action/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/button.d.ts:
--------------------------------------------------------------------------------
1 | export declare const button: void;
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/swipe-cell/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/moviceDetail/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "绑架者"
3 | }
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/open-type.d.ts:
--------------------------------------------------------------------------------
1 | export declare const openType: void;
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/observer/behavior.d.ts:
--------------------------------------------------------------------------------
1 | export declare const behavior: void;
2 |
--------------------------------------------------------------------------------
/static/tabs/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lusteng/wx-douban/HEAD/static/tabs/home.png
--------------------------------------------------------------------------------
/static/tabs/list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lusteng/wx-douban/HEAD/static/tabs/list.png
--------------------------------------------------------------------------------
/static/tabs/mine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lusteng/wx-douban/HEAD/static/tabs/mine.png
--------------------------------------------------------------------------------
/static/images/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lusteng/wx-douban/HEAD/static/images/user.png
--------------------------------------------------------------------------------
/static/vant-weapp/badge-group/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-badge-group{width:85px}
--------------------------------------------------------------------------------
/static/vant-weapp/common/style/clearfix.wxss:
--------------------------------------------------------------------------------
1 | .van-clearfix:after{content:"";display:table;clear:both}
--------------------------------------------------------------------------------
/static/tabs/home-active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lusteng/wx-douban/HEAD/static/tabs/home-active.png
--------------------------------------------------------------------------------
/static/tabs/list-active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lusteng/wx-douban/HEAD/static/tabs/list-active.png
--------------------------------------------------------------------------------
/static/tabs/mine-active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lusteng/wx-douban/HEAD/static/tabs/mine-active.png
--------------------------------------------------------------------------------
/static/vant-weapp/goods-action-button/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';:host{-webkit-flex:1;flex:1}
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/observer/props.d.ts:
--------------------------------------------------------------------------------
1 | export declare function observeProps(props: any): void;
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/transition.d.ts:
--------------------------------------------------------------------------------
1 | export declare const transition: (showDefaultValue: boolean) => void;
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/row/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-row:after{content:"";display:table;clear:both}
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/observer/index.d.ts:
--------------------------------------------------------------------------------
1 | export declare function observe(vantOptions: any, options: any): void;
2 |
--------------------------------------------------------------------------------
/static/vant-weapp/row/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/will_delete/微信图片_20190718103234.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lusteng/wx-douban/HEAD/will_delete/微信图片_20190718103234.jpg
--------------------------------------------------------------------------------
/static/vant-weapp/overlay/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-overlay{position:fixed;top:0;right:0;bottom:0;left:0}
--------------------------------------------------------------------------------
/src/pages/counter/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/logs/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/static/vant-weapp/cell/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/static/vant-weapp/common/color.js:
--------------------------------------------------------------------------------
1 | export const RED = '#f44';
2 | export const BLUE = '#1989fa';
3 | export const GREEN = '#07c160';
4 |
--------------------------------------------------------------------------------
/static/vant-weapp/badge-group/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/vant-weapp/badge/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-info": "../info/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/card/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-tag": "../tag/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/icon/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-info": "../info/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/notice-bar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/static/vant-weapp/panel/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-cell": "../cell/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/radio/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/rate/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/steps/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/tabs/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-info": "../info/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/area/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-picker": "../picker/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/button/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-loading": "../loading/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/static/vant-weapp/checkbox/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/nav-bar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/popup/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-overlay": "../overlay/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/radio-group/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/checkbox-group/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/collapse-item/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-cell": "../cell/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/switch/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-loading": "../loading/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/cell-group/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-cell-group__title{font-size:14px;padding:15px 15px 5px;color:#999;line-height:16px}
--------------------------------------------------------------------------------
/static/vant-weapp/collapse/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/vant-weapp/datetime-picker/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-picker": "../picker/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/notify/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-transition": "../transition/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/overlay/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-transition": "../transition/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/common/color.d.ts:
--------------------------------------------------------------------------------
1 | export declare const RED = "#f44";
2 | export declare const BLUE = "#1989fa";
3 | export declare const GREEN = "#07c160";
4 |
--------------------------------------------------------------------------------
/static/vant-weapp/goods-action-button/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-button": "../button/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/wxs/array.wxs:
--------------------------------------------------------------------------------
1 | function isArray(array) {
2 | return array && array.constructor === 'Array';
3 | }
4 |
5 | module.exports.isArray = isArray;
6 |
--------------------------------------------------------------------------------
/static/vant-weapp/info/index.wxml:
--------------------------------------------------------------------------------
1 | {{ info }}
6 |
--------------------------------------------------------------------------------
/static/vant-weapp/panel/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-panel{background:#fff}.van-panel__header-value{color:#f44}.van-panel__footer{padding:10px 15px}
--------------------------------------------------------------------------------
/static/vant-weapp/progress/index.wxs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | text: function(pivotText, percentage) {
3 | return pivotText || percentage + '%';
4 | }
5 | };
6 |
--------------------------------------------------------------------------------
/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | "postcss-mpvue-wxss": {}
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/static/vant-weapp/switch-cell/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-switch-cell{padding-top:9px;padding-bottom:9px}.van-switch-cell__switch{vertical-align:middle}
--------------------------------------------------------------------------------
/static/vant-weapp/field/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-cell": "../cell/index",
5 | "van-icon": "../icon/index"
6 | }
7 | }
--------------------------------------------------------------------------------
/config/dev.env.js:
--------------------------------------------------------------------------------
1 | var merge = require('webpack-merge')
2 | var prodEnv = require('./prod.env')
3 |
4 | module.exports = merge(prodEnv, {
5 | NODE_ENV: '"development"'
6 | })
7 |
--------------------------------------------------------------------------------
/static/vant-weapp/search/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-field": "../field/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/static/vant-weapp/dialog/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-popup": "../popup/index",
5 | "van-button": "../button/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/static/vant-weapp/submit-bar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-button": "../button/index",
5 | "van-icon": "../icon/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/static/vant-weapp/tabbar-item/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-info": "../info/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/static/vant-weapp/tree-select/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-cell": "../cell/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/pages/moviceDetail/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
7 | export default {
8 | }
9 |
10 |
11 |
--------------------------------------------------------------------------------
/static/vant-weapp/switch-cell/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-cell": "../cell/index",
5 | "van-switch": "../switch/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/static/vant-weapp/goods-action-icon/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-button": "../button/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/static/vant-weapp/picker/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "picker-column": "../picker-column/index",
5 | "loading": "../loading/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/static/vant-weapp/info/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | props: {
4 | info: null,
5 | customStyle: String
6 | }
7 | });
8 |
--------------------------------------------------------------------------------
/static/vant-weapp/tab/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-tab__pane{box-sizing:border-box;overflow-y:auto}.van-tab__pane--active{height:auto}.van-tab__pane--inactive{height:0;overflow:visible}
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 4
7 | end_of_line = 1f
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/static/vant-weapp/goods-action/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { safeArea } from '../mixins/safe-area';
3 | VantComponent({
4 | mixins: [safeArea()]
5 | });
6 |
--------------------------------------------------------------------------------
/src/pages/rank/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
7 | export default {
8 | config: {
9 | }
10 | }
11 |
12 |
13 |
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/safe-area.d.ts:
--------------------------------------------------------------------------------
1 | export declare const safeArea: ({ safeAreaInsetBottom, safeAreaInsetTop }?: {
2 | safeAreaInsetBottom?: boolean;
3 | safeAreaInsetTop?: boolean;
4 | }) => void;
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
8 | # Editor directories and files
9 | .idea
10 | *.suo
11 | *.ntvs*
12 | *.njsproj
13 | *.sln
14 |
--------------------------------------------------------------------------------
/project.swan.json:
--------------------------------------------------------------------------------
1 | {
2 | "appid": "testappid",
3 | "setting": {
4 | "urlCheck": false
5 | },
6 | "condition": {
7 | "swan": {
8 | "current": -1,
9 | "list": []
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/package.swan.json:
--------------------------------------------------------------------------------
1 | {
2 | "appid": "touristappid",
3 | "setting": {
4 | "urlCheck": false
5 | },
6 | "condition": {
7 | "swan": {
8 | "current": -1,
9 | "list": []
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/static/vant-weapp/action-sheet/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-popup": "../popup/index",
6 | "van-loading": "../loading/index"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/static/vant-weapp/goods-action/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/static/vant-weapp/goods-action/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-goods-action{position:fixed;right:0;bottom:0;left:0;display:-webkit-flex;display:flex;background-color:#fff}.van-goods-action--safe{padding-bottom:34px}
--------------------------------------------------------------------------------
/src/pages/mine/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
7 | export default {
8 | config: {
9 | navigationBarTitleText: '首页'
10 | }
11 | }
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/pages/movice/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
7 | export default {
8 | config: {
9 | navigationBarTitleText: '首页'
10 | }
11 | }
12 |
13 |
14 |
--------------------------------------------------------------------------------
/static/vant-weapp/tabbar/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-tabbar{display:-webkit-flex;display:flex;width:100%;height:50px;background-color:#fff}.van-tabbar--fixed{position:fixed;bottom:0;left:0}.van-tabbar--safe{padding-bottom:34px}
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App'
3 |
4 |
5 | Vue.config.productionTip = false
6 | App.mpType = 'app'
7 |
8 | const app = new Vue(App)
9 | app.$mount()
10 |
11 | Vue.prototype.globalData = getApp().globalData
--------------------------------------------------------------------------------
/src/pages/rankList/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
7 | export default {
8 | config: {
9 | navigationBarTitleText: '榜单'
10 | }
11 | }
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/pages/moviceList/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
7 | export default {
8 | config: {
9 | "onReachBottomDistance": 100
10 | }
11 | }
12 |
13 |
14 |
--------------------------------------------------------------------------------
/static/vant-weapp/notify/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-notify{position:fixed;top:0;width:100%;padding:6px 15px;font-size:14px;line-height:20px;text-align:center;word-break:break-all;box-sizing:border-box}.van-notify__safe-top{height:44px}
--------------------------------------------------------------------------------
/static/vant-weapp/col/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | douban-movice
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/static/vant-weapp/cell-group/index.wxml:
--------------------------------------------------------------------------------
1 |
5 | {{ title }}
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/static/vant-weapp/cell-group/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | props: {
4 | title: String,
5 | border: {
6 | type: Boolean,
7 | value: true
8 | }
9 | }
10 | });
11 |
--------------------------------------------------------------------------------
/static/vant-weapp/tag/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/static/vant-weapp/toast/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-loading": "../loading/index",
6 | "van-overlay": "../overlay/index",
7 | "van-transition": "../transition/index"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/static/vant-weapp/common/component.d.ts:
--------------------------------------------------------------------------------
1 | declare function VantComponent(vantOptions?: VantComponentOptions>): void;
2 | export { VantComponent };
3 |
--------------------------------------------------------------------------------
/static/vant-weapp/common/utils.d.ts:
--------------------------------------------------------------------------------
1 | declare function isDef(value: any): boolean;
2 | declare function isObj(x: any): boolean;
3 | declare function isNumber(value: any): boolean;
4 | declare function range(num: number, min: number, max: number): number;
5 | export { isObj, isDef, isNumber, range };
6 |
--------------------------------------------------------------------------------
/static/vant-weapp/picker-column/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-picker-column{overflow:hidden;font-size:16px;color:#999;text-align:center}.van-picker-column__item{padding:0 5px}.van-picker-column__item--selected{font-weight:500;color:#333}.van-picker-column__item--disabled{opacity:.3}
--------------------------------------------------------------------------------
/static/vant-weapp/rate/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-rate{-webkit-user-select:none;user-select:none}.van-rate__item{position:relative;display:inline-block;padding:0 2px}.van-rate__icon{display:block;height:1em}.van-rate__icon--half{position:absolute;top:0;left:2px;width:.5em;overflow:hidden}
--------------------------------------------------------------------------------
/static/vant-weapp/panel/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | classes: ['header-class', 'footer-class'],
4 | props: {
5 | desc: String,
6 | title: String,
7 | status: String,
8 | useFooterSlot: Boolean
9 | }
10 | });
11 |
--------------------------------------------------------------------------------
/static/vant-weapp/overlay/index.wxml:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/static/vant-weapp/common/style/ellipsis.wxss:
--------------------------------------------------------------------------------
1 | .van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}
--------------------------------------------------------------------------------
/static/vant-weapp/tabbar/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/static/vant-weapp/wxs/object.wxs:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | var REGEXP = getRegExp('{|}|"', 'g');
3 |
4 | function keys(obj) {
5 | return JSON.stringify(obj)
6 | .replace(REGEXP, '')
7 | .split(',')
8 | .map(function(item) {
9 | return item.split(':')[0];
10 | });
11 | }
12 |
13 | module.exports.keys = keys;
14 |
--------------------------------------------------------------------------------
/src/pages/index/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | // add this to handle exception
5 | Vue.config.errorHandler = function (err) {
6 | if (console && console.error) {
7 | console.error(err)
8 | }
9 | }
10 |
11 | const app = new Vue(App)
12 | app.$mount()
13 | Vue.prototype.globalData = getApp().globalData
--------------------------------------------------------------------------------
/static/vant-weapp/tab/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/static/vant-weapp/transition/index.wxml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/static/vant-weapp/wxs/utils.wxs:
--------------------------------------------------------------------------------
1 | var bem = require('./bem.wxs').bem;
2 | var memoize = require('./memoize.wxs').memoize;
3 |
4 | function isSrc(url) {
5 | return url.indexOf('http') === 0 || url.indexOf('data:image') === 0 || url.indexOf('//') === 0;
6 | }
7 |
8 | module.exports = {
9 | bem: memoize(bem),
10 | isSrc: isSrc,
11 | memoize: memoize
12 | };
13 |
--------------------------------------------------------------------------------
/static/vant-weapp/notify/notify.d.ts:
--------------------------------------------------------------------------------
1 | interface NotifyOptions {
2 | text: string;
3 | color?: string;
4 | backgroundColor?: string;
5 | duration?: number;
6 | selector?: string;
7 | context?: any;
8 | safeAreaInsetTop?: boolean;
9 | zIndex?: number;
10 | }
11 | export default function Notify(options: NotifyOptions | string): void;
12 | export {};
13 |
--------------------------------------------------------------------------------
/static/vant-weapp/swipe-cell/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-swipe-cell{position:relative;overflow:hidden}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", {
4 | "modules": false,
5 | "targets": {
6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7 | }
8 | }],
9 | "stage-2"
10 | ],
11 | "plugins": ["transform-runtime"],
12 | "env": {
13 | "test": {
14 | "presets": ["env", "stage-2"],
15 | "plugins": ["istanbul"]
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/static/vant-weapp/goods-action-icon/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-goods-action-icon{width:50px!important;border:none!important}.van-goods-action-icon__content{display:-webkit-flex;display:flex;height:100%;font-size:10px;line-height:1;color:#7d7e80;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-goods-action-icon__icon{margin-bottom:4px}
--------------------------------------------------------------------------------
/static/vant-weapp/notify/index.wxml:
--------------------------------------------------------------------------------
1 |
7 |
8 | {{ text }}
9 |
10 |
--------------------------------------------------------------------------------
/static/vant-weapp/transition/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { transition } from '../mixins/transition';
3 | VantComponent({
4 | classes: [
5 | 'enter-class',
6 | 'enter-active-class',
7 | 'enter-to-class',
8 | 'leave-class',
9 | 'leave-active-class',
10 | 'leave-to-class'
11 | ],
12 | mixins: [transition(true)]
13 | });
14 |
--------------------------------------------------------------------------------
/static/vant-weapp/loading/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | props: {
4 | size: {
5 | type: String,
6 | value: '30px'
7 | },
8 | type: {
9 | type: String,
10 | value: 'circular'
11 | },
12 | color: {
13 | type: String,
14 | value: '#c9c9c9'
15 | }
16 | }
17 | });
18 |
--------------------------------------------------------------------------------
/static/vant-weapp/loading/index.wxml:
--------------------------------------------------------------------------------
1 |
5 |
9 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/static/vant-weapp/common/utils.js:
--------------------------------------------------------------------------------
1 | function isDef(value) {
2 | return value !== undefined && value !== null;
3 | }
4 | function isObj(x) {
5 | const type = typeof x;
6 | return x !== null && (type === 'object' || type === 'function');
7 | }
8 | function isNumber(value) {
9 | return /^\d+$/.test(value);
10 | }
11 | function range(num, min, max) {
12 | return Math.min(Math.max(num, min), max);
13 | }
14 | export { isObj, isDef, isNumber, range };
15 |
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/link.js:
--------------------------------------------------------------------------------
1 | export const link = Behavior({
2 | properties: {
3 | url: String,
4 | linkType: {
5 | type: String,
6 | value: 'navigateTo'
7 | }
8 | },
9 | methods: {
10 | jumpLink(urlKey = 'url') {
11 | const url = this.data[urlKey];
12 | if (url) {
13 | wx[this.data.linkType]({ url });
14 | }
15 | }
16 | }
17 | });
18 |
--------------------------------------------------------------------------------
/static/vant-weapp/info/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-info{position:absolute;top:-8px;right:0;min-width:16px;padding:0 3px;font-family:PingFang SC,Helvetica Neue,Arial,sans-serif;font-size:12px;font-weight:500;line-height:14px;color:#fff;text-align:center;white-space:nowrap;background-color:#f44;border:1px solid #fff;border-radius:16px;-webkit-transform:translateX(50%);transform:translateX(50%);box-sizing:border-box;-webkit-transform-origin:100%;transform-origin:100%}
--------------------------------------------------------------------------------
/static/vant-weapp/tag/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-tag{color:#fff;font-size:10px;padding:.2em .5em;line-height:normal;border-radius:.2em;display:inline-block}.van-tag:after{border-color:currentColor;border-radius:.4em}.van-tag--mark{padding-right:.6em;border-radius:0 .8em .8em 0}.van-tag--mark:after{border-radius:0 1.6em 1.6em 0}.van-tag--round{border-radius:.8em}.van-tag--round:after{border-radius:1.6em}.van-tag--medium{font-size:12px}.van-tag--large{font-size:14px}
--------------------------------------------------------------------------------
/static/vant-weapp/steps/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { GREEN } from '../common/color';
3 | VantComponent({
4 | props: {
5 | icon: String,
6 | steps: Array,
7 | active: Number,
8 | direction: {
9 | type: String,
10 | value: 'horizontal'
11 | },
12 | activeColor: {
13 | type: String,
14 | value: GREEN
15 | }
16 | }
17 | });
18 |
--------------------------------------------------------------------------------
/static/vant-weapp/badge/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
15 | {{ title }}
16 |
17 |
18 |
--------------------------------------------------------------------------------
/static/vant-weapp/icon/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | props: {
4 | info: null,
5 | name: String,
6 | size: String,
7 | color: String,
8 | customStyle: String,
9 | classPrefix: {
10 | type: String,
11 | value: 'van-icon'
12 | }
13 | },
14 | methods: {
15 | onClick() {
16 | this.$emit('click');
17 | }
18 | }
19 | });
20 |
--------------------------------------------------------------------------------
/static/vant-weapp/progress/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-progress{position:relative;height:4px;background:#e5e5e5;border-radius:4px}.van-progress__portion{position:absolute;left:0;height:100%;border-radius:inherit}.van-progress__pivot{position:absolute;top:50%;right:0;min-width:2em;padding:0 5px;font-size:10px;line-height:1.6;text-align:center;word-break:keep-all;background-color:#e5e5e5;border-radius:1em;-webkit-transform:translateY(-50%);transform:translateY(-50%);box-sizing:border-box}
--------------------------------------------------------------------------------
/static/vant-weapp/picker/shared.js:
--------------------------------------------------------------------------------
1 | export const pickerProps = {
2 | title: String,
3 | loading: Boolean,
4 | showToolbar: Boolean,
5 | cancelButtonText: {
6 | type: String,
7 | value: '取消'
8 | },
9 | confirmButtonText: {
10 | type: String,
11 | value: '确认'
12 | },
13 | visibleItemCount: {
14 | type: Number,
15 | value: 5
16 | },
17 | itemHeight: {
18 | type: Number,
19 | value: 44
20 | }
21 | };
22 |
--------------------------------------------------------------------------------
/src/components/LoadingComponent.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
17 |
18 |
19 |
26 |
27 |
--------------------------------------------------------------------------------
/static/vant-weapp/switch/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/button.js:
--------------------------------------------------------------------------------
1 | export const button = Behavior({
2 | externalClasses: ['hover-class'],
3 | properties: {
4 | id: String,
5 | lang: {
6 | type: String,
7 | value: 'en'
8 | },
9 | businessId: Number,
10 | sessionFrom: String,
11 | sendMessageTitle: String,
12 | sendMessagePath: String,
13 | sendMessageImg: String,
14 | showMessageCard: Boolean,
15 | appParameter: String,
16 | ariaLabel: String
17 | }
18 | });
19 |
--------------------------------------------------------------------------------
/src/pages/counter/store.js:
--------------------------------------------------------------------------------
1 | // https://vuex.vuejs.org/zh-cn/intro.html
2 | // make sure to call Vue.use(Vuex) if using a module system
3 | import Vue from 'vue'
4 | import Vuex from 'vuex'
5 |
6 | Vue.use(Vuex)
7 |
8 | const store = new Vuex.Store({
9 | state: {
10 | count: 0
11 | },
12 | mutations: {
13 | increment: (state) => {
14 | const obj = state
15 | obj.count += 1
16 | },
17 | decrement: (state) => {
18 | const obj = state
19 | obj.count -= 1
20 | }
21 | }
22 | })
23 |
24 | export default store
25 |
--------------------------------------------------------------------------------
/static/vant-weapp/datetime-picker/index.wxml:
--------------------------------------------------------------------------------
1 |
17 |
--------------------------------------------------------------------------------
/static/vant-weapp/slider/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-slider{position:relative;border-radius:999px;background-color:#e5e5e5}.van-slider__bar{position:relative;border-radius:inherit;background-color:#1989fa}.van-slider__button{width:20px;height:20px;border-radius:50%;background-color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.5)}.van-slider__button-wrapper{position:absolute;top:50%;right:0;-webkit-transform:translate3d(50%,-50%,0);transform:translate3d(50%,-50%,0)}.van-slider__button-wrapper:after{content:"";position:absolute;width:200%;height:200%;top:-50%;left:-50%}.van-slider--disabled{opacity:.3}
--------------------------------------------------------------------------------
/static/vant-weapp/area/index.wxml:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/static/vant-weapp/overlay/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | props: {
4 | show: Boolean,
5 | mask: Boolean,
6 | customStyle: String,
7 | duration: {
8 | type: [Number, Object],
9 | value: 300
10 | },
11 | zIndex: {
12 | type: Number,
13 | value: 1
14 | }
15 | },
16 | methods: {
17 | onClick() {
18 | this.$emit('click');
19 | },
20 | // for prevent touchmove
21 | noop() { }
22 | }
23 | });
24 |
--------------------------------------------------------------------------------
/static/vant-weapp/picker/shared.d.ts:
--------------------------------------------------------------------------------
1 | export declare const pickerProps: {
2 | title: StringConstructor;
3 | loading: BooleanConstructor;
4 | showToolbar: BooleanConstructor;
5 | cancelButtonText: {
6 | type: StringConstructor;
7 | value: string;
8 | };
9 | confirmButtonText: {
10 | type: StringConstructor;
11 | value: string;
12 | };
13 | visibleItemCount: {
14 | type: NumberConstructor;
15 | value: number;
16 | };
17 | itemHeight: {
18 | type: NumberConstructor;
19 | value: number;
20 | };
21 | };
22 |
--------------------------------------------------------------------------------
/static/vant-weapp/badge/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-badge{display:block;padding:20px 12px 20px 9px;overflow:hidden;font-size:14px;line-height:1.4;color:#7d7e80;word-break:break-all;background-color:#f8f8f8;border-left:3px solid transparent;box-sizing:border-box;-webkit-user-select:none;user-select:none}.van-badge--hover{background-color:#f2f3f5}.van-badge:after{border-bottom-width:1px}.van-badge--active{font-weight:700;color:#333;border-color:#f44}.van-badge--active:after{border-right-width:1px}.van-badge--active,.van-badge--active.van-badge--hover{background-color:#fff}.van-badge__text{position:relative}
--------------------------------------------------------------------------------
/static/vant-weapp/panel/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/static/vant-weapp/progress/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { BLUE } from '../common/color';
3 | VantComponent({
4 | props: {
5 | inactive: Boolean,
6 | percentage: Number,
7 | pivotText: String,
8 | pivotColor: String,
9 | showPivot: {
10 | type: Boolean,
11 | value: true
12 | },
13 | color: {
14 | type: String,
15 | value: BLUE
16 | },
17 | textColor: {
18 | type: String,
19 | value: '#fff'
20 | }
21 | }
22 | });
23 |
--------------------------------------------------------------------------------
/static/vant-weapp/icon/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
13 |
18 |
19 |
--------------------------------------------------------------------------------
/static/vant-weapp/progress/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
13 | {{ getters.text(pivotText, percentage) }}
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/static/vant-weapp/tabbar-item/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{color:#7d7e80;height:100%;display:-webkit-flex;display:flex;line-height:1;font-size:12px;-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-tabbar-item__icon{font-size:18px;margin-bottom:5px;position:relative}.van-tabbar-item__icon--dot:after{top:0;right:-8px;width:8px;height:8px;content:" ";position:absolute;border-radius:100%;background-color:#f44}.van-tabbar-item__icon image{width:30px;height:18px;display:block}.van-tabbar-item--active{color:#1989fa}
--------------------------------------------------------------------------------
/static/vant-weapp/col/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | relation: {
4 | name: 'row',
5 | type: 'ancestor'
6 | },
7 | props: {
8 | span: Number,
9 | offset: Number
10 | },
11 | data: {
12 | style: ''
13 | },
14 | methods: {
15 | setGutter(gutter) {
16 | const padding = `${gutter / 2}px`;
17 | const style = gutter ? `padding-left: ${padding}; padding-right: ${padding};` : '';
18 | if (style !== this.data.style) {
19 | this.set({ style });
20 | }
21 | }
22 | }
23 | });
24 |
--------------------------------------------------------------------------------
/static/vant-weapp/goods-action-button/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { link } from '../mixins/link';
3 | import { button } from '../mixins/button';
4 | import { openType } from '../mixins/open-type';
5 | VantComponent({
6 | mixins: [link, button, openType],
7 | props: {
8 | text: String,
9 | loading: Boolean,
10 | disabled: Boolean,
11 | type: {
12 | type: String,
13 | value: 'danger'
14 | }
15 | },
16 | methods: {
17 | onClick(event) {
18 | this.$emit('click', event.detail);
19 | this.jumpLink();
20 | }
21 | }
22 | });
23 |
--------------------------------------------------------------------------------
/static/vant-weapp/goods-action-icon/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { link } from '../mixins/link';
3 | import { button } from '../mixins/button';
4 | import { openType } from '../mixins/open-type';
5 | VantComponent({
6 | classes: ['icon-class', 'text-class'],
7 | mixins: [link, button, openType],
8 | props: {
9 | text: String,
10 | info: String,
11 | icon: String,
12 | disabled: Boolean,
13 | loading: Boolean
14 | },
15 | methods: {
16 | onClick(event) {
17 | this.$emit('click', event.detail);
18 | this.jumpLink();
19 | }
20 | }
21 | });
22 |
--------------------------------------------------------------------------------
/static/vant-weapp/search/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-search{padding:10px 16px;-webkit-align-items:center;align-items:center;box-sizing:border-box}.van-search,.van-search__content{display:-webkit-flex;display:flex}.van-search__content{padding-left:10px;background-color:#f7f8fa;border-radius:2px;-webkit-flex:1;flex:1}.van-search__content--round{border-radius:17px}.van-search__label{padding:0 5px;font-size:14px;line-height:34px;color:#333}.van-search__field{-webkit-flex:1;flex:1}.van-search__field__left-icon{color:#999}.van-search--withaction{padding-right:0}.van-search__action{padding:0 10px;font-size:14px;line-height:34px;color:#333}.van-search__action--hover{background-color:#f2f3f5}
--------------------------------------------------------------------------------
/static/vant-weapp/switch/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-switch{display:inline-block;position:relative;width:2em;border:1px solid rgba(0,0,0,.1);border-radius:1em;box-sizing:initial;transition:background-color .3s}.van-switch,.van-switch__node{height:1em;background-color:#fff}.van-switch__node{top:0;left:0;position:absolute;border-radius:100%;width:1em;z-index:1;transition:.3s;box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05)}.van-switch__loading{top:25%;left:25%;position:absolute!important}.van-switch--on{background-color:#1989fa}.van-switch--on .van-switch__node{-webkit-transform:translateX(1em);transform:translateX(1em)}.van-switch--disabled{opacity:.4}
--------------------------------------------------------------------------------
/static/vant-weapp/swipe-cell/index.wxml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/assets/style/base.scss:
--------------------------------------------------------------------------------
1 |
2 |
3 | body{
4 | font-family: PingFangSC-Regular, helvetica, 'Heiti SC';
5 | font-size: 12px;
6 | color: $black_color;
7 | }
8 | img{
9 | margin: 0;
10 | padding: 0;
11 | width: 100%;
12 | height: 100%;
13 | border-radius: 3px;
14 | vertical-align: top;
15 | }
16 |
17 |
18 | /* clear float**/
19 | .clearfix{
20 | zoom:1;
21 | }
22 | .clearfix:after{
23 | content:"";
24 | display: block;
25 | clear:both;
26 | }
27 | .fl{
28 | float: left;
29 | }
30 | .fr{
31 | float: right;
32 | }
33 |
34 | /* text-overflow **/
35 | .text-overflow {
36 | white-space: nowrap;
37 | text-overflow: ellipsis;
38 | -o-text-overflow: ellipsis;
39 | overflow: hidden;
40 | }
--------------------------------------------------------------------------------
/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "项目配置文件。",
3 | "setting": {
4 | "urlCheck": true,
5 | "es6": false,
6 | "postcss": true,
7 | "minified": true,
8 | "newFeature": true
9 | },
10 | "miniprogramRoot": "dist/wx/",
11 | "compileType": "miniprogram",
12 | "appid": "touristappid",
13 | "projectname": "douban-movice",
14 | "simulatorType": "wechat",
15 | "simulatorPluginLibVersion": {},
16 | "condition": {
17 | "search": {
18 | "current": -1,
19 | "list": []
20 | },
21 | "conversation": {
22 | "current": -1,
23 | "list": []
24 | },
25 | "game": {
26 | "currentL": -1,
27 | "list": []
28 | },
29 | "miniprogram": {
30 | "current": -1,
31 | "list": []
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/static/vant-weapp/collapse-item/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{-webkit-transform:rotate(90deg);transform:rotate(90deg);transition:.3s}.van-collapse-item__title--expanded .van-cell__right-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:#c9c9c9!important}.van-collapse-item__title--disabled .van-cell--hover{background-color:#fff!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__wrapper--transition{transition:height .3s ease-in-out}.van-collapse-item__content{padding:15px;font-size:13px;line-height:1.5;color:#999;background-color:#fff}
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/observer/props.js:
--------------------------------------------------------------------------------
1 | export function observeProps(props) {
2 | if (!props) {
3 | return;
4 | }
5 | Object.keys(props).forEach(key => {
6 | let prop = props[key];
7 | if (prop === null || !('type' in prop)) {
8 | prop = { type: prop };
9 | }
10 | let { observer } = prop;
11 | prop.observer = function () {
12 | if (observer) {
13 | if (typeof observer === 'string') {
14 | observer = this[observer];
15 | }
16 | observer.apply(this, arguments);
17 | }
18 | this.set();
19 | };
20 | props[key] = prop;
21 | });
22 | }
23 |
--------------------------------------------------------------------------------
/static/vant-weapp/nav-bar/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-nav-bar{position:relative;height:44px;line-height:44px;text-align:center;background-color:#fff;-webkit-user-select:none;user-select:none}.van-nav-bar__text{display:inline-block;padding:0 15px;margin:0 -15px;color:#1989fa;vertical-align:middle}.van-nav-bar__text--hover{background-color:#f2f3f5}.van-nav-bar__arrow{color:#1989fa;vertical-align:middle}.van-nav-bar__arrow+.van-nav-bar__text{padding-left:25px;margin-left:-20px}.van-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.van-nav-bar__title{max-width:60%;margin:0 auto;font-size:16px;font-weight:500}.van-nav-bar__left,.van-nav-bar__right{position:absolute;bottom:0;font-size:14px}.van-nav-bar__left{left:15px}.van-nav-bar__right{right:15px}
--------------------------------------------------------------------------------
/static/vant-weapp/toast/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | props: {
4 | show: Boolean,
5 | mask: Boolean,
6 | message: String,
7 | forbidClick: Boolean,
8 | zIndex: {
9 | type: Number,
10 | value: 1000
11 | },
12 | type: {
13 | type: String,
14 | value: 'text'
15 | },
16 | loadingType: {
17 | type: String,
18 | value: 'circular'
19 | },
20 | position: {
21 | type: String,
22 | value: 'middle'
23 | }
24 | },
25 | methods: {
26 | // for prevent touchmove
27 | noop() { }
28 | }
29 | });
30 |
--------------------------------------------------------------------------------
/static/vant-weapp/switch-cell/index.wxml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
25 |
26 |
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/basic.js:
--------------------------------------------------------------------------------
1 | export const basic = Behavior({
2 | methods: {
3 | $emit() {
4 | this.triggerEvent.apply(this, arguments);
5 | },
6 | getRect(selector, all) {
7 | return new Promise(resolve => {
8 | wx.createSelectorQuery()
9 | .in(this)[all ? 'selectAll' : 'select'](selector)
10 | .boundingClientRect(rect => {
11 | if (all && Array.isArray(rect) && rect.length) {
12 | resolve(rect);
13 | }
14 | if (!all && rect) {
15 | resolve(rect);
16 | }
17 | })
18 | .exec();
19 | });
20 | }
21 | }
22 | });
23 |
--------------------------------------------------------------------------------
/static/vant-weapp/checkbox/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/open-type.js:
--------------------------------------------------------------------------------
1 | export const openType = Behavior({
2 | properties: {
3 | openType: String
4 | },
5 | methods: {
6 | bindGetUserInfo(event) {
7 | this.$emit('getuserinfo', event.detail);
8 | },
9 | bindContact(event) {
10 | this.$emit('contact', event.detail);
11 | },
12 | bindGetPhoneNumber(event) {
13 | this.$emit('getphonenumber', event.detail);
14 | },
15 | bindError(event) {
16 | this.$emit('error', event.detail);
17 | },
18 | bindLaunchApp(event) {
19 | this.$emit('launchapp', event.detail);
20 | },
21 | bindOpenSetting(event) {
22 | this.$emit('opensetting', event.detail);
23 | },
24 | }
25 | });
26 |
--------------------------------------------------------------------------------
/static/vant-weapp/nav-bar/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { safeArea } from '../mixins/safe-area';
3 | VantComponent({
4 | mixins: [safeArea({ safeAreaInsetTop: true })],
5 | classes: ['title-class'],
6 | props: {
7 | title: String,
8 | fixed: Boolean,
9 | leftText: String,
10 | rightText: String,
11 | leftArrow: Boolean,
12 | border: {
13 | type: Boolean,
14 | value: true
15 | },
16 | zIndex: {
17 | type: Number,
18 | value: 120
19 | }
20 | },
21 | methods: {
22 | onClickLeft() {
23 | this.$emit('click-left');
24 | },
25 | onClickRight() {
26 | this.$emit('click-right');
27 | }
28 | }
29 | });
30 |
--------------------------------------------------------------------------------
/static/vant-weapp/notify/notify.js:
--------------------------------------------------------------------------------
1 | import { isObj } from '../common/utils';
2 | const defaultOptions = {
3 | selector: '#van-notify',
4 | duration: 3000
5 | };
6 | function parseOptions(text) {
7 | return isObj(text) ? text : { text };
8 | }
9 | function getContext() {
10 | const pages = getCurrentPages();
11 | return pages[pages.length - 1];
12 | }
13 | export default function Notify(options) {
14 | options = Object.assign({}, defaultOptions, parseOptions(options));
15 | const context = options.context || getContext();
16 | const notify = context.selectComponent(options.selector);
17 | delete options.selector;
18 | if (notify) {
19 | notify.set(options);
20 | notify.show();
21 | }
22 | else {
23 | console.warn('未找到 van-notify 节点,请确认 selector 及 context 是否正确');
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/static/vant-weapp/popup/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
21 |
--------------------------------------------------------------------------------
/static/vant-weapp/slider/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
12 |
19 |
23 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/static/vant-weapp/radio/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-radio{display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap,.van-radio__label{line-height:20px}.van-radio__icon-wrap{-webkit-flex:none;flex:none}.van-radio__icon{display:block;width:20px;height:20px;font-size:14px;color:transparent;text-align:center;border:1px solid #e5e5e5;box-sizing:border-box;transition:.2s}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-radio__icon--disabled{background-color:#eee;border-color:#c9c9c9}.van-radio__icon--disabled.van-radio__icon--checked{color:#c9c9c9}.van-radio__label{margin-left:10px;color:#333;word-break:break-all}.van-radio__label--left{float:left;margin:0 10px 0 0}.van-radio__label--disabled{color:#c9c9c9}.van-radio__label:empty{margin:0}
--------------------------------------------------------------------------------
/static/vant-weapp/tabbar-item/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
15 |
19 |
20 |
21 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/static/vant-weapp/badge/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | relation: {
4 | type: 'ancestor',
5 | name: 'badge-group',
6 | linked(target) {
7 | this.parent = target;
8 | }
9 | },
10 | props: {
11 | info: null,
12 | title: String
13 | },
14 | methods: {
15 | onClick() {
16 | const { parent } = this;
17 | if (!parent) {
18 | return;
19 | }
20 | const index = parent.badges.indexOf(this);
21 | parent.setActive(index).then(() => {
22 | this.$emit('click', index);
23 | parent.$emit('change', index);
24 | });
25 | },
26 | setActive(active) {
27 | return this.set({ active });
28 | }
29 | }
30 | });
31 |
--------------------------------------------------------------------------------
/static/vant-weapp/goods-action-button/index.wxml:
--------------------------------------------------------------------------------
1 |
26 | {{ text }}
27 |
28 |
--------------------------------------------------------------------------------
/static/vant-weapp/notice-bar/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-notice-bar{display:-webkit-flex;display:flex;height:40px;padding:0 15px;font-size:14px;line-height:24px;-webkit-align-items:center;align-items:center}.van-notice-bar--withicon{position:relative;padding-right:40px}.van-notice-bar--wrapable{height:auto;padding:8px 15px}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal}.van-notice-bar__left-icon{display:-webkit-flex;display:flex;margin-right:4px;vertical-align:middle;-webkit-align-items:center;align-items:center}.van-notice-bar__right-icon{position:absolute;top:10px;right:15px;font-size:16px}.van-notice-bar__wrap{position:relative;height:24px;overflow:hidden;-webkit-flex:1;flex:1}.van-notice-bar__content{position:absolute;white-space:nowrap}.van-notice-bar__content.van-ellipsis{max-width:100%}
--------------------------------------------------------------------------------
/static/vant-weapp/common/style/hairline.wxss:
--------------------------------------------------------------------------------
1 | .van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{content:" ";position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
--------------------------------------------------------------------------------
/src/assets/style/mixin.scss:
--------------------------------------------------------------------------------
1 | $db_theme: #67ba62;
2 | $white_color: #fff;
3 | $gray_color: #f6f4f8;
4 | $black_color: #333;
5 | $active_color: #f2a939;
6 | $font_gray: #959493;
7 |
8 |
9 | @mixin flex(){
10 | display: flex;
11 | display: -webkit-flex;
12 | }
13 |
14 | /*********************
15 | 遮罩层
16 | *********************/
17 | @mixin mask($bg: rgba(82,82,82,.6), $zIndex: 1){
18 | width: 100%;
19 | height: 100%;
20 | position: absolute;
21 | background: $bg;
22 | top: 0;
23 | left: 0;
24 | z-index: $zIndex;
25 | }
26 |
27 | /*********************
28 | 小图标
29 | *********************/
30 | @mixin tag($bg: #f7c36f, $wid:42px, $hig: 22px){
31 | width: $wid;
32 | height: $hig;
33 | line-height: $hig;
34 | background: $bg;
35 | border-radius: 3px;
36 | text-align: center;
37 | display: inline-block;
38 | color: $white_color;
39 | }
--------------------------------------------------------------------------------
/src/pages/counter/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Vuex counter:{{ count }}
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
31 |
32 |
45 |
--------------------------------------------------------------------------------
/src/utils/index.js:
--------------------------------------------------------------------------------
1 | function formatNumber (n) {
2 | const str = n.toString()
3 | return str[1] ? str : `0${str}`
4 | }
5 |
6 | export function formatTime (date) {
7 | const year = date.getFullYear()
8 | const month = date.getMonth() + 1
9 | const day = date.getDate()
10 |
11 | const hour = date.getHours()
12 | const minute = date.getMinutes()
13 | const second = date.getSeconds()
14 |
15 | const t1 = [year, month, day].map(formatNumber).join('/')
16 | const t2 = [hour, minute, second].map(formatNumber).join(':')
17 |
18 | return `${t1} ${t2}`
19 | }
20 |
21 | export const BASE_PATH = "https://www.easy-mock.com/mock/5d2eebbc6a088d6b468ebcd7/mock/"
22 |
23 | export const HOME_NAMES = {
24 | 1: "影院热映",
25 | 2: "豆瓣热门",
26 | 3: "近期热门剧集",
27 | 4: "近期热门综艺节目",
28 | 5: "畅销图书",
29 | 6: "热门单曲榜",
30 | }
31 |
32 | export default {
33 | formatNumber,
34 | formatTime,
35 | }
36 |
--------------------------------------------------------------------------------
/static/vant-weapp/action-sheet/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-action-sheet{max-height:90%!important;color:#333}.van-action-sheet__cancel,.van-action-sheet__item{height:50px;font-size:16px;line-height:50px;text-align:center;background-color:#fff}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5}.van-action-sheet__cancel{height:60px}.van-action-sheet__cancel:before{display:block;height:10px;background-color:#f8f8f8;content:" "}.van-action-sheet__item--disabled{color:#c9c9c9}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:#fff}.van-action-sheet__subname{margin-left:5px;font-size:12px;color:#7d7e80}.van-action-sheet__header{font-size:16px;font-weight:500;line-height:44px;text-align:center}.van-action-sheet__close{position:absolute!important;top:0;right:0;padding:0 15px;font-size:18px!important;line-height:inherit!important;color:#999}
--------------------------------------------------------------------------------
/static/vant-weapp/checkbox/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-checkbox{display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px}.van-checkbox__icon-wrap{-webkit-flex:none;flex:none}.van-checkbox__icon{display:block;width:20px;height:20px;font-size:14px;color:transparent;text-align:center;border:1px solid #e5e5e5;box-sizing:border-box;transition:.2s}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-checkbox__icon--disabled{background-color:#eee;border-color:#c9c9c9}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c9c9c9}.van-checkbox__label{margin-left:10px;color:#333;word-break:break-all}.van-checkbox__label--left{float:left;margin:0 10px 0 0}.van-checkbox__label--disabled{color:#c9c9c9}.van-checkbox__label:empty{margin:0}
--------------------------------------------------------------------------------
/static/vant-weapp/tab/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | relation: {
4 | name: 'tabs',
5 | type: 'ancestor'
6 | },
7 | props: {
8 | dot: Boolean,
9 | info: null,
10 | title: String,
11 | disabled: Boolean,
12 | titleStyle: String
13 | },
14 | data: {
15 | width: null,
16 | inited: false,
17 | active: false,
18 | animated: false
19 | },
20 | watch: {
21 | title: 'update',
22 | disabled: 'update',
23 | dot: 'update',
24 | info: 'update',
25 | titleStyle: 'update'
26 | },
27 | methods: {
28 | update() {
29 | const parent = this.getRelationNodes('../tabs/index')[0];
30 | if (parent) {
31 | parent.updateTabs();
32 | }
33 | }
34 | }
35 | });
36 |
--------------------------------------------------------------------------------
/static/vant-weapp/tree-select/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-tree-select{position:relative;font-size:14px;-webkit-user-select:none;user-select:none}.van-tree-select__nav{position:absolute;top:0;bottom:0;left:0;width:35%;min-width:120px;background-color:#fafafa}.van-tree-select__nitem{position:relative;padding:0 9px 0 15px;line-height:44px}.van-tree-select__nitem--active:after{position:absolute;top:0;bottom:0;left:0;width:3.6px;background-color:#f44;content:""}.van-tree-select__nitem--active{font-weight:700;background-color:#fff}.van-tree-select__nitem--disabled{color:#999}.van-tree-select__content{width:65%;padding-left:15px;margin-left:35%;background-color:#fff;box-sizing:border-box}.van-tree-select__item{position:relative;font-weight:700;line-height:44px}.van-tree-select__item--active{color:#f44}.van-tree-select__item--disabled{color:#999}.van-tree-select__selected{position:absolute;top:0;right:15px;bottom:0;height:24px;margin:auto 0;line-height:24px}
--------------------------------------------------------------------------------
/static/vant-weapp/toast/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-toast{display:-webkit-flex;display:flex;color:#fff;font-size:14px;line-height:20px;border-radius:4px;word-break:break-all;-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;box-sizing:initial;background-color:rgba(51,51,51,.88);white-space:pre-wrap}.van-toast__container{position:fixed;top:50%;left:50%;max-width:70%;width:-webkit-fit-content;width:fit-content;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-toast--text{padding:8px 12px;min-width:96px}.van-toast--icon{width:90px;padding:15px;min-height:90px}.van-toast--icon .van-toast__icon{font-size:48px}.van-toast--icon .van-toast__text{padding-top:5px}.van-toast__loading{margin:10px 0}.van-toast--top{-webkit-transform:translateY(-30vh);transform:translateY(-30vh)}.van-toast--bottom{-webkit-transform:translateY(30vh);transform:translateY(30vh)}
--------------------------------------------------------------------------------
/static/vant-weapp/toast/toast.d.ts:
--------------------------------------------------------------------------------
1 | declare type ToastMessage = string | number;
2 | interface ToastOptions {
3 | show?: boolean;
4 | type?: string;
5 | mask?: boolean;
6 | zIndex?: number;
7 | context?: any;
8 | position?: string;
9 | duration?: number;
10 | selector?: string;
11 | forbidClick?: boolean;
12 | loadingType?: string;
13 | message?: ToastMessage;
14 | onClose?: () => void;
15 | }
16 | declare function Toast(toastOptions: ToastOptions | ToastMessage): Weapp.Component;
17 | declare namespace Toast {
18 | var loading: (options: string | number | ToastOptions) => Weapp.Component;
19 | var success: (options: string | number | ToastOptions) => Weapp.Component;
20 | var fail: (options: string | number | ToastOptions) => Weapp.Component;
21 | var clear: () => void;
22 | var setDefaultOptions: (options: ToastOptions) => void;
23 | var resetDefaultOptions: () => void;
24 | }
25 | export default Toast;
26 |
--------------------------------------------------------------------------------
/static/vant-weapp/wxs/bem.wxs:
--------------------------------------------------------------------------------
1 | var array = require('./array.wxs');
2 | var object = require('./object.wxs');
3 | var PREFIX = 'van-';
4 |
5 | function join(name, mods) {
6 | name = PREFIX + name;
7 | mods = mods.map(function(mod) {
8 | return name + '--' + mod;
9 | });
10 | mods.unshift(name);
11 | return mods.join(' ');
12 | }
13 |
14 | function traversing(mods, conf) {
15 | if (!conf) {
16 | return;
17 | }
18 |
19 | if (typeof conf === 'string' || typeof conf === 'number') {
20 | mods.push(conf);
21 | } else if (array.isArray(conf)) {
22 | conf.forEach(function(item) {
23 | traversing(mods, item);
24 | });
25 | } else if (typeof conf === 'object') {
26 | object.keys(conf).forEach(function(key) {
27 | conf[key] && mods.push(key);
28 | });
29 | }
30 | }
31 |
32 | function bem(name, conf) {
33 | var mods = [];
34 | traversing(mods, conf);
35 | return join(name, mods);
36 | }
37 |
38 | module.exports.bem = bem;
39 |
--------------------------------------------------------------------------------
/static/vant-weapp/submit-bar/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-submit-bar{position:fixed;bottom:0;left:0;z-index:100;width:100%;-webkit-user-select:none;user-select:none}.van-submit-bar__tip{padding:10px;font-size:12px;line-height:1.5;color:#f56723;background-color:#fff7cc}.van-submit-bar__tip:empty{display:none}.van-submit-bar__tip-icon{width:12px;height:12px;margin-right:4px;vertical-align:middle}.van-submit-bar__tip-text{display:inline;vertical-align:middle}.van-submit-bar__bar{display:-webkit-flex;display:flex;height:50px;font-size:14px;background-color:#fff;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end}.van-submit-bar__bar--safe{padding-bottom:34px}.van-submit-bar__text{padding-right:12px;font-weight:500;color:#333;-webkit-flex:1;flex:1;text-align:right}.van-submit-bar__price{font-size:18px;color:#f44}.van-submit-bar__currency{font-size:14px}.van-submit-bar__suffix-label{margin-left:5px}.van-submit-bar__button{width:110px}
--------------------------------------------------------------------------------
/static/vant-weapp/stepper/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
21 |
27 |
28 |
--------------------------------------------------------------------------------
/static/vant-weapp/tag/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { RED, BLUE, GREEN } from '../common/color';
3 | const DEFAULT_COLOR = '#999';
4 | const COLOR_MAP = {
5 | danger: RED,
6 | primary: BLUE,
7 | success: GREEN
8 | };
9 | VantComponent({
10 | props: {
11 | size: String,
12 | type: String,
13 | mark: Boolean,
14 | color: String,
15 | plain: Boolean,
16 | round: Boolean,
17 | textColor: String
18 | },
19 | computed: {
20 | style() {
21 | const color = this.data.color || COLOR_MAP[this.data.type] || DEFAULT_COLOR;
22 | const key = this.data.plain ? 'color' : 'background-color';
23 | const style = { [key]: color };
24 | if (this.data.textColor) {
25 | style.color = this.data.textColor;
26 | }
27 | return Object.keys(style).map(key => `${key}: ${style[key]}`).join(';');
28 | }
29 | }
30 | });
31 |
--------------------------------------------------------------------------------
/static/vant-weapp/card/index.js:
--------------------------------------------------------------------------------
1 | import { link } from '../mixins/link';
2 | import { VantComponent } from '../common/component';
3 | VantComponent({
4 | classes: [
5 | 'num-class',
6 | 'desc-class',
7 | 'thumb-class',
8 | 'title-class',
9 | 'price-class',
10 | 'origin-price-class',
11 | ],
12 | mixins: [link],
13 | props: {
14 | tag: String,
15 | num: String,
16 | desc: String,
17 | thumb: String,
18 | title: String,
19 | price: String,
20 | centered: Boolean,
21 | lazyLoad: Boolean,
22 | thumbLink: String,
23 | originPrice: String,
24 | thumbMode: {
25 | type: String,
26 | value: 'aspectFit'
27 | },
28 | currency: {
29 | type: String,
30 | value: '¥'
31 | }
32 | },
33 | methods: {
34 | onClickThumb() {
35 | this.jumpLink('thumbLink');
36 | }
37 | }
38 | });
39 |
--------------------------------------------------------------------------------
/static/vant-weapp/dialog/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-dialog{width:85%;overflow:hidden;font-size:16px;background-color:#fff;border-radius:4px}.van-dialog__header{padding-top:25px;font-weight:500;text-align:center}.van-dialog__header--isolated{padding:25px 0}.van-dialog__message{max-height:60vh;padding:25px;overflow-y:auto;font-size:14px;line-height:1.5;text-align:center;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:12px;color:#7d7e80}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog__confirm{color:#1989fa!important}.van-dialog-bounce-enter{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7)}.van-dialog-bounce-leave-active{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9)}
--------------------------------------------------------------------------------
/static/vant-weapp/cell/index.js:
--------------------------------------------------------------------------------
1 | import { link } from '../mixins/link';
2 | import { VantComponent } from '../common/component';
3 | VantComponent({
4 | classes: [
5 | 'title-class',
6 | 'label-class',
7 | 'value-class',
8 | 'right-icon-class',
9 | 'hover-class'
10 | ],
11 | mixins: [link],
12 | props: {
13 | title: null,
14 | value: null,
15 | icon: String,
16 | size: String,
17 | label: String,
18 | center: Boolean,
19 | isLink: Boolean,
20 | required: Boolean,
21 | clickable: Boolean,
22 | titleWidth: String,
23 | customStyle: String,
24 | arrowDirection: String,
25 | useLabelSlot: Boolean,
26 | border: {
27 | type: Boolean,
28 | value: true
29 | }
30 | },
31 | methods: {
32 | onClick(event) {
33 | this.$emit('click', event.detail);
34 | this.jumpLink();
35 | }
36 | }
37 | });
38 |
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/observer/index.js:
--------------------------------------------------------------------------------
1 | import { behavior } from './behavior';
2 | import { observeProps } from './props';
3 | export function observe(vantOptions, options) {
4 | const { watch, computed } = vantOptions;
5 | options.behaviors.push(behavior);
6 | if (watch) {
7 | const props = options.properties || {};
8 | Object.keys(watch).forEach(key => {
9 | if (key in props) {
10 | let prop = props[key];
11 | if (prop === null || !('type' in prop)) {
12 | prop = { type: prop };
13 | }
14 | prop.observer = watch[key];
15 | props[key] = prop;
16 | }
17 | });
18 | options.properties = props;
19 | }
20 | if (computed) {
21 | options.methods = options.methods || {};
22 | options.methods.$options = () => vantOptions;
23 | if (options.properties) {
24 | observeProps(options.properties);
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/touch.js:
--------------------------------------------------------------------------------
1 | export const touch = Behavior({
2 | methods: {
3 | touchStart(event) {
4 | const touch = event.touches[0];
5 | this.direction = '';
6 | this.deltaX = 0;
7 | this.deltaY = 0;
8 | this.offsetX = 0;
9 | this.offsetY = 0;
10 | this.startX = touch.clientX;
11 | this.startY = touch.clientY;
12 | },
13 | touchMove(event) {
14 | const touch = event.touches[0];
15 | this.deltaX = touch.clientX - this.startX;
16 | this.deltaY = touch.clientY - this.startY;
17 | this.offsetX = Math.abs(this.deltaX);
18 | this.offsetY = Math.abs(this.deltaY);
19 | this.direction =
20 | this.offsetX > this.offsetY
21 | ? 'horizontal'
22 | : this.offsetX < this.offsetY
23 | ? 'vertical'
24 | : '';
25 | }
26 | }
27 | });
28 |
--------------------------------------------------------------------------------
/static/vant-weapp/toast/index.wxml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
16 |
17 | {{ message }}
18 |
19 |
20 |
21 |
27 |
28 | {{ message }}
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/static/vant-weapp/button/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { button } from '../mixins/button';
3 | import { openType } from '../mixins/open-type';
4 | VantComponent({
5 | mixins: [button, openType],
6 | classes: ['hover-class', 'loading-class'],
7 | props: {
8 | plain: Boolean,
9 | block: Boolean,
10 | round: Boolean,
11 | square: Boolean,
12 | loading: Boolean,
13 | hairline: Boolean,
14 | disabled: Boolean,
15 | loadingText: String,
16 | type: {
17 | type: String,
18 | value: 'default'
19 | },
20 | size: {
21 | type: String,
22 | value: 'normal'
23 | },
24 | loadingSize: {
25 | type: String,
26 | value: '20px'
27 | }
28 | },
29 | methods: {
30 | onClick() {
31 | if (!this.data.disabled && !this.data.loading) {
32 | this.$emit('click');
33 | }
34 | }
35 | }
36 | });
37 |
--------------------------------------------------------------------------------
/static/vant-weapp/rate/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
13 |
21 |
22 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/static/vant-weapp/row/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | relation: {
4 | name: 'col',
5 | type: 'descendant',
6 | linked(target) {
7 | if (this.data.gutter) {
8 | target.setGutter(this.data.gutter);
9 | }
10 | }
11 | },
12 | props: {
13 | gutter: Number
14 | },
15 | watch: {
16 | gutter: 'setGutter'
17 | },
18 | mounted() {
19 | if (this.data.gutter) {
20 | this.setGutter();
21 | }
22 | },
23 | methods: {
24 | setGutter() {
25 | const { gutter } = this.data;
26 | const margin = `-${Number(gutter) / 2}px`;
27 | const style = gutter
28 | ? `margin-right: ${margin}; margin-left: ${margin};`
29 | : '';
30 | this.set({ style });
31 | this.getRelationNodes('../col/index').forEach(col => {
32 | col.setGutter(this.data.gutter);
33 | });
34 | }
35 | }
36 | });
37 |
--------------------------------------------------------------------------------
/static/vant-weapp/card/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-card{position:relative;padding:5px 15px;font-size:12px;color:#333;background-color:#fafafa;box-sizing:border-box}.van-card__header{display:-webkit-flex;display:flex}.van-card__header--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-card__thumb{position:relative;width:90px;height:90px;margin-right:10px;-webkit-flex:none;flex:none}.van-card__thumb:empty{display:none}.van-card__img{width:100%;height:100%}.van-card__content{position:relative;min-width:0;-webkit-flex:1;flex:1}.van-card__desc,.van-card__title{word-break:break-all}.van-card__title{font-weight:700;line-height:16px}.van-card__desc{color:#7d7e80}.van-card__bottom,.van-card__desc{line-height:20px}.van-card__price{display:inline-block;font-weight:700;color:#f44}.van-card__origin-price{display:inline-block;margin-left:5px;font-size:10px;color:#7d7e80;text-decoration:line-through}.van-card__num{float:right}.van-card__tag{position:absolute;top:2px;left:0}.van-card__footer{width:100%;text-align:right;-webkit-flex:none;flex:none}
--------------------------------------------------------------------------------
/static/vant-weapp/notice-bar/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
15 |
16 |
17 |
18 | {{ text }}
19 |
20 |
21 |
22 |
28 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/static/vant-weapp/radio/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
12 |
13 |
21 |
22 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/static/vant-weapp/switch-cell/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | field: true,
4 | props: {
5 | value: null,
6 | icon: String,
7 | title: String,
8 | label: String,
9 | border: Boolean,
10 | checked: Boolean,
11 | loading: Boolean,
12 | disabled: Boolean,
13 | activeColor: String,
14 | inactiveColor: String,
15 | useLabelSlot: Boolean,
16 | size: {
17 | type: String,
18 | value: '24px'
19 | },
20 | activeValue: {
21 | type: null,
22 | value: true
23 | },
24 | inactiveValue: {
25 | type: null,
26 | value: false
27 | }
28 | },
29 | watch: {
30 | checked(value) {
31 | this.set({ value });
32 | }
33 | },
34 | created() {
35 | this.set({ value: this.data.checked });
36 | },
37 | methods: {
38 | onChange(event) {
39 | this.$emit('change', event.detail);
40 | }
41 | }
42 | });
43 |
--------------------------------------------------------------------------------
/static/vant-weapp/picker/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-picker{position:relative;overflow:hidden;-webkit-text-size-adjust:100%;background-color:#fff;-webkit-user-select:none;user-select:none}.van-picker__toolbar{display:-webkit-flex;display:flex;height:44px;line-height:44px;-webkit-justify-content:space-between;justify-content:space-between}.van-picker__cancel,.van-picker__confirm{padding:0 15px;font-size:14px;color:#1989fa}.van-picker__cancel--hover,.van-picker__confirm--hover{background-color:#f2f3f5}.van-picker__title{max-width:50%;font-size:16px;font-weight:500;text-align:center}.van-picker__columns{position:relative;display:-webkit-flex;display:flex}.van-picker__column{-webkit-flex:1 1;flex:1 1;width:0}.van-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:4;display:-webkit-flex;display:flex;background-color:hsla(0,0%,100%,.9);-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-picker__frame,.van-picker__loading .van-loading{position:absolute;top:50%;left:0;z-index:1;width:100%;pointer-events:none;-webkit-transform:translateY(-50%);transform:translateY(-50%)}
--------------------------------------------------------------------------------
/static/vant-weapp/picker-column/index.wxml:
--------------------------------------------------------------------------------
1 |
9 |
10 | {{ getOptionText(option, valueKey) }}
19 |
20 |
21 |
22 |
23 | function isObj(x) {
24 | var type = typeof x;
25 | return x !== null && (type === 'object' || type === 'function');
26 | }
27 |
28 | module.exports = function (option, valueKey) {
29 | return isObj(option) && option[valueKey] ? option[valueKey] : option;
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/static/vant-weapp/goods-action-icon/index.wxml:
--------------------------------------------------------------------------------
1 |
25 |
26 |
33 | {{ text }}
34 |
35 |
36 |
--------------------------------------------------------------------------------
/static/vant-weapp/action-sheet/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { safeArea } from '../mixins/safe-area';
3 | VantComponent({
4 | mixins: [safeArea()],
5 | props: {
6 | show: Boolean,
7 | title: String,
8 | cancelText: String,
9 | zIndex: {
10 | type: Number,
11 | value: 100
12 | },
13 | actions: {
14 | type: Array,
15 | value: []
16 | },
17 | overlay: {
18 | type: Boolean,
19 | value: true
20 | },
21 | closeOnClickOverlay: {
22 | type: Boolean,
23 | value: true
24 | }
25 | },
26 | methods: {
27 | onSelect(event) {
28 | const { index } = event.currentTarget.dataset;
29 | const item = this.data.actions[index];
30 | if (item && !item.disabled && !item.loading) {
31 | this.$emit('select', item);
32 | }
33 | },
34 | onCancel() {
35 | this.$emit('cancel');
36 | },
37 | onClose() {
38 | this.$emit('close');
39 | }
40 | }
41 | });
42 |
--------------------------------------------------------------------------------
/static/vant-weapp/radio-group/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | field: true,
4 | relation: {
5 | name: 'radio',
6 | type: 'descendant',
7 | linked(target) {
8 | this.children = this.children || [];
9 | this.children.push(target);
10 | this.updateChild(target);
11 | },
12 | unlinked(target) {
13 | this.children = this.children.filter((child) => child !== target);
14 | }
15 | },
16 | props: {
17 | value: {
18 | type: null,
19 | observer: 'updateChildren'
20 | },
21 | disabled: {
22 | type: Boolean,
23 | observer: 'updateChildren'
24 | }
25 | },
26 | methods: {
27 | updateChildren() {
28 | (this.children || []).forEach((child) => this.updateChild(child));
29 | },
30 | updateChild(child) {
31 | const { value, disabled } = this.data;
32 | child.set({
33 | value,
34 | disabled: disabled || child.data.disabled
35 | });
36 | }
37 | }
38 | });
39 |
--------------------------------------------------------------------------------
/static/vant-weapp/common/index.wxss:
--------------------------------------------------------------------------------
1 | .van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{content:"";display:table;clear:both}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{content:" ";position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
--------------------------------------------------------------------------------
/static/vant-weapp/wxs/memoize.wxs:
--------------------------------------------------------------------------------
1 | /**
2 | * Simple memoize
3 | * wxs doesn't support fn.apply, so this memoize only support up to 2 args
4 | */
5 |
6 | function isPrimitive(value) {
7 | var type = typeof value;
8 | return (
9 | type === 'boolean' ||
10 | type === 'number' ||
11 | type === 'string' ||
12 | type === 'undefined' ||
13 | value === null
14 | );
15 | }
16 |
17 | // mock simple fn.call in wxs
18 | function call(fn, args) {
19 | if (args.length === 2) {
20 | return fn(args[0], args[1]);
21 | }
22 |
23 | if (args.length === 1) {
24 | return fn(args[0]);
25 | }
26 |
27 | return fn();
28 | }
29 |
30 | function serializer(args) {
31 | if (args.length === 1 && isPrimitive(args[0])) {
32 | return args[0];
33 | }
34 | var obj = {};
35 | for (var i = 0; i < args.length; i++) {
36 | obj['key' + i] = args[i];
37 | }
38 | return JSON.stringify(obj);
39 | }
40 |
41 | function memoize(fn) {
42 | var cache = {};
43 |
44 | return function() {
45 | var key = serializer(arguments);
46 | if (cache[key] === undefined) {
47 | cache[key] = call(fn, arguments);
48 | }
49 |
50 | return cache[key];
51 | };
52 | }
53 |
54 | module.exports.memoize = memoize;
55 |
--------------------------------------------------------------------------------
/static/vant-weapp/checkbox-group/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | field: true,
4 | relation: {
5 | name: 'checkbox',
6 | type: 'descendant',
7 | linked(target) {
8 | this.children = this.children || [];
9 | this.children.push(target);
10 | this.updateChild(target);
11 | },
12 | unlinked(target) {
13 | this.children = this.children.filter((child) => child !== target);
14 | }
15 | },
16 | props: {
17 | max: Number,
18 | value: {
19 | type: Array,
20 | observer: 'updateChildren'
21 | },
22 | disabled: {
23 | type: Boolean,
24 | observer: 'updateChildren'
25 | }
26 | },
27 | methods: {
28 | updateChildren() {
29 | (this.children || []).forEach((child) => this.updateChild(child));
30 | },
31 | updateChild(child) {
32 | const { value, disabled } = this.data;
33 | child.set({
34 | value: value.indexOf(child.data.name) !== -1,
35 | disabled: disabled || child.data.disabled
36 | });
37 | }
38 | }
39 | });
40 |
--------------------------------------------------------------------------------
/static/vant-weapp/notify/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { RED } from '../common/color';
3 | import { safeArea } from '../mixins/safe-area';
4 | VantComponent({
5 | mixins: [safeArea()],
6 | props: {
7 | text: String,
8 | color: {
9 | type: String,
10 | value: '#fff'
11 | },
12 | backgroundColor: {
13 | type: String,
14 | value: RED
15 | },
16 | duration: {
17 | type: Number,
18 | value: 3000
19 | },
20 | zIndex: {
21 | type: Number,
22 | value: 110
23 | }
24 | },
25 | methods: {
26 | show() {
27 | const { duration } = this.data;
28 | clearTimeout(this.timer);
29 | this.set({
30 | show: true
31 | });
32 | if (duration > 0 && duration !== Infinity) {
33 | this.timer = setTimeout(() => {
34 | this.hide();
35 | }, duration);
36 | }
37 | },
38 | hide() {
39 | clearTimeout(this.timer);
40 | this.set({
41 | show: false
42 | });
43 | }
44 | }
45 | });
46 |
--------------------------------------------------------------------------------
/static/vant-weapp/collapse-item/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
19 |
23 |
27 |
28 |
32 |
33 |
38 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/static/vant-weapp/switch/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | field: true,
4 | classes: ['node-class'],
5 | props: {
6 | checked: null,
7 | loading: Boolean,
8 | disabled: Boolean,
9 | activeColor: String,
10 | inactiveColor: String,
11 | size: {
12 | type: String,
13 | value: '30px'
14 | },
15 | activeValue: {
16 | type: null,
17 | value: true
18 | },
19 | inactiveValue: {
20 | type: null,
21 | value: false
22 | }
23 | },
24 | watch: {
25 | checked(value) {
26 | this.set({ value });
27 | }
28 | },
29 | created() {
30 | this.set({ value: this.data.checked });
31 | },
32 | methods: {
33 | onClick() {
34 | const { activeValue, inactiveValue } = this.data;
35 | if (!this.data.disabled && !this.data.loading) {
36 | const checked = this.data.checked === activeValue;
37 | const value = checked ? inactiveValue : activeValue;
38 | this.$emit('input', value);
39 | this.$emit('change', value);
40 | }
41 | }
42 | }
43 | });
44 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
32 |
33 |
51 |
--------------------------------------------------------------------------------
/static/vant-weapp/steps/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 | {{ item.text }}
12 | {{ item.desc }}
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | function get(index, active) {
25 | if (index < active) {
26 | return 'finish';
27 | } else if (index === active) {
28 | return 'process';
29 | }
30 |
31 | return '';
32 | }
33 |
34 | module.exports = get;
35 |
36 |
--------------------------------------------------------------------------------
/static/vant-weapp/nav-bar/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
15 | {{ leftText }}
21 |
22 |
23 |
24 |
25 | {{ title }}
26 |
27 |
28 |
29 | {{ rightText }}
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/safe-area.js:
--------------------------------------------------------------------------------
1 | let cache = null;
2 | function getSafeArea() {
3 | return new Promise((resolve, reject) => {
4 | if (cache != null) {
5 | resolve(cache);
6 | }
7 | else {
8 | wx.getSystemInfo({
9 | success: ({ model, screenHeight, statusBarHeight }) => {
10 | const iphoneX = /iphone x/i.test(model);
11 | const iphoneNew = /iPhone11/i.test(model) && screenHeight === 812;
12 | cache = {
13 | isIPhoneX: iphoneX || iphoneNew,
14 | statusBarHeight
15 | };
16 | resolve(cache);
17 | },
18 | fail: reject
19 | });
20 | }
21 | });
22 | }
23 | export const safeArea = ({ safeAreaInsetBottom = true, safeAreaInsetTop = false } = {}) => Behavior({
24 | properties: {
25 | safeAreaInsetTop: {
26 | type: Boolean,
27 | value: safeAreaInsetTop
28 | },
29 | safeAreaInsetBottom: {
30 | type: Boolean,
31 | value: safeAreaInsetBottom
32 | }
33 | },
34 | created() {
35 | getSafeArea().then(({ isIPhoneX, statusBarHeight }) => {
36 | this.set({ isIPhoneX, statusBarHeight });
37 | });
38 | }
39 | });
40 |
--------------------------------------------------------------------------------
/static/vant-weapp/field/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{min-height:24px}.van-field__input{position:relative;display:block;width:100%;height:24px;min-height:24px;padding:0;margin:0;line-height:inherit;color:#333;text-align:left;background-color:initial;border:0;box-sizing:border-box;resize:none}.van-field__input--disabled{color:#999;background-color:initial;opacity:1}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__placeholder{position:absolute;top:0;right:0;left:0;color:#999;pointer-events:none}.van-field__placeholder--error{color:#f44}.van-field__icon-root{display:-webkit-flex;display:flex;min-height:24px;-webkit-align-items:center;align-items:center}.van-field__clear-root,.van-field__icon-container{padding:0 10px;margin-right:-10px;line-height:inherit;vertical-align:middle}.van-field__button,.van-field__clear-root,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear-root{color:#c9c9c9}.van-field__icon-container{color:#999}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:10px}.van-field__button:empty{display:none}.van-field__error-message{font-size:12px;color:#f44;text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}
--------------------------------------------------------------------------------
/static/vant-weapp/radio/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | field: true,
4 | relation: {
5 | name: 'radio-group',
6 | type: 'ancestor',
7 | linked(target) {
8 | this.parent = target;
9 | },
10 | unlinked() {
11 | this.parent = null;
12 | }
13 | },
14 | classes: ['icon-class', 'label-class'],
15 | props: {
16 | value: null,
17 | disabled: Boolean,
18 | useIconSlot: Boolean,
19 | checkedColor: String,
20 | labelPosition: {
21 | type: String,
22 | value: 'right'
23 | },
24 | labelDisabled: Boolean,
25 | shape: {
26 | type: String,
27 | value: 'round'
28 | }
29 | },
30 | methods: {
31 | emitChange(value) {
32 | const instance = this.parent || this;
33 | instance.$emit('input', value);
34 | instance.$emit('change', value);
35 | },
36 | onChange(event) {
37 | console.log(event);
38 | this.emitChange(this.data.name);
39 | },
40 | onClickLabel() {
41 | const { disabled, labelDisabled, name } = this.data;
42 | if (!disabled && !labelDisabled) {
43 | this.emitChange(name);
44 | }
45 | }
46 | }
47 | });
48 |
--------------------------------------------------------------------------------
/static/vant-weapp/badge-group/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | relation: {
4 | name: 'badge',
5 | type: 'descendant',
6 | linked(target) {
7 | this.badges.push(target);
8 | this.setActive(this.data.active);
9 | },
10 | unlinked(target) {
11 | this.badges = this.badges.filter(item => item !== target);
12 | this.setActive(this.data.active);
13 | }
14 | },
15 | props: {
16 | active: {
17 | type: Number,
18 | value: 0,
19 | observer: 'setActive'
20 | }
21 | },
22 | beforeCreate() {
23 | this.badges = [];
24 | this.currentActive = -1;
25 | },
26 | methods: {
27 | setActive(active) {
28 | const { badges, currentActive } = this;
29 | if (!badges.length) {
30 | return Promise.resolve();
31 | }
32 | this.currentActive = active;
33 | const stack = [];
34 | if (currentActive !== active && badges[currentActive]) {
35 | stack.push(badges[currentActive].setActive(false));
36 | }
37 | if (badges[active]) {
38 | stack.push(badges[active].setActive(true));
39 | }
40 | return Promise.all(stack);
41 | }
42 | }
43 | });
44 |
--------------------------------------------------------------------------------
/static/vant-weapp/submit-bar/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
13 |
14 | {{ tip }}
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | {{ label || '合计:' }}
23 |
24 | {{ currency }}
25 | {{ priceStr }}
26 |
27 | {{ suffixLabel }}
28 |
29 |
39 | {{ loading ? '' : buttonText }}
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/static/vant-weapp/button/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
40 |
--------------------------------------------------------------------------------
/src/components/GradeStar.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
28 |
29 |
58 |
--------------------------------------------------------------------------------
/static/vant-weapp/dialog/dialog.d.ts:
--------------------------------------------------------------------------------
1 | declare type DialogAction = 'confirm' | 'cancel';
2 | declare type DialogOptions = {
3 | lang?: string;
4 | show?: boolean;
5 | title?: string;
6 | zIndex?: number;
7 | context?: any;
8 | message?: string;
9 | overlay?: boolean;
10 | selector?: string;
11 | ariaLabel?: string;
12 | className?: string;
13 | transition?: string;
14 | asyncClose?: boolean;
15 | businessId?: number;
16 | sessionFrom?: string;
17 | appParameter?: string;
18 | messageAlign?: string;
19 | sendMessageImg?: string;
20 | showMessageCard?: boolean;
21 | sendMessagePath?: string;
22 | sendMessageTitle?: string;
23 | confirmButtonText?: string;
24 | cancelButtonText?: string;
25 | showConfirmButton?: boolean;
26 | showCancelButton?: boolean;
27 | closeOnClickOverlay?: boolean;
28 | confirmButtonOpenType?: string;
29 | };
30 | interface Dialog {
31 | (options: DialogOptions): Promise;
32 | alert?: (options: DialogOptions) => Promise;
33 | confirm?: (options: DialogOptions) => Promise;
34 | close?: () => void;
35 | stopLoading?: () => void;
36 | install?: () => void;
37 | setDefaultOptions?: (options: DialogOptions) => void;
38 | resetDefaultOptions?: () => void;
39 | defaultOptions?: DialogOptions;
40 | currentOptions?: DialogOptions;
41 | }
42 | declare const Dialog: Dialog;
43 | export default Dialog;
44 |
--------------------------------------------------------------------------------
/static/vant-weapp/tree-select/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
15 | {{ item.text }}
16 |
17 |
18 |
23 |
30 | {{ item.text }}
31 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/static/vant-weapp/search/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | field: true,
4 | classes: ['field-class', 'input-class', 'cancel-class'],
5 | props: {
6 | focus: Boolean,
7 | error: Boolean,
8 | disabled: Boolean,
9 | readonly: Boolean,
10 | inputAlign: String,
11 | showAction: Boolean,
12 | useActionSlot: Boolean,
13 | placeholder: String,
14 | placeholderStyle: String,
15 | background: {
16 | type: String,
17 | value: '#ffffff'
18 | },
19 | maxlength: {
20 | type: Number,
21 | value: -1
22 | },
23 | shape: {
24 | type: String,
25 | value: 'square'
26 | },
27 | label: String
28 | },
29 | methods: {
30 | onChange(event) {
31 | this.set({ value: event.detail });
32 | this.$emit('change', event.detail);
33 | },
34 | onCancel() {
35 | this.set({ value: '' });
36 | this.$emit('cancel');
37 | this.$emit('change', '');
38 | },
39 | onSearch() {
40 | this.$emit('search', this.data.value);
41 | },
42 | onFocus() {
43 | this.$emit('focus');
44 | },
45 | onBlur() {
46 | this.$emit('blur');
47 | },
48 | onClear() {
49 | this.$emit('clear');
50 | },
51 | }
52 | });
53 |
--------------------------------------------------------------------------------
/static/vant-weapp/mixins/observer/behavior.js:
--------------------------------------------------------------------------------
1 | function setAsync(context, data) {
2 | return new Promise(resolve => {
3 | context.setData(data, resolve);
4 | });
5 | }
6 | ;
7 | export const behavior = Behavior({
8 | created() {
9 | if (!this.$options) {
10 | return;
11 | }
12 | const cache = {};
13 | const { computed } = this.$options();
14 | const keys = Object.keys(computed);
15 | this.calcComputed = () => {
16 | const needUpdate = {};
17 | keys.forEach(key => {
18 | const value = computed[key].call(this);
19 | if (cache[key] !== value) {
20 | cache[key] = needUpdate[key] = value;
21 | }
22 | });
23 | return needUpdate;
24 | };
25 | },
26 | attached() {
27 | this.set();
28 | },
29 | methods: {
30 | // set data and set computed data
31 | set(data, callback) {
32 | const stack = [];
33 | if (data) {
34 | stack.push(setAsync(this, data));
35 | }
36 | if (this.calcComputed) {
37 | stack.push(setAsync(this, this.calcComputed()));
38 | }
39 | return Promise.all(stack).then(res => {
40 | if (callback && typeof callback === 'function') {
41 | callback.call(this);
42 | }
43 | return res;
44 | });
45 | }
46 | }
47 | });
48 |
--------------------------------------------------------------------------------
/static/vant-weapp/collapse/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | relation: {
4 | name: 'collapse-item',
5 | type: 'descendant',
6 | linked(child) {
7 | this.children.push(child);
8 | },
9 | unlinked(child) {
10 | this.children = this.children.filter((item) => item !== child);
11 | }
12 | },
13 | props: {
14 | value: {
15 | type: null,
16 | observer: 'updateExpanded'
17 | },
18 | accordion: {
19 | type: Boolean,
20 | observer: 'updateExpanded'
21 | },
22 | border: {
23 | type: Boolean,
24 | value: true
25 | }
26 | },
27 | beforeCreate() {
28 | this.children = [];
29 | },
30 | methods: {
31 | updateExpanded() {
32 | this.children.forEach((child) => {
33 | child.updateExpanded();
34 | });
35 | },
36 | switch(name, expanded) {
37 | const { accordion, value } = this.data;
38 | if (!accordion) {
39 | name = expanded
40 | ? (value || []).concat(name)
41 | : (value || []).filter((activeName) => activeName !== name);
42 | }
43 | else {
44 | name = expanded ? name : '';
45 | }
46 | this.$emit('change', name);
47 | this.$emit('input', name);
48 | }
49 | }
50 | });
51 |
--------------------------------------------------------------------------------
/static/vant-weapp/cell/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
16 |
17 |
18 |
22 | {{ title }}
23 |
24 |
25 |
26 |
27 | {{ label }}
28 |
29 |
30 |
31 |
32 | {{ value }}
33 |
34 |
35 |
36 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/static/vant-weapp/cell/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-cell{position:relative;display:-webkit-flex;display:flex;width:100%;padding:10px 15px;font-size:14px;line-height:24px;color:#333;background-color:#fff;box-sizing:border-box}.van-cell:after{content:" ";position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:auto;left:15px;right:0;bottom:0;-webkit-transform:scaleY(.5);transform:scaleY(.5);border-bottom:1px solid #eee}.van-cell--borderless:after{display:none}.van-cell-group{background-color:#fff}.van-cell__label{margin-top:3px;font-size:12px;line-height:18px;color:#999}.van-cell__value{overflow:hidden;color:#999;text-align:right;vertical-align:middle}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;height:24px;font-size:16px;-webkit-align-items:center;align-items:center}.van-cell__left-icon-wrap{margin-right:5px}.van-cell__right-icon-wrap{margin-left:5px;color:#999}.van-cell__left-icon{line-height:24px;vertical-align:middle}.van-cell__right-icon{line-height:24px}.van-cell--clickable.van-cell--hover{background-color:#f2f3f5}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;left:7px;font-size:14px;color:#f44;content:"*"}.van-cell--center{-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-bottom:12px}.van-cell--large .van-cell__title{font-size:16px}.van-cell--large .van-cell__label{font-size:14px}
--------------------------------------------------------------------------------
/static/vant-weapp/submit-bar/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { safeArea } from '../mixins/safe-area';
3 | VantComponent({
4 | mixins: [safeArea()],
5 | classes: [
6 | 'bar-class',
7 | 'price-class',
8 | 'button-class'
9 | ],
10 | props: {
11 | tip: {
12 | type: null,
13 | observer: 'updateTip'
14 | },
15 | tipIcon: String,
16 | type: Number,
17 | price: {
18 | type: null,
19 | observer: 'updatePrice'
20 | },
21 | label: String,
22 | loading: Boolean,
23 | disabled: Boolean,
24 | buttonText: String,
25 | currency: {
26 | type: String,
27 | value: '¥'
28 | },
29 | buttonType: {
30 | type: String,
31 | value: 'danger'
32 | },
33 | decimalLength: {
34 | type: Number,
35 | value: 2,
36 | observer: 'updatePrice'
37 | },
38 | suffixLabel: String
39 | },
40 | methods: {
41 | updatePrice() {
42 | const { price, decimalLength } = this.data;
43 | this.set({
44 | hasPrice: typeof price === 'number',
45 | priceStr: (price / 100).toFixed(decimalLength)
46 | });
47 | },
48 | updateTip() {
49 | this.set({ hasTip: typeof this.data.tip === 'string' });
50 | },
51 | onSubmit(event) {
52 | this.$emit('submit', event.detail);
53 | }
54 | }
55 | });
56 |
--------------------------------------------------------------------------------
/static/vant-weapp/search/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 | {{ label }}
9 |
10 |
11 |
35 |
36 |
37 |
43 |
44 | 取消
45 |
46 |
47 |
--------------------------------------------------------------------------------
/static/vant-weapp/tabbar-item/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | props: {
4 | info: null,
5 | icon: String,
6 | dot: Boolean,
7 | name: {
8 | type: [String, Number]
9 | }
10 | },
11 | relation: {
12 | name: 'tabbar',
13 | type: 'ancestor'
14 | },
15 | data: {
16 | active: false
17 | },
18 | methods: {
19 | onClick() {
20 | if (this.parent) {
21 | this.parent.onChange(this);
22 | }
23 | this.$emit('click');
24 | },
25 | updateFromParent() {
26 | const { parent } = this;
27 | if (!parent) {
28 | return;
29 | }
30 | const index = parent.children.indexOf(this);
31 | const parentData = parent.data;
32 | const { data } = this;
33 | const active = (data.name || index) === parentData.active;
34 | const patch = {};
35 | if (active !== data.active) {
36 | patch.active = active;
37 | }
38 | if (parentData.activeColor !== data.activeColor) {
39 | patch.activeColor = parentData.activeColor;
40 | }
41 | if (parentData.inactiveColor !== data.inactiveColor) {
42 | patch.inactiveColor = parentData.inactiveColor;
43 | }
44 | return Object.keys(patch).length > 0
45 | ? this.set(patch)
46 | : Promise.resolve();
47 | }
48 | }
49 | });
50 |
--------------------------------------------------------------------------------
/static/vant-weapp/stepper/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-stepper{font-size:0}.van-stepper__minus,.van-stepper__plus{position:relative;display:inline-block;width:28px;height:28px;padding:5px;margin:1px;vertical-align:middle;background-color:#f2f3f5;border:0;box-sizing:border-box}.van-stepper__minus:before,.van-stepper__plus:before{width:9px;height:1px}.van-stepper__minus:after,.van-stepper__plus:after{width:1px;height:9px}.van-stepper__minus:after,.van-stepper__minus:before,.van-stepper__plus:after,.van-stepper__plus:before{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;background-color:#333;content:""}.van-stepper__minus--hover,.van-stepper__plus--hover{background-color:#e8e8e8}.van-stepper__minus--disabled,.van-stepper__plus--disabled{background-color:#f7f8fa}.van-stepper__minus--disabled:after,.van-stepper__minus--disabled:before,.van-stepper__plus--disabled:after,.van-stepper__plus--disabled:before{background-color:#c9c9c9}.van-stepper__minus--disabled.van-stepper__minus--hover,.van-stepper__minus--disabled.van-stepper__plus--hover,.van-stepper__plus--disabled.van-stepper__minus--hover,.van-stepper__plus--disabled.van-stepper__plus--hover{background-color:#f7f8fa}.van-stepper__minus{border-radius:4px 0 0 4px}.van-stepper__minus:after{display:none}.van-stepper__plus{border-radius:0 4px 4px 0}.van-stepper__input{display:inline-block;width:30px;height:26px;padding:1px;margin:1px;font-size:14px;color:#333;text-align:center;vertical-align:middle;background-color:#f2f3f5;border:0;border-width:1px 0;border-radius:0;box-sizing:initial;-webkit-appearance:none}.van-stepper__input--disabled{color:#c9c9c9;background-color:#f2f3f5}
--------------------------------------------------------------------------------
/static/vant-weapp/card/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
41 |
42 |
45 |
46 |
--------------------------------------------------------------------------------
/src/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/movice/main",
4 | "pages/rank/main",
5 | "pages/rankList/main",
6 | "pages/moviceList/main",
7 | "pages/moviceDetail/main",
8 | "pages/mine/main"
9 | ],
10 | "window": {
11 | "backgroundTextStyle": "light",
12 | "navigationBarBackgroundColor": "#67ba62",
13 | "navigationBarTitleText": "首页",
14 | "navigationBarTextStyle": "white"
15 | },
16 | "tabBar": {
17 | "color": "#999",
18 | "backgroundColor": "#fff",
19 | "selectedColor": "#67ba62",
20 | "borderStyle": "black",
21 | "list": [
22 | {
23 | "text": "首页",
24 | "pagePath": "pages/movice/main",
25 | "iconPath": "static/tabs/home.png",
26 | "selectedIconPath": "static/tabs/home-active.png"
27 | }, {
28 | "text": "榜单",
29 | "pagePath": "pages/rank/main",
30 | "iconPath": "static/tabs/list.png",
31 | "selectedIconPath": "static/tabs/list-active.png"
32 | },{
33 | "text": "我的",
34 | "pagePath": "pages/mine/main",
35 | "iconPath": "static/tabs/mine.png",
36 | "selectedIconPath": "static/tabs/mine-active.png"
37 | }
38 | ],
39 | "position": "bottom"
40 | },
41 | "usingComponents": {
42 | "van-button": "static/vant-weapp/button/index",
43 | "van-icon": "static/vant-weapp/icon/index",
44 | "van-cell": "static/vant-weapp/cell/index",
45 | "van-cell-group": "static/vant-weapp/cell-group/index",
46 | "van-toast": "static/vant-weapp/toast/index",
47 | "van-rate": "static/vant-weapp/rate/index",
48 | "van-loading": "static/vant-weapp/loading/index"
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/static/vant-weapp/common/component.js:
--------------------------------------------------------------------------------
1 | import { basic } from '../mixins/basic';
2 | import { observe } from '../mixins/observer/index';
3 | function mapKeys(source, target, map) {
4 | Object.keys(map).forEach(key => {
5 | if (source[key]) {
6 | target[map[key]] = source[key];
7 | }
8 | });
9 | }
10 | function VantComponent(vantOptions = {}) {
11 | const options = {};
12 | mapKeys(vantOptions, options, {
13 | data: 'data',
14 | props: 'properties',
15 | mixins: 'behaviors',
16 | methods: 'methods',
17 | beforeCreate: 'created',
18 | created: 'attached',
19 | mounted: 'ready',
20 | relations: 'relations',
21 | destroyed: 'detached',
22 | classes: 'externalClasses'
23 | });
24 | const { relation } = vantOptions;
25 | if (relation) {
26 | options.relations = Object.assign(options.relations || {}, {
27 | [`../${relation.name}/index`]: relation
28 | });
29 | }
30 | // add default externalClasses
31 | options.externalClasses = options.externalClasses || [];
32 | options.externalClasses.push('custom-class');
33 | // add default behaviors
34 | options.behaviors = options.behaviors || [];
35 | options.behaviors.push(basic);
36 | // map field to form-field behavior
37 | if (vantOptions.field) {
38 | options.behaviors.push('wx://form-field');
39 | }
40 | // add default options
41 | options.options = {
42 | multipleSlots: true,
43 | addGlobalClass: true
44 | };
45 | observe(vantOptions, options);
46 | Component(options);
47 | }
48 | export { VantComponent };
49 |
--------------------------------------------------------------------------------
/static/vant-weapp/action-sheet/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
21 |
22 |
23 |
38 |
39 |
40 |
47 | {{ cancelText }}
48 |
49 |
50 |
--------------------------------------------------------------------------------
/static/vant-weapp/tabs/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-tabs{position:relative;-webkit-tap-highlight-color:transparent}.van-tabs__wrap{position:absolute;top:0;right:0;left:0;display:-webkit-flex;display:flex;background-color:#fff}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__wrap--scrollable .van-tab{-webkit-flex:0 0 22%;flex:0 0 22%}.van-tabs__scroll--card{border:1px solid #f44;border-radius:2px}.van-tabs__nav{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none}.van-tabs__nav--line{height:100%}.van-tabs__nav--card{height:30px}.van-tabs__nav--card .van-tab{line-height:30px;color:#f44;border-right:1px solid #f44}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{color:#fff;background-color:#f44}.van-tabs__line{position:absolute;bottom:0;left:0;z-index:1;height:3px;background-color:#f44;border-radius:3px}.van-tabs--line{padding-top:44px}.van-tabs--line .van-tabs__wrap{height:44px}.van-tabs--card{padding-top:30px;margin:0 15px}.van-tabs--card .van-tabs__wrap{height:30px}.van-tabs__content{overflow:hidden}.van-tab,.van-tabs__track{position:relative}.van-tab{min-width:0;padding:0 5px;font-size:14px;line-height:44px;color:#7d7e80;text-align:center;cursor:pointer;box-sizing:border-box;-webkit-flex:1;flex:1}.van-tab--active{font-weight:500;color:#333}.van-tab--disabled{color:#c9c9c9}.van-tab__title--dot:after{display:inline-block;width:8px;height:8px;vertical-align:middle;background-color:#f44;border-radius:100%;content:""}.van-tab__title__info{position:relative!important;top:-1px!important;display:inline-block;-webkit-transform:translateX(0)!important;transform:translateX(0)!important}
--------------------------------------------------------------------------------
/static/vant-weapp/col/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-col{float:left;box-sizing:border-box}.van-col--1{width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{width:100%}.van-col--offset-24{margin-left:100%}
--------------------------------------------------------------------------------
/src/pages/logs/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
19 |
50 |
51 |
62 |
--------------------------------------------------------------------------------
/static/vant-weapp/popup/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { transition } from '../mixins/transition';
3 | import { safeArea } from '../mixins/safe-area';
4 | VantComponent({
5 | classes: [
6 | 'enter-class',
7 | 'enter-active-class',
8 | 'enter-to-class',
9 | 'leave-class',
10 | 'leave-active-class',
11 | 'leave-to-class'
12 | ],
13 | mixins: [transition(false), safeArea()],
14 | props: {
15 | transition: {
16 | type: String,
17 | observer: 'observeClass'
18 | },
19 | customStyle: String,
20 | overlayStyle: String,
21 | zIndex: {
22 | type: Number,
23 | value: 100
24 | },
25 | overlay: {
26 | type: Boolean,
27 | value: true
28 | },
29 | closeOnClickOverlay: {
30 | type: Boolean,
31 | value: true
32 | },
33 | position: {
34 | type: String,
35 | value: 'center',
36 | observer: 'observeClass'
37 | }
38 | },
39 | created() {
40 | this.observeClass();
41 | },
42 | methods: {
43 | onClickOverlay() {
44 | this.$emit('click-overlay');
45 | if (this.data.closeOnClickOverlay) {
46 | this.$emit('close');
47 | }
48 | },
49 | observeClass() {
50 | const { transition, position } = this.data;
51 | const updateData = {
52 | name: transition || position
53 | };
54 | if (transition === 'none') {
55 | updateData.duration = 0;
56 | }
57 | this.set(updateData);
58 | }
59 | }
60 | });
61 |
--------------------------------------------------------------------------------
/static/vant-weapp/transition/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-transition{transition-timing-function:ease}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-fade-down-enter-active,.van-fade-down-leave-active,.van-fade-left-enter-active,.van-fade-left-leave-active,.van-fade-right-enter-active,.van-fade-right-leave-active,.van-fade-up-enter-active,.van-fade-up-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-fade-up-enter,.van-fade-up-leave-to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-fade-down-enter,.van-fade-down-leave-to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-fade-left-enter,.van-fade-left-leave-to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-fade-right-enter,.van-fade-right-leave-to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.van-slide-down-enter-active,.van-slide-down-leave-active,.van-slide-left-enter-active,.van-slide-left-leave-active,.van-slide-right-enter-active,.van-slide-right-leave-active,.van-slide-up-enter-active,.van-slide-up-leave-active{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-slide-up-enter,.van-slide-up-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-slide-down-enter,.van-slide-down-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-slide-left-enter,.van-slide-left-leave-to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-slide-right-enter,.van-slide-right-leave-to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}
--------------------------------------------------------------------------------
/static/vant-weapp/dialog/dialog.js:
--------------------------------------------------------------------------------
1 | let queue = [];
2 | function getContext() {
3 | const pages = getCurrentPages();
4 | return pages[pages.length - 1];
5 | }
6 | const Dialog = options => {
7 | options = Object.assign({}, Dialog.currentOptions, options);
8 | return new Promise((resolve, reject) => {
9 | const context = options.context || getContext();
10 | const dialog = context.selectComponent(options.selector);
11 | delete options.selector;
12 | if (dialog) {
13 | dialog.set(Object.assign({ onCancel: reject, onConfirm: resolve }, options));
14 | queue.push(dialog);
15 | }
16 | else {
17 | console.warn('未找到 van-dialog 节点,请确认 selector 及 context 是否正确');
18 | }
19 | });
20 | };
21 | Dialog.defaultOptions = {
22 | show: true,
23 | title: '',
24 | message: '',
25 | zIndex: 100,
26 | overlay: true,
27 | className: '',
28 | asyncClose: false,
29 | messageAlign: '',
30 | transition: 'scale',
31 | selector: '#van-dialog',
32 | confirmButtonText: '确认',
33 | cancelButtonText: '取消',
34 | showConfirmButton: true,
35 | showCancelButton: false,
36 | closeOnClickOverlay: false,
37 | confirmButtonOpenType: ''
38 | };
39 | Dialog.alert = Dialog;
40 | Dialog.confirm = options => Dialog(Object.assign({ showCancelButton: true }, options));
41 | Dialog.close = () => {
42 | queue.forEach(dialog => {
43 | dialog.close();
44 | });
45 | queue = [];
46 | };
47 | Dialog.stopLoading = () => {
48 | queue.forEach(dialog => {
49 | dialog.stopLoading();
50 | });
51 | };
52 | Dialog.setDefaultOptions = options => {
53 | Object.assign(Dialog.currentOptions, options);
54 | };
55 | Dialog.resetDefaultOptions = () => {
56 | Dialog.currentOptions = Object.assign({}, Dialog.defaultOptions);
57 | };
58 | Dialog.resetDefaultOptions();
59 | export default Dialog;
60 |
--------------------------------------------------------------------------------
/static/vant-weapp/picker/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
13 | {{ cancelButtonText }}
14 |
15 | {{ title }}
16 |
23 | {{ confirmButtonText }}
24 |
25 |
26 |
27 |
28 |
29 |
34 |
48 |
52 |
53 |
54 |
55 |
56 | function isSimple(columns) {
57 | return columns.length && !columns[0].values;
58 | }
59 | module.exports = isSimple;
60 |
61 |
--------------------------------------------------------------------------------
/static/vant-weapp/tabbar/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { safeArea } from '../mixins/safe-area';
3 | VantComponent({
4 | mixins: [safeArea()],
5 | relation: {
6 | name: 'tabbar-item',
7 | type: 'descendant',
8 | linked(target) {
9 | this.children.push(target);
10 | target.parent = this;
11 | target.updateFromParent();
12 | },
13 | unlinked(target) {
14 | this.children = this.children.filter((item) => item !== target);
15 | this.updateChildren();
16 | }
17 | },
18 | props: {
19 | active: {
20 | type: [Number, String],
21 | observer: 'updateChildren'
22 | },
23 | activeColor: {
24 | type: String,
25 | observer: 'updateChildren'
26 | },
27 | inactiveColor: {
28 | type: String,
29 | observer: 'updateChildren'
30 | },
31 | fixed: {
32 | type: Boolean,
33 | value: true
34 | },
35 | border: {
36 | type: Boolean,
37 | value: true
38 | },
39 | zIndex: {
40 | type: Number,
41 | value: 1
42 | }
43 | },
44 | beforeCreate() {
45 | this.children = [];
46 | },
47 | methods: {
48 | updateChildren() {
49 | const { children } = this;
50 | if (!Array.isArray(children) || !children.length) {
51 | return Promise.resolve();
52 | }
53 | return Promise.all(children.map((child) => child.updateFromParent()));
54 | },
55 | onChange(child) {
56 | const index = this.children.indexOf(child);
57 | const active = child.data.name || index;
58 | if (active !== this.data.active) {
59 | this.$emit('change', active);
60 | }
61 | }
62 | }
63 | });
64 |
--------------------------------------------------------------------------------
/src/components/MoviceLabel.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
![]()
9 |
{{title}}
10 |
11 |
19 |
20 | {{rate}}
21 |
22 |
23 |
24 |
25 |
26 |
46 |
47 |
81 |
--------------------------------------------------------------------------------
/src/pages/mine/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | 获取昵称
14 |
15 |
16 |
![]()
17 |
{{userInfo.nickName}}
18 |
19 |
20 |
21 |
22 |
48 |
49 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/static/vant-weapp/button/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-button{position:relative;display:inline-block;height:44px;padding:0;font-size:16px;line-height:42px;text-align:center;vertical-align:middle;box-sizing:border-box;border-radius:2px;-webkit-appearance:none;-webkit-text-size-adjust:100%}.van-button:before{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:#000;border:inherit;border-color:#000;border-radius:inherit;content:" ";opacity:0;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-button:after{border-width:0}.van-button--active:before{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{color:#333;background-color:#fff;border:1px solid #eee}.van-button--primary{color:#fff;background-color:#07c160;border:1px solid #07c160}.van-button--info{color:#fff;background-color:#1989fa;border:1px solid #1989fa}.van-button--danger{color:#fff;background-color:#f44;border:1px solid #f44}.van-button--warning{color:#fff;background-color:#ff976a;border:1px solid #ff976a}.van-button--plain{background-color:#fff}.van-button--plain.van-button--primary{color:#07c160}.van-button--plain.van-button--info{color:#1989fa}.van-button--plain.van-button--danger{color:#f44}.van-button--plain.van-button--warning{color:#ff976a}.van-button--large{width:100%;height:50px;line-height:48px}.van-button--normal{padding:0 15px;font-size:14px}.van-button--small{height:30px;min-width:60px;padding:0 8px;font-size:12px;line-height:28px}.van-button--mini{display:inline-block;width:50px;height:22px;font-size:10px;line-height:20px}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:block;width:100%}.van-button--round{border-radius:10em}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5}.van-button__loading-text{margin-left:5px;display:inline-block;vertical-align:middle}.van-button--hairline{border-width:0;padding-top:1px}.van-button--hairline:after{border-width:1px;border-color:inherit;border-radius:4px}.van-button--hairline.van-button--round:after{border-radius:10em}.van-button--hairline.van-button--square:after{border-radius:0}
--------------------------------------------------------------------------------
/src/components/OrderCard.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{title}}
6 | 查看更多 >
7 |
8 |
9 |
10 |
11 |
15 |
20 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
60 |
61 |
87 |
--------------------------------------------------------------------------------
/static/vant-weapp/dialog/index.wxml:
--------------------------------------------------------------------------------
1 |
10 |
16 |
17 |
18 |
22 | {{ message }}
23 |
24 |
25 |
64 |
65 |
--------------------------------------------------------------------------------
/static/vant-weapp/toast/toast.js:
--------------------------------------------------------------------------------
1 | import { isObj } from '../common/utils';
2 | const defaultOptions = {
3 | type: 'text',
4 | mask: false,
5 | message: '',
6 | show: true,
7 | zIndex: 1000,
8 | duration: 3000,
9 | position: 'middle',
10 | forbidClick: false,
11 | loadingType: 'circular',
12 | selector: '#van-toast'
13 | };
14 | let queue = [];
15 | let currentOptions = Object.assign({}, defaultOptions);
16 | function parseOptions(message) {
17 | return isObj(message) ? message : { message };
18 | }
19 | function getContext() {
20 | const pages = getCurrentPages();
21 | return pages[pages.length - 1];
22 | }
23 | function Toast(toastOptions) {
24 | const options = Object.assign({}, currentOptions, parseOptions(toastOptions));
25 | const context = options.context || getContext();
26 | const toast = context.selectComponent(options.selector);
27 | if (!toast) {
28 | console.warn('未找到 van-toast 节点,请确认 selector 及 context 是否正确');
29 | return;
30 | }
31 | delete options.context;
32 | delete options.selector;
33 | toast.clear = () => {
34 | toast.set({ show: false });
35 | if (options.onClose) {
36 | options.onClose();
37 | }
38 | };
39 | queue.push(toast);
40 | toast.set(options);
41 | clearTimeout(toast.timer);
42 | if (options.duration > 0) {
43 | toast.timer = setTimeout(() => {
44 | toast.clear();
45 | queue = queue.filter(item => item !== toast);
46 | }, options.duration);
47 | }
48 | return toast;
49 | }
50 | const createMethod = type => (options) => Toast(Object.assign({ type }, parseOptions(options)));
51 | Toast.loading = createMethod('loading');
52 | Toast.success = createMethod('success');
53 | Toast.fail = createMethod('fail');
54 | Toast.clear = () => {
55 | queue.forEach(toast => {
56 | toast.clear();
57 | });
58 | queue = [];
59 | };
60 | Toast.setDefaultOptions = (options) => {
61 | Object.assign(currentOptions, options);
62 | };
63 | Toast.resetDefaultOptions = () => {
64 | currentOptions = Object.assign({}, defaultOptions);
65 | };
66 | export default Toast;
67 |
--------------------------------------------------------------------------------
/static/vant-weapp/tabs/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
14 |
15 |
16 |
24 |
25 | {{ item.title }}
26 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/static/vant-weapp/loading/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-loading{z-index:0;line-height:0;vertical-align:middle}.van-loading,.van-loading__spinner{position:relative;display:inline-block}.van-loading__spinner{z-index:-1;width:100%;height:100%;box-sizing:border-box;-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--circular{border-radius:100%;border:1px solid transparent;border-top-color:initial}.van-loading__dot{top:0;left:0;width:100%;height:100%;position:absolute}.van-loading__dot:before{width:2px;height:25%;content:" ";display:block;margin:0 auto;border-radius:40%;background-color:currentColor}.van-loading__dot:first-of-type{opacity:1;-webkit-transform:rotate(30deg);transform:rotate(30deg)}.van-loading__dot:nth-of-type(2){opacity:.9375;-webkit-transform:rotate(60deg);transform:rotate(60deg)}.van-loading__dot:nth-of-type(3){opacity:.875;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.van-loading__dot:nth-of-type(4){opacity:.8125;-webkit-transform:rotate(120deg);transform:rotate(120deg)}.van-loading__dot:nth-of-type(5){opacity:.75;-webkit-transform:rotate(150deg);transform:rotate(150deg)}.van-loading__dot:nth-of-type(6){opacity:.6875;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.van-loading__dot:nth-of-type(7){opacity:.625;-webkit-transform:rotate(210deg);transform:rotate(210deg)}.van-loading__dot:nth-of-type(8){opacity:.5625;-webkit-transform:rotate(240deg);transform:rotate(240deg)}.van-loading__dot:nth-of-type(9){opacity:.5;-webkit-transform:rotate(270deg);transform:rotate(270deg)}.van-loading__dot:nth-of-type(10){opacity:.4375;-webkit-transform:rotate(300deg);transform:rotate(300deg)}.van-loading__dot:nth-of-type(11){opacity:.375;-webkit-transform:rotate(330deg);transform:rotate(330deg)}.van-loading__dot:nth-of-type(12){opacity:.3125;-webkit-transform:rotate(1turn);transform:rotate(1turn)}@-webkit-keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}
--------------------------------------------------------------------------------
/static/vant-weapp/rate/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | field: true,
4 | classes: ['icon-class'],
5 | props: {
6 | value: Number,
7 | readonly: Boolean,
8 | disabled: Boolean,
9 | allowHalf: Boolean,
10 | size: {
11 | type: Number,
12 | value: 20
13 | },
14 | icon: {
15 | type: String,
16 | value: 'star'
17 | },
18 | voidIcon: {
19 | type: String,
20 | value: 'star-o'
21 | },
22 | color: {
23 | type: String,
24 | value: '#ffd21e'
25 | },
26 | voidColor: {
27 | type: String,
28 | value: '#c7c7c7'
29 | },
30 | disabledColor: {
31 | type: String,
32 | value: '#bdbdbd'
33 | },
34 | count: {
35 | type: Number,
36 | value: 5
37 | }
38 | },
39 | data: {
40 | innerValue: 0
41 | },
42 | watch: {
43 | value(value) {
44 | if (value !== this.data.innerValue) {
45 | this.set({ innerValue: value });
46 | }
47 | }
48 | },
49 | methods: {
50 | onSelect(event) {
51 | const { data } = this;
52 | const { score } = event.currentTarget.dataset;
53 | if (!data.disabled && !data.readonly) {
54 | this.set({ innerValue: score + 1 });
55 | this.$emit('input', score + 1);
56 | this.$emit('change', score + 1);
57 | }
58 | },
59 | onTouchMove(event) {
60 | const { clientX, clientY } = event.touches[0];
61 | this.getRect('.van-rate__icon', true).then((list) => {
62 | const target = list
63 | .sort(item => item.right - item.left)
64 | .find(item => clientX >= item.left &&
65 | clientX <= item.right &&
66 | clientY >= item.top &&
67 | clientY <= item.bottom);
68 | if (target != null) {
69 | this.onSelect(Object.assign({}, event, { currentTarget: target }));
70 | }
71 | });
72 | }
73 | }
74 | });
75 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
1 | // see http://vuejs-templates.github.io/webpack for documentation.
2 | var path = require('path')
3 | var fileExtConfig = {
4 | swan: {
5 | template: 'swan',
6 | script: 'js',
7 | style: 'css',
8 | platform: 'swan'
9 | },
10 | tt: {
11 | template: 'ttml',
12 | script: 'js',
13 | style: 'ttss',
14 | platform: 'tt'
15 | },
16 | wx: {
17 | template: 'wxml',
18 | script: 'js',
19 | style: 'wxss',
20 | platform: 'wx'
21 | },
22 | my: {
23 | template: 'axml',
24 | script: 'js',
25 | style: 'acss',
26 | platform: 'my'
27 | }
28 | }
29 | var fileExt = fileExtConfig[process.env.PLATFORM]
30 |
31 | module.exports = {
32 | build: {
33 | env: require('./prod.env'),
34 | index: path.resolve(__dirname, `../dist/${fileExt.platform}/index.html`),
35 | assetsRoot: path.resolve(__dirname, `../dist/${fileExt.platform}`),
36 | assetsSubDirectory: '',
37 | assetsPublicPath: '/',
38 | productionSourceMap: false,
39 | // Gzip off by default as many popular static hosts such as
40 | // Surge or Netlify already gzip all static assets for you.
41 | // Before setting to `true`, make sure to:
42 | // npm install --save-dev compression-webpack-plugin
43 | productionGzip: false,
44 | productionGzipExtensions: ['js', 'css'],
45 | // Run the build command with an extra argument to
46 | // View the bundle analyzer report after build finishes:
47 | // `npm run build --report`
48 | // Set to `true` or `false` to always turn it on or off
49 | bundleAnalyzerReport: process.env.npm_config_report,
50 | fileExt: fileExt
51 | },
52 | dev: {
53 | env: require('./dev.env'),
54 | port: 8080,
55 | // 在小程序开发者工具中不需要自动打开浏览器
56 | autoOpenBrowser: false,
57 | assetsSubDirectory: '',
58 | assetsPublicPath: '/',
59 | proxyTable: {},
60 | // CSS Sourcemaps off by default because relative paths are "buggy"
61 | // with this option, according to the CSS-Loader README
62 | // (https://github.com/webpack/css-loader#sourcemaps)
63 | // In our experience, they generally work as expected,
64 | // just be aware of this issue when enabling this option.
65 | cssSourceMap: false,
66 | fileExt: fileExt
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/static/vant-weapp/checkbox/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | function emit(target, value) {
3 | target.$emit('input', value);
4 | target.$emit('change', value);
5 | }
6 | VantComponent({
7 | field: true,
8 | relation: {
9 | name: 'checkbox-group',
10 | type: 'ancestor',
11 | linked(target) {
12 | this.parent = target;
13 | },
14 | unlinked() {
15 | this.parent = null;
16 | }
17 | },
18 | classes: ['icon-class', 'label-class'],
19 | props: {
20 | value: Boolean,
21 | disabled: Boolean,
22 | useIconSlot: Boolean,
23 | checkedColor: String,
24 | labelPosition: String,
25 | labelDisabled: Boolean,
26 | shape: {
27 | type: String,
28 | value: 'round'
29 | }
30 | },
31 | methods: {
32 | emitChange(value) {
33 | if (this.parent) {
34 | this.setParentValue(this.parent, value);
35 | }
36 | else {
37 | emit(this, value);
38 | }
39 | },
40 | toggle() {
41 | const { disabled, value } = this.data;
42 | if (!disabled) {
43 | this.emitChange(!value);
44 | }
45 | },
46 | onClickLabel() {
47 | const { labelDisabled, disabled, value } = this.data;
48 | if (!disabled && !labelDisabled) {
49 | this.emitChange(!value);
50 | }
51 | },
52 | setParentValue(parent, value) {
53 | const parentValue = parent.data.value.slice();
54 | const { name } = this.data;
55 | const { max } = parent.data;
56 | if (value) {
57 | if (max && parentValue.length >= max) {
58 | return;
59 | }
60 | if (parentValue.indexOf(name) === -1) {
61 | parentValue.push(name);
62 | emit(parent, parentValue);
63 | }
64 | }
65 | else {
66 | const index = parentValue.indexOf(name);
67 | if (index !== -1) {
68 | parentValue.splice(index, 1);
69 | emit(parent, parentValue);
70 | }
71 | }
72 | }
73 | }
74 | });
75 |
--------------------------------------------------------------------------------
/static/vant-weapp/popup/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-popup{position:fixed;top:50%;left:50%;max-height:100%;overflow-y:auto;background-color:#fff;box-sizing:border-box;-webkit-animation:ease both;animation:ease both;-webkit-overflow-scrolling:touch;transition-timing-function:ease}.van-popup--center{-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-popup--top{top:0;right:auto;bottom:auto;left:50%;width:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.van-popup--right{top:50%;right:0;bottom:auto;left:auto;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.van-popup--bottom{top:auto;right:auto;bottom:0;left:50%;width:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.van-popup--left{top:50%;right:auto;bottom:auto;left:0;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.van-popup--bottom.van-popup--safe{padding-bottom:34px}.van-popup--left .van-popup__safe-top,.van-popup--right .van-popup__safe-top,.van-popup--top .van-popup__safe-top{height:44px}.van-popup--bottom .van-popup__safe-top,.van-popup--center .van-popup__safe-top{padding-top:0!important}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-scale-enter,.van-scale-leave-to{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7)}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-center-enter-active,.van-center-leave-active{transition-property:opacity}.van-center-enter,.van-center-leave-to{opacity:0}.van-bottom-enter-active,.van-bottom-leave-active,.van-left-enter-active,.van-left-leave-active,.van-right-enter-active,.van-right-leave-active,.van-top-enter-active,.van-top-leave-active{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-bottom-enter,.van-bottom-leave-to{-webkit-transform:translate3d(-50%,100%,0);transform:translate3d(-50%,100%,0)}.van-top-enter,.van-top-leave-to{-webkit-transform:translate3d(-50%,-100%,0);transform:translate3d(-50%,-100%,0)}.van-left-enter,.van-left-leave-to{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)}
--------------------------------------------------------------------------------
/static/vant-weapp/steps/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-steps{overflow:hidden;background-color:#fff}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{position:relative;display:-webkit-flex;display:flex;overflow:hidden}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{position:relative;-webkit-flex:1;flex:1;font-size:14px;color:#999}.van-step--finish{color:#333}.van-step__circle{width:5px;height:5px;background-color:#999;border-radius:50%}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{-webkit-transform:none;transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;-webkit-transform:none;transform:none}.van-step--horizontal:last-child .van-step__circle-container{right:0;padding:0 0 0 8px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{position:absolute;bottom:6px;z-index:1;padding:0 8px;background-color:#fff;-webkit-transform:translate3d(-50%,50%,0);transform:translate3d(-50%,50%,0)}.van-step--horizontal .van-step__title{display:inline-block;font-size:12px;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.van-step--horizontal .van-step__line{position:absolute;right:0;bottom:6px;left:0;height:1px;background-color:#eee;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal.van-step--process{color:#333}.van-step--horizontal.van-step--process .van-step__active{display:block;font-size:12px;line-height:1}.van-step--vertical{padding:10px 10px 10px 0;font-size:14px;line-height:18px}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{position:absolute;top:0;left:-15px;z-index:1;width:1px;height:20px;background-color:#fff;content:""}.van-step--vertical .van-step__active,.van-step--vertical .van-step__circle,.van-step--vertical .van-step__line{position:absolute;top:19px;left:-14px;z-index:2;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-step--vertical .van-step__active{font-size:12px;line-height:1}.van-step--vertical .van-step__line{z-index:1;width:1px;height:100%;background-color:#eee;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}
--------------------------------------------------------------------------------