weapps-plugin-jingtong-verify 1.6.4 → 1.7.0
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 -1
- package/package.json +1 -1
- package/weapps-plugin-jingtong-verify/components/face-modal/face-modal.js +4 -0
- package/weapps-plugin-jingtong-verify/components/face-modal/face-modal.wxml +7 -6
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.wxml +1 -1
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.js +51 -23
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.wxml +1 -1
package/README.md
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# SDK #
|
|
2
|
-
1.
|
|
2
|
+
1.7.0
|
package/package.json
CHANGED
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
<view class="title">温馨提示</view>
|
|
5
5
|
<view class="mb50">
|
|
6
6
|
<view>为确保人脸识别结果准确,请注意:</view>
|
|
7
|
-
<view>1.请<text class="desc-red">正面对准摄像头</text
|
|
8
|
-
<view>2
|
|
9
|
-
<view>3
|
|
10
|
-
<view>4
|
|
7
|
+
<view>1.请<text class="desc-red">正面对准摄像头</text>进行人脸识别,<text class="desc-red">勿佩戴遮挡脸部物品</text>包括口罩、墨镜、帽子等。</view>
|
|
8
|
+
<view>2.请确保使用有效的身份证件信息进行人脸识别,如未办理身份证将无法完成人脸识别。</view>
|
|
9
|
+
<view>3.确保摄像头清洁、无遮挡且<text class="desc-red">环境光线充足。</text></view>
|
|
10
|
+
<view>4.如您因年龄、手术、蓄须等原因导致人脸变化较大,可使用带NFC功能的手机下载国家网络身份认证APP,申领网络身份认证凭证后再尝试登录。</view>
|
|
11
|
+
<view>5.请确保您的微信APP更新为最新版本。</view>
|
|
11
12
|
</view>
|
|
12
|
-
<view class="mb50"><text class="desc-red">您已连续认证失败{{
|
|
13
|
-
<view class="desc-red">注:如您连续认证失败{{ isKidsOrOld ? '18' : '6' }}
|
|
13
|
+
<view class="mb50"><text class="desc-red">您已连续认证失败{{ times }}次</text>,请您检查人脸识别时是否有上述情况,若确认无误可再次尝试进行人脸识别。</view>
|
|
14
|
+
<view class="desc-red">注:如您连续认证失败{{ isKidsOrOld ? '18' : '6' }}次,将临时锁定您的认证权限,请您切换至京通小程序支付宝端进行尝试,或您可以明天再进行尝试。</view>
|
|
14
15
|
</view>
|
|
15
16
|
<view class="btn-view" catch:tap="handleOk">我知道了</view>
|
|
16
17
|
</view>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<view class="modal-box">
|
|
3
3
|
<view class="content">
|
|
4
4
|
<view class="title">温馨提示</view>
|
|
5
|
-
<view><text class="desc-red">您已连续认证失败
|
|
5
|
+
<view><text class="desc-red">您已连续认证失败6次</text>,将临时锁定您的权限,您可以切换至京通小程序支付宝端进行尝试,或您可以明天再进行尝试</view>
|
|
6
6
|
</view>
|
|
7
7
|
<view class="btn-view" catch:tap="handleOk">我知道了</view>
|
|
8
8
|
</view>
|
|
@@ -145,6 +145,7 @@ Page({
|
|
|
145
145
|
cidExpireMinDate: [new Date().getFullYear(), (new Date().getMonth() + 1), new Date().getDate()],
|
|
146
146
|
// 老/小6次、成人3次 人脸报错提示弹窗
|
|
147
147
|
showFaceModal: false,
|
|
148
|
+
showFaceModalTimes: 0,
|
|
148
149
|
isKidsOrOld: false,
|
|
149
150
|
// 老/小18次、成人6次 人脸报错提示弹窗
|
|
150
151
|
showLockFaceModal: false,
|
|
@@ -330,47 +331,74 @@ Page({
|
|
|
330
331
|
jingtongVerifyRequest.operateFaceFailCount({
|
|
331
332
|
count,
|
|
332
333
|
cid,
|
|
333
|
-
age
|
|
334
|
+
age: 20 // 不再区分用户年龄(如老人、小孩),所以传20
|
|
334
335
|
}).then(res => {
|
|
335
336
|
console.log('获取人脸失败次数res', res)
|
|
336
337
|
const times = Number(res.times) || 0
|
|
337
338
|
|
|
338
339
|
// 老人/小孩:累计刷脸失败6次后,弹长窗提示
|
|
339
|
-
if (count && isKidsOrOld && times === 6) {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
}
|
|
340
|
+
// if (count && isKidsOrOld && times === 6) {
|
|
341
|
+
// console.log('==============老人/小孩 -- 累计刷脸失败6次:弹长窗===============')
|
|
342
|
+
// this.setData({
|
|
343
|
+
// showFaceModal: true
|
|
344
|
+
// })
|
|
345
|
+
// }
|
|
345
346
|
|
|
346
347
|
// 成人:累计刷脸失败3次后,弹长窗提示
|
|
347
|
-
if (count && !isKidsOrOld && times === 3) {
|
|
348
|
-
|
|
348
|
+
// if (count && !isKidsOrOld && times === 3) {
|
|
349
|
+
// console.log('==============成人 -- 累计刷脸失败3次:弹长窗===============')
|
|
350
|
+
// this.setData({
|
|
351
|
+
// showFaceModal: true,
|
|
352
|
+
// })
|
|
353
|
+
// }
|
|
354
|
+
|
|
355
|
+
// 老/小18次锁定人脸
|
|
356
|
+
// if (isKidsOrOld && times >= 18) {
|
|
357
|
+
// console.log('==============老人/小孩 -- 累计刷脸失败18次:弹短窗===============')
|
|
358
|
+
// wx.hideLoading()
|
|
359
|
+
// this.setData({
|
|
360
|
+
// showLockFaceModal: true
|
|
361
|
+
// })
|
|
362
|
+
// // 人脸识别异常温馨提示弹窗
|
|
363
|
+
// count && this.handleFaceError(errCode)
|
|
364
|
+
// return
|
|
365
|
+
// }
|
|
366
|
+
|
|
367
|
+
// 成人6次 锁定人脸
|
|
368
|
+
// if (!isKidsOrOld && times >= 6) {
|
|
369
|
+
// console.log('==============成人 -- 累计刷脸失败6次:弹短窗===============')
|
|
370
|
+
// wx.hideLoading()
|
|
371
|
+
// this.setData({
|
|
372
|
+
// showLockFaceModal: true
|
|
373
|
+
// })
|
|
374
|
+
// // 人脸识别异常温馨提示弹窗
|
|
375
|
+
// count && this.handleFaceError(errCode)
|
|
376
|
+
// return
|
|
377
|
+
// }
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
if (3 <= times && time <= 5) {
|
|
381
|
+
console.log('==============累计刷脸失败超过3次,小于6次===============')
|
|
349
382
|
this.setData({
|
|
350
|
-
showFaceModal: true
|
|
383
|
+
showFaceModal: true,
|
|
384
|
+
showFaceModalTimes: time
|
|
351
385
|
})
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
// 老/小18次、成人6次 锁定人脸
|
|
355
|
-
if (isKidsOrOld && times >= 18) {
|
|
356
|
-
console.log('==============老人/小孩 -- 累计刷脸失败18次:弹短窗===============')
|
|
386
|
+
} else if (times >= 6) {
|
|
387
|
+
console.log('==============累计刷脸失败达到6次===============')
|
|
357
388
|
wx.hideLoading()
|
|
358
389
|
this.setData({
|
|
359
|
-
showLockFaceModal: true
|
|
390
|
+
showLockFaceModal: true,
|
|
391
|
+
showFaceModalTimes: time
|
|
360
392
|
})
|
|
361
393
|
// 人脸识别异常温馨提示弹窗
|
|
362
394
|
count && this.handleFaceError(errCode)
|
|
363
395
|
return
|
|
364
|
-
} else
|
|
365
|
-
console.log('==============成人 -- 累计刷脸失败6次:弹短窗===============')
|
|
366
|
-
wx.hideLoading()
|
|
396
|
+
} else {
|
|
367
397
|
this.setData({
|
|
368
|
-
|
|
398
|
+
showFaceModalTimes: time
|
|
369
399
|
})
|
|
370
|
-
// 人脸识别异常温馨提示弹窗
|
|
371
|
-
count && this.handleFaceError(errCode)
|
|
372
|
-
return
|
|
373
400
|
}
|
|
401
|
+
|
|
374
402
|
resolve()
|
|
375
403
|
}).catch(err => {
|
|
376
404
|
console.log(err, '获取人脸失败次数err')
|
|
@@ -479,7 +479,7 @@
|
|
|
479
479
|
<jt-modal visible="{{ showModal }}" status="{{ modalStatus }}" bind:ok="handleModalOk"></jt-modal>
|
|
480
480
|
|
|
481
481
|
<!-- 老/小6次、成人3次 人脸报错提示弹窗 -->
|
|
482
|
-
<face-modal visible="{{ showFaceModal }}" isKidsOrOld="{{ isKidsOrOld }}" bind:ok="handleModalOk"></face-modal>
|
|
482
|
+
<face-modal visible="{{ showFaceModal }}" isKidsOrOld="{{ isKidsOrOld }}" times="{{ showFaceModalTimes }}" bind:ok="handleModalOk"></face-modal>
|
|
483
483
|
|
|
484
484
|
<!-- 老/小18次、成人6次 人脸报错提示弹窗 -->
|
|
485
485
|
<lock-face-modal visible="{{ showLockFaceModal }}" isKidsOrOld="{{ isKidsOrOld }}" bind:ok="handleModalOk"></lock-face-modal>
|