├── miniprogram
├── app.wxss
├── pages
│ ├── index
│ │ ├── index.wxss
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.js
│ ├── scanCode
│ │ ├── scanCode.wxss
│ │ ├── scanCode.wxml
│ │ ├── scanCode.json
│ │ └── scanCode.js
│ └── bookDetail
│ │ ├── bookDetail.wxss
│ │ ├── bookDetail.json
│ │ ├── bookDetail.wxml
│ │ └── bookDetail.js
├── vant
│ ├── common
│ │ ├── style
│ │ │ ├── var.wxss
│ │ │ ├── mixins
│ │ │ │ ├── clearfix.wxss
│ │ │ │ ├── ellipsis.wxss
│ │ │ │ └── border-retina.wxss
│ │ │ ├── clearfix.wxss
│ │ │ ├── ellipsis.wxss
│ │ │ └── hairline.wxss
│ │ ├── classnames.js
│ │ └── index.wxss
│ ├── tag
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.js
│ │ └── index.wxss
│ ├── card
│ │ ├── index.json
│ │ ├── index.js
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── col
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.js
│ │ └── index.wxss
│ ├── loading
│ │ ├── index.json
│ │ ├── index.js
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── row
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
│ ├── stepper
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.wxss
│ │ └── index.js
│ ├── badge
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.js
│ │ └── index.wxss
│ ├── cell-group
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.js
│ │ └── index.wxss
│ ├── popup
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.js
│ │ └── index.wxss
│ ├── slider
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.wxss
│ │ └── index.js
│ ├── tabbar
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
│ ├── transition
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.js
│ │ └── index.wxss
│ ├── badge-group
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.wxss
│ │ └── index.js
│ ├── overlay
│ │ ├── index.wxss
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.js
│ ├── cell
│ │ ├── index.json
│ │ ├── index.js
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── switch-cell
│ │ ├── index.wxss
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.js
│ ├── button
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── behaviors.js
│ │ ├── index.wxss
│ │ └── index.js
│ ├── nav-bar
│ │ ├── index.json
│ │ ├── index.js
│ │ ├── index.wxss
│ │ └── index.wxml
│ ├── notice-bar
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
│ ├── panel
│ │ ├── index.json
│ │ ├── index.js
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── steps
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.js
│ │ └── index.wxss
│ ├── switch
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.js
│ │ └── index.wxss
│ ├── tabbar-item
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.js
│ │ └── index.wxss
│ ├── tree-select
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.wxss
│ │ └── index.js
│ ├── notify
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ ├── notify.js
│ │ └── index.js
│ ├── field
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
│ ├── search
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
│ ├── actionsheet
│ │ ├── index.json
│ │ ├── index.js
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── toast
│ │ ├── index.json
│ │ ├── index.js
│ │ ├── index.wxml
│ │ ├── index.wxss
│ │ └── toast.js
│ ├── utils
│ │ └── index.js
│ └── behaviors
│ │ ├── touch.js
│ │ └── button.js
├── app.js
└── app.json
├── cloudfunctions
├── bookinfo
│ ├── index.js
│ ├── package.json
│ ├── .gitignore
│ └── package-lock.json
├── batchupdate
│ ├── package.json
│ ├── index.js
│ ├── .gitignore
│ └── yarn.lock
└── login
│ └── index.js
├── project.config.json
├── README.md
└── .gitignore
/miniprogram/app.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/miniprogram/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/miniprogram/vant/common/style/var.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/miniprogram/vant/common/style/mixins/clearfix.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/miniprogram/vant/common/style/mixins/ellipsis.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/miniprogram/vant/common/style/mixins/border-retina.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/miniprogram/vant/tag/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/miniprogram/vant/card/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/vant/col/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/vant/loading/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/miniprogram/vant/row/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/vant/stepper/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/miniprogram/vant/badge/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/vant/cell-group/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/miniprogram/vant/popup/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/vant/slider/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/vant/tabbar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/vant/transition/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/scanCode/scanCode.wxss:
--------------------------------------------------------------------------------
1 | /* pages/scanCode/scanCode.wxss */
--------------------------------------------------------------------------------
/miniprogram/vant/badge-group/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/pages/bookDetail/bookDetail.wxss:
--------------------------------------------------------------------------------
1 | /* pages/bookDetail/bookDetail.wxss */
--------------------------------------------------------------------------------
/miniprogram/vant/row/index.wxss:
--------------------------------------------------------------------------------
1 | .van-row::after{content:"";display:table;clear:both}
--------------------------------------------------------------------------------
/miniprogram/vant/overlay/index.wxss:
--------------------------------------------------------------------------------
1 | .van-overlay{position:fixed;top:0;left:0;right:0;bottom:0}
--------------------------------------------------------------------------------
/miniprogram/vant/common/style/clearfix.wxss:
--------------------------------------------------------------------------------
1 | .van-clearfix::after{content:'';display:table;clear:both}
--------------------------------------------------------------------------------
/miniprogram/vant/row/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/miniprogram/pages/bookDetail/bookDetail.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "van-button": "../../vant/button/index"
4 | }
5 | }
--------------------------------------------------------------------------------
/miniprogram/vant/cell/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/miniprogram/vant/switch-cell/index.wxss:
--------------------------------------------------------------------------------
1 | .van-switch-cell{padding-top:8px;padding-bottom:8px}.van-switch-cell__switch{vertical-align:middle}
--------------------------------------------------------------------------------
/miniprogram/vant/badge-group/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/miniprogram/vant/button/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-loading": "../loading/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/miniprogram/vant/nav-bar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/vant/notice-bar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/miniprogram/vant/panel/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-cell": "../cell/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/vant/steps/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/vant/tabbar/index.wxss:
--------------------------------------------------------------------------------
1 | .van-tabbar{width:100%;height:50px;background-color:#fff}.van-tabbar--fixed{left:0;bottom:0;position:fixed}
--------------------------------------------------------------------------------
/miniprogram/vant/switch/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-loading": "../loading/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/vant/tabbar-item/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/vant/tree-select/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/vant/notify/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-transition": "../transition/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/vant/overlay/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-transition": "../transition/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/vant/cell-group/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/miniprogram/vant/field/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-cell": "../cell/index",
5 | "van-icon": "../icon/index"
6 | }
7 | }
--------------------------------------------------------------------------------
/miniprogram/vant/search/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-field": "../field/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/miniprogram/vant/switch-cell/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-cell": "../cell/index",
5 | "van-switch": "../switch/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/miniprogram/vant/notify/index.wxss:
--------------------------------------------------------------------------------
1 | .van-notify{top:0;width:100%;z-index:110;color:#fff;position:fixed;min-height:32px;line-height:2.3;font-size:14px;text-align:center;background-color:#e64340}
--------------------------------------------------------------------------------
/miniprogram/pages/scanCode/scanCode.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 扫码加书
4 |
5 |
--------------------------------------------------------------------------------
/miniprogram/pages/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "van-card": "../../vant/card/index",
4 | "van-tag": "../../vant/tag/index",
5 | "van-button": "../../vant/button/index"
6 | }
7 | }
--------------------------------------------------------------------------------
/miniprogram/pages/scanCode/scanCode.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "van-button": "../../vant/button/index",
4 | "van-row": "../../vant/row/index",
5 | "van-col": "../../vant/col/index"
6 | }
7 | }
--------------------------------------------------------------------------------
/miniprogram/vant/col/index.wxml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/miniprogram/vant/actionsheet/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 |
--------------------------------------------------------------------------------
/miniprogram/vant/tabbar/index.wxml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/miniprogram/pages/bookDetail/bookDetail.wxml:
--------------------------------------------------------------------------------
1 | {{book.title}}
2 | 更新数据
3 | 删除数据
--------------------------------------------------------------------------------
/miniprogram/vant/notify/index.wxml:
--------------------------------------------------------------------------------
1 |
7 | {{ text }}
8 |
9 |
--------------------------------------------------------------------------------
/miniprogram/vant/tag/index.wxml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/miniprogram/vant/badge/index.wxml:
--------------------------------------------------------------------------------
1 |
2 | {{ info }}
3 | {{ title }}
4 |
5 |
--------------------------------------------------------------------------------
/miniprogram/vant/overlay/index.wxml:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/miniprogram/vant/tag/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | options: {
3 | addGlobalClass: true
4 | },
5 |
6 | externalClasses: ['custom-class'],
7 |
8 | properties: {
9 | type: String,
10 | mark: Boolean,
11 | plain: Boolean
12 | }
13 | });
14 |
--------------------------------------------------------------------------------
/miniprogram/vant/cell-group/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | options: {
3 | addGlobalClass: true
4 | },
5 |
6 | externalClasses: ['custom-class'],
7 |
8 | properties: {
9 | border: {
10 | type: Boolean,
11 | value: true
12 | }
13 | }
14 | });
15 |
--------------------------------------------------------------------------------
/miniprogram/vant/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 |
--------------------------------------------------------------------------------
/cloudfunctions/bookinfo/index.js:
--------------------------------------------------------------------------------
1 | var rp = require('request-promise')
2 |
3 | exports.main = (event, context) => {
4 | var res = rp('https://api.douban.com/v2/book/isbn/'+ event.isbn).then( html => {
5 | return html;
6 | }).catch( err => {
7 | console.log(err);
8 | })
9 | return res
10 | }
--------------------------------------------------------------------------------
/miniprogram/app.js:
--------------------------------------------------------------------------------
1 | //app.js
2 | App({
3 | onLaunch: function () {
4 |
5 | if (!wx.cloud) {
6 | console.error('请使用 2.2.3 或以上的基础库以使用云能力')
7 | } else {
8 | wx.cloud.init({
9 | traceUser:true
10 | })
11 | }
12 |
13 | this.globalData = {}
14 | }
15 | })
16 |
--------------------------------------------------------------------------------
/miniprogram/vant/utils/index.js:
--------------------------------------------------------------------------------
1 | function isDef(value) {
2 | return value !== undefined && value !== null;
3 | }
4 |
5 | function isObj(x) {
6 | const type = typeof x;
7 | return x !== null && (type === 'object' || type === 'function');
8 | }
9 |
10 | module.exports = {
11 | isObj,
12 | isDef
13 | };
14 |
--------------------------------------------------------------------------------
/miniprogram/vant/transition/index.wxml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/cloudfunctions/batchupdate/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "batchupdate",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "wx-server-sdk": "0.x.x"
13 | }
14 | }
--------------------------------------------------------------------------------
/miniprogram/vant/common/style/ellipsis.wxss:
--------------------------------------------------------------------------------
1 | .van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}
--------------------------------------------------------------------------------
/miniprogram/vant/popup/index.wxml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/miniprogram/vant/panel/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | externalClasses: [
3 | 'custom-class',
4 | 'footer-class'
5 | ],
6 |
7 | options: {
8 | multipleSlots: true,
9 | addGlobalClass: true
10 | },
11 |
12 | properties: {
13 | desc: String,
14 | title: String,
15 | status: String,
16 | headerClass: String,
17 | useFooterSlot: Boolean
18 | }
19 | });
20 |
--------------------------------------------------------------------------------
/miniprogram/vant/overlay/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | options: {
3 | addGlobalClass: true
4 | },
5 |
6 | properties: {
7 | show: Boolean,
8 | mask: Boolean,
9 | customStyle: String,
10 | zIndex: {
11 | type: Number,
12 | value: 1
13 | }
14 | },
15 |
16 | methods: {
17 | onClick() {
18 | this.triggerEvent('click');
19 | }
20 | }
21 | });
22 |
--------------------------------------------------------------------------------
/miniprogram/vant/switch/index.wxml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/miniprogram/vant/switch-cell/index.wxml:
--------------------------------------------------------------------------------
1 |
7 |
15 |
16 |
--------------------------------------------------------------------------------
/cloudfunctions/bookinfo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bookinfo",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "request": "^2.88.0",
13 | "request-promise": "^4.2.2",
14 | "wx-server-sdk": "0.x.x"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/miniprogram/vant/loading/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | options: {
3 | addGlobalClass: true
4 | },
5 |
6 | externalClasses: ['custom-class'],
7 |
8 | properties: {
9 | size: {
10 | type: String,
11 | value: '30px'
12 | },
13 | type: {
14 | type: String,
15 | value: 'circular'
16 | },
17 | color: {
18 | type: String,
19 | value: '#c9c9c9'
20 | }
21 | }
22 | });
23 |
--------------------------------------------------------------------------------
/miniprogram/vant/slider/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/miniprogram/vant/loading/index.wxml:
--------------------------------------------------------------------------------
1 |
5 |
9 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/miniprogram/vant/switch-cell/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | options: {
3 | addGlobalClass: true
4 | },
5 |
6 | properties: {
7 | title: String,
8 | checked: Boolean,
9 | border: Boolean,
10 | loading: Boolean,
11 | disabled: Boolean,
12 | size: {
13 | type: String,
14 | value: '26px'
15 | }
16 | },
17 |
18 | methods: {
19 | onChange(event) {
20 | this.triggerEvent('change', event.detail);
21 | }
22 | }
23 | });
24 |
--------------------------------------------------------------------------------
/cloudfunctions/batchupdate/index.js:
--------------------------------------------------------------------------------
1 | const cloud = require('wx-server-sdk')
2 | cloud.init({})
3 | const db = cloud.database()
4 | const _ = db.command
5 |
6 | exports.main = async (event, context) => {
7 | try {
8 | return await db.collection('mybook').where({
9 | _openid: "ocdyO4u6-0Gf92PZUWAsEK4LxkuI"
10 | })
11 | .update({
12 | data: {
13 | price: "100元"
14 | },
15 | })
16 | } catch (e) {
17 | console.error(e)
18 | }
19 | }
--------------------------------------------------------------------------------
/cloudfunctions/login/index.js:
--------------------------------------------------------------------------------
1 | // 云函数模板
2 | // 部署:在 cloud-functions/login 文件夹右击选择 “上传并部署”
3 |
4 | /**
5 | * 这个示例将经自动鉴权过的小程序用户 openid 返回给小程序端
6 | *
7 | * event 参数包含
8 | * - 小程序端调用传入的 data
9 | * - 经过微信鉴权直接可信的用户唯一标识 openid
10 | *
11 | */
12 | exports.main = (event, context) => {
13 | console.log(event)
14 | console.log(context)
15 |
16 | // 可执行其他自定义逻辑
17 | // console.log 的内容可以在云开发云函数调用日志查看
18 |
19 | return {
20 | openid: event.userInfo.openId,
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/miniprogram/vant/slider/index.wxss:
--------------------------------------------------------------------------------
1 | .van-slider{position:relative;border-radius:999px;background-color:#e5e5e5}.van-slider__bar{position:relative;border-radius:inherit;background-color:#38f}.van-slider__button{position:absolute;top:50%;right:0;width:20px;height:20px;border-radius:50%;background-color:#fff;-webkit-transform:translate3d(50%,-50%,0);transform:translate3d(50%,-50%,0);box-shadow:0 1px 2px rgba(0,0,0,.5)}.van-slider__button::after{content:'';position:absolute;width:200%;height:200%;top:-50%;left:-50%}.van-slider--disabled{opacity:.3}
--------------------------------------------------------------------------------
/miniprogram/vant/card/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | options: {
3 | multipleSlots: true,
4 | addGlobalClass: true
5 | },
6 |
7 | externalClasses: [
8 | 'custom-class',
9 | 'thumb-class',
10 | 'title-class',
11 | 'price-class',
12 | 'desc-class',
13 | 'num-class'
14 | ],
15 |
16 | properties: {
17 | num: String,
18 | desc: String,
19 | thumb: String,
20 | title: String,
21 | price: String,
22 | centered: Boolean,
23 | currency: {
24 | type: String,
25 | default: '¥'
26 | }
27 | }
28 | });
29 |
--------------------------------------------------------------------------------
/miniprogram/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/index/index",
4 | "pages/scanCode/scanCode",
5 | "pages/bookDetail/bookDetail"
6 | ],
7 | "window": {
8 | "backgroundColor": "#F6F6F6",
9 | "backgroundTextStyle": "light",
10 | "navigationBarBackgroundColor": "#F6F6F6",
11 | "navigationBarTitleText": "私家书柜",
12 | "navigationBarTextStyle": "black"
13 | },
14 | "tabBar": {
15 | "list": [{
16 | "pagePath": "pages/index/index",
17 | "text": "我的藏书"
18 | },{
19 | "pagePath": "pages/scanCode/scanCode",
20 | "text": "扫码加书"
21 | }]
22 | }
23 | }
--------------------------------------------------------------------------------
/miniprogram/vant/col/index.js:
--------------------------------------------------------------------------------
1 | const ROW_PATH = '../row/index';
2 |
3 | Component({
4 | options: {
5 | addGlobalClass: true
6 | },
7 |
8 | externalClasses: ['custom-class'],
9 |
10 | relations: {
11 | [ROW_PATH]: {
12 | type: 'ancestor'
13 | }
14 | },
15 |
16 | properties: {
17 | span: Number,
18 | offset: Number
19 | },
20 |
21 | methods: {
22 | setGutter(gutter) {
23 | const padding = `${gutter / 2}px`;
24 | const style = gutter ? `padding-left: ${padding}; padding-right: ${padding};` : '';
25 | this.setData({ style });
26 | }
27 | }
28 | });
29 |
--------------------------------------------------------------------------------
/miniprogram/vant/panel/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/miniprogram/vant/notice-bar/index.wxss:
--------------------------------------------------------------------------------
1 | .van-notice-bar{display:-webkit-box;display:-webkit-flex;display:flex;padding:9px 10px;font-size:12px;line-height:1.5}.van-notice-bar--within-icon{position:relative;padding-right:30px}.van-notice-bar__left-icon{height:18px;min-width:20px;padding-top:1px;box-sizing:border-box}.van-notice-bar__left-icon>image{width:16px;height:16px}.van-notice-bar__right-icon{position:absolute;top:10px;right:10px;font-size:15px;line-height:1}.van-notice-bar__content-wrap{position:relative;-webkit-box-flex:1;-webkit-flex:1;flex:1;height:18px;overflow:hidden}.van-notice-bar__content{position:absolute;white-space:nowrap}
--------------------------------------------------------------------------------
/miniprogram/vant/switch/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | options: {
3 | addGlobalClass: true
4 | },
5 |
6 | externalClasses: ['custom-class', 'node-class'],
7 |
8 | properties: {
9 | checked: Boolean,
10 | loading: Boolean,
11 | disabled: Boolean,
12 | size: {
13 | type: String,
14 | value: '30px'
15 | }
16 | },
17 |
18 | methods: {
19 | onClick() {
20 | if (!this.data.disabled && !this.data.loading) {
21 | const checked = !this.data.checked;
22 | this.triggerEvent('input', checked);
23 | this.triggerEvent('change', checked);
24 | }
25 | }
26 | }
27 | });
28 |
--------------------------------------------------------------------------------
/miniprogram/vant/tabbar-item/index.wxml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/miniprogram/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{tag.name}}
7 |
8 |
9 |
10 |
11 |
12 | 查看详情
13 |
14 |
15 |
--------------------------------------------------------------------------------
/miniprogram/vant/notify/notify.js:
--------------------------------------------------------------------------------
1 | const defaultOptions = {
2 | selector: '#van-notify',
3 | duration: 3000
4 | };
5 |
6 | export default function Notify(options = {}) {
7 | const pages = getCurrentPages();
8 | const ctx = pages[pages.length - 1];
9 |
10 | options = Object.assign({}, defaultOptions, parseParam(options));
11 |
12 | const el = ctx.selectComponent(options.selector);
13 | delete options.selector;
14 |
15 | if (el) {
16 | el.setData({
17 | ...options
18 | });
19 | el.show();
20 | }
21 | }
22 |
23 | function parseParam(params = '') {
24 | return typeof params === 'object' ? params : { text: params };
25 | }
26 |
--------------------------------------------------------------------------------
/miniprogram/vant/nav-bar/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | externalClasses: [
3 | 'custom-class',
4 | 'title-class'
5 | ],
6 |
7 | options: {
8 | multipleSlots: true,
9 | addGlobalClass: true
10 | },
11 |
12 | properties: {
13 | title: String,
14 | leftText: String,
15 | rightText: String,
16 | leftArrow: Boolean,
17 | fixed: Boolean,
18 | zIndex: {
19 | type: Number,
20 | value: 1
21 | }
22 | },
23 |
24 | methods: {
25 | onClickLeft() {
26 | this.triggerEvent('click-left');
27 | },
28 |
29 | onClickRight() {
30 | this.triggerEvent('click-right');
31 | }
32 | }
33 | });
34 |
--------------------------------------------------------------------------------
/miniprogram/vant/switch/index.wxss:
--------------------------------------------------------------------------------
1 | .van-switch{height:1em;width:1.6em;display:inline-block;position:relative;background:#fff;box-sizing:content-box;border:1px solid rgba(0,0,0,.1);border-radius:1em}.van-switch__node{top:0;left:0;z-index:1;width:1em;height:1em;-webkit-transition:.3s;transition:.3s;position:absolute;border-radius:100%;background-color:#fff;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%;width:50%;height:50%;position:absolute}.van-switch--on{background-color:#44db5e}.van-switch--on .van-switch__node{-webkit-transform:translateX(.6em);transform:translateX(.6em)}.van-switch--disabled{opacity:.4}
--------------------------------------------------------------------------------
/miniprogram/vant/badge/index.js:
--------------------------------------------------------------------------------
1 | const BADGE_GROUP_PATH = '../badge-group/index';
2 |
3 | Component({
4 | options: {
5 | addGlobalClass: true
6 | },
7 |
8 | externalClasses: ['custom-class'],
9 |
10 | relations: {
11 | [BADGE_GROUP_PATH]: {
12 | type: 'ancestor'
13 | }
14 | },
15 |
16 | properties: {
17 | info: Number,
18 | title: String
19 | },
20 |
21 | methods: {
22 | onClick() {
23 | const group = this.getRelationNodes(BADGE_GROUP_PATH)[0];
24 | if (group) {
25 | group.setActive(this);
26 | }
27 | },
28 |
29 | setActive(active) {
30 | this.setData({ active });
31 | }
32 | }
33 | });
34 |
--------------------------------------------------------------------------------
/miniprogram/vant/search/index.wxss:
--------------------------------------------------------------------------------
1 | .van-search{display:-webkit-box;display:-webkit-flex;display:flex;padding:7px 15px;-webkit-box-align:center;-webkit-align-items:center;align-items:center;box-sizing:border-box}.van-search__field{-webkit-box-flex:1;-webkit-flex:1;flex:1;border-radius:4px}.van-search__field__left-icon{color:#999}.van-search--show-action{padding-right:0}.van-search input::-webkit-search-cancel-button,.van-search input::-webkit-search-decoration,.van-search input::-webkit-search-results-button,.van-search input::-webkit-search-results-decoration{display:none}.van-search__action{padding:0 10px;font-size:14px;line-height:30px;color:#666}.van-search__action:active{background-color:#e8e8e8}
--------------------------------------------------------------------------------
/miniprogram/vant/toast/index.js:
--------------------------------------------------------------------------------
1 | import Toast from './toast';
2 |
3 | Component({
4 | options: {
5 | addGlobalClass: true
6 | },
7 |
8 | properties: {
9 | show: Boolean,
10 | mask: Boolean,
11 | message: String,
12 | forbidClick: Boolean,
13 | type: {
14 | type: String,
15 | value: 'text'
16 | },
17 | loadingType: {
18 | type: String,
19 | value: 'circular'
20 | },
21 | position: {
22 | type: String,
23 | value: 'middle'
24 | }
25 | },
26 |
27 | methods: {
28 | clear() {
29 | this.setData({
30 | show: false
31 | });
32 | }
33 | }
34 | });
35 |
36 | export default Toast;
37 |
--------------------------------------------------------------------------------
/miniprogram/vant/tabbar-item/index.js:
--------------------------------------------------------------------------------
1 | const TABBAR_PATH = '../tabbar/index';
2 |
3 | Component({
4 | properties: {
5 | info: null,
6 | icon: String,
7 | dot: Boolean
8 | },
9 |
10 | options: {
11 | multipleSlots: true,
12 | addGlobalClass: true
13 | },
14 |
15 | relations: {
16 | [TABBAR_PATH]: {
17 | type: 'ancestor'
18 | }
19 | },
20 |
21 | data: {
22 | active: false,
23 | count: 0
24 | },
25 |
26 | methods: {
27 | onClick() {
28 | const parent = this.getRelationNodes(TABBAR_PATH)[0];
29 | if (parent) {
30 | parent.onChange(this);
31 | }
32 | this.triggerEvent('click');
33 | }
34 | }
35 | });
36 |
--------------------------------------------------------------------------------
/miniprogram/vant/stepper/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
14 |
18 |
19 |
--------------------------------------------------------------------------------
/miniprogram/vant/nav-bar/index.wxss:
--------------------------------------------------------------------------------
1 | .van-nav-bar{height:46px;position:relative;-webkit-user-select:none;user-select:none;text-align:center;line-height:46px;background-color:#fff}.van-nav-bar__arrow{color:#38f;vertical-align:middle;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.van-nav-bar__arrow+.van-nav-bar__text{margin-left:-20px;padding-left:25px}.van-nav-bar--fixed{top:0;left:0;width:100%;position:fixed}.van-nav-bar__title{margin:0 auto;max-width:60%;font-size:16px}.van-nav-bar__left,.van-nav-bar__right{bottom:0;font-size:14px;position:absolute}.van-nav-bar__left{left:15px}.van-nav-bar__right{right:15px}.van-nav-bar__text{color:#38f;margin:0 -15px;padding:0 15px;display:inline-block;vertical-align:middle}.van-nav-bar__text:active{background-color:#e8e8e8}
--------------------------------------------------------------------------------
/miniprogram/vant/popup/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | options: {
3 | addGlobalClass: true
4 | },
5 |
6 | externalClasses: [
7 | 'custom-class',
8 | 'overlay-class'
9 | ],
10 |
11 | properties: {
12 | show: Boolean,
13 | overlayStyle: String,
14 | overlay: {
15 | type: Boolean,
16 | value: true
17 | },
18 | closeOnClickOverlay: {
19 | type: Boolean,
20 | value: true
21 | },
22 | position: {
23 | type: String,
24 | value: 'center'
25 | }
26 | },
27 |
28 | methods: {
29 | onClickOverlay() {
30 | this.triggerEvent('click-overlay');
31 |
32 | if (this.data.closeOnClickOverlay) {
33 | this.triggerEvent('close');
34 | }
35 | }
36 | }
37 | });
38 |
--------------------------------------------------------------------------------
/miniprogram/vant/tabbar-item/index.wxss:
--------------------------------------------------------------------------------
1 | .van-tabbar-item{float:left;color:#666;height:100%;display:-webkit-box;display:-webkit-flex;display:flex;line-height:1;font-size:12px;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.van-tabbar-item__icon{font-size:18px;margin-bottom:5px;position:relative}.van-tabbar-item__icon .van-icon{display:block}.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:50px;height:18px}.van-tabbar-item--active{color:#38f}
--------------------------------------------------------------------------------
/miniprogram/vant/behaviors/touch.js:
--------------------------------------------------------------------------------
1 | module.exports = Behavior({
2 | methods: {
3 | touchStart(event) {
4 | this.direction = '';
5 | this.deltaX = 0;
6 | this.deltaY = 0;
7 | this.offsetX = 0;
8 | this.offsetY = 0;
9 | this.startX = event.touches[0].clientX;
10 | this.startY = event.touches[0].clientY;
11 | },
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 = this.offsetX > this.offsetY ? 'horizontal' : this.offsetX < this.offsetY ? 'vertical' : '';
20 | }
21 | }
22 | });
23 |
--------------------------------------------------------------------------------
/miniprogram/vant/common/classnames.js:
--------------------------------------------------------------------------------
1 | const hasOwn = {}.hasOwnProperty;
2 |
3 | module.exports = function classNames() {
4 | const classes = [];
5 |
6 | for (let i = 0; i < arguments.length; i++) {
7 | const arg = arguments[i];
8 | if (!arg) continue;
9 |
10 | const argType = typeof arg;
11 |
12 | if (argType === 'string' || argType === 'number') {
13 | classes.push(arg);
14 | } else if (Array.isArray(arg) && arg.length) {
15 | const inner = classNames.apply(null, arg);
16 | if (inner) {
17 | classes.push(inner);
18 | }
19 | } else if (argType === 'object') {
20 | for (const key in arg) {
21 | if (hasOwn.call(arg, key) && arg[key]) {
22 | classes.push(key);
23 | }
24 | }
25 | }
26 | }
27 |
28 | return classes.join(' ');
29 | };
30 |
--------------------------------------------------------------------------------
/miniprogram/vant/cell-group/index.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;top:0;left:0;width:200%;height:200%;-webkit-transform:scale(.5);transform:scale(.5);-webkit-transform-origin:0 0;transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e5e5e5}.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}
--------------------------------------------------------------------------------
/miniprogram/vant/toast/index.wxml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
11 |
12 | {{ message }}
13 |
14 |
15 |
16 |
22 |
23 | {{ message }}
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/miniprogram/vant/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;top:0;left:0;width:200%;height:200%;-webkit-transform:scale(.5);transform:scale(.5);-webkit-transform-origin:0 0;transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e5e5e5}.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}
--------------------------------------------------------------------------------
/miniprogram/vant/actionsheet/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | options: {
3 | addGlobalClass: true
4 | },
5 |
6 | properties: {
7 | show: Boolean,
8 | title: String,
9 | cancelText: String,
10 | actions: {
11 | type: Array,
12 | value: []
13 | },
14 | overlay: {
15 | type: Boolean,
16 | value: true
17 | },
18 | closeOnClickOverlay: {
19 | type: Boolean,
20 | value: true
21 | }
22 | },
23 |
24 | methods: {
25 | onSelect(event) {
26 | const { index } = event.currentTarget.dataset;
27 | const item = this.data.actions[index];
28 | if (item && !item.disabled && !item.loading) {
29 | this.triggerEvent('select', item);
30 | }
31 | },
32 |
33 | onCancel() {
34 | this.triggerEvent('cancel');
35 | },
36 |
37 | onClose() {
38 | this.triggerEvent('close');
39 | }
40 | }
41 | });
42 |
--------------------------------------------------------------------------------
/miniprogram/vant/row/index.js:
--------------------------------------------------------------------------------
1 | const COL_PATH = '../col/index';
2 |
3 | Component({
4 | options: {
5 | addGlobalClass: true
6 | },
7 |
8 | externalClasses: ['custom-class'],
9 |
10 | relations: {
11 | [COL_PATH]: {
12 | type: 'descendant'
13 | }
14 | },
15 |
16 | properties: {
17 | gutter: {
18 | type: Number,
19 | observer() {
20 | this.setGutter();
21 | }
22 | }
23 | },
24 |
25 | ready() {
26 | this.setGutter();
27 | },
28 |
29 | methods: {
30 | setGutter() {
31 | const { gutter } = this.data;
32 | const margin = `-${Number(gutter) / 2}px`;
33 | const style = gutter ? `margin-right: ${margin}; margin-left: ${margin};` : '';
34 |
35 | this.setData({ style });
36 | this.getRelationNodes(COL_PATH).forEach((col) => {
37 | col.setGutter(this.data.gutter);
38 | });
39 | }
40 | }
41 | });
42 |
--------------------------------------------------------------------------------
/miniprogram/vant/badge-group/index.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;top:0;left:0;width:200%;height:200%;-webkit-transform:scale(.5);transform:scale(.5);-webkit-transform-origin:0 0;transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e5e5e5}.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}.van-badge-group{width:85px}
--------------------------------------------------------------------------------
/miniprogram/vant/nav-bar/index.wxml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
12 | {{ leftText }}
13 |
14 |
15 |
16 |
17 | {{ title }}
18 |
19 |
20 |
21 | {{ rightText }}
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/miniprogram/vant/panel/index.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;top:0;left:0;width:200%;height:200%;-webkit-transform:scale(.5);transform:scale(.5);-webkit-transform-origin:0 0;transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e5e5e5}.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}.van-panel{background:#fff}.van-panel__header-value{color:#f44}.van-panel__footer{padding:10px 15px}
--------------------------------------------------------------------------------
/miniprogram/vant/notify/index.js:
--------------------------------------------------------------------------------
1 | import Notify from './notify';
2 |
3 | Component({
4 | options: {
5 | addGlobalClass: true
6 | },
7 |
8 | properties: {
9 | text: String,
10 | color: {
11 | type: String,
12 | value: '#fff'
13 | },
14 | backgroundColor: {
15 | type: String,
16 | value: '#e64340'
17 | },
18 | duration: {
19 | type: Number,
20 | value: 3000
21 | }
22 | },
23 |
24 | methods: {
25 | show() {
26 | const { duration } = this.data;
27 |
28 | clearTimeout(this.timer);
29 | this.setData({
30 | show: true
31 | });
32 |
33 | if (duration > 0 && duration !== Infinity) {
34 | this.timer = setTimeout(() => {
35 | this.hide();
36 | }, duration);
37 | }
38 | },
39 |
40 | hide() {
41 | clearTimeout(this.timer);
42 | this.setData({
43 | show: false
44 | });
45 | }
46 | }
47 | });
48 |
49 | export default Notify;
50 |
--------------------------------------------------------------------------------
/miniprogram/vant/search/index.wxml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
23 |
24 |
25 |
26 | 取消
27 |
28 |
29 |
--------------------------------------------------------------------------------
/miniprogram/vant/steps/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 | {{ item.text }}
10 | {{ item.desc }}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/miniprogram/vant/toast/index.wxss:
--------------------------------------------------------------------------------
1 | .van-toast{display:-webkit-box;display:-webkit-flex;display:flex;color:#fff;font-size:12px;line-height:1.2;border-radius:5px;word-break:break-all;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;box-sizing:border-box;background-color:rgba(0,0,0,.7)}.van-toast__container{top:50%;left:50%;z-index:3001;position:fixed;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-toast--text{padding:12px;min-width:220px}.van-toast--icon{width:120px;min-height:120px;padding:15px}.van-toast--icon .van-toast__icon{height:1em;font-size:50px}.van-toast--icon .van-toast__text{font-size:14px;padding-top:10px}.van-toast__loading{margin:10px 0 5px}.van-toast--top{-webkit-transform:translate(0,-30vh);transform:translate(0,-30vh)}.van-toast--bottom{-webkit-transform:translate(0,30vh);transform:translate(0,30vh)}
--------------------------------------------------------------------------------
/miniprogram/vant/cell/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | externalClasses: [
3 | 'custom-class',
4 | 'title-class',
5 | 'label-class',
6 | 'value-class',
7 | 'left-icon-class',
8 | 'right-icon-class'
9 | ],
10 |
11 | options: {
12 | multipleSlots: true,
13 | addGlobalClass: true
14 | },
15 |
16 | properties: {
17 | title: null,
18 | value: null,
19 | url: String,
20 | icon: String,
21 | label: String,
22 | center: Boolean,
23 | isLink: Boolean,
24 | required: Boolean,
25 | clickable: Boolean,
26 | titleWidth: String,
27 | customStyle: String,
28 | arrowDirection: String,
29 | linkType: {
30 | type: String,
31 | value: 'navigateTo'
32 | },
33 | border: {
34 | type: Boolean,
35 | value: true
36 | }
37 | },
38 |
39 | methods: {
40 | onClick() {
41 | const { url } = this.data;
42 | if (url) {
43 | wx[this.data.linkType]({ url });
44 | }
45 | this.triggerEvent('click');
46 | }
47 | }
48 | });
49 |
--------------------------------------------------------------------------------
/miniprogram/vant/notice-bar/index.wxml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
12 | {{ text }}
13 |
14 |
15 |
16 |
17 |
23 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/miniprogram/vant/card/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{ title }}
9 | {{ currency }} {{ price }}
10 |
11 |
12 |
13 | {{ desc }}
14 | x {{ num }}
15 |
16 |
17 |
18 |
19 |
22 |
23 |
--------------------------------------------------------------------------------
/miniprogram/vant/button/index.wxml:
--------------------------------------------------------------------------------
1 |
31 |
--------------------------------------------------------------------------------
/miniprogram/vant/tree-select/index.wxml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 | {{ item.text }}
14 |
15 |
16 |
20 |
27 | {{ item.text }}
28 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/miniprogram/vant/field/index.wxss:
--------------------------------------------------------------------------------
1 | .van-field__body{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.van-field__body--textarea{min-height:24px}.van-field__control{border:0;margin:0;padding:0;width:100%;resize:none;display:block;text-align:left;box-sizing:border-box;line-height:inherit;background-color:transparent}.van-field__control--disabled{opacity:1;color:#666;background-color:transparent}.van-field__control--center{text-align:center}.van-field__control--right{text-align:right}.van-field__button,.van-field__clear,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear,.van-field__icon-container{padding:0 10px;color:#999;line-height:inherit;margin-right:-10px;vertical-align:middle}.van-field__icon{display:block;font-size:16px;line-height:inherit}.van-field__button{padding-left:10px}.van-field__error-message{color:#f44;font-size:12px;text-align:left}.van-field--error{color:#f44}.van-field--label-center .van-cell__title{text-align:center}.van-field--label-right .van-cell__title{text-align:right}
--------------------------------------------------------------------------------
/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "miniprogramRoot": "./miniprogram",
3 | "cloudfunctionRoot": "./cloudfunctions",
4 | "setting": {
5 | "urlCheck": true,
6 | "es6": true,
7 | "postcss": true,
8 | "minified": true,
9 | "newFeature": true
10 | },
11 | "appid": "wxd1ca70db507085dd",
12 | "projectname": "clouddev",
13 | "condition": {
14 | "search": {
15 | "current": -1,
16 | "list": []
17 | },
18 | "conversation": {
19 | "current": -1,
20 | "list": []
21 | },
22 | "plugin": {
23 | "current": -1,
24 | "list": []
25 | },
26 | "game": {
27 | "list": []
28 | },
29 | "miniprogram": {
30 | "current": 2,
31 | "list": [
32 | {
33 | "id": -1,
34 | "name": "db guide",
35 | "pathName": "pages/databaseGuide/databaseGuide",
36 | "query": ""
37 | },
38 | {
39 | "id": -1,
40 | "name": "scanCode",
41 | "pathName": "pages/scanCode/scanCode",
42 | "query": ""
43 | },
44 | {
45 | "id": -1,
46 | "name": "bookDetail",
47 | "pathName": "pages/bookDetail/bookDetail",
48 | "query": "id=W35bTSGodpkt_1Un"
49 | }
50 | ]
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/miniprogram/vant/cell/index.wxml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 | {{ title }}
11 | {{ label }}
12 |
13 |
14 |
15 |
16 | {{ value }}
17 |
18 |
19 |
20 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/miniprogram/vant/transition/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | options: {
3 | addGlobalClass: true
4 | },
5 |
6 | externalClasses: ['custom-class'],
7 |
8 | properties: {
9 | customStyle: String,
10 | show: {
11 | value: true,
12 | type: Boolean,
13 | observer(value) {
14 | if (value) {
15 | this.show();
16 | } else {
17 | this.setData({
18 | type: 'leave'
19 | });
20 | }
21 | }
22 | },
23 | name: {
24 | type: String,
25 | value: 'fade'
26 | },
27 | duration: {
28 | type: Number,
29 | value: 300
30 | }
31 | },
32 |
33 | data: {
34 | type: '',
35 | inited: false,
36 | display: false
37 | },
38 |
39 | attached() {
40 | if (this.data.show) {
41 | this.show();
42 | }
43 | },
44 |
45 | methods: {
46 | show() {
47 | this.setData({
48 | inited: true,
49 | display: true,
50 | type: 'enter'
51 | });
52 | },
53 |
54 | onAnimationEnd() {
55 | if (!this.data.show) {
56 | this.setData({
57 | display: false
58 | });
59 | }
60 | }
61 | }
62 | });
63 |
--------------------------------------------------------------------------------
/miniprogram/vant/common/index.wxss:
--------------------------------------------------------------------------------
1 | .van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.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;top:0;left:0;width:200%;height:200%;-webkit-transform:scale(.5);transform:scale(.5);-webkit-transform-origin:0 0;transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e5e5e5}.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}
--------------------------------------------------------------------------------
/miniprogram/vant/card/index.wxss:
--------------------------------------------------------------------------------
1 | .van-card{color:#333;height:100px;font-size:16px;background:#fafafa;position:relative;box-sizing:border-box;padding:5px 15px 5px 115px}.van-card--center,.van-card__thumb{-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.van-card__thumb{top:5px;left:15px;width:90px;height:90px;position:absolute}.van-card__img{border:none;max-width:100%;max-height:100%}.van-card,.van-card__row,.van-card__thumb{display:-webkit-box;display:-webkit-flex;display:flex}.van-card__content{width:100%}.van-card__content--center{height:90px;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.van-card__desc,.van-card__title{line-height:20px;word-break:break-all}.van-card__title{max-height:40px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-card__desc{color:#666;font-size:12px;max-height:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-card__num,.van-card__price{-webkit-box-flex:1;-webkit-flex:1;flex:1;min-width:80px;line-height:20px;text-align:right}.van-card__price{font-size:14px}.van-card__num{color:#666;font-size:12px}.van-card__footer{right:15px;bottom:5px;position:absolute}.van-card__footer .van-button{margin-left:5px}
--------------------------------------------------------------------------------
/miniprogram/vant/search/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | externalClasses: ['custom-class', 'cancel-class'],
3 |
4 | options: {
5 | multipleSlots: true,
6 | addGlobalClass: true
7 | },
8 |
9 | properties: {
10 | disabled: Boolean,
11 | readonly: Boolean,
12 | showAction: Boolean,
13 | useActionSlot: Boolean,
14 | placeholder: String,
15 | value: {
16 | type: String,
17 | observer(currentValue) {
18 | this.setData({ currentValue });
19 | }
20 | },
21 | background: {
22 | type: String,
23 | value: '#f2f2f2'
24 | },
25 | maxlength: {
26 | type: Number,
27 | value: -1
28 | }
29 | },
30 |
31 | attached() {
32 | this.setData({ currentValue: this.data.value });
33 | },
34 |
35 | methods: {
36 | onChange(event) {
37 | this.triggerEvent('change', event.detail);
38 | },
39 |
40 | onCancel() {
41 | this.setData({ currentValue: '' });
42 | this.triggerEvent('cancel');
43 | this.triggerEvent('change', '');
44 | },
45 |
46 | onSearch() {
47 | this.triggerEvent('search', this.data.currentValue);
48 | },
49 |
50 | onFocus() {
51 | this.triggerEvent('focus');
52 | },
53 |
54 | onBlur() {
55 | this.triggerEvent('blur');
56 | }
57 | }
58 | });
59 |
--------------------------------------------------------------------------------
/miniprogram/vant/steps/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | options: {
3 | addGlobalClass: true
4 | },
5 |
6 | externalClasses: [
7 | 'custom-class'
8 | ],
9 |
10 | properties: {
11 | icon: String,
12 | steps: {
13 | type: Array,
14 | observer() {
15 | this.formatSteps();
16 | }
17 | },
18 | active: {
19 | type: Number,
20 | observer() {
21 | this.formatSteps();
22 | }
23 | },
24 | direction: {
25 | type: String,
26 | value: 'horizontal'
27 | },
28 | activeColor: {
29 | type: String,
30 | value: '#06bf04'
31 | }
32 | },
33 |
34 | attached() {
35 | this.formatSteps();
36 | },
37 |
38 | methods: {
39 | formatSteps() {
40 | const { steps } = this.data;
41 | const formattedSteps = steps.map((step, index) => {
42 | return {
43 | ...step,
44 | status: this.getStatus(index)
45 | };
46 | });
47 |
48 | this.setData({
49 | formattedSteps
50 | });
51 | },
52 |
53 | getStatus(index) {
54 | const { active } = this.data;
55 |
56 | if (index < active) {
57 | return 'finish';
58 | } else if (index === active) {
59 | return 'process';
60 | }
61 |
62 | return '';
63 | }
64 | }
65 | });
66 |
--------------------------------------------------------------------------------
/miniprogram/vant/badge-group/index.js:
--------------------------------------------------------------------------------
1 | const BADGE_PATH = '../badge/index';
2 |
3 | Component({
4 | options: {
5 | addGlobalClass: true
6 | },
7 |
8 | externalClasses: ['custom-class'],
9 |
10 | relations: {
11 | [BADGE_PATH]: {
12 | type: 'descendant',
13 |
14 | linked(target) {
15 | this.data.badges.push(target);
16 | this.setActive();
17 | },
18 |
19 | unlinked(target) {
20 | this.data.badges = this.data.badges.filter(item => item !== target);
21 | this.setActive();
22 | }
23 | }
24 | },
25 |
26 | properties: {
27 | active: {
28 | type: Number,
29 | value: 0,
30 | observer() {
31 | this.setActive();
32 | }
33 | }
34 | },
35 |
36 | data: {
37 | badges: []
38 | },
39 |
40 | attached() {
41 | this.currentActive = -1;
42 | },
43 |
44 | methods: {
45 | setActive(badge) {
46 | let { active } = this.data;
47 | if (badge) {
48 | active = this.data.badges.indexOf(badge);
49 | }
50 |
51 | if (active === this.currentActive) {
52 | return;
53 | }
54 |
55 | if (this.currentActive !== -1) {
56 | this.triggerEvent('change', active);
57 | }
58 |
59 | this.currentActive = active;
60 | this.data.badges.forEach((badge, index) => {
61 | badge.setActive(index === active);
62 | });
63 | }
64 | }
65 | });
66 |
--------------------------------------------------------------------------------
/miniprogram/pages/index/index.js:
--------------------------------------------------------------------------------
1 | const db = wx.cloud.database()
2 | const book = db.collection('mybook')
3 | const _ = db.command
4 |
5 | Page({
6 |
7 | /**
8 | * 页面的初始数据
9 | */
10 | data: {
11 | book_list:[]
12 | },
13 |
14 | /**
15 | * 生命周期函数--监听页面加载
16 | */
17 | onLoad: function (options) {
18 | var _this = this;
19 |
20 | db.collection('mybook').get({
21 | success: res => {
22 | this.setData({
23 | book_list:res.data
24 | })
25 | }
26 | })
27 | },
28 |
29 | /**
30 | * 生命周期函数--监听页面初次渲染完成
31 | */
32 | onReady: function () {
33 |
34 | },
35 |
36 | /**
37 | * 生命周期函数--监听页面显示
38 | */
39 | onShow: function () {
40 |
41 | },
42 |
43 | /**
44 | * 生命周期函数--监听页面隐藏
45 | */
46 | onHide: function () {
47 |
48 | },
49 |
50 | /**
51 | * 生命周期函数--监听页面卸载
52 | */
53 | onUnload: function () {
54 |
55 | },
56 |
57 | /**
58 | * 页面相关事件处理函数--监听用户下拉动作
59 | */
60 | onPullDownRefresh: function () {
61 |
62 | },
63 |
64 | /**
65 | * 页面上拉触底事件的处理函数
66 | */
67 | onReachBottom: function () {
68 |
69 | },
70 |
71 | /**
72 | * 用户点击右上角分享
73 | */
74 | onShareAppMessage: function () {
75 |
76 | },
77 | viewItem:function(event){
78 | var id = event.currentTarget.dataset.id;
79 | wx.navigateTo({
80 | url: '../bookDetail/bookDetail?id='+id
81 | });
82 | }
83 | })
--------------------------------------------------------------------------------
/miniprogram/vant/tag/index.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;top:0;left:0;width:200%;height:200%;-webkit-transform:scale(.5);transform:scale(.5);-webkit-transform-origin:0 0;transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e5e5e5}.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}.van-tag{display:inline-block;padding:2px 5px;line-height:normal;border-radius:3px;font-size:10px;background:#c9c9c9;color:#fff}.van-tag::after{border-color:currentColor;border-radius:4px}.van-tag--mark{padding-right:7px;border-radius:0 8px 8px 0}.van-tag--mark::after{border-radius:0 16px 16px 0}.van-tag--success{background:#06bf04}.van-tag--success.van-tag--plain{color:#06bf04}.van-tag--danger{background:#f44}.van-tag--danger.van-tag--plain{color:#f44}.van-tag--primary{background:#38f}.van-tag--primary.van-tag--plain{color:#38f}.van-tag--plain{background:#fff;color:#c9c9c9}
--------------------------------------------------------------------------------
/miniprogram/vant/stepper/index.wxss:
--------------------------------------------------------------------------------
1 | .van-stepper{font-size:0}.van-stepper__input,.van-stepper__minus,.van-stepper__plus{display:inline-block;vertical-align:middle;background-color:#fff}.van-stepper__minus,.van-stepper__plus{width:40px;height:30px;box-sizing:border-box;border:1px solid #e5e5e5;position:relative;padding:5px}.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{content:'';position:absolute;margin:auto;top:0;left:0;right:0;bottom:0;background-color:#6c6c6c}.van-stepper__minus:active,.van-stepper__plus:active{background-color:#e8e8e8}.van-stepper__minus--disabled,.van-stepper__plus--disabled{background-color:#f8f8f8}.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:active,.van-stepper__plus--disabled:active{background-color:#f8f8f8}.van-stepper__minus{border-radius:2px 0 0 2px}.van-stepper__minus::after{display:none}.van-stepper__plus{border-radius:0 2px 2px 0}.van-stepper__input{width:33px;height:26px;padding:1px;border:1px solid #e5e5e5;border-width:1px 0;border-radius:0;box-sizing:content-box;color:#666;font-size:14px;text-align:center;-webkit-appearance:none}.van-stepper__input--disabled{color:#c9c9c9;background-color:#f8f8f8}
--------------------------------------------------------------------------------
/miniprogram/vant/behaviors/button.js:
--------------------------------------------------------------------------------
1 | module.exports = Behavior({
2 | properties: {
3 | loading: Boolean,
4 | // 在自定义组件中,无法与外界的 form 组件联动,暂时不开放
5 | // formType: String,
6 | openType: String,
7 | appParameter: String,
8 | // 暂时不开放,直接传入无法设置样式
9 | // hoverClass: {
10 | // type: String,
11 | // value: 'button-hover'
12 | // },
13 | hoverStopPropagation: Boolean,
14 | hoverStartTime: {
15 | type: Number,
16 | value: 20
17 | },
18 | hoverStayTime: {
19 | type: Number,
20 | value: 70
21 | },
22 | lang: {
23 | type: String,
24 | value: 'en'
25 | },
26 | sessionFrom: {
27 | type: String,
28 | value: ''
29 | },
30 | sendMessageTitle: String,
31 | sendMessagePath: String,
32 | sendMessageImg: String,
33 | showMessageCard: String
34 | },
35 |
36 | methods: {
37 | bindgetuserinfo(event = {}) {
38 | this.triggerEvent('getuserinfo', event.detail || {});
39 | },
40 |
41 | bindcontact(event = {}) {
42 | this.triggerEvent('contact', event.detail || {});
43 | },
44 |
45 | bindgetphonenumber(event = {}) {
46 | this.triggerEvent('getphonenumber', event.detail || {});
47 | },
48 |
49 | bindopensetting(event = {}) {
50 | this.triggerEvent('opensetting', event.detail || {});
51 | },
52 |
53 | binderror(event = {}) {
54 | this.triggerEvent('error', event.detail || {});
55 | }
56 | }
57 | });
58 |
--------------------------------------------------------------------------------
/miniprogram/vant/button/behaviors.js:
--------------------------------------------------------------------------------
1 | module.exports = Behavior({
2 | properties: {
3 | loading: Boolean,
4 | // 在自定义组件中,无法与外界的 form 组件联动,暂时不开放
5 | // formType: String,
6 | openType: String,
7 | appParameter: String,
8 | // 暂时不开放,直接传入无法设置样式
9 | // hoverClass: {
10 | // type: String,
11 | // value: 'button-hover'
12 | // },
13 | hoverStopPropagation: Boolean,
14 | hoverStartTime: {
15 | type: Number,
16 | value: 20
17 | },
18 | hoverStayTime: {
19 | type: Number,
20 | value: 70
21 | },
22 | lang: {
23 | type: String,
24 | value: 'en'
25 | },
26 | sessionFrom: {
27 | type: String,
28 | value: ''
29 | },
30 | sendMessageTitle: String,
31 | sendMessagePath: String,
32 | sendMessageImg: String,
33 | showMessageCard: String
34 | },
35 |
36 | methods: {
37 | bindgetuserinfo(event = {}) {
38 | this.triggerEvent('getuserinfo', event.detail || {});
39 | },
40 |
41 | bindcontact(event = {}) {
42 | this.triggerEvent('contact', event.detail || {});
43 | },
44 |
45 | bindgetphonenumber(event = {}) {
46 | this.triggerEvent('getphonenumber', event.detail || {});
47 | },
48 |
49 | bindopensetting(event = {}) {
50 | this.triggerEvent('opensetting', event.detail || {});
51 | },
52 |
53 | binderror(event = {}) {
54 | this.triggerEvent('error', event.detail || {});
55 | }
56 | }
57 | });
58 |
--------------------------------------------------------------------------------
/miniprogram/vant/actionsheet/index.wxml:
--------------------------------------------------------------------------------
1 |
9 |
13 |
14 |
21 |
22 | {{ item.name }}
23 | {{ item.subname }}
24 |
25 |
26 |
27 |
28 |
33 | {{ cancelText }}
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 小程序云开发项目实战 · 私房书柜 · 课程 Demo
2 |
3 | By [腾讯云学院](https://cloud.tencent.com/developer/edu)
4 |
5 | 
6 |
7 | ## 课程需要
8 |
9 | 进行小程序云开发的实践时,需要你自行申请小程序云开发的公测资格,申请地址:https://wj.qq.com/s/2368934/4eb2
10 |
11 | ## 课程简介
12 |
13 | 本课程是基于微信小程序发布的[小程序云开发](https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html)服务来开发一个微信小程序的项目 Demo。
14 |
15 | ## 课程目录
16 |
17 | 1. [课程概述](https://cloud.tencent.com/developer/edu/learn-100005-1244/3154)
18 | 2. [产品描述](https://cloud.tencent.com/developer/edu/learn-100005-1244/3142)
19 | 3. [云开发简介](https://cloud.tencent.com/developer/edu/learn-100005-1244/3143)
20 | 4. [微信登录实现](https://cloud.tencent.com/developer/edu/learn-100005-1244/3145)
21 | 5. [添加图书的实现](https://cloud.tencent.com/developer/edu/learn-100005-1244/3146)
22 | 6. [图书列表的实现](https://cloud.tencent.com/developer/edu/learn-100005-1244/3147)
23 | 7. [图书信息查看、更新和删除的实现](https://cloud.tencent.com/developer/edu/learn-100005-1244/3148)
24 |
25 | ## 课程基础信息
26 |
27 | 课程类型:**免费课程**
28 |
29 | 课程分类:**微信小程序开发基础课程**
30 |
31 | 适合人群:**微信小程序开发人员**
32 |
33 | 编程语言:**JavaScript**
34 |
35 | 课程地址:[**https://cloud.tencent.com/developer/edu/course-100005-1244**](https://cloud.tencent.com/developer/edu/course-100005-1244)
36 |
37 | ## 课程学习方法
38 | 访问 https://cloud.tencent.com/developer/edu/course-100005-1244 ,使用腾讯云账号登录后即可免费学习。
39 |
40 | ## 联系我们
41 |
42 | 添加微信号 **Tcloudedu** 并回复 1 可以进入到我们的云计算交流群。
43 |
44 | 或扫描下方二维码添加学院君
45 |
46 | 
--------------------------------------------------------------------------------
/miniprogram/vant/col/index.wxss:
--------------------------------------------------------------------------------
1 | .van-col{float:left;box-sizing:border-box}.van-col--1{width:4.16667%}.van-col--offset-1{margin-left:4.16667%}.van-col--2{width:8.33333%}.van-col--offset-2{margin-left:8.33333%}.van-col--3{width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{width:16.66667%}.van-col--offset-4{margin-left:16.66667%}.van-col--5{width:20.83333%}.van-col--offset-5{margin-left:20.83333%}.van-col--6{width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{width:29.16667%}.van-col--offset-7{margin-left:29.16667%}.van-col--8{width:33.33333%}.van-col--offset-8{margin-left:33.33333%}.van-col--9{width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{width:41.66667%}.van-col--offset-10{margin-left:41.66667%}.van-col--11{width:45.83333%}.van-col--offset-11{margin-left:45.83333%}.van-col--12{width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{width:54.16667%}.van-col--offset-13{margin-left:54.16667%}.van-col--14{width:58.33333%}.van-col--offset-14{margin-left:58.33333%}.van-col--15{width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{width:66.66667%}.van-col--offset-16{margin-left:66.66667%}.van-col--17{width:70.83333%}.van-col--offset-17{margin-left:70.83333%}.van-col--18{width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{width:79.16667%}.van-col--offset-19{margin-left:79.16667%}.van-col--20{width:83.33333%}.van-col--offset-20{margin-left:83.33333%}.van-col--21{width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{width:91.66667%}.van-col--offset-22{margin-left:91.66667%}.van-col--23{width:95.83333%}.van-col--offset-23{margin-left:95.83333%}.van-col--24{width:100%}.van-col--offset-24{margin-left:100%}
--------------------------------------------------------------------------------
/miniprogram/vant/badge/index.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;top:0;left:0;width:200%;height:200%;-webkit-transform:scale(.5);transform:scale(.5);-webkit-transform-origin:0 0;transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e5e5e5}.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}.van-badge{display:block;overflow:hidden;font-size:14px;line-height:1.4;-webkit-user-select:none;user-select:none;color:#666;word-break:break-all;box-sizing:border-box;padding:20px 12px 20px 9px;background-color:#f8f8f8;border-left:3px solid transparent}.van-badge:active{background-color:#e8e8e8}.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:active{background-color:#fff}.van-badge__info{position:absolute;top:2px;right:2px;color:#fff;font-size:10px;font-weight:400;-webkit-transform:scale(.8);transform:scale(.8);text-align:center;box-sizing:border-box;padding:0 6px;min-width:18px;line-height:18px;border-radius:9px;background-color:#f44}
--------------------------------------------------------------------------------
/miniprogram/vant/button/index.wxss:
--------------------------------------------------------------------------------
1 | .van-button{position:relative;padding:0;display:inline-block;height:44px;line-height:42px;border-radius:3px;box-sizing:border-box;font-size:16px;text-align:center;vertical-align:middle;-webkit-appearance:none;-webkit-text-size-adjust:100%}.van-button::after{content:" ";position:absolute;top:50%;left:50%;opacity:0;width:100%;height:100%;border:inherit;border-color:#000;background-color:#000;border-radius:inherit;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-button:active::after{opacity:.3}.van-button--unclickable::after{display:none}.van-button--default{color:#333;background-color:#fff;border:1px solid #e5e5e5}.van-button--primary{color:#fff;background-color:#4b0;border:1px solid #4b0}.van-button--danger{color:#fff;background-color:#f44;border:1px solid #f44}.van-button--warning{color:#fff;background-color:#f85;border:1px solid #f85}.van-button--plain{background-color:#fff}.van-button--plain.van-button--primary{color:#4b0}.van-button--plain.van-button--danger{color:#f44}.van-button--plain.van-button--warning{color:#f85}.van-button--large{width:100%;height:50px;line-height:48px}.van-button--normal{padding:0 15px;font-size:14px}.van-button--small{height:30px;padding:0 8px;min-width:60px;font-size:12px;line-height:28px}.van-button--loading .van-loading{display:inline-block}.van-button--loading .van-button__text{display:none}.van-button--mini{display:inline-block;width:50px;height:22px;line-height:20px;font-size:10px}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{width:100%;display:block}.van-button--square{border-radius:0}.van-button--disabled{color:#999;background-color:#e8e8e8;border:1px solid #e5e5e5}
--------------------------------------------------------------------------------
/miniprogram/vant/toast/toast.js:
--------------------------------------------------------------------------------
1 | import { isObj } from '../utils/index';
2 |
3 | const defaultOptions = {
4 | type: 'text',
5 | mask: false,
6 | message: '',
7 | show: true,
8 | duration: 3000,
9 | position: 'middle',
10 | forbidClick: false,
11 | loadingType: 'circular',
12 | selector: '#van-toast'
13 | };
14 | const parseOptions = message => isObj(message) ? message : { message };
15 |
16 | let queue = [];
17 | let currentOptions = { ...defaultOptions };
18 |
19 | function Toast(options = {}) {
20 | options = {
21 | ...currentOptions,
22 | ...parseOptions(options)
23 | };
24 |
25 | const pages = getCurrentPages();
26 | const ctx = pages[pages.length - 1];
27 |
28 | const toast = ctx.selectComponent(options.selector);
29 | delete options.selector;
30 |
31 | queue.push(toast);
32 | toast.setData(options);
33 | clearTimeout(toast.timer);
34 |
35 | if (options.duration > 0) {
36 | toast.timer = setTimeout(() => {
37 | toast.clear();
38 | queue = queue.filter(item => item !== toast);
39 | }, options.duration);
40 | }
41 |
42 | return toast;
43 | };
44 |
45 | const createMethod = type => options => Toast({
46 | type, ...parseOptions(options)
47 | });
48 |
49 | ['loading', 'success', 'fail'].forEach(method => {
50 | Toast[method] = createMethod(method);
51 | });
52 |
53 | Toast.clear = all => {
54 | queue.forEach(toast => {
55 | toast.clear();
56 | });
57 | queue = [];
58 | };
59 |
60 | Toast.setDefaultOptions = options => {
61 | Object.assign(currentOptions, options);
62 | };
63 |
64 | Toast.resetDefaultOptions = () => {
65 | currentOptions = { ...defaultOptions };
66 | };
67 |
68 | export default Toast;
69 |
--------------------------------------------------------------------------------
/miniprogram/vant/actionsheet/index.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;top:0;left:0;width:200%;height:200%;-webkit-transform:scale(.5);transform:scale(.5);-webkit-transform-origin:0 0;transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e5e5e5}.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}.van-actionsheet{color:#333;max-height:90%;overflow-y:auto;-webkit-overflow-scrolling:touch;background-color:#f8f8f8}.van-actionsheet--withtitle{background-color:#fff}.van-actionsheet__cancel,.van-actionsheet__item{height:50px;line-height:50px;font-size:16px;text-align:center;background-color:#fff}.van-actionsheet__cancel:active,.van-actionsheet__item:active{background-color:#e8e8e8}.van-actionsheet__item--disabled{color:#c9c9c9}.van-actionsheet__item--disabled:active{background-color:#fff}.van-actionsheet__subname{font-size:12px;color:#666;margin-left:5px}.van-actionsheet__loading{display:inline-block}.van-actionsheet__cancel{margin-top:10px}.van-actionsheet__header{font-size:16px;line-height:44px;text-align:center}.van-actionsheet__close{top:0;right:0;padding:0 15px;font-size:18px;color:#999;position:absolute;line-height:inherit}
--------------------------------------------------------------------------------
/miniprogram/vant/tabbar/index.js:
--------------------------------------------------------------------------------
1 | const ITEM_PATH = '../tabbar-item/index';
2 |
3 | Component({
4 | options: {
5 | addGlobalClass: true
6 | },
7 |
8 | externalClasses: ['custom-class'],
9 |
10 | properties: {
11 | active: {
12 | type: Number,
13 | observer(active) {
14 | this.setData({ currentActive: active });
15 | this.setActiveItem();
16 | }
17 | },
18 | fixed: {
19 | type: Boolean,
20 | value: true
21 | },
22 | zIndex: {
23 | type: Number,
24 | value: 1
25 | }
26 | },
27 |
28 | data: {
29 | items: [],
30 | currentActive: -1
31 | },
32 |
33 | attached() {
34 | this.setData({ currentActive: this.data.active });
35 | },
36 |
37 | relations: {
38 | [ITEM_PATH]: {
39 | type: 'descendant',
40 |
41 | linked(target) {
42 | this.data.items.push(target);
43 | this.setActiveItem();
44 | },
45 |
46 | unlinked(target) {
47 | this.data.items = this.data.items.filter(item => item !== target);
48 | this.setActiveItem();
49 | }
50 | }
51 | },
52 |
53 | methods: {
54 | setActiveItem() {
55 | this.data.items.forEach((item, index) => {
56 | item.setData({
57 | active: index === this.data.currentActive,
58 | count: this.data.items.length
59 | });
60 | });
61 | },
62 |
63 | onChange(child) {
64 | const active = this.data.items.indexOf(child);
65 | if (active !== this.data.currentActive && active !== -1) {
66 | this.triggerEvent('change', active);
67 | this.setData({ currentActive: active });
68 | this.setActiveItem();
69 | }
70 | }
71 | }
72 | });
73 |
--------------------------------------------------------------------------------
/miniprogram/pages/bookDetail/bookDetail.js:
--------------------------------------------------------------------------------
1 | const db = wx.cloud.database();
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 | db.collection('mybook').doc(options.id).get({
16 | success: res => {
17 | console.log(res.data);
18 | this.setData({
19 | book: res.data,
20 | id:options.id
21 | });
22 | },
23 | fail:err => {
24 | console.error(err);
25 | }
26 | })
27 | //console.log(options)
28 | },
29 |
30 | /**
31 | * 生命周期函数--监听页面初次渲染完成
32 | */
33 | onReady: function () {
34 |
35 | },
36 |
37 | /**
38 | * 生命周期函数--监听页面显示
39 | */
40 | onShow: function () {
41 |
42 | },
43 |
44 | /**
45 | * 生命周期函数--监听页面隐藏
46 | */
47 | onHide: function () {
48 |
49 | },
50 |
51 | /**
52 | * 生命周期函数--监听页面卸载
53 | */
54 | onUnload: function () {
55 |
56 | },
57 |
58 | /**
59 | * 页面相关事件处理函数--监听用户下拉动作
60 | */
61 | onPullDownRefresh: function () {
62 |
63 | },
64 |
65 | /**
66 | * 页面上拉触底事件的处理函数
67 | */
68 | onReachBottom: function () {
69 |
70 | },
71 |
72 | /**
73 | * 用户点击右上角分享
74 | */
75 | onShareAppMessage: function () {
76 |
77 | },
78 | update:function(event){
79 | console.log(event)
80 | db.collection('mybook').doc(this.data.id).update({
81 | data: {
82 | title: "局部更新测试2"
83 | },
84 | success: function (res) {
85 | console.log(res)
86 | }
87 | })
88 | },
89 | delete: function (event) {
90 | db.collection('mybook').doc(this.data.id).remove({
91 | success: function (res) {
92 | console.log(res)
93 | }
94 | })
95 | }
96 | })
--------------------------------------------------------------------------------
/miniprogram/vant/button/index.js:
--------------------------------------------------------------------------------
1 | const buttonBehaviors = require('../behaviors/button');
2 | const classnames = require('../common/classnames');
3 |
4 | const observer = function() {
5 | this.setClasses();
6 | };
7 |
8 | Component({
9 | options: {
10 | addGlobalClass: true
11 | },
12 |
13 | externalClasses: ['custom-class', 'loading-class'],
14 |
15 | behaviors: [buttonBehaviors],
16 |
17 | properties: {
18 | type: {
19 | type: String,
20 | value: 'default',
21 | observer
22 | },
23 | size: {
24 | type: String,
25 | value: 'normal',
26 | observer
27 | },
28 | plain: {
29 | type: Boolean,
30 | observer
31 | },
32 | disabled: {
33 | type: Boolean,
34 | observer
35 | },
36 | loading: {
37 | type: Boolean,
38 | observer
39 | },
40 | block: {
41 | type: Boolean,
42 | observer
43 | },
44 | square: {
45 | type: Boolean,
46 | observer
47 | }
48 | },
49 |
50 | attached() {
51 | this.setClasses();
52 | },
53 |
54 | methods: {
55 | onClick() {
56 | if (!this.data.disabled && !this.data.loading) {
57 | this.triggerEvent('click');
58 | }
59 | },
60 |
61 | setClasses() {
62 | const { type, size, plain, disabled, loading, square, block } = this.data;
63 | this.setData({
64 | classes: classnames(`van-button--${type}`, `van-button--${size}`, {
65 | 'van-button--block': block,
66 | 'van-button--plain': plain,
67 | 'van-button--square': square,
68 | 'van-button--loading': loading,
69 | 'van-button--disabled': disabled,
70 | 'van-button--unclickable': disabled || loading
71 | })
72 | });
73 | }
74 | }
75 | });
76 |
--------------------------------------------------------------------------------
/miniprogram/vant/tree-select/index.wxss:
--------------------------------------------------------------------------------
1 | .van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.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;top:0;left:0;width:200%;height:200%;-webkit-transform:scale(.5);transform:scale(.5);-webkit-transform-origin:0 0;transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e5e5e5}.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}.tree-select{-webkit-user-select:none;user-select:none;position:relative;font-size:16px}.tree-select__nav{width:143px;position:absolute;left:0;top:0;bottom:0;overflow:scroll;background-color:#fff;-webkit-overflow-scrolling:touch}.tree-select__nitem{line-height:44px;padding:0 15px;background-color:#fff}.tree-select__nitem--active{background-color:#f8f8f8}.tree-select__content{padding:0 15px;margin-left:143px;overflow:scroll;-webkit-overflow-scrolling:touch}.tree-select__item{position:relative;line-height:44px;padding-left:5px;padding-right:18px}.tree-select__item--active{color:#f44}.tree-select__selected{float:right;position:absolute;right:0;top:0;bottom:0;line-height:inherit}
--------------------------------------------------------------------------------
/miniprogram/vant/tree-select/index.js:
--------------------------------------------------------------------------------
1 | const ITEM_HEIGHT = 44;
2 |
3 | Component({
4 | options: {
5 | addGlobalClass: true
6 | },
7 |
8 | properties: {
9 | items: {
10 | type: Array,
11 | observer() {
12 | this.updateSubItems();
13 | this.updateMainHeight();
14 | }
15 | },
16 | mainActiveIndex: {
17 | type: Number,
18 | value: 0,
19 | observer() {
20 | this.updateSubItems();
21 | }
22 | },
23 | activeId: {
24 | type: Number,
25 | value: 0
26 | },
27 | maxHeight: {
28 | type: Number,
29 | value: 300,
30 | observer() {
31 | this.updateItemHeight();
32 | this.updateMainHeight();
33 | }
34 | }
35 | },
36 |
37 | data: {
38 | subItems: [],
39 | mainHeight: 0,
40 | itemHeight: 0
41 | },
42 |
43 | methods: {
44 | // 当一个子项被选择时
45 | onSelectItem(event) {
46 | const {
47 | dataset = {}
48 | } = event.currentTarget || {};
49 | this.triggerEvent('click-item', { ...(dataset.item || {}) });
50 | },
51 |
52 | // 当一个导航被点击时
53 | onClickNav(event) {
54 | const {
55 | dataset = {}
56 | } = event.currentTarget || {};
57 | this.triggerEvent('click-nav', { index: dataset.index });
58 | },
59 |
60 | // 更新子项列表
61 | updateSubItems() {
62 | const selectedItem = this.data.items[this.data.mainActiveIndex] || {};
63 |
64 | this.setData({ subItems: selectedItem.children || [] });
65 |
66 | this.updateItemHeight();
67 | },
68 |
69 | // 更新组件整体高度,根据最大高度和当前组件需要展示的高度来决定
70 | updateMainHeight() {
71 | const maxHeight = Math.max(this.data.items.length * ITEM_HEIGHT, this.data.subItems.length * ITEM_HEIGHT);
72 |
73 | this.setData({ mainHeight: Math.min(maxHeight, this.data.maxHeight) });
74 | },
75 |
76 | // 更新子项列表高度,根据可展示的最大高度和当前子项列表的高度决定
77 | updateItemHeight() {
78 | this.setData({ itemHeight: Math.min(this.data.subItems.length * ITEM_HEIGHT, this.data.maxHeight) });
79 | }
80 | }
81 | });
82 |
--------------------------------------------------------------------------------
/miniprogram/pages/scanCode/scanCode.js:
--------------------------------------------------------------------------------
1 | // pages/scanCode/scanCode.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | },
66 | scanCode: function (event) {
67 | wx.scanCode({
68 | onlyFromCamera: true,
69 | scanType: ['barCode'],
70 | success: res => {
71 | wx.cloud.callFunction({
72 | name: 'bookinfo',
73 | // 传递给云函数的参数
74 | data: {
75 | isbn: res.result
76 | },
77 | success: res => {
78 | var bookString = res.result;
79 | // console.log(JSON.parse(bookString))
80 | const db = wx.cloud.database()
81 | const book = db.collection('mybook')
82 | // set price , shop
83 | db.collection('mybook').add({
84 | data: JSON.parse(bookString)
85 | }).then(res => {
86 | console.log(res)
87 | }).catch(err => {
88 | console.log(err)
89 | })
90 | },
91 | fail: err => {
92 | console.error(err)
93 | }
94 | })
95 | },
96 | fail: err => {
97 | console.log(err);
98 | }
99 | })
100 | }
101 | })
--------------------------------------------------------------------------------
/miniprogram/vant/cell/index.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;top:0;left:0;width:200%;height:200%;-webkit-transform:scale(.5);transform:scale(.5);-webkit-transform-origin:0 0;transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e5e5e5}.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}.van-cell{width:100%;display:-webkit-box;display:-webkit-flex;display:flex;padding:10px 15px;box-sizing:border-box;line-height:24px;position:relative;background-color:#fff;color:#333;font-size:14px}.van-cell::after{left:15px;right:0;width:auto;-webkit-transform:scale(1,.5);transform:scale(1,.5);border-bottom-width:1px}.van-cell-group{background-color:#fff}.van-cell__label{font-size:12px;line-height:1.2;color:#666}.van-cell__title,.van-cell__value{-webkit-box-flex:1;-webkit-flex:1;flex:1}.van-cell__value{overflow:hidden;text-align:right;vertical-align:middle}.van-cell__left-icon{font-size:16px;line-height:24px;margin-right:5px;vertical-align:middle}.van-cell__right-icon{color:#999;font-size:12px;line-height:24px;margin-left:5px}.van-cell__right-icon--left::before{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.van-cell__right-icon--up::before{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-cell__right-icon--down::before{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.van-cell--clickable:active{background-color:#e8e8e8}.van-cell--required{overflow:visible}.van-cell--required::before{content:'*';position:absolute;left:7px;font-size:14px;color:#f44}.van-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.gitignore.io/api/node,osx
3 |
4 | ### Node ###
5 | # Logs
6 | logs
7 | *.log
8 | npm-debug.log*
9 | yarn-debug.log*
10 | yarn-error.log*
11 |
12 | # Runtime data
13 | pids
14 | *.pid
15 | *.seed
16 | *.pid.lock
17 |
18 | # Directory for instrumented libs generated by jscoverage/JSCover
19 | lib-cov
20 |
21 | # Coverage directory used by tools like istanbul
22 | coverage
23 |
24 | # nyc test coverage
25 | .nyc_output
26 |
27 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
28 | .grunt
29 |
30 | # Bower dependency directory (https://bower.io/)
31 | bower_components
32 |
33 | # node-waf configuration
34 | .lock-wscript
35 |
36 | # Compiled binary addons (https://nodejs.org/api/addons.html)
37 | build/Release
38 |
39 | # Dependency directories
40 | node_modules/
41 | jspm_packages/
42 |
43 | # TypeScript v1 declaration files
44 | typings/
45 |
46 | # Optional npm cache directory
47 | .npm
48 |
49 | # Optional eslint cache
50 | .eslintcache
51 |
52 | # Optional REPL history
53 | .node_repl_history
54 |
55 | # Output of 'npm pack'
56 | *.tgz
57 |
58 | # Yarn Integrity file
59 | .yarn-integrity
60 |
61 | # dotenv environment variables file
62 | .env
63 |
64 | # parcel-bundler cache (https://parceljs.org/)
65 | .cache
66 |
67 | # next.js build output
68 | .next
69 |
70 | # nuxt.js build output
71 | .nuxt
72 |
73 | # vuepress build output
74 | .vuepress/dist
75 |
76 | # Serverless directories
77 | .serverless
78 |
79 | ### OSX ###
80 | # General
81 | .DS_Store
82 | .AppleDouble
83 | .LSOverride
84 |
85 | # Icon must end with two \r
86 | Icon
87 |
88 | # Thumbnails
89 | ._*
90 |
91 | # Files that might appear in the root of a volume
92 | .DocumentRevisions-V100
93 | .fseventsd
94 | .Spotlight-V100
95 | .TemporaryItems
96 | .Trashes
97 | .VolumeIcon.icns
98 | .com.apple.timemachine.donotpresent
99 |
100 | # Directories potentially created on remote AFP share
101 | .AppleDB
102 | .AppleDesktop
103 | Network Trash Folder
104 | Temporary Items
105 | .apdisk
106 |
107 |
108 | # End of https://www.gitignore.io/api/node,osx
109 |
--------------------------------------------------------------------------------
/cloudfunctions/batchupdate/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.gitignore.io/api/node,osx
3 |
4 | ### Node ###
5 | # Logs
6 | logs
7 | *.log
8 | npm-debug.log*
9 | yarn-debug.log*
10 | yarn-error.log*
11 |
12 | # Runtime data
13 | pids
14 | *.pid
15 | *.seed
16 | *.pid.lock
17 |
18 | # Directory for instrumented libs generated by jscoverage/JSCover
19 | lib-cov
20 |
21 | # Coverage directory used by tools like istanbul
22 | coverage
23 |
24 | # nyc test coverage
25 | .nyc_output
26 |
27 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
28 | .grunt
29 |
30 | # Bower dependency directory (https://bower.io/)
31 | bower_components
32 |
33 | # node-waf configuration
34 | .lock-wscript
35 |
36 | # Compiled binary addons (https://nodejs.org/api/addons.html)
37 | build/Release
38 |
39 | # Dependency directories
40 | node_modules/
41 | jspm_packages/
42 |
43 | # TypeScript v1 declaration files
44 | typings/
45 |
46 | # Optional npm cache directory
47 | .npm
48 |
49 | # Optional eslint cache
50 | .eslintcache
51 |
52 | # Optional REPL history
53 | .node_repl_history
54 |
55 | # Output of 'npm pack'
56 | *.tgz
57 |
58 | # Yarn Integrity file
59 | .yarn-integrity
60 |
61 | # dotenv environment variables file
62 | .env
63 |
64 | # parcel-bundler cache (https://parceljs.org/)
65 | .cache
66 |
67 | # next.js build output
68 | .next
69 |
70 | # nuxt.js build output
71 | .nuxt
72 |
73 | # vuepress build output
74 | .vuepress/dist
75 |
76 | # Serverless directories
77 | .serverless
78 |
79 | ### OSX ###
80 | # General
81 | .DS_Store
82 | .AppleDouble
83 | .LSOverride
84 |
85 | # Icon must end with two \r
86 | Icon
87 |
88 | # Thumbnails
89 | ._*
90 |
91 | # Files that might appear in the root of a volume
92 | .DocumentRevisions-V100
93 | .fseventsd
94 | .Spotlight-V100
95 | .TemporaryItems
96 | .Trashes
97 | .VolumeIcon.icns
98 | .com.apple.timemachine.donotpresent
99 |
100 | # Directories potentially created on remote AFP share
101 | .AppleDB
102 | .AppleDesktop
103 | Network Trash Folder
104 | Temporary Items
105 | .apdisk
106 |
107 |
108 | # End of https://www.gitignore.io/api/node,osx
109 |
--------------------------------------------------------------------------------
/cloudfunctions/bookinfo/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.gitignore.io/api/node,osx
3 |
4 | ### Node ###
5 | # Logs
6 | logs
7 | *.log
8 | npm-debug.log*
9 | yarn-debug.log*
10 | yarn-error.log*
11 |
12 | # Runtime data
13 | pids
14 | *.pid
15 | *.seed
16 | *.pid.lock
17 |
18 | # Directory for instrumented libs generated by jscoverage/JSCover
19 | lib-cov
20 |
21 | # Coverage directory used by tools like istanbul
22 | coverage
23 |
24 | # nyc test coverage
25 | .nyc_output
26 |
27 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
28 | .grunt
29 |
30 | # Bower dependency directory (https://bower.io/)
31 | bower_components
32 |
33 | # node-waf configuration
34 | .lock-wscript
35 |
36 | # Compiled binary addons (https://nodejs.org/api/addons.html)
37 | build/Release
38 |
39 | # Dependency directories
40 | node_modules/
41 | jspm_packages/
42 |
43 | # TypeScript v1 declaration files
44 | typings/
45 |
46 | # Optional npm cache directory
47 | .npm
48 |
49 | # Optional eslint cache
50 | .eslintcache
51 |
52 | # Optional REPL history
53 | .node_repl_history
54 |
55 | # Output of 'npm pack'
56 | *.tgz
57 |
58 | # Yarn Integrity file
59 | .yarn-integrity
60 |
61 | # dotenv environment variables file
62 | .env
63 |
64 | # parcel-bundler cache (https://parceljs.org/)
65 | .cache
66 |
67 | # next.js build output
68 | .next
69 |
70 | # nuxt.js build output
71 | .nuxt
72 |
73 | # vuepress build output
74 | .vuepress/dist
75 |
76 | # Serverless directories
77 | .serverless
78 |
79 | ### OSX ###
80 | # General
81 | .DS_Store
82 | .AppleDouble
83 | .LSOverride
84 |
85 | # Icon must end with two \r
86 | Icon
87 |
88 | # Thumbnails
89 | ._*
90 |
91 | # Files that might appear in the root of a volume
92 | .DocumentRevisions-V100
93 | .fseventsd
94 | .Spotlight-V100
95 | .TemporaryItems
96 | .Trashes
97 | .VolumeIcon.icns
98 | .com.apple.timemachine.donotpresent
99 |
100 | # Directories potentially created on remote AFP share
101 | .AppleDB
102 | .AppleDesktop
103 | Network Trash Folder
104 | Temporary Items
105 | .apdisk
106 |
107 |
108 | # End of https://www.gitignore.io/api/node,osx
109 |
--------------------------------------------------------------------------------
/miniprogram/vant/loading/index.wxss:
--------------------------------------------------------------------------------
1 | .van-loading{z-index:0;font-size:0;line-height:0;position:relative;display:inline-block;vertical-align:middle}.van-loading__spinner{z-index:-1;width:100%;height:100%;position:relative;display:inline-block;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:1px solid;border-radius:100%;border-color:currentColor;border-top-color:transparent}.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:nth-of-type(1){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(360deg);transform:rotate(360deg)}@-webkit-keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}
--------------------------------------------------------------------------------
/miniprogram/vant/popup/index.wxss:
--------------------------------------------------------------------------------
1 | .van-popup{top:50%;left:50%;z-index:11;max-height:100%;overflow-y:auto;box-sizing:border-box;background-color:#fff;-webkit-overflow-scrolling:touch;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-popup,.van-popup__overlay{display:none;position:fixed;-webkit-animation:van-fade-in .3s ease;animation:van-fade-in .3s ease}.van-popup__overlay{width:100%;height:100%;top:0;left:0;z-index:10;background-color:rgba(0,0,0,.7)}.van-popup--top{width:100%;top:0;right:auto;bottom:auto;left:50%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);-webkit-animation-name:van-popup-top;animation-name:van-popup-top}.van-popup--right{top:50%;right:0;bottom:auto;left:auto;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0);-webkit-animation-name:van-popup-right;animation-name:van-popup-right}.van-popup--bottom{width:100%;top:auto;bottom:0;right:auto;left:50%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);-webkit-animation-name:van-popup-bottom;animation-name:van-popup-bottom}.van-popup--left{top:50%;right:auto;bottom:auto;left:0;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0);-webkit-animation-name:van-popup-left;animation-name:van-popup-left}.van-popup--show{display:block}@-webkit-keyframes van-popup-top{from{-webkit-transform:translate3d(-50%,-100%,0);transform:translate3d(-50%,-100%,0)}}@keyframes van-popup-top{from{-webkit-transform:translate3d(-50%,-100%,0);transform:translate3d(-50%,-100%,0)}}@-webkit-keyframes van-popup-bottom{from{-webkit-transform:translate3d(-50%,100%,0);transform:translate3d(-50%,100%,0)}}@keyframes van-popup-bottom{from{-webkit-transform:translate3d(-50%,100%,0);transform:translate3d(-50%,100%,0)}}@-webkit-keyframes van-popup-left{from{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}}@keyframes van-popup-left{from{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}}@-webkit-keyframes van-popup-right{from{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)}}@keyframes van-popup-right{from{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)}}@-webkit-keyframes van-fade-in{from{opacity:0}to{opacity:1}}@keyframes van-fade-in{from{opacity:0}to{opacity:1}}
--------------------------------------------------------------------------------
/miniprogram/vant/slider/index.js:
--------------------------------------------------------------------------------
1 | const touchBehaviors = require('../behaviors/touch');
2 |
3 | Component({
4 | options: {
5 | addGlobalClass: true
6 | },
7 |
8 | externalClasses: ['custom-class'],
9 |
10 | behaviors: [touchBehaviors],
11 |
12 | properties: {
13 | disabled: Boolean,
14 | max: {
15 | type: Number,
16 | value: 100
17 | },
18 | min: {
19 | type: Number,
20 | value: 0
21 | },
22 | step: {
23 | type: Number,
24 | value: 1
25 | },
26 | value: {
27 | type: Number,
28 | value: 0
29 | },
30 | barHeight: {
31 | type: String,
32 | value: '2px'
33 | }
34 | },
35 |
36 | attached() {
37 | this.updateValue(this.data.value);
38 | },
39 |
40 | methods: {
41 | getRect(callback) {
42 | wx.createSelectorQuery()
43 | .in(this)
44 | .select('.van-slider')
45 | .boundingClientRect(callback)
46 | .exec();
47 | },
48 |
49 | onTouchStart(event) {
50 | if (this.data.disabled) return;
51 |
52 | this.touchStart(event);
53 | this.startValue = this.format(this.data.value);
54 | },
55 |
56 | onTouchMove(event) {
57 | if (this.data.disabled) return;
58 |
59 | this.touchMove(event);
60 | this.getRect(rect => {
61 | const diff = this.deltaX / rect.width * 100;
62 | this.updateValue(this.startValue + diff);
63 | });
64 | },
65 |
66 | onTouchEnd() {
67 | if (this.data.disabled) return;
68 | this.updateValue(this.data.value, true);
69 | },
70 |
71 | onClick(event) {
72 | if (this.data.disabled) return;
73 |
74 | this.getRect(rect => {
75 | const value = (event.detail.x - rect.left) / rect.width * 100;
76 | this.updateValue(value, true);
77 | });
78 | },
79 |
80 | updateValue(value, end) {
81 | value = this.format(value);
82 |
83 | this.setData({
84 | value,
85 | barStyle: `width: ${value}%; height: ${this.data.barHeight};`
86 | });
87 |
88 | if (end) {
89 | this.triggerEvent('change', value);
90 | }
91 | },
92 |
93 | format(value) {
94 | const { max, min, step } = this.data;
95 | return Math.round(Math.max(min, Math.min(value, max)) / step) * step;
96 | }
97 | }
98 | });
99 |
--------------------------------------------------------------------------------
/miniprogram/vant/stepper/index.js:
--------------------------------------------------------------------------------
1 | // Note that the bitwise operators and shift operators operate on 32-bit ints
2 | // so in that case, the max safe integer is 2^31-1, or 2147483647
3 | const MAX = 2147483647;
4 |
5 | Component({
6 | options: {
7 | addGlobalClass: true
8 | },
9 |
10 | externalClasses: [
11 | 'custom-class',
12 | 'input-class',
13 | 'plus-class',
14 | 'minus-class'
15 | ],
16 |
17 | properties: {
18 | value: {
19 | type: null,
20 | observer(val) {
21 | if (val !== this.currentValue) {
22 | this.setData({ currentValue: this.range(val) });
23 | }
24 | }
25 | },
26 | integer: Boolean,
27 | disabled: Boolean,
28 | disableInput: Boolean,
29 | min: {
30 | type: null,
31 | value: 1
32 | },
33 | max: {
34 | type: null,
35 | value: MAX
36 | },
37 | step: {
38 | type: null,
39 | value: 1
40 | }
41 | },
42 |
43 | attached() {
44 | this.setData({
45 | currentValue: this.range(this.data.value)
46 | });
47 | },
48 |
49 | methods: {
50 | // limit value range
51 | range(value) {
52 | return Math.max(Math.min(this.data.max, value), this.data.min);
53 | },
54 |
55 | onInput(event) {
56 | const { value = '' } = event.detail || {};
57 | this.triggerInput(value);
58 | },
59 |
60 | onChange(type) {
61 | if (this[`${type}Disabled`]) {
62 | this.triggerEvent('overlimit', type);
63 | return;
64 | }
65 |
66 | const diff = type === 'minus' ? -this.data.step : +this.data.step;
67 | const value = Math.round((this.data.currentValue + diff) * 100) / 100;
68 | this.triggerInput(this.range(value));
69 | this.triggerEvent(type);
70 | },
71 |
72 | onBlur(event) {
73 | const currentValue = this.range(this.data.currentValue);
74 | this.triggerInput(currentValue);
75 | this.triggerEvent('blur', event);
76 | },
77 |
78 | onMinus() {
79 | this.onChange('minus');
80 | },
81 |
82 | onPlus() {
83 | this.onChange('plus');
84 | },
85 |
86 | triggerInput(currentValue) {
87 | this.setData({ currentValue });
88 | this.triggerEvent('input', currentValue);
89 | this.triggerEvent('change', currentValue);
90 | }
91 | }
92 | });
93 |
--------------------------------------------------------------------------------
/miniprogram/vant/field/index.wxml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
31 |
49 |
55 |
56 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | {{ errorMessage }}
69 |
70 |
71 |
--------------------------------------------------------------------------------
/miniprogram/vant/field/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | behaviors: ['wx://form-field'],
3 |
4 | externalClasses: [
5 | 'input-class'
6 | ],
7 |
8 | options: {
9 | multipleSlots: true,
10 | addGlobalClass: true
11 | },
12 |
13 | properties: {
14 | icon: String,
15 | label: String,
16 | error: Boolean,
17 | focus: Boolean,
18 | center: Boolean,
19 | isLink: Boolean,
20 | leftIcon: String,
21 | disabled: Boolean,
22 | autosize: Boolean,
23 | readonly: Boolean,
24 | required: Boolean,
25 | iconClass: String,
26 | clearable: Boolean,
27 | labelAlign: String,
28 | inputAlign: String,
29 | customClass: String,
30 | confirmType: String,
31 | errorMessage: String,
32 | placeholder: String,
33 | customStyle: String,
34 | useIconSlot: Boolean,
35 | useButtonSlot: Boolean,
36 | placeholderClass: String,
37 | cursorSpacing: {
38 | type: Number,
39 | value: 50
40 | },
41 | maxlength: {
42 | type: Number,
43 | value: -1
44 | },
45 | value: {
46 | type: null,
47 | value: ''
48 | },
49 | type: {
50 | type: String,
51 | value: 'text'
52 | },
53 | border: {
54 | type: Boolean,
55 | value: true
56 | }
57 | },
58 |
59 | data: {
60 | focused: false,
61 | showClear: false
62 | },
63 |
64 | methods: {
65 | onInput(event) {
66 | const { value = '' } = event.detail || {};
67 | this.triggerEvent('input', value);
68 | this.triggerEvent('change', value);
69 | this.setData({
70 | value,
71 | showClear: this.getShowClear({ value })
72 | });
73 | },
74 |
75 | onFocus(event) {
76 | this.triggerEvent('focus', event);
77 | this.setData({
78 | focused: true,
79 | showClear: this.getShowClear({ focused: true })
80 | });
81 | },
82 |
83 | onBlur(event) {
84 | this.focused = false;
85 | this.triggerEvent('blur', event);
86 | this.setData({
87 | focused: false,
88 | showClear: this.getShowClear({ focused: false })
89 | });
90 | },
91 |
92 | onClickIcon() {
93 | this.triggerEvent('click-icon');
94 | },
95 |
96 | getShowClear(options) {
97 | const {
98 | focused = this.data.focused,
99 | value = this.data.value
100 | } = options;
101 |
102 | return this.data.clearable && focused && value !== '' && !this.data.readonly;
103 | },
104 |
105 | onClear() {
106 | this.setData({
107 | value: '',
108 | showClear: this.getShowClear({ value: '' })
109 | });
110 | this.triggerEvent('input', '');
111 | this.triggerEvent('change', '');
112 | },
113 |
114 | onConfirm() {
115 | this.triggerEvent('confirm', this.data.value);
116 | }
117 | }
118 | });
119 |
--------------------------------------------------------------------------------
/miniprogram/vant/steps/index.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;top:0;left:0;width:200%;height:200%;-webkit-transform:scale(.5);transform:scale(.5);-webkit-transform-origin:0 0;transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e5e5e5}.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}.van-steps{overflow:hidden;background-color:#fff}.van-steps--horizontal{display:-webkit-box;display:-webkit-flex;display:flex;overflow:hidden;position:relative;padding:10px 10px 15px}.van-steps--vertical{padding:0 0 0 35px}.van-step{-webkit-box-flex:1;-webkit-flex:1;flex:1;font-size:14px;position:relative;color:#999}.van-step--finish{color:#333}.van-step__circle{width:5px;height:5px;background-color:#999;border-radius:50%}.van-step--horizontal{float:left;padding-bottom:10px}.van-step--horizontal:first-child .van-step__title{-webkit-transform:none;transform:none;margin-left:0}.van-step--horizontal:last-child{position:absolute;right:10px;width:auto}.van-step--horizontal:last-child .van-step__title{-webkit-transform:none;transform:none;margin-left:0;text-align:right}.van-step--horizontal:last-child .van-step__circle-container{left:auto;right:-9px}.van-step--horizontal:last-child .van-step__line{width:0}.van-step--horizontal .van-step__circle-container{position:absolute;bottom:0;left:-8px;padding:0 8px;background-color:#fff;z-index:1}.van-step--horizontal .van-step__title{font-size:12px;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);display:inline-block;margin-left:3px}.van-step--horizontal .van-step__line{position:absolute;left:0;bottom:2px;width:100%;height:1px;background-color:#e5e5e5}.van-step--horizontal.van-step--process{color:#333}.van-step--horizontal.van-step--process .van-step__circle-container{bottom:-4px}.van-step--horizontal.van-step--process .van-step__active{font-size:12px;color:#06bf04;display:block;line-height:1}.van-step--vertical{font-size:14px;line-height:18px;padding:10px 10px 10px 0}.van-step--vertical:not(:last-child)::after{border-bottom-width:1px}.van-step--vertical:first-child::before{content:'';position:absolute;width:1px;height:20px;background-color:#fff;top:0;left:-15px;z-index:1}.van-step--vertical .van-step__active,.van-step--vertical .van-step__circle{z-index:2;position:absolute}.van-step--vertical .van-step__active{top:12px;left:-20px;line-height:1;font-size:12px}.van-step--vertical .van-step__circle{top:16px;left:-17px}.van-step--vertical .van-step__line{position:absolute;top:0;left:-15px;width:1px;height:100%;background-color:#e5e5e5}
--------------------------------------------------------------------------------
/miniprogram/vant/transition/index.wxss:
--------------------------------------------------------------------------------
1 | .van-transition{-webkit-animation:ease both;animation:ease both}@-webkit-keyframes van-fade-enter{from{opacity:0}to{opacity:1}}@keyframes van-fade-enter{from{opacity:0}to{opacity:1}}@-webkit-keyframes van-fade-leave{from{opacity:1}to{opacity:0}}@keyframes van-fade-leave{from{opacity:1}to{opacity:0}}@-webkit-keyframes van-fade-up-enter{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-fade-up-enter{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-fade-up-leave{to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-fade-up-leave{to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-slide-up-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-up-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-slide-up-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-up-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-fade-down-enter{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes van-fade-down-enter{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes van-fade-down-leave{to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes van-fade-down-leave{to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes van-slide-down-enter{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-enter{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes van-slide-down-leave{to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-leave{to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes van-fade-left-enter{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes van-fade-left-enter{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes van-fade-left-leave{to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes van-fade-left-leave{to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes van-slide-left-enter{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-enter{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes van-slide-left-leave{to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-leave{to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes van-fade-right-enter{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes van-fade-right-enter{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes van-fade-right-leave{to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes van-fade-right-leave{to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes van-slide-right-enter{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes van-slide-right-enter{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes van-slide-right-leave{to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes van-slide-right-leave{to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}
--------------------------------------------------------------------------------
/miniprogram/vant/notice-bar/index.js:
--------------------------------------------------------------------------------
1 | const VALID_MODE = ['closeable', 'link'];
2 | const FONT_COLOR = '#f60';
3 | const BG_COLOR = '#fff7cc';
4 |
5 | Component({
6 | options: {
7 | addGlobalClass: true
8 | },
9 |
10 | externalClasses: ['custom-class'],
11 |
12 | properties: {
13 | text: {
14 | type: String,
15 | value: '',
16 | observer() {
17 | this.setData({}, this._init);
18 | }
19 | },
20 | mode: {
21 | type: String,
22 | value: ''
23 | },
24 | url: {
25 | type: String,
26 | value: ''
27 | },
28 | openType: {
29 | type: String,
30 | value: 'navigate'
31 | },
32 | delay: {
33 | type: Number,
34 | value: 0
35 | },
36 | speed: {
37 | type: Number,
38 | value: 50
39 | },
40 | scrollable: {
41 | type: Boolean,
42 | value: true
43 | },
44 | leftIcon: {
45 | type: String,
46 | value: ''
47 | },
48 | color: {
49 | type: String,
50 | value: FONT_COLOR
51 | },
52 | backgroundColor: {
53 | type: String,
54 | value: BG_COLOR
55 | }
56 | },
57 |
58 | data: {
59 | show: true,
60 | hasRightIcon: false,
61 | width: undefined,
62 | wrapWidth: undefined,
63 | elapse: undefined,
64 | animation: null,
65 | resetAnimation: null,
66 | timer: null
67 | },
68 |
69 | attached() {
70 | const { mode } = this.data;
71 | if (mode && this._checkMode(mode)) {
72 | this.setData({
73 | hasRightIcon: true
74 | });
75 | }
76 | },
77 |
78 | detached() {
79 | const { timer } = this.data;
80 | timer && clearTimeout(timer);
81 | },
82 |
83 | methods: {
84 | _checkMode(val) {
85 | const isValidMode = ~VALID_MODE.indexOf(val);
86 | if (!isValidMode) {
87 | console.warn(`mode only accept value of ${VALID_MODE}, now get ${val}.`);
88 | }
89 | return isValidMode;
90 | },
91 |
92 | _init() {
93 | wx.createSelectorQuery()
94 | .in(this)
95 | .select('.van-notice-bar__content')
96 | .boundingClientRect((rect) => {
97 | if (!rect || !rect.width) {
98 | return;
99 | }
100 | this.setData({
101 | width: rect.width
102 | });
103 |
104 | wx.createSelectorQuery()
105 | .in(this)
106 | .select('.van-notice-bar__content-wrap')
107 | .boundingClientRect((rect) => {
108 | if (!rect || !rect.width) {
109 | return;
110 | }
111 |
112 | const wrapWidth = rect.width;
113 | const {
114 | width, speed, scrollable, delay
115 | } = this.data;
116 |
117 | if (scrollable && wrapWidth < width) {
118 | const elapse = width / speed * 1000;
119 | const animation = wx.createAnimation({
120 | duration: elapse,
121 | timeingFunction: 'linear',
122 | delay
123 | });
124 | const resetAnimation = wx.createAnimation({
125 | duration: 0,
126 | timeingFunction: 'linear'
127 | });
128 |
129 | this.setData({
130 | elapse,
131 | wrapWidth,
132 | animation,
133 | resetAnimation
134 | }, () => {
135 | this._scroll();
136 | });
137 | }
138 | })
139 | .exec();
140 | })
141 | .exec();
142 | },
143 |
144 | _scroll() {
145 | const {
146 | animation, resetAnimation, wrapWidth, elapse, speed
147 | } = this.data;
148 | resetAnimation.translateX(wrapWidth).step();
149 | const animationData = animation.translateX(-(elapse * speed) / 1000).step();
150 | this.setData({
151 | animationData: resetAnimation.export()
152 | });
153 | setTimeout(() => {
154 | this.setData({
155 | animationData: animationData.export()
156 | });
157 | }, 100);
158 |
159 | const timer = setTimeout(() => {
160 | this._scroll();
161 | }, elapse);
162 |
163 | this.setData({
164 | timer
165 | });
166 | },
167 |
168 | _handleButtonClick() {
169 | const { timer } = this.data;
170 | timer && clearTimeout(timer);
171 | this.setData({
172 | show: false,
173 | timer: null
174 | });
175 | },
176 |
177 | onClick(event) {
178 | this.triggerEvent('click', event);
179 | }
180 | }
181 | });
182 |
--------------------------------------------------------------------------------
/cloudfunctions/batchupdate/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | ajv@^5.3.0:
6 | version "5.5.2"
7 | resolved "http://registry.npm.taobao.org/ajv/download/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965"
8 | dependencies:
9 | co "^4.6.0"
10 | fast-deep-equal "^1.0.0"
11 | fast-json-stable-stringify "^2.0.0"
12 | json-schema-traverse "^0.3.0"
13 |
14 | asn1@~0.2.3:
15 | version "0.2.4"
16 | resolved "http://registry.npm.taobao.org/asn1/download/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
17 | dependencies:
18 | safer-buffer "~2.1.0"
19 |
20 | assert-plus@1.0.0, assert-plus@^1.0.0:
21 | version "1.0.0"
22 | resolved "http://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
23 |
24 | asynckit@^0.4.0:
25 | version "0.4.0"
26 | resolved "http://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
27 |
28 | aws-sign2@~0.7.0:
29 | version "0.7.0"
30 | resolved "http://registry.npm.taobao.org/aws-sign2/download/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
31 |
32 | aws4@^1.8.0:
33 | version "1.8.0"
34 | resolved "http://registry.npm.taobao.org/aws4/download/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
35 |
36 | bcrypt-pbkdf@^1.0.0:
37 | version "1.0.2"
38 | resolved "http://registry.npm.taobao.org/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
39 | dependencies:
40 | tweetnacl "^0.14.3"
41 |
42 | caseless@~0.12.0:
43 | version "0.12.0"
44 | resolved "http://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
45 |
46 | co@^4.6.0:
47 | version "4.6.0"
48 | resolved "http://registry.npm.taobao.org/co/download/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
49 |
50 | combined-stream@1.0.6, combined-stream@~1.0.6:
51 | version "1.0.6"
52 | resolved "http://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818"
53 | dependencies:
54 | delayed-stream "~1.0.0"
55 |
56 | core-util-is@1.0.2:
57 | version "1.0.2"
58 | resolved "http://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
59 |
60 | dashdash@^1.12.0:
61 | version "1.14.1"
62 | resolved "http://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
63 | dependencies:
64 | assert-plus "^1.0.0"
65 |
66 | deep-assign@^2.0.0:
67 | version "2.0.0"
68 | resolved "http://registry.npm.taobao.org/deep-assign/download/deep-assign-2.0.0.tgz#ebe06b1f07f08dae597620e3dd1622f371a1c572"
69 | dependencies:
70 | is-obj "^1.0.0"
71 |
72 | delayed-stream@~1.0.0:
73 | version "1.0.0"
74 | resolved "http://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
75 |
76 | ecc-jsbn@~0.1.1:
77 | version "0.1.2"
78 | resolved "http://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
79 | dependencies:
80 | jsbn "~0.1.0"
81 | safer-buffer "^2.1.0"
82 |
83 | extend@~3.0.2:
84 | version "3.0.2"
85 | resolved "http://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
86 |
87 | extsprintf@1.3.0:
88 | version "1.3.0"
89 | resolved "http://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
90 |
91 | extsprintf@^1.2.0:
92 | version "1.4.0"
93 | resolved "http://registry.npm.taobao.org/extsprintf/download/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
94 |
95 | fast-deep-equal@^1.0.0:
96 | version "1.1.0"
97 | resolved "http://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
98 |
99 | fast-json-stable-stringify@^2.0.0:
100 | version "2.0.0"
101 | resolved "http://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
102 |
103 | forever-agent@~0.6.1:
104 | version "0.6.1"
105 | resolved "http://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
106 |
107 | form-data@~2.3.2:
108 | version "2.3.2"
109 | resolved "http://registry.npm.taobao.org/form-data/download/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099"
110 | dependencies:
111 | asynckit "^0.4.0"
112 | combined-stream "1.0.6"
113 | mime-types "^2.1.12"
114 |
115 | getpass@^0.1.1:
116 | version "0.1.7"
117 | resolved "http://registry.npm.taobao.org/getpass/download/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
118 | dependencies:
119 | assert-plus "^1.0.0"
120 |
121 | har-schema@^2.0.0:
122 | version "2.0.0"
123 | resolved "http://registry.npm.taobao.org/har-schema/download/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
124 |
125 | har-validator@~5.1.0:
126 | version "5.1.0"
127 | resolved "http://registry.npm.taobao.org/har-validator/download/har-validator-5.1.0.tgz#44657f5688a22cfd4b72486e81b3a3fb11742c29"
128 | dependencies:
129 | ajv "^5.3.0"
130 | har-schema "^2.0.0"
131 |
132 | http-signature@~1.2.0:
133 | version "1.2.0"
134 | resolved "http://registry.npm.taobao.org/http-signature/download/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
135 | dependencies:
136 | assert-plus "^1.0.0"
137 | jsprim "^1.2.2"
138 | sshpk "^1.7.0"
139 |
140 | is-obj@^1.0.0:
141 | version "1.0.1"
142 | resolved "http://registry.npm.taobao.org/is-obj/download/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"
143 |
144 | is-typedarray@~1.0.0:
145 | version "1.0.0"
146 | resolved "http://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
147 |
148 | isstream@~0.1.2:
149 | version "0.1.2"
150 | resolved "http://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
151 |
152 | jsbn@~0.1.0:
153 | version "0.1.1"
154 | resolved "http://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
155 |
156 | json-schema-traverse@^0.3.0:
157 | version "0.3.1"
158 | resolved "http://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340"
159 |
160 | json-schema@0.2.3:
161 | version "0.2.3"
162 | resolved "http://registry.npm.taobao.org/json-schema/download/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
163 |
164 | json-stringify-safe@~5.0.1:
165 | version "5.0.1"
166 | resolved "http://registry.npm.taobao.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
167 |
168 | jsprim@^1.2.2:
169 | version "1.4.1"
170 | resolved "http://registry.npm.taobao.org/jsprim/download/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
171 | dependencies:
172 | assert-plus "1.0.0"
173 | extsprintf "1.3.0"
174 | json-schema "0.2.3"
175 | verror "1.10.0"
176 |
177 | mime-db@~1.35.0:
178 | version "1.35.0"
179 | resolved "http://registry.npm.taobao.org/mime-db/download/mime-db-1.35.0.tgz#0569d657466491283709663ad379a99b90d9ab47"
180 |
181 | mime-types@^2.1.12, mime-types@~2.1.19:
182 | version "2.1.19"
183 | resolved "http://registry.npm.taobao.org/mime-types/download/mime-types-2.1.19.tgz#71e464537a7ef81c15f2db9d97e913fc0ff606f0"
184 | dependencies:
185 | mime-db "~1.35.0"
186 |
187 | oauth-sign@~0.9.0:
188 | version "0.9.0"
189 | resolved "http://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
190 |
191 | performance-now@^2.1.0:
192 | version "2.1.0"
193 | resolved "http://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
194 |
195 | psl@^1.1.24:
196 | version "1.1.29"
197 | resolved "http://registry.npm.taobao.org/psl/download/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67"
198 |
199 | punycode@^1.4.1:
200 | version "1.4.1"
201 | resolved "http://registry.npm.taobao.org/punycode/download/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
202 |
203 | qs@~6.5.2:
204 | version "6.5.2"
205 | resolved "http://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
206 |
207 | request@^2.87.0:
208 | version "2.88.0"
209 | resolved "http://registry.npm.taobao.org/request/download/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
210 | dependencies:
211 | aws-sign2 "~0.7.0"
212 | aws4 "^1.8.0"
213 | caseless "~0.12.0"
214 | combined-stream "~1.0.6"
215 | extend "~3.0.2"
216 | forever-agent "~0.6.1"
217 | form-data "~2.3.2"
218 | har-validator "~5.1.0"
219 | http-signature "~1.2.0"
220 | is-typedarray "~1.0.0"
221 | isstream "~0.1.2"
222 | json-stringify-safe "~5.0.1"
223 | mime-types "~2.1.19"
224 | oauth-sign "~0.9.0"
225 | performance-now "^2.1.0"
226 | qs "~6.5.2"
227 | safe-buffer "^5.1.2"
228 | tough-cookie "~2.4.3"
229 | tunnel-agent "^0.6.0"
230 | uuid "^3.3.2"
231 |
232 | safe-buffer@^5.0.1, safe-buffer@^5.1.2:
233 | version "5.1.2"
234 | resolved "http://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
235 |
236 | safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
237 | version "2.1.2"
238 | resolved "http://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
239 |
240 | sshpk@^1.7.0:
241 | version "1.14.2"
242 | resolved "http://registry.npm.taobao.org/sshpk/download/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98"
243 | dependencies:
244 | asn1 "~0.2.3"
245 | assert-plus "^1.0.0"
246 | dashdash "^1.12.0"
247 | getpass "^0.1.1"
248 | safer-buffer "^2.0.2"
249 | optionalDependencies:
250 | bcrypt-pbkdf "^1.0.0"
251 | ecc-jsbn "~0.1.1"
252 | jsbn "~0.1.0"
253 | tweetnacl "~0.14.0"
254 |
255 | tcb-admin-node@1.0.26:
256 | version "1.0.26"
257 | resolved "http://registry.npm.taobao.org/tcb-admin-node/download/tcb-admin-node-1.0.26.tgz#60b15b45988384c1609f3a8fa1e12d2df7a79f72"
258 | dependencies:
259 | deep-assign "^2.0.0"
260 | request "^2.87.0"
261 |
262 | tough-cookie@~2.4.3:
263 | version "2.4.3"
264 | resolved "http://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781"
265 | dependencies:
266 | psl "^1.1.24"
267 | punycode "^1.4.1"
268 |
269 | tslib@^1.9.3:
270 | version "1.9.3"
271 | resolved "http://registry.npm.taobao.org/tslib/download/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
272 |
273 | tunnel-agent@^0.6.0:
274 | version "0.6.0"
275 | resolved "http://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
276 | dependencies:
277 | safe-buffer "^5.0.1"
278 |
279 | tweetnacl@^0.14.3, tweetnacl@~0.14.0:
280 | version "0.14.5"
281 | resolved "http://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
282 |
283 | uuid@^3.3.2:
284 | version "3.3.2"
285 | resolved "http://registry.npm.taobao.org/uuid/download/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
286 |
287 | verror@1.10.0:
288 | version "1.10.0"
289 | resolved "http://registry.npm.taobao.org/verror/download/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
290 | dependencies:
291 | assert-plus "^1.0.0"
292 | core-util-is "1.0.2"
293 | extsprintf "^1.2.0"
294 |
295 | wx-server-sdk@0.x.x:
296 | version "0.0.9"
297 | resolved "http://registry.npm.taobao.org/wx-server-sdk/download/wx-server-sdk-0.0.9.tgz#3e8c09a514328bab38a69cfadfce4ca2335d02c6"
298 | dependencies:
299 | tcb-admin-node "1.0.26"
300 | tslib "^1.9.3"
301 |
--------------------------------------------------------------------------------
/cloudfunctions/bookinfo/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bookinfo",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "ajv": {
8 | "version": "5.5.2",
9 | "resolved": "http://registry.npm.taobao.org/ajv/download/ajv-5.5.2.tgz",
10 | "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
11 | "requires": {
12 | "co": "^4.6.0",
13 | "fast-deep-equal": "^1.0.0",
14 | "fast-json-stable-stringify": "^2.0.0",
15 | "json-schema-traverse": "^0.3.0"
16 | }
17 | },
18 | "asn1": {
19 | "version": "0.2.4",
20 | "resolved": "http://registry.npm.taobao.org/asn1/download/asn1-0.2.4.tgz",
21 | "integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=",
22 | "requires": {
23 | "safer-buffer": "~2.1.0"
24 | }
25 | },
26 | "assert-plus": {
27 | "version": "1.0.0",
28 | "resolved": "http://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz",
29 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
30 | },
31 | "asynckit": {
32 | "version": "0.4.0",
33 | "resolved": "http://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz",
34 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
35 | },
36 | "aws-sign2": {
37 | "version": "0.7.0",
38 | "resolved": "http://registry.npm.taobao.org/aws-sign2/download/aws-sign2-0.7.0.tgz",
39 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
40 | },
41 | "aws4": {
42 | "version": "1.8.0",
43 | "resolved": "http://registry.npm.taobao.org/aws4/download/aws4-1.8.0.tgz",
44 | "integrity": "sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8="
45 | },
46 | "bcrypt-pbkdf": {
47 | "version": "1.0.2",
48 | "resolved": "http://registry.npm.taobao.org/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz",
49 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
50 | "optional": true,
51 | "requires": {
52 | "tweetnacl": "^0.14.3"
53 | }
54 | },
55 | "bluebird": {
56 | "version": "3.5.1",
57 | "resolved": "http://registry.npm.taobao.org/bluebird/download/bluebird-3.5.1.tgz",
58 | "integrity": "sha1-2VUfnemPH82h5oPRfukaBgLuLrk="
59 | },
60 | "caseless": {
61 | "version": "0.12.0",
62 | "resolved": "http://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz",
63 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
64 | },
65 | "co": {
66 | "version": "4.6.0",
67 | "resolved": "http://registry.npm.taobao.org/co/download/co-4.6.0.tgz",
68 | "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
69 | },
70 | "combined-stream": {
71 | "version": "1.0.6",
72 | "resolved": "http://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.6.tgz",
73 | "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
74 | "requires": {
75 | "delayed-stream": "~1.0.0"
76 | }
77 | },
78 | "core-util-is": {
79 | "version": "1.0.2",
80 | "resolved": "http://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz",
81 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
82 | },
83 | "dashdash": {
84 | "version": "1.14.1",
85 | "resolved": "http://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz",
86 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
87 | "requires": {
88 | "assert-plus": "^1.0.0"
89 | }
90 | },
91 | "deep-assign": {
92 | "version": "2.0.0",
93 | "resolved": "http://registry.npm.taobao.org/deep-assign/download/deep-assign-2.0.0.tgz",
94 | "integrity": "sha1-6+BrHwfwja5ZdiDj3RYi83GhxXI=",
95 | "requires": {
96 | "is-obj": "^1.0.0"
97 | }
98 | },
99 | "delayed-stream": {
100 | "version": "1.0.0",
101 | "resolved": "http://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz",
102 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
103 | },
104 | "ecc-jsbn": {
105 | "version": "0.1.2",
106 | "resolved": "http://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz",
107 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
108 | "optional": true,
109 | "requires": {
110 | "jsbn": "~0.1.0",
111 | "safer-buffer": "^2.1.0"
112 | }
113 | },
114 | "extend": {
115 | "version": "3.0.2",
116 | "resolved": "http://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz",
117 | "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo="
118 | },
119 | "extsprintf": {
120 | "version": "1.3.0",
121 | "resolved": "http://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz",
122 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
123 | },
124 | "fast-deep-equal": {
125 | "version": "1.1.0",
126 | "resolved": "http://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-1.1.0.tgz",
127 | "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
128 | },
129 | "fast-json-stable-stringify": {
130 | "version": "2.0.0",
131 | "resolved": "http://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.0.0.tgz",
132 | "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
133 | },
134 | "forever-agent": {
135 | "version": "0.6.1",
136 | "resolved": "http://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz",
137 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
138 | },
139 | "form-data": {
140 | "version": "2.3.2",
141 | "resolved": "http://registry.npm.taobao.org/form-data/download/form-data-2.3.2.tgz",
142 | "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
143 | "requires": {
144 | "asynckit": "^0.4.0",
145 | "combined-stream": "1.0.6",
146 | "mime-types": "^2.1.12"
147 | }
148 | },
149 | "getpass": {
150 | "version": "0.1.7",
151 | "resolved": "http://registry.npm.taobao.org/getpass/download/getpass-0.1.7.tgz",
152 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
153 | "requires": {
154 | "assert-plus": "^1.0.0"
155 | }
156 | },
157 | "har-schema": {
158 | "version": "2.0.0",
159 | "resolved": "http://registry.npm.taobao.org/har-schema/download/har-schema-2.0.0.tgz",
160 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
161 | },
162 | "har-validator": {
163 | "version": "5.1.0",
164 | "resolved": "http://registry.npm.taobao.org/har-validator/download/har-validator-5.1.0.tgz",
165 | "integrity": "sha1-RGV/VoiiLP1LckhugbOj+xF0LCk=",
166 | "requires": {
167 | "ajv": "^5.3.0",
168 | "har-schema": "^2.0.0"
169 | }
170 | },
171 | "http-signature": {
172 | "version": "1.2.0",
173 | "resolved": "http://registry.npm.taobao.org/http-signature/download/http-signature-1.2.0.tgz",
174 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
175 | "requires": {
176 | "assert-plus": "^1.0.0",
177 | "jsprim": "^1.2.2",
178 | "sshpk": "^1.7.0"
179 | }
180 | },
181 | "is-obj": {
182 | "version": "1.0.1",
183 | "resolved": "http://registry.npm.taobao.org/is-obj/download/is-obj-1.0.1.tgz",
184 | "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8="
185 | },
186 | "is-typedarray": {
187 | "version": "1.0.0",
188 | "resolved": "http://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz",
189 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
190 | },
191 | "isstream": {
192 | "version": "0.1.2",
193 | "resolved": "http://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz",
194 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
195 | },
196 | "jsbn": {
197 | "version": "0.1.1",
198 | "resolved": "http://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz",
199 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
200 | "optional": true
201 | },
202 | "json-schema": {
203 | "version": "0.2.3",
204 | "resolved": "http://registry.npm.taobao.org/json-schema/download/json-schema-0.2.3.tgz",
205 | "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
206 | },
207 | "json-schema-traverse": {
208 | "version": "0.3.1",
209 | "resolved": "http://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.3.1.tgz",
210 | "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
211 | },
212 | "json-stringify-safe": {
213 | "version": "5.0.1",
214 | "resolved": "http://registry.npm.taobao.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz",
215 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
216 | },
217 | "jsprim": {
218 | "version": "1.4.1",
219 | "resolved": "http://registry.npm.taobao.org/jsprim/download/jsprim-1.4.1.tgz",
220 | "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
221 | "requires": {
222 | "assert-plus": "1.0.0",
223 | "extsprintf": "1.3.0",
224 | "json-schema": "0.2.3",
225 | "verror": "1.10.0"
226 | }
227 | },
228 | "lodash": {
229 | "version": "4.17.10",
230 | "resolved": "http://registry.npm.taobao.org/lodash/download/lodash-4.17.10.tgz",
231 | "integrity": "sha1-G3eTz3JZ6jj7NmHU04syYK+K5Oc="
232 | },
233 | "mime-db": {
234 | "version": "1.35.0",
235 | "resolved": "http://registry.npm.taobao.org/mime-db/download/mime-db-1.35.0.tgz",
236 | "integrity": "sha1-BWnWV0ZkkSg3CWY603mpm5DZq0c="
237 | },
238 | "mime-types": {
239 | "version": "2.1.19",
240 | "resolved": "http://registry.npm.taobao.org/mime-types/download/mime-types-2.1.19.tgz",
241 | "integrity": "sha1-ceRkU3p++BwV8tudl+kT/A/2BvA=",
242 | "requires": {
243 | "mime-db": "~1.35.0"
244 | }
245 | },
246 | "oauth-sign": {
247 | "version": "0.9.0",
248 | "resolved": "http://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz",
249 | "integrity": "sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU="
250 | },
251 | "performance-now": {
252 | "version": "2.1.0",
253 | "resolved": "http://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz",
254 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
255 | },
256 | "psl": {
257 | "version": "1.1.29",
258 | "resolved": "http://registry.npm.taobao.org/psl/download/psl-1.1.29.tgz",
259 | "integrity": "sha1-YPWA02AXC7cip5fMcEQR5tqFDGc="
260 | },
261 | "punycode": {
262 | "version": "1.4.1",
263 | "resolved": "http://registry.npm.taobao.org/punycode/download/punycode-1.4.1.tgz",
264 | "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
265 | },
266 | "qs": {
267 | "version": "6.5.2",
268 | "resolved": "http://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz",
269 | "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY="
270 | },
271 | "request": {
272 | "version": "2.88.0",
273 | "resolved": "http://registry.npm.taobao.org/request/download/request-2.88.0.tgz",
274 | "integrity": "sha1-nC/KT301tZLv5Xx/ClXoEFIST+8=",
275 | "requires": {
276 | "aws-sign2": "~0.7.0",
277 | "aws4": "^1.8.0",
278 | "caseless": "~0.12.0",
279 | "combined-stream": "~1.0.6",
280 | "extend": "~3.0.2",
281 | "forever-agent": "~0.6.1",
282 | "form-data": "~2.3.2",
283 | "har-validator": "~5.1.0",
284 | "http-signature": "~1.2.0",
285 | "is-typedarray": "~1.0.0",
286 | "isstream": "~0.1.2",
287 | "json-stringify-safe": "~5.0.1",
288 | "mime-types": "~2.1.19",
289 | "oauth-sign": "~0.9.0",
290 | "performance-now": "^2.1.0",
291 | "qs": "~6.5.2",
292 | "safe-buffer": "^5.1.2",
293 | "tough-cookie": "~2.4.3",
294 | "tunnel-agent": "^0.6.0",
295 | "uuid": "^3.3.2"
296 | }
297 | },
298 | "request-promise": {
299 | "version": "4.2.2",
300 | "resolved": "http://registry.npm.taobao.org/request-promise/download/request-promise-4.2.2.tgz",
301 | "integrity": "sha1-0epG1lSm7k+O5qT+oQGMIpEZBLQ=",
302 | "requires": {
303 | "bluebird": "^3.5.0",
304 | "request-promise-core": "1.1.1",
305 | "stealthy-require": "^1.1.0",
306 | "tough-cookie": ">=2.3.3"
307 | }
308 | },
309 | "request-promise-core": {
310 | "version": "1.1.1",
311 | "resolved": "http://registry.npm.taobao.org/request-promise-core/download/request-promise-core-1.1.1.tgz",
312 | "integrity": "sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY=",
313 | "requires": {
314 | "lodash": "^4.13.1"
315 | }
316 | },
317 | "safe-buffer": {
318 | "version": "5.1.2",
319 | "resolved": "http://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz",
320 | "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0="
321 | },
322 | "safer-buffer": {
323 | "version": "2.1.2",
324 | "resolved": "http://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz",
325 | "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo="
326 | },
327 | "sshpk": {
328 | "version": "1.14.2",
329 | "resolved": "http://registry.npm.taobao.org/sshpk/download/sshpk-1.14.2.tgz",
330 | "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=",
331 | "requires": {
332 | "asn1": "~0.2.3",
333 | "assert-plus": "^1.0.0",
334 | "bcrypt-pbkdf": "^1.0.0",
335 | "dashdash": "^1.12.0",
336 | "ecc-jsbn": "~0.1.1",
337 | "getpass": "^0.1.1",
338 | "jsbn": "~0.1.0",
339 | "safer-buffer": "^2.0.2",
340 | "tweetnacl": "~0.14.0"
341 | }
342 | },
343 | "stealthy-require": {
344 | "version": "1.1.1",
345 | "resolved": "http://registry.npm.taobao.org/stealthy-require/download/stealthy-require-1.1.1.tgz",
346 | "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks="
347 | },
348 | "tcb-admin-node": {
349 | "version": "1.0.26",
350 | "resolved": "http://registry.npm.taobao.org/tcb-admin-node/download/tcb-admin-node-1.0.26.tgz",
351 | "integrity": "sha1-YLFbRZiDhMFgnzqPoeEtLfenn3I=",
352 | "requires": {
353 | "deep-assign": "^2.0.0",
354 | "request": "^2.87.0"
355 | }
356 | },
357 | "tough-cookie": {
358 | "version": "2.4.3",
359 | "resolved": "http://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.4.3.tgz",
360 | "integrity": "sha1-U/Nto/R3g7CSWvoG/587FlKA94E=",
361 | "requires": {
362 | "psl": "^1.1.24",
363 | "punycode": "^1.4.1"
364 | }
365 | },
366 | "tslib": {
367 | "version": "1.9.3",
368 | "resolved": "http://registry.npm.taobao.org/tslib/download/tslib-1.9.3.tgz",
369 | "integrity": "sha1-1+TdeSRdhUKMTX5IIqeZF5VMooY="
370 | },
371 | "tunnel-agent": {
372 | "version": "0.6.0",
373 | "resolved": "http://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz",
374 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
375 | "requires": {
376 | "safe-buffer": "^5.0.1"
377 | }
378 | },
379 | "tweetnacl": {
380 | "version": "0.14.5",
381 | "resolved": "http://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz",
382 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
383 | "optional": true
384 | },
385 | "uuid": {
386 | "version": "3.3.2",
387 | "resolved": "http://registry.npm.taobao.org/uuid/download/uuid-3.3.2.tgz",
388 | "integrity": "sha1-G0r0lV6zB3xQHCOHL8ZROBFYcTE="
389 | },
390 | "verror": {
391 | "version": "1.10.0",
392 | "resolved": "http://registry.npm.taobao.org/verror/download/verror-1.10.0.tgz",
393 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
394 | "requires": {
395 | "assert-plus": "^1.0.0",
396 | "core-util-is": "1.0.2",
397 | "extsprintf": "^1.2.0"
398 | }
399 | },
400 | "wx-server-sdk": {
401 | "version": "0.0.9",
402 | "resolved": "http://registry.npm.taobao.org/wx-server-sdk/download/wx-server-sdk-0.0.9.tgz",
403 | "integrity": "sha1-PowJpRQyi6s4ppz6385MojNdAsY=",
404 | "requires": {
405 | "tcb-admin-node": "1.0.26",
406 | "tslib": "^1.9.3"
407 | }
408 | }
409 | }
410 | }
411 |
--------------------------------------------------------------------------------