weapps-plugin-jingtong-verify 1.3.6 → 1.3.8
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/package.json +1 -1
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-input/index.js +21 -2
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-input/index.wxml +6 -1
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.js +24 -0
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.wxml +8 -2
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.js +1 -1
- package/weapps-plugin-jingtong-verify/pages/setting/setting.js +6 -6
package/package.json
CHANGED
|
@@ -58,6 +58,8 @@ Component({
|
|
|
58
58
|
},
|
|
59
59
|
password: Boolean,
|
|
60
60
|
clearable: Boolean,
|
|
61
|
+
showEye: Boolean,
|
|
62
|
+
isOpen: Boolean,
|
|
61
63
|
disabled: Boolean,
|
|
62
64
|
prepend: Boolean,
|
|
63
65
|
append: Boolean,
|
|
@@ -124,6 +126,7 @@ Component({
|
|
|
124
126
|
},
|
|
125
127
|
// 内部校验 input
|
|
126
128
|
validateInput() {
|
|
129
|
+
console.log('=========内部校验=======')
|
|
127
130
|
if (!this.id) {
|
|
128
131
|
throw new Error('请提供需要校验的组件 ID');
|
|
129
132
|
}
|
|
@@ -168,13 +171,15 @@ Component({
|
|
|
168
171
|
},
|
|
169
172
|
// blur
|
|
170
173
|
handleBlur(e) {
|
|
174
|
+
console.log('blur', e)
|
|
171
175
|
const { validateTrigger } = this.properties;
|
|
172
|
-
|
|
176
|
+
const { eye, open } = e.currentTarget.dataset
|
|
177
|
+
if (validateTrigger === 'blur' && ((eye && open) || !eye)) {
|
|
173
178
|
// 触发内部校验
|
|
174
179
|
setTimeout(() => {
|
|
175
180
|
this.validateInput();
|
|
176
181
|
}, 300)
|
|
177
|
-
|
|
182
|
+
}
|
|
178
183
|
this.setData({ _focus: false });
|
|
179
184
|
this.triggerEvent('blur', e.detail);
|
|
180
185
|
// 避免输入法最后一个字没点击确认
|
|
@@ -202,6 +207,20 @@ Component({
|
|
|
202
207
|
this.validateInput();
|
|
203
208
|
}
|
|
204
209
|
},
|
|
210
|
+
// 明文
|
|
211
|
+
handleTapEye(e) {
|
|
212
|
+
const { disabled } = this.properties;
|
|
213
|
+
const { _focus } = this.data;
|
|
214
|
+
if (disabled)
|
|
215
|
+
return false;
|
|
216
|
+
// this.triggerEvent('input', { value: '' });
|
|
217
|
+
// this.triggerEvent('change', { value: '' });
|
|
218
|
+
// if (!_focus) {
|
|
219
|
+
// // 触发内部校验
|
|
220
|
+
// this.validateInput();
|
|
221
|
+
// }
|
|
222
|
+
this.triggerEvent('openEye', { isOpen: e.currentTarget.dataset.open });
|
|
223
|
+
},
|
|
205
224
|
// tap info
|
|
206
225
|
handleTapIcon() {
|
|
207
226
|
const { icon } = this.properties;
|
|
@@ -21,13 +21,18 @@
|
|
|
21
21
|
adjust-position="{{adjustPosition}}"
|
|
22
22
|
bindinput="handleInput" bindfocus="handleFocus"
|
|
23
23
|
bindblur="handleBlur" bindconfirm="handleConfirm"
|
|
24
|
+
data-open="{{isOpen}}"
|
|
25
|
+
data-eye="{{showEye}}"
|
|
24
26
|
/>
|
|
25
27
|
|
|
26
|
-
|
|
27
28
|
<view class="{{icon === 'info'?'input__iconInfo__container':'input__icon__container'}}" >
|
|
28
29
|
<view class="input__icon input__icon--clear" hidden="{{!clearable || !value}}" catch:tap="handleTapClear">
|
|
29
30
|
<g-icon type="close-circle" size="36"/>
|
|
30
31
|
</view>
|
|
32
|
+
<view class="input__icon input__icon--clear" hidden="{{!showEye}}" catch:tap="handleTapEye" data-value="{{value}}" data-open="{{isOpen}}">
|
|
33
|
+
<g-icon type="eye" size="36" wx:if="{{isOpen}}" />
|
|
34
|
+
<g-icon type="eye-close" size="36" wx:else />
|
|
35
|
+
</view>
|
|
31
36
|
<view class="input__icon input__icon--{{icon}}" wx:if="{{icon}}" catch:tap="handleTapIcon">
|
|
32
37
|
<g-popover wx:if="{{icon === 'info'}}" content="{{iconDesc}}" placement="topRight">
|
|
33
38
|
<g-icon type="info-o" size="36"/>
|
|
@@ -1233,5 +1233,29 @@ Page({
|
|
|
1233
1233
|
flow.navigateTo({
|
|
1234
1234
|
url: `../face-error-reason/face-error-reason?type=${this.data.faceErrorType}`,
|
|
1235
1235
|
})
|
|
1236
|
+
},
|
|
1237
|
+
|
|
1238
|
+
openEye(e) {
|
|
1239
|
+
console.log(e)
|
|
1240
|
+
const isOpen = e.detail.isOpen
|
|
1241
|
+
const key = e.currentTarget.id
|
|
1242
|
+
const strKey = e.currentTarget.dataset.star
|
|
1243
|
+
console.log('isOpen', isOpen)
|
|
1244
|
+
console.log('key', key)
|
|
1245
|
+
console.log('strKey', strKey)
|
|
1246
|
+
if (isOpen) {
|
|
1247
|
+
console.log('显示脱敏')
|
|
1248
|
+
const { name, id_card_number } = this.data.formData
|
|
1249
|
+
const value = key === 'name' ? utils.hideName(name) : utils.hideIdCard(id_card_number, '111')
|
|
1250
|
+
console.log('value', value)
|
|
1251
|
+
this.setData({
|
|
1252
|
+
[`formData.${strKey}`]: value
|
|
1253
|
+
})
|
|
1254
|
+
} else {
|
|
1255
|
+
console.log('删除脱敏,显示明文')
|
|
1256
|
+
this.setData({
|
|
1257
|
+
[`formData.${strKey}`]: ''
|
|
1258
|
+
})
|
|
1259
|
+
}
|
|
1236
1260
|
}
|
|
1237
1261
|
})
|
|
@@ -86,10 +86,13 @@
|
|
|
86
86
|
label="姓名"
|
|
87
87
|
placeholder="请输入本人姓名"
|
|
88
88
|
value="{{ formData.strName || formData.name }}"
|
|
89
|
-
clearable="
|
|
89
|
+
clearable="{{ false }}"
|
|
90
|
+
showEye="{{ true }}"
|
|
91
|
+
isOpen="{{ !formData.strName }}"
|
|
90
92
|
bind:change="handleChange"
|
|
91
93
|
showQuestion="{{ true }}"
|
|
92
94
|
bind:showQuestionTip="showQuestionTip"
|
|
95
|
+
bind:openEye="openEye"
|
|
93
96
|
/>
|
|
94
97
|
</view>
|
|
95
98
|
|
|
@@ -100,10 +103,13 @@
|
|
|
100
103
|
label="证件号码"
|
|
101
104
|
placeholder="请输入本人证件号码"
|
|
102
105
|
value="{{ formData.strCid || formData.id_card_number }}"
|
|
103
|
-
clearable="
|
|
106
|
+
clearable="{{ false }}"
|
|
107
|
+
showEye="{{ true }}"
|
|
108
|
+
isOpen="{{ !formData.strCid }}"
|
|
104
109
|
bind:change="handleChange"
|
|
105
110
|
showQuestion="{{ true }}"
|
|
106
111
|
bind:showQuestionTip="showQuestionTip"
|
|
112
|
+
bind:openEye="openEye"
|
|
107
113
|
/>
|
|
108
114
|
</view>
|
|
109
115
|
</view>
|
|
@@ -63,9 +63,9 @@ Page({
|
|
|
63
63
|
console.log('文件地址', `https://js.jt.beijing.gov.cn/jt/tiffile/${file}.pdf`)
|
|
64
64
|
|
|
65
65
|
const trackMap = {
|
|
66
|
-
'1': '
|
|
67
|
-
'2': '
|
|
68
|
-
'3': '
|
|
66
|
+
'1': '110000000000511111993403800000', // 帮助指引
|
|
67
|
+
'2': '110000000000511111993403900000', // 隐私政策
|
|
68
|
+
'3': '110000000000511111993404000000' // 用户服务协议
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
// 上报事件
|
|
@@ -110,7 +110,7 @@ Page({
|
|
|
110
110
|
// 上报事件
|
|
111
111
|
SDKTrack('function_btn_click', {
|
|
112
112
|
item_type: '8', // 业务分类
|
|
113
|
-
item_code: '
|
|
113
|
+
item_code: '110000000000511111993405000000', // 事项ID
|
|
114
114
|
item_access: '', // 业务入口
|
|
115
115
|
})
|
|
116
116
|
|
|
@@ -162,7 +162,7 @@ Page({
|
|
|
162
162
|
// 上报事件
|
|
163
163
|
SDKTrack('function_btn_click', {
|
|
164
164
|
item_type: '8', // 业务分类
|
|
165
|
-
item_code: '
|
|
165
|
+
item_code: '110000000000511111993403700000', // 事项ID
|
|
166
166
|
item_access: '', // 业务入口
|
|
167
167
|
})
|
|
168
168
|
|
|
@@ -264,7 +264,7 @@ Page({
|
|
|
264
264
|
// 上报事件
|
|
265
265
|
SDKTrack('function_btn_click', {
|
|
266
266
|
item_type: '8', // 业务分类
|
|
267
|
-
item_code: '
|
|
267
|
+
item_code: '110000000000511111993404800000', // 事项ID
|
|
268
268
|
item_access: '', // 业务入口
|
|
269
269
|
})
|
|
270
270
|
|