weapps-plugin-jingtong-verify 1.6.1 → 1.6.2-beta
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 +309 -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 +864 -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/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,34 +1,34 @@
|
|
|
1
|
-
/* weapps-plugin-jingtong-verify/pages/logoff-success/logoff-success.wxss */
|
|
2
|
-
.center-box {
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
}
|
|
7
|
-
.img {
|
|
8
|
-
width: 326rpx;
|
|
9
|
-
height: 310rpx;
|
|
10
|
-
margin-top: 180rpx;
|
|
11
|
-
}
|
|
12
|
-
.title {
|
|
13
|
-
color: #27282E;
|
|
14
|
-
font-size: 40rpx;
|
|
15
|
-
font-weight: 700;
|
|
16
|
-
margin-top: 86rpx;
|
|
17
|
-
}
|
|
18
|
-
.tips {
|
|
19
|
-
color: #62667A;
|
|
20
|
-
font-size: 32rpx;
|
|
21
|
-
font-weight: 400;
|
|
22
|
-
padding: 0 102rpx 0 104rpx;
|
|
23
|
-
text-align: center;
|
|
24
|
-
margin-top: 26rpx;
|
|
25
|
-
}
|
|
26
|
-
.bottom-btn {
|
|
27
|
-
margin-top: 240rpx;
|
|
28
|
-
margin-bottom: 40rpx;
|
|
29
|
-
background-color: #ce0022;
|
|
30
|
-
color: #fff;
|
|
31
|
-
font-size: 36rpx;
|
|
32
|
-
width: 478rpx !important;
|
|
33
|
-
line-height: 66rpx !important;
|
|
1
|
+
/* weapps-plugin-jingtong-verify/pages/logoff-success/logoff-success.wxss */
|
|
2
|
+
.center-box {
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
}
|
|
7
|
+
.img {
|
|
8
|
+
width: 326rpx;
|
|
9
|
+
height: 310rpx;
|
|
10
|
+
margin-top: 180rpx;
|
|
11
|
+
}
|
|
12
|
+
.title {
|
|
13
|
+
color: #27282E;
|
|
14
|
+
font-size: 40rpx;
|
|
15
|
+
font-weight: 700;
|
|
16
|
+
margin-top: 86rpx;
|
|
17
|
+
}
|
|
18
|
+
.tips {
|
|
19
|
+
color: #62667A;
|
|
20
|
+
font-size: 32rpx;
|
|
21
|
+
font-weight: 400;
|
|
22
|
+
padding: 0 102rpx 0 104rpx;
|
|
23
|
+
text-align: center;
|
|
24
|
+
margin-top: 26rpx;
|
|
25
|
+
}
|
|
26
|
+
.bottom-btn {
|
|
27
|
+
margin-top: 240rpx;
|
|
28
|
+
margin-bottom: 40rpx;
|
|
29
|
+
background-color: #ce0022;
|
|
30
|
+
color: #fff;
|
|
31
|
+
font-size: 36rpx;
|
|
32
|
+
width: 478rpx !important;
|
|
33
|
+
line-height: 66rpx !important;
|
|
34
34
|
}
|
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
// pages/authenticate/countrySerchList/countrySerchList.js
|
|
2
|
-
const { nation, fullNation } = require("../../utils/country")
|
|
3
|
-
const nationFull = fullNation()
|
|
4
|
-
|
|
5
|
-
Page({
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* 页面的初始数据
|
|
9
|
-
*/
|
|
10
|
-
data: {
|
|
11
|
-
searchValue: '',
|
|
12
|
-
nationsList: [],
|
|
13
|
-
cid_type: '',
|
|
14
|
-
language: ''
|
|
15
|
-
},
|
|
16
|
-
/**
|
|
17
|
-
* 使用match方法实现模糊查询
|
|
18
|
-
* @param {Array} list 进行查询的数组
|
|
19
|
-
* @param {String} keyWord 查询的关键词
|
|
20
|
-
* @return {Array} 查询的结果
|
|
21
|
-
*/
|
|
22
|
-
fuzzyQuery(list, keyWord) {
|
|
23
|
-
// let arr = [];
|
|
24
|
-
// for (let i = 0; i < list.length; i++) {
|
|
25
|
-
// if (list[i].name.match(keyWord) != null) {
|
|
26
|
-
// arr.push(list[i]);
|
|
27
|
-
// }
|
|
28
|
-
// }
|
|
29
|
-
// return arr;
|
|
30
|
-
const arr = [];
|
|
31
|
-
// 先将关键词转为小写(避免keyWord本身有大小写)
|
|
32
|
-
const lowerKeyWord = keyWord.toLowerCase();
|
|
33
|
-
for (let i = 0; i < list.length; i++) {
|
|
34
|
-
// 将name也转为小写,再用includes匹配(简单场景)
|
|
35
|
-
if (list[i].name.toLowerCase().includes(lowerKeyWord)) {
|
|
36
|
-
arr.push(list[i]);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return arr;
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
whoNation() {
|
|
43
|
-
if (this.data.cid_type === '516') {
|
|
44
|
-
// 港澳居民来往内地通行证:加入中国
|
|
45
|
-
console.log('加入中国', nationFull.length)
|
|
46
|
-
return nationFull
|
|
47
|
-
} else {
|
|
48
|
-
console.log('国籍', nation.length)
|
|
49
|
-
return nation
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
handleChange(e) {
|
|
54
|
-
let { value } = e.detail
|
|
55
|
-
let nationsList = this.fuzzyQuery(this.whoNation(), value)
|
|
56
|
-
this.setData({
|
|
57
|
-
nationsList
|
|
58
|
-
})
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
handleChoose(e) {
|
|
62
|
-
const { value, name } = e.detail
|
|
63
|
-
const { cid_type } = this.data
|
|
64
|
-
let formDataTemp = wx.getStorageSync('tif.formDataTemp')
|
|
65
|
-
formDataTemp[cid_type].nation = value
|
|
66
|
-
formDataTemp[cid_type].nation_name = name
|
|
67
|
-
wx.setStorageSync('tif.formDataTemp', formDataTemp)
|
|
68
|
-
var pages = getCurrentPages(); // 当前页面
|
|
69
|
-
var prevPage = pages[pages.length - 2]; // 上一页面
|
|
70
|
-
prevPage.setData({
|
|
71
|
-
// 直接给上一个页面赋值
|
|
72
|
-
hadChoseNation: true
|
|
73
|
-
});
|
|
74
|
-
wx.navigateBack({
|
|
75
|
-
delta: 1
|
|
76
|
-
})
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* 生命周期函数--监听页面加载
|
|
81
|
-
*/
|
|
82
|
-
onLoad: function (options) {
|
|
83
|
-
const { cid_type } = options
|
|
84
|
-
this.setData({
|
|
85
|
-
cid_type
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
wx.hideShareMenu()
|
|
89
|
-
const language = wx.getStorageSync('tif.currentLanguage') || 'zh_CN'
|
|
90
|
-
this.setData({
|
|
91
|
-
nationsList: this.whoNation(),
|
|
92
|
-
language
|
|
93
|
-
})
|
|
94
|
-
this.initDomText(language)
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
// 根据语言环境,初始化文案
|
|
98
|
-
initDomText(language) {
|
|
99
|
-
const navigationBarTitleText = {
|
|
100
|
-
zh_CN: '国籍',
|
|
101
|
-
en: 'Nationality'
|
|
102
|
-
}
|
|
103
|
-
let title = this.data.cid_type === '700' ? navigationBarTitleText['en'] : navigationBarTitleText[language]
|
|
104
|
-
wx.setNavigationBarTitle({
|
|
105
|
-
title
|
|
106
|
-
})
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* 生命周期函数--监听页面初次渲染完成
|
|
111
|
-
*/
|
|
112
|
-
onReady: function () {
|
|
113
|
-
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* 生命周期函数--监听页面显示
|
|
118
|
-
*/
|
|
119
|
-
onShow: function () {
|
|
120
|
-
}
|
|
1
|
+
// pages/authenticate/countrySerchList/countrySerchList.js
|
|
2
|
+
const { nation, fullNation } = require("../../utils/country")
|
|
3
|
+
const nationFull = fullNation()
|
|
4
|
+
|
|
5
|
+
Page({
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 页面的初始数据
|
|
9
|
+
*/
|
|
10
|
+
data: {
|
|
11
|
+
searchValue: '',
|
|
12
|
+
nationsList: [],
|
|
13
|
+
cid_type: '',
|
|
14
|
+
language: ''
|
|
15
|
+
},
|
|
16
|
+
/**
|
|
17
|
+
* 使用match方法实现模糊查询
|
|
18
|
+
* @param {Array} list 进行查询的数组
|
|
19
|
+
* @param {String} keyWord 查询的关键词
|
|
20
|
+
* @return {Array} 查询的结果
|
|
21
|
+
*/
|
|
22
|
+
fuzzyQuery(list, keyWord) {
|
|
23
|
+
// let arr = [];
|
|
24
|
+
// for (let i = 0; i < list.length; i++) {
|
|
25
|
+
// if (list[i].name.match(keyWord) != null) {
|
|
26
|
+
// arr.push(list[i]);
|
|
27
|
+
// }
|
|
28
|
+
// }
|
|
29
|
+
// return arr;
|
|
30
|
+
const arr = [];
|
|
31
|
+
// 先将关键词转为小写(避免keyWord本身有大小写)
|
|
32
|
+
const lowerKeyWord = keyWord.toLowerCase();
|
|
33
|
+
for (let i = 0; i < list.length; i++) {
|
|
34
|
+
// 将name也转为小写,再用includes匹配(简单场景)
|
|
35
|
+
if (list[i].name.toLowerCase().includes(lowerKeyWord)) {
|
|
36
|
+
arr.push(list[i]);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return arr;
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
whoNation() {
|
|
43
|
+
if (this.data.cid_type === '516') {
|
|
44
|
+
// 港澳居民来往内地通行证:加入中国
|
|
45
|
+
console.log('加入中国', nationFull.length)
|
|
46
|
+
return nationFull
|
|
47
|
+
} else {
|
|
48
|
+
console.log('国籍', nation.length)
|
|
49
|
+
return nation
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
handleChange(e) {
|
|
54
|
+
let { value } = e.detail
|
|
55
|
+
let nationsList = this.fuzzyQuery(this.whoNation(), value)
|
|
56
|
+
this.setData({
|
|
57
|
+
nationsList
|
|
58
|
+
})
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
handleChoose(e) {
|
|
62
|
+
const { value, name } = e.detail
|
|
63
|
+
const { cid_type } = this.data
|
|
64
|
+
let formDataTemp = wx.getStorageSync('tif.formDataTemp')
|
|
65
|
+
formDataTemp[cid_type].nation = value
|
|
66
|
+
formDataTemp[cid_type].nation_name = name
|
|
67
|
+
wx.setStorageSync('tif.formDataTemp', formDataTemp)
|
|
68
|
+
var pages = getCurrentPages(); // 当前页面
|
|
69
|
+
var prevPage = pages[pages.length - 2]; // 上一页面
|
|
70
|
+
prevPage.setData({
|
|
71
|
+
// 直接给上一个页面赋值
|
|
72
|
+
hadChoseNation: true
|
|
73
|
+
});
|
|
74
|
+
wx.navigateBack({
|
|
75
|
+
delta: 1
|
|
76
|
+
})
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* 生命周期函数--监听页面加载
|
|
81
|
+
*/
|
|
82
|
+
onLoad: function (options) {
|
|
83
|
+
const { cid_type } = options
|
|
84
|
+
this.setData({
|
|
85
|
+
cid_type
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
wx.hideShareMenu()
|
|
89
|
+
const language = wx.getStorageSync('tif.currentLanguage') || 'zh_CN'
|
|
90
|
+
this.setData({
|
|
91
|
+
nationsList: this.whoNation(),
|
|
92
|
+
language
|
|
93
|
+
})
|
|
94
|
+
this.initDomText(language)
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
// 根据语言环境,初始化文案
|
|
98
|
+
initDomText(language) {
|
|
99
|
+
const navigationBarTitleText = {
|
|
100
|
+
zh_CN: '国籍',
|
|
101
|
+
en: 'Nationality'
|
|
102
|
+
}
|
|
103
|
+
let title = this.data.cid_type === '700' ? navigationBarTitleText['en'] : navigationBarTitleText[language]
|
|
104
|
+
wx.setNavigationBarTitle({
|
|
105
|
+
title
|
|
106
|
+
})
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* 生命周期函数--监听页面初次渲染完成
|
|
111
|
+
*/
|
|
112
|
+
onReady: function () {
|
|
113
|
+
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* 生命周期函数--监听页面显示
|
|
118
|
+
*/
|
|
119
|
+
onShow: function () {
|
|
120
|
+
}
|
|
121
121
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"navigationBarTitleText": "国籍",
|
|
3
|
-
"usingComponents": {
|
|
4
|
-
"g-search": "../../components/gsd-ui/g-search/index",
|
|
5
|
-
"g-index-list": "../../components/gsd-ui/g-index-list/index"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"navigationBarTitleText": "国籍",
|
|
3
|
+
"usingComponents": {
|
|
4
|
+
"g-search": "../../components/gsd-ui/g-search/index",
|
|
5
|
+
"g-index-list": "../../components/gsd-ui/g-index-list/index"
|
|
6
|
+
}
|
|
7
7
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<!--weapps-plugin-citycode/pages/nation-list/nation-list.wxml-->
|
|
2
|
-
<g-index-list
|
|
3
|
-
list="{{ nationsList }}"
|
|
4
|
-
bind:choose="handleChoose"
|
|
5
|
-
>
|
|
6
|
-
<view slot="header">
|
|
7
|
-
<g-search value="{{searchValue}}" placeholder="{{ cid_type === '700' ? '' : '请输入国籍' }}" bind:change="handleChange"/>
|
|
8
|
-
</view>
|
|
9
|
-
</g-index-list>
|
|
1
|
+
<!--weapps-plugin-citycode/pages/nation-list/nation-list.wxml-->
|
|
2
|
+
<g-index-list
|
|
3
|
+
list="{{ nationsList }}"
|
|
4
|
+
bind:choose="handleChoose"
|
|
5
|
+
>
|
|
6
|
+
<view slot="header">
|
|
7
|
+
<g-search value="{{searchValue}}" placeholder="{{ cid_type === '700' ? '' : '请输入国籍' }}" bind:change="handleChange"/>
|
|
8
|
+
</view>
|
|
9
|
+
</g-index-list>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* weapps-plugin-citycode/pages/nation-list/nation-list.wxss */
|
|
1
|
+
/* weapps-plugin-citycode/pages/nation-list/nation-list.wxss */
|
|
2
2
|
@import '../../components/gsd-ui/static/style/main';
|