weapps-plugin-jingtong-verify 1.6.1 → 1.6.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/app.json +33 -33
- package/package.json +20 -20
- package/sdk.js +313 -289
- package/weapps-plugin-jingtong-verify/components/card-modal/card-modal.js +31 -31
- package/weapps-plugin-jingtong-verify/components/card-modal/card-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/card-modal/card-modal.wxml +9 -9
- package/weapps-plugin-jingtong-verify/components/card-modal/card-modal.wxss +65 -65
- package/weapps-plugin-jingtong-verify/components/face-error-modal/face-error-modal.js +37 -37
- package/weapps-plugin-jingtong-verify/components/face-error-modal/face-error-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/face-error-modal/face-error-modal.wxml +30 -30
- package/weapps-plugin-jingtong-verify/components/face-error-modal/face-error-modal.wxss +79 -79
- package/weapps-plugin-jingtong-verify/components/face-modal/face-modal.js +32 -32
- package/weapps-plugin-jingtong-verify/components/face-modal/face-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/face-modal/face-modal.wxml +16 -16
- package/weapps-plugin-jingtong-verify/components/face-modal/face-modal.wxss +57 -57
- package/weapps-plugin-jingtong-verify/components/gsd-lib/anim/anim.min.js +1 -1
- package/weapps-plugin-jingtong-verify/components/gsd-lib/crypto/crypto.js +37 -37
- package/weapps-plugin-jingtong-verify/components/gsd-lib/crypto/index.js +44 -44
- package/weapps-plugin-jingtong-verify/components/gsd-lib/dayjs/index.js +351 -351
- package/weapps-plugin-jingtong-verify/components/gsd-lib/event/index.js +117 -117
- package/weapps-plugin-jingtong-verify/components/gsd-lib/index.js +63 -63
- package/weapps-plugin-jingtong-verify/components/gsd-lib/map/index.js +10 -10
- package/weapps-plugin-jingtong-verify/components/gsd-lib/map/qmap.js +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-lib/storage/index.js +114 -114
- package/weapps-plugin-jingtong-verify/components/gsd-lib/utils/index.js +218 -218
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/formCheck.js +72 -72
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/formController.js +47 -47
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/icon.js +11 -11
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/list.js +16 -16
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/navigator.js +33 -33
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/primarySecondButton.js +18 -18
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-agree/index.js +12 -12
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-agree/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-agree/index.wxml +15 -15
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-badge/index.js +47 -47
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-badge/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-badge/index.wxml +13 -13
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-button-group/index.js +44 -44
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-button-group/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-button-group/index.wxml +28 -28
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-cell/index.js +30 -30
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-cell/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-cell/index.wxml +42 -42
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-cell/index.wxss +1 -1
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-date-picker-en/index.js +418 -418
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-date-picker-en/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-date-picker-en/index.wxml +29 -29
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-dropdown/index.js +11 -11
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-dropdown/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-dropdown/index.wxml +4 -4
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form/index.js +179 -179
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form/index.wxml +16 -16
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-cell/index.js +92 -92
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-cell/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-cell/index.wxml +12 -12
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-cell/index.wxss +2 -2
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-item/index.js +49 -49
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-item/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-item/index.wxml +14 -14
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-icon/index.js +33 -33
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-icon/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-icon/index.wxml +2 -2
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-index-list/index.js +108 -108
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-index-list/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-index-list/index.wxml +53 -53
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-input/index.js +236 -236
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-input/index.json +8 -8
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-input/index.wxml +49 -49
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-picker/index.js +328 -328
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-picker/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-picker/index.wxml +26 -26
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-popover/index.js +159 -159
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-popover/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-popover/index.wxml +10 -10
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-search/index.js +112 -112
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-search/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-search/index.wxml +21 -21
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-switch/index.js +21 -21
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-switch/index.json +7 -7
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-switch/index.wxml +16 -16
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-tips/index.js +50 -50
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-tips/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-tips/index.wxml +27 -27
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/add.svg +13 -13
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/arrow.svg +14 -14
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/delete.svg +16 -16
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/preview.svg +21 -21
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/user.svg +13 -13
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-agree.wxss +147 -147
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-badge.wxss +41 -41
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-button-group.wxss +244 -244
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-cell.wxss +220 -220
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-dropdown.wxss +115 -115
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-form-cell.wxss +101 -101
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-form-item.wxss +174 -174
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-form.wxss +101 -101
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-icon.wxss +268 -268
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-index-list.wxss +206 -206
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-input.wxss +206 -206
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-picker.wxss +139 -139
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-popover.wxss +129 -129
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-search.wxss +171 -171
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-switch.wxss +176 -176
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-tips.wxss +173 -173
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/icon/iconfont.wxss +160 -160
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/main.wxss +283 -283
- package/weapps-plugin-jingtong-verify/components/gsd-ui/utils/helper.js +55 -55
- package/weapps-plugin-jingtong-verify/components/gsd-ui/utils/validType.js +117 -117
- package/weapps-plugin-jingtong-verify/components/gsd-ui/utils/validator.js +106 -106
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.js +32 -32
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.wxml +8 -8
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.wxss +57 -57
- package/weapps-plugin-jingtong-verify/components/modal/modal.js +32 -32
- package/weapps-plugin-jingtong-verify/components/modal/modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/modal/modal.wxml +28 -28
- package/weapps-plugin-jingtong-verify/components/modal/modal.wxss +84 -84
- package/weapps-plugin-jingtong-verify/components/my-modal/my-modal.js +82 -82
- package/weapps-plugin-jingtong-verify/components/my-modal/my-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/my-modal/my-modal.wxml +18 -18
- package/weapps-plugin-jingtong-verify/components/my-modal/my-modal.wxss +72 -72
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.js +39 -39
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.wxml +9 -9
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.wxss +51 -51
- package/weapps-plugin-jingtong-verify/i18n/index.js +7 -7
- package/weapps-plugin-jingtong-verify/i18n/logout.js +10 -10
- package/weapps-plugin-jingtong-verify/i18n/rules.js +262 -262
- package/weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone.js +86 -86
- package/weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone.json +6 -6
- package/weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone.wxml +20 -20
- package/weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone.wxss +51 -51
- package/weapps-plugin-jingtong-verify/pages/confirm-phone/confirm-phone.js +167 -167
- package/weapps-plugin-jingtong-verify/pages/confirm-phone/confirm-phone.json +3 -3
- package/weapps-plugin-jingtong-verify/pages/confirm-phone/confirm-phone.wxml +30 -30
- package/weapps-plugin-jingtong-verify/pages/confirm-phone/confirm-phone.wxss +91 -91
- package/weapps-plugin-jingtong-verify/pages/face-error-reason/face-error-reason.js +79 -79
- package/weapps-plugin-jingtong-verify/pages/face-error-reason/face-error-reason.json +5 -5
- package/weapps-plugin-jingtong-verify/pages/face-error-reason/face-error-reason.wxml +19 -19
- package/weapps-plugin-jingtong-verify/pages/face-error-reason/face-error-reason.wxss +44 -44
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.js +1557 -1547
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.json +17 -17
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.wxml +504 -504
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.wxss +133 -133
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.js +127 -127
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.json +5 -5
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.wxml +36 -36
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.wxss +60 -60
- package/weapps-plugin-jingtong-verify/pages/login-manage/login-manage.js +106 -106
- package/weapps-plugin-jingtong-verify/pages/login-manage/login-manage.json +3 -3
- package/weapps-plugin-jingtong-verify/pages/login-manage/login-manage.wxml +29 -29
- package/weapps-plugin-jingtong-verify/pages/login-manage/login-manage.wxss +68 -68
- package/weapps-plugin-jingtong-verify/pages/logoff-success/logoff-success.js +24 -24
- package/weapps-plugin-jingtong-verify/pages/logoff-success/logoff-success.json +3 -3
- package/weapps-plugin-jingtong-verify/pages/logoff-success/logoff-success.wxml +12 -12
- package/weapps-plugin-jingtong-verify/pages/logoff-success/logoff-success.wxss +33 -33
- package/weapps-plugin-jingtong-verify/pages/nation-list/nation-list.js +120 -120
- package/weapps-plugin-jingtong-verify/pages/nation-list/nation-list.json +6 -6
- package/weapps-plugin-jingtong-verify/pages/nation-list/nation-list.wxml +9 -9
- package/weapps-plugin-jingtong-verify/pages/nation-list/nation-list.wxss +1 -1
- package/weapps-plugin-jingtong-verify/pages/passport-verify/passport-verify.js +865 -854
- package/weapps-plugin-jingtong-verify/pages/passport-verify/passport-verify.json +11 -11
- package/weapps-plugin-jingtong-verify/pages/passport-verify/passport-verify.wxml +162 -162
- package/weapps-plugin-jingtong-verify/pages/passport-verify/passport-verify.wxss +64 -64
- package/weapps-plugin-jingtong-verify/pages/setting/setting.js +328 -328
- package/weapps-plugin-jingtong-verify/pages/setting/setting.json +5 -5
- package/weapps-plugin-jingtong-verify/pages/setting/setting.wxml +91 -91
- package/weapps-plugin-jingtong-verify/pages/setting/setting.wxss +69 -69
- package/weapps-plugin-jingtong-verify/pages/user-info/user-info.js +306 -306
- package/weapps-plugin-jingtong-verify/pages/user-info/user-info.json +7 -7
- package/weapps-plugin-jingtong-verify/pages/user-info/user-info.wxml +142 -142
- package/weapps-plugin-jingtong-verify/pages/user-info/user-info.wxss +110 -110
- package/weapps-plugin-jingtong-verify/style/page.wxss +13 -13
- package/weapps-plugin-jingtong-verify/utils/QDTrackerNew/QDTracker.js +15 -15
- package/weapps-plugin-jingtong-verify/utils/QDTrackerNew/QDTrackerMain.js +59 -59
- package/weapps-plugin-jingtong-verify/utils/country.js +209 -209
- package/weapps-plugin-jingtong-verify/utils/index.js +306 -306
- package/weapps-plugin-jingtong-verify/utils/jsencrypt.min.js +1 -1
- package/weapps-plugin-jingtong-verify/utils/request.js +1 -1
- package/weapps-plugin-jingtong-verify/utils/rules.js +301 -301
- package/weapps-plugin-jingtong-verify/utils/tifadmin_config.js +61 -61
- package/weapps-plugin-jingtong-verify/utils/validate.js +772 -772
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
module.exports = Behavior({
|
|
3
|
-
properties: {
|
|
4
|
-
iconType: String,
|
|
5
|
-
iconSize: {
|
|
6
|
-
type: Number,
|
|
7
|
-
value: 36
|
|
8
|
-
},
|
|
9
|
-
iconColor: String
|
|
10
|
-
}
|
|
11
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = Behavior({
|
|
3
|
+
properties: {
|
|
4
|
+
iconType: String,
|
|
5
|
+
iconSize: {
|
|
6
|
+
type: Number,
|
|
7
|
+
value: 36
|
|
8
|
+
},
|
|
9
|
+
iconColor: String
|
|
10
|
+
}
|
|
11
|
+
});
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
module.exports = Behavior({
|
|
3
|
-
data: {
|
|
4
|
-
labelWidth: 105
|
|
5
|
-
},
|
|
6
|
-
methods: {
|
|
7
|
-
// 提供修改 label 的方法
|
|
8
|
-
setLabelWidth(width) {
|
|
9
|
-
if (!Number.isNaN(width)) {
|
|
10
|
-
this.setData({
|
|
11
|
-
labelWidth: width
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
}
|
|
16
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = Behavior({
|
|
3
|
+
data: {
|
|
4
|
+
labelWidth: 105
|
|
5
|
+
},
|
|
6
|
+
methods: {
|
|
7
|
+
// 提供修改 label 的方法
|
|
8
|
+
setLabelWidth(width) {
|
|
9
|
+
if (!Number.isNaN(width)) {
|
|
10
|
+
this.setData({
|
|
11
|
+
labelWidth: width
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* 处理所有包含 to 的组件
|
|
4
|
-
*/
|
|
5
|
-
module.exports = Behavior({
|
|
6
|
-
properties: {
|
|
7
|
-
to: {
|
|
8
|
-
type: String,
|
|
9
|
-
value: ''
|
|
10
|
-
},
|
|
11
|
-
toType: {
|
|
12
|
-
type: String,
|
|
13
|
-
value: 'to'
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
data: {},
|
|
17
|
-
methods: {
|
|
18
|
-
// 统一提供跳转方法
|
|
19
|
-
navigator() {
|
|
20
|
-
const { to, toType } = this.properties;
|
|
21
|
-
if (!to)
|
|
22
|
-
return false;
|
|
23
|
-
if (toType === 'to')
|
|
24
|
-
wx.navigateTo({ url: to });
|
|
25
|
-
if (toType === 'redirect')
|
|
26
|
-
wx.redirectTo({ url: to });
|
|
27
|
-
if (toType === 'switch')
|
|
28
|
-
wx.switchTab({ url: to });
|
|
29
|
-
if (toType === 'reLaunch')
|
|
30
|
-
wx.reLaunch({ url: to });
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* 处理所有包含 to 的组件
|
|
4
|
+
*/
|
|
5
|
+
module.exports = Behavior({
|
|
6
|
+
properties: {
|
|
7
|
+
to: {
|
|
8
|
+
type: String,
|
|
9
|
+
value: ''
|
|
10
|
+
},
|
|
11
|
+
toType: {
|
|
12
|
+
type: String,
|
|
13
|
+
value: 'to'
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
data: {},
|
|
17
|
+
methods: {
|
|
18
|
+
// 统一提供跳转方法
|
|
19
|
+
navigator() {
|
|
20
|
+
const { to, toType } = this.properties;
|
|
21
|
+
if (!to)
|
|
22
|
+
return false;
|
|
23
|
+
if (toType === 'to')
|
|
24
|
+
wx.navigateTo({ url: to });
|
|
25
|
+
if (toType === 'redirect')
|
|
26
|
+
wx.redirectTo({ url: to });
|
|
27
|
+
if (toType === 'switch')
|
|
28
|
+
wx.switchTab({ url: to });
|
|
29
|
+
if (toType === 'reLaunch')
|
|
30
|
+
wx.reLaunch({ url: to });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
module.exports = Behavior({
|
|
3
|
-
properties: {
|
|
4
|
-
primaryText: {
|
|
5
|
-
type: String,
|
|
6
|
-
value: '下一步'
|
|
7
|
-
},
|
|
8
|
-
secondText: String
|
|
9
|
-
},
|
|
10
|
-
methods: {
|
|
11
|
-
handlePrimaryTap(e) {
|
|
12
|
-
this.triggerEvent('primaryTap', e.detail);
|
|
13
|
-
},
|
|
14
|
-
handleSecondTap(e) {
|
|
15
|
-
this.triggerEvent('secondTap', e.detail);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = Behavior({
|
|
3
|
+
properties: {
|
|
4
|
+
primaryText: {
|
|
5
|
+
type: String,
|
|
6
|
+
value: '下一步'
|
|
7
|
+
},
|
|
8
|
+
secondText: String
|
|
9
|
+
},
|
|
10
|
+
methods: {
|
|
11
|
+
handlePrimaryTap(e) {
|
|
12
|
+
this.triggerEvent('primaryTap', e.detail);
|
|
13
|
+
},
|
|
14
|
+
handleSecondTap(e) {
|
|
15
|
+
this.triggerEvent('secondTap', e.detail);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// pages/g-agree/index.js
|
|
2
|
-
Component({
|
|
3
|
-
properties: {
|
|
4
|
-
value: Boolean
|
|
5
|
-
},
|
|
6
|
-
data: {},
|
|
7
|
-
methods: {
|
|
8
|
-
handleChange(e) {
|
|
9
|
-
this.triggerEvent('change', { value: e.detail.value.length > 0 });
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
});
|
|
1
|
+
// pages/g-agree/index.js
|
|
2
|
+
Component({
|
|
3
|
+
properties: {
|
|
4
|
+
value: Boolean
|
|
5
|
+
},
|
|
6
|
+
data: {},
|
|
7
|
+
methods: {
|
|
8
|
+
handleChange(e) {
|
|
9
|
+
this.triggerEvent('change', { value: e.detail.value.length > 0 });
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"component": true,
|
|
3
|
-
"usingComponents": {
|
|
4
|
-
"g-icon": "../g-icon/index"
|
|
5
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"component": true,
|
|
3
|
+
"usingComponents": {
|
|
4
|
+
"g-icon": "../g-icon/index"
|
|
5
|
+
}
|
|
6
6
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<!-- pages/g-agree/index.wxml -->
|
|
2
|
-
<checkbox-group bind:change="handleChange">
|
|
3
|
-
<label class="agree">
|
|
4
|
-
<view class="agree__checkbox__container">
|
|
5
|
-
<checkbox class="agree__checkbox" id="agree" value="agree" checked="{{value}}" />
|
|
6
|
-
<view class="checkbox__icon">
|
|
7
|
-
<view hidden="{{!value}}"><g-icon class="checkbox__icon--checked" type="check" size="32" /></view>
|
|
8
|
-
<view hidden="{{value}}" class="checkbox__icon--unchecked"></view>
|
|
9
|
-
</view>
|
|
10
|
-
</view>
|
|
11
|
-
<view class="agree__desc">
|
|
12
|
-
<slot />
|
|
13
|
-
</view>
|
|
14
|
-
</label>
|
|
15
|
-
</checkbox-group>
|
|
1
|
+
<!-- pages/g-agree/index.wxml -->
|
|
2
|
+
<checkbox-group bind:change="handleChange">
|
|
3
|
+
<label class="agree">
|
|
4
|
+
<view class="agree__checkbox__container">
|
|
5
|
+
<checkbox class="agree__checkbox" id="agree" value="agree" checked="{{value}}" />
|
|
6
|
+
<view class="checkbox__icon">
|
|
7
|
+
<view hidden="{{!value}}"><g-icon class="checkbox__icon--checked" type="check" size="32" /></view>
|
|
8
|
+
<view hidden="{{value}}" class="checkbox__icon--unchecked"></view>
|
|
9
|
+
</view>
|
|
10
|
+
</view>
|
|
11
|
+
<view class="agree__desc">
|
|
12
|
+
<slot />
|
|
13
|
+
</view>
|
|
14
|
+
</label>
|
|
15
|
+
</checkbox-group>
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
// pages/g-badge/index.js
|
|
2
|
-
const badgePosition = 'none';
|
|
3
|
-
Component({
|
|
4
|
-
externalClasses: ['component-class'],
|
|
5
|
-
properties: {
|
|
6
|
-
count: {
|
|
7
|
-
type: [Number, String],
|
|
8
|
-
observer(newVal) {
|
|
9
|
-
this.isShowOverflowCount(newVal);
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
dot: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
value: false
|
|
15
|
-
},
|
|
16
|
-
overflowCount: {
|
|
17
|
-
type: Number,
|
|
18
|
-
value: 99
|
|
19
|
-
},
|
|
20
|
-
position: {
|
|
21
|
-
type: String,
|
|
22
|
-
value: badgePosition
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
data: {
|
|
26
|
-
showOverflowCount: false
|
|
27
|
-
},
|
|
28
|
-
methods: {
|
|
29
|
-
/**
|
|
30
|
-
* 如果是整型的话,判断是否达到最大值
|
|
31
|
-
*
|
|
32
|
-
* @param {(number | string)} value
|
|
33
|
-
*/
|
|
34
|
-
isShowOverflowCount(value) {
|
|
35
|
-
if (typeof value === 'number' && value >= this.properties.overflowCount) {
|
|
36
|
-
this.setData({
|
|
37
|
-
showOverflowCount: true
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
this.setData({
|
|
42
|
-
showOverflowCount: false
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
});
|
|
1
|
+
// pages/g-badge/index.js
|
|
2
|
+
const badgePosition = 'none';
|
|
3
|
+
Component({
|
|
4
|
+
externalClasses: ['component-class'],
|
|
5
|
+
properties: {
|
|
6
|
+
count: {
|
|
7
|
+
type: [Number, String],
|
|
8
|
+
observer(newVal) {
|
|
9
|
+
this.isShowOverflowCount(newVal);
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
dot: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
value: false
|
|
15
|
+
},
|
|
16
|
+
overflowCount: {
|
|
17
|
+
type: Number,
|
|
18
|
+
value: 99
|
|
19
|
+
},
|
|
20
|
+
position: {
|
|
21
|
+
type: String,
|
|
22
|
+
value: badgePosition
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
data: {
|
|
26
|
+
showOverflowCount: false
|
|
27
|
+
},
|
|
28
|
+
methods: {
|
|
29
|
+
/**
|
|
30
|
+
* 如果是整型的话,判断是否达到最大值
|
|
31
|
+
*
|
|
32
|
+
* @param {(number | string)} value
|
|
33
|
+
*/
|
|
34
|
+
isShowOverflowCount(value) {
|
|
35
|
+
if (typeof value === 'number' && value >= this.properties.overflowCount) {
|
|
36
|
+
this.setData({
|
|
37
|
+
showOverflowCount: true
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
this.setData({
|
|
42
|
+
showOverflowCount: false
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
2
|
-
"component": true,
|
|
3
|
-
"usingComponents": {}
|
|
1
|
+
{
|
|
2
|
+
"component": true,
|
|
3
|
+
"usingComponents": {}
|
|
4
4
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<!--pages/g-badge/index.wxml-->
|
|
2
|
-
<view class="badge component-class badge--{{ dot?'dot':'normal' }} badge__position--{{ position }}">
|
|
3
|
-
<view wx:if="{{ dot }}">
|
|
4
|
-
</view>
|
|
5
|
-
<view wx:else>
|
|
6
|
-
<view wx:if="{{ showOverflowCount }}">
|
|
7
|
-
{{ overflowCount }}+
|
|
8
|
-
</view>
|
|
9
|
-
<view wx:else>
|
|
10
|
-
{{ count }}
|
|
11
|
-
</view>
|
|
12
|
-
</view>
|
|
13
|
-
</view>
|
|
1
|
+
<!--pages/g-badge/index.wxml-->
|
|
2
|
+
<view class="badge component-class badge--{{ dot?'dot':'normal' }} badge__position--{{ position }}">
|
|
3
|
+
<view wx:if="{{ dot }}">
|
|
4
|
+
</view>
|
|
5
|
+
<view wx:else>
|
|
6
|
+
<view wx:if="{{ showOverflowCount }}">
|
|
7
|
+
{{ overflowCount }}+
|
|
8
|
+
</view>
|
|
9
|
+
<view wx:else>
|
|
10
|
+
{{ count }}
|
|
11
|
+
</view>
|
|
12
|
+
</view>
|
|
13
|
+
</view>
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// pages/g-button-group/index.js
|
|
4
|
-
const primarySecondButtonBehaviors = require("../behaviors/primarySecondButton");
|
|
5
|
-
Component({
|
|
6
|
-
options: {
|
|
7
|
-
multipleSlots: true
|
|
8
|
-
},
|
|
9
|
-
behaviors: [primarySecondButtonBehaviors],
|
|
10
|
-
properties: {
|
|
11
|
-
disabled: Boolean,
|
|
12
|
-
secondDisabled: Boolean,
|
|
13
|
-
fixed: Boolean,
|
|
14
|
-
agree: Boolean,
|
|
15
|
-
autoAgree: Boolean,
|
|
16
|
-
buttonList: Array,
|
|
17
|
-
direction: {
|
|
18
|
-
type: String,
|
|
19
|
-
value: 'horizontal'
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
data: {
|
|
23
|
-
_agreeChecked: false
|
|
24
|
-
},
|
|
25
|
-
ready() {
|
|
26
|
-
if (this.properties.autoAgree) {
|
|
27
|
-
this.setData({ _agreeChecked: this.properties.autoAgree });
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
methods: {
|
|
31
|
-
handleAgreeChange(e) {
|
|
32
|
-
this.setData({
|
|
33
|
-
_agreeChecked: e.detail.value
|
|
34
|
-
});
|
|
35
|
-
},
|
|
36
|
-
handelButtonListTap(e) {
|
|
37
|
-
if (e.currentTarget.dataset.item) {
|
|
38
|
-
this.triggerEvent('buttonListTap', {
|
|
39
|
-
item: e.currentTarget.dataset.item
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// pages/g-button-group/index.js
|
|
4
|
+
const primarySecondButtonBehaviors = require("../behaviors/primarySecondButton");
|
|
5
|
+
Component({
|
|
6
|
+
options: {
|
|
7
|
+
multipleSlots: true
|
|
8
|
+
},
|
|
9
|
+
behaviors: [primarySecondButtonBehaviors],
|
|
10
|
+
properties: {
|
|
11
|
+
disabled: Boolean,
|
|
12
|
+
secondDisabled: Boolean,
|
|
13
|
+
fixed: Boolean,
|
|
14
|
+
agree: Boolean,
|
|
15
|
+
autoAgree: Boolean,
|
|
16
|
+
buttonList: Array,
|
|
17
|
+
direction: {
|
|
18
|
+
type: String,
|
|
19
|
+
value: 'horizontal'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
data: {
|
|
23
|
+
_agreeChecked: false
|
|
24
|
+
},
|
|
25
|
+
ready() {
|
|
26
|
+
if (this.properties.autoAgree) {
|
|
27
|
+
this.setData({ _agreeChecked: this.properties.autoAgree });
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
methods: {
|
|
31
|
+
handleAgreeChange(e) {
|
|
32
|
+
this.setData({
|
|
33
|
+
_agreeChecked: e.detail.value
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
handelButtonListTap(e) {
|
|
37
|
+
if (e.currentTarget.dataset.item) {
|
|
38
|
+
this.triggerEvent('buttonListTap', {
|
|
39
|
+
item: e.currentTarget.dataset.item
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"component": true,
|
|
3
|
-
"usingComponents": {
|
|
4
|
-
"g-agree": "../g-agree/index"
|
|
5
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"component": true,
|
|
3
|
+
"usingComponents": {
|
|
4
|
+
"g-agree": "../g-agree/index"
|
|
5
|
+
}
|
|
6
6
|
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
<!-- pages/g-button-group/index.wxml -->
|
|
2
|
-
<block wx:if="{{buttonList.length === 0}}">
|
|
3
|
-
<view class="button-group {{fixed ? 'button-group--fixed' : ''}}">
|
|
4
|
-
<view class="button-group__agree" wx:if="{{agree}}">
|
|
5
|
-
<g-agree catch:change="handleAgreeChange" value="{{_agreeChecked}}">
|
|
6
|
-
<slot name="agree" />
|
|
7
|
-
</g-agree>
|
|
8
|
-
</view>
|
|
9
|
-
<view class="button-area button-area--{{direction}}">
|
|
10
|
-
<button wx:if="{{secondText}}" disabled="{{secondDisabled}}" catch:tap="handleSecondTap">{{secondText}}</button>
|
|
11
|
-
<button wx:if="{{primaryText}}" disabled="{{agree && !_agreeChecked || disabled}}" catch:tap="handlePrimaryTap" type="primary">
|
|
12
|
-
<view aria-label="{{label}}">{{primaryText}}</view>
|
|
13
|
-
</button>
|
|
14
|
-
</view>
|
|
15
|
-
</view>
|
|
16
|
-
</block>
|
|
17
|
-
<block wx:if="{{buttonList.length > 0}}">
|
|
18
|
-
<view class="button-list">
|
|
19
|
-
<view class="button-list__item"
|
|
20
|
-
id="{{index}}" hover-class="button-list__item--hover"
|
|
21
|
-
wx:for="{{buttonList}}" wx:key="{{index}}"
|
|
22
|
-
catch:tap="handelButtonListTap"
|
|
23
|
-
data-item="{{item}}"
|
|
24
|
-
>
|
|
25
|
-
<view class="button-list__text">{{item.text}}</view>
|
|
26
|
-
</view>
|
|
27
|
-
</view>
|
|
28
|
-
</block>
|
|
1
|
+
<!-- pages/g-button-group/index.wxml -->
|
|
2
|
+
<block wx:if="{{buttonList.length === 0}}">
|
|
3
|
+
<view class="button-group {{fixed ? 'button-group--fixed' : ''}}">
|
|
4
|
+
<view class="button-group__agree" wx:if="{{agree}}">
|
|
5
|
+
<g-agree catch:change="handleAgreeChange" value="{{_agreeChecked}}">
|
|
6
|
+
<slot name="agree" />
|
|
7
|
+
</g-agree>
|
|
8
|
+
</view>
|
|
9
|
+
<view class="button-area button-area--{{direction}}">
|
|
10
|
+
<button wx:if="{{secondText}}" disabled="{{secondDisabled}}" catch:tap="handleSecondTap">{{secondText}}</button>
|
|
11
|
+
<button wx:if="{{primaryText}}" disabled="{{agree && !_agreeChecked || disabled}}" catch:tap="handlePrimaryTap" type="primary">
|
|
12
|
+
<view aria-label="{{label}}">{{primaryText}}</view>
|
|
13
|
+
</button>
|
|
14
|
+
</view>
|
|
15
|
+
</view>
|
|
16
|
+
</block>
|
|
17
|
+
<block wx:if="{{buttonList.length > 0}}">
|
|
18
|
+
<view class="button-list">
|
|
19
|
+
<view class="button-list__item"
|
|
20
|
+
id="{{index}}" hover-class="button-list__item--hover"
|
|
21
|
+
wx:for="{{buttonList}}" wx:key="{{index}}"
|
|
22
|
+
catch:tap="handelButtonListTap"
|
|
23
|
+
data-item="{{item}}"
|
|
24
|
+
>
|
|
25
|
+
<view class="button-list__text">{{item.text}}</view>
|
|
26
|
+
</view>
|
|
27
|
+
</view>
|
|
28
|
+
</block>
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// pages/g-cell/index.js
|
|
4
|
-
const navigatorBehavior = require("../behaviors/navigator");
|
|
5
|
-
const iconBehavior = require("../behaviors/icon");
|
|
6
|
-
Component({
|
|
7
|
-
behaviors: [navigatorBehavior, iconBehavior],
|
|
8
|
-
externalClasses: ['component-class', 'prepend-class'],
|
|
9
|
-
options: {
|
|
10
|
-
multipleSlots: true
|
|
11
|
-
},
|
|
12
|
-
properties: {
|
|
13
|
-
label: String,
|
|
14
|
-
desc: String,
|
|
15
|
-
access: Boolean,
|
|
16
|
-
disabled: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
value: false
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
data: {},
|
|
22
|
-
methods: {
|
|
23
|
-
handleTap(e) {
|
|
24
|
-
if (!this.properties.disabled) {
|
|
25
|
-
this.navigator();
|
|
26
|
-
this.triggerEvent('tap', e.detail);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// pages/g-cell/index.js
|
|
4
|
+
const navigatorBehavior = require("../behaviors/navigator");
|
|
5
|
+
const iconBehavior = require("../behaviors/icon");
|
|
6
|
+
Component({
|
|
7
|
+
behaviors: [navigatorBehavior, iconBehavior],
|
|
8
|
+
externalClasses: ['component-class', 'prepend-class'],
|
|
9
|
+
options: {
|
|
10
|
+
multipleSlots: true
|
|
11
|
+
},
|
|
12
|
+
properties: {
|
|
13
|
+
label: String,
|
|
14
|
+
desc: String,
|
|
15
|
+
access: Boolean,
|
|
16
|
+
disabled: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
value: false
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
data: {},
|
|
22
|
+
methods: {
|
|
23
|
+
handleTap(e) {
|
|
24
|
+
if (!this.properties.disabled) {
|
|
25
|
+
this.navigator();
|
|
26
|
+
this.triggerEvent('tap', e.detail);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"component": true,
|
|
3
|
-
"usingComponents": {
|
|
4
|
-
"g-badge": "../g-badge/index",
|
|
5
|
-
"g-icon": "../g-icon/index"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"component": true,
|
|
3
|
+
"usingComponents": {
|
|
4
|
+
"g-badge": "../g-badge/index",
|
|
5
|
+
"g-icon": "../g-icon/index"
|
|
6
|
+
}
|
|
7
7
|
}
|