weapps-plugin-jingtong-verify 1.8.0 → 1.9.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/drainage-modal/drainage-modal.js +28 -0
- package/weapps-plugin-jingtong-verify/components/drainage-modal/drainage-modal.json +4 -0
- package/weapps-plugin-jingtong-verify/components/drainage-modal/drainage-modal.wxml +6 -0
- package/weapps-plugin-jingtong-verify/components/drainage-modal/drainage-modal.wxss +36 -0
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.js +9 -1
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.json +2 -1
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.wxml +3 -0
- package/weapps-plugin-jingtong-verify/utils/validate.js +3 -2
package/README.md
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# SDK #
|
|
2
|
-
1.
|
|
2
|
+
1.9.0
|
package/package.json
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
Component({
|
|
3
|
+
/**
|
|
4
|
+
* 组件的属性列表
|
|
5
|
+
*/
|
|
6
|
+
properties: {
|
|
7
|
+
visible: {
|
|
8
|
+
type: Boolean,
|
|
9
|
+
value: false
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 组件的初始数据
|
|
15
|
+
*/
|
|
16
|
+
data: {
|
|
17
|
+
content: ''
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 组件的方法列表
|
|
22
|
+
*/
|
|
23
|
+
methods: {
|
|
24
|
+
handleOk() {
|
|
25
|
+
this.triggerEvent('ok')
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
})
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<view wx:if="{{ visible }}" class="modal-view">
|
|
2
|
+
<view class="modal-box">
|
|
3
|
+
<image class="bg-image" src="https://js.jt.beijing.gov.cn/jt/APP/APP-shangxian.png"></image>
|
|
4
|
+
<image class="btn-image" src="https://js.jt.beijing.gov.cn/jt/APP/APP-zhidao.png" bind:tap="handleOk"></image>
|
|
5
|
+
</view>
|
|
6
|
+
</view>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* weapps-plugin-jingtong-verify/components/my-modal/my-modal.wxss */
|
|
2
|
+
.modal-view {
|
|
3
|
+
position: fixed;
|
|
4
|
+
top: 0;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
right: 0;
|
|
8
|
+
background: rgba(39, 40, 46, 0.6);
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
z-index: 9999;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.modal-box {
|
|
16
|
+
position: relative;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
width: 660rpx;
|
|
19
|
+
height: auto;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.modal-box .bg-image {
|
|
23
|
+
display: block;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 816rpx;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.modal-box .btn-image {
|
|
29
|
+
display: block;
|
|
30
|
+
position: absolute;
|
|
31
|
+
width: 500rpx;
|
|
32
|
+
height: 98rpx;
|
|
33
|
+
bottom: 50rpx;
|
|
34
|
+
left: 80rpx;
|
|
35
|
+
z-index: 2;
|
|
36
|
+
}
|
|
@@ -189,7 +189,15 @@ Page({
|
|
|
189
189
|
// 是否显示自定义校验提示
|
|
190
190
|
showCustomTips: false,
|
|
191
191
|
// 自定义校验提示文本
|
|
192
|
-
customTipsMsg: ''
|
|
192
|
+
customTipsMsg: '',
|
|
193
|
+
// 显示引流modal
|
|
194
|
+
showDrainageModal: true
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
handleDrainageModalOk() {
|
|
198
|
+
this.setData({
|
|
199
|
+
showDrainageModal: false
|
|
200
|
+
})
|
|
193
201
|
},
|
|
194
202
|
|
|
195
203
|
/**
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"tip-modal": "../../components/tip-modal/tip-modal",
|
|
13
13
|
"face-error-modal": "../../components/face-error-modal/face-error-modal",
|
|
14
14
|
"g-switch": "../../components/gsd-ui/g-switch/index",
|
|
15
|
-
"g-tips": "../../components/gsd-ui/g-tips/index"
|
|
15
|
+
"g-tips": "../../components/gsd-ui/g-tips/index",
|
|
16
|
+
"drainage-modal": "../../components/drainage-modal/drainage-modal"
|
|
16
17
|
},
|
|
17
18
|
"navigationBarTitleText": "身份验证"
|
|
18
19
|
}
|
|
@@ -118,12 +118,13 @@ function checkName(userName, cid_type = '111') {
|
|
|
118
118
|
}
|
|
119
119
|
var onlyChineseReg = /^[\u2E80-\uFE4F]+$/; // 中文
|
|
120
120
|
var chineseReg = /^[\u2E80-\uFE4F_a-zA-Z_\·•]+$/; // 大陆居民:中文无特殊符号
|
|
121
|
-
var emojiReg = /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi;
|
|
121
|
+
// var emojiReg = /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi;
|
|
122
|
+
var emojiReg = /^(?!.*🎏)(?:[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030)/gi;
|
|
122
123
|
// var englishReg = /^[A-Za-z]+$/ // 全英文
|
|
123
124
|
// var chOrEnReg = /^([a-zA-Z\u4E00-\u9FA5]*?)$/ // 英文大小写及中文
|
|
124
125
|
var waiGuoReg = /^[A-Za-z]+(\s|\.|\, )?[A-Za-z]*/ // 全英文大写,中间可能有空格,圆点,逗号
|
|
125
126
|
var patternSep = /[#\$%\^&\*【】‘;:”“'。,、.,?<>+=:]+/g; // 特殊字符判断
|
|
126
|
-
|
|
127
|
+
console.log('正则校验:', userName)
|
|
127
128
|
if (cid_type === '111') {
|
|
128
129
|
// 大陆
|
|
129
130
|
if (userName.length > 30 || userName.length < 1) {
|