正在显示
6 个修改的文件
包含
61 行增加
和
34 行删除
@@ -143,8 +143,8 @@ App({ | @@ -143,8 +143,8 @@ App({ | ||
143 | // baseUrl: "http://192.144.144.220:20000/", | 143 | // baseUrl: "http://192.144.144.220:20000/", |
144 | // baseUrl: "http://154.8.229.55:20000/", | 144 | // baseUrl: "http://154.8.229.55:20000/", |
145 | // baseUrl: "http://47.110.250.177:20000/", | 145 | // baseUrl: "http://47.110.250.177:20000/", |
146 | - // baseUrl: "http://47.110.158.110:20000/", | ||
147 | - baseUrl: "https://api.workai.com.cn/", | 146 | + baseUrl: "http://47.110.158.110:20000/", |
147 | + // baseUrl: "https://api.workai.com.cn/", | ||
148 | OSSUrl: "", //"https://oss.workai.com.cn/", | 148 | OSSUrl: "", //"https://oss.workai.com.cn/", |
149 | userInfo: null, | 149 | userInfo: null, |
150 | hostInfo: null, | 150 | hostInfo: null, |
@@ -53,19 +53,19 @@ Page({ | @@ -53,19 +53,19 @@ Page({ | ||
53 | duration: 1000 | 53 | duration: 1000 |
54 | }) | 54 | }) |
55 | } else { | 55 | } else { |
56 | - that.setData({ | ||
57 | - has_verify: false | ||
58 | - }) | ||
59 | - // if (!res.data.need_verify) { //不需要再实名认证 | ||
60 | - // that.setData({ | ||
61 | - // has_verify: true | ||
62 | - // }) | ||
63 | - // that.taxconfirm(); | ||
64 | - // } else { | ||
65 | - // that.setData({ | ||
66 | - // has_verify: false | ||
67 | - // }) | ||
68 | - // } | 56 | + // that.setData({ |
57 | + // has_verify: false | ||
58 | + // }) | ||
59 | + if (!res.data.need_verify) { //不需要再实名认证 | ||
60 | + that.setData({ | ||
61 | + has_verify: true | ||
62 | + }) | ||
63 | + that.taxconfirm(); | ||
64 | + } else { | ||
65 | + that.setData({ | ||
66 | + has_verify: false | ||
67 | + }) | ||
68 | + } | ||
69 | } | 69 | } |
70 | } | 70 | } |
71 | }) | 71 | }) |
@@ -7,6 +7,9 @@ Page({ | @@ -7,6 +7,9 @@ Page({ | ||
7 | * Page initial data | 7 | * Page initial data |
8 | */ | 8 | */ |
9 | data: { | 9 | data: { |
10 | + input_name: "", | ||
11 | + input_card_number: "", | ||
12 | + | ||
10 | facepath: '', | 13 | facepath: '', |
11 | already_getdata: false, | 14 | already_getdata: false, |
12 | front_card_info: {}, | 15 | front_card_info: {}, |
@@ -16,6 +19,11 @@ Page({ | @@ -16,6 +19,11 @@ Page({ | ||
16 | }, | 19 | }, |
17 | 20 | ||
18 | onLoad: function (options) { | 21 | onLoad: function (options) { |
22 | + console.log("options",options) | ||
23 | + this.setData({ | ||
24 | + input_name:options.input_name, | ||
25 | + input_card_number: options.input_card_number, | ||
26 | + }) | ||
19 | this.initOSS() | 27 | this.initOSS() |
20 | }, | 28 | }, |
21 | 29 | ||
@@ -210,6 +218,15 @@ Page({ | @@ -210,6 +218,15 @@ Page({ | ||
210 | 218 | ||
211 | gonext: function () { | 219 | gonext: function () { |
212 | if (this.data.already_getdata) { | 220 | if (this.data.already_getdata) { |
221 | + var id_Info = this.data.idInfo; | ||
222 | + if(this.data.input_name!=id_Info.name){ | ||
223 | + this.showtoast("您输入的姓名与身份证照片不一致,请重试"); | ||
224 | + return; | ||
225 | + } | ||
226 | + if (this.data.input_card_number != id_Info.id_card_number) { | ||
227 | + this.showtoast("您输入的证照号码与身份证照片不一致,请重试"); | ||
228 | + return; | ||
229 | + } | ||
213 | //提交数据 | 230 | //提交数据 |
214 | wx.request({ | 231 | wx.request({ |
215 | url: baseUrl + 'uaa/v1/users/auth', | 232 | url: baseUrl + 'uaa/v1/users/auth', |
@@ -241,6 +258,16 @@ Page({ | @@ -241,6 +258,16 @@ Page({ | ||
241 | } | 258 | } |
242 | }, | 259 | }, |
243 | 260 | ||
261 | + showtoast: function (title) { | ||
262 | + wx.showToast({ | ||
263 | + title: title, | ||
264 | + duration: 2000, | ||
265 | + icon: 'none' | ||
266 | + // image: '/images/error.png' | ||
267 | + }) | ||
268 | + }, | ||
269 | + | ||
270 | + | ||
244 | /** | 271 | /** |
245 | * Lifecycle function--Called when page hide | 272 | * Lifecycle function--Called when page hide |
246 | */ | 273 | */ |
@@ -3,6 +3,7 @@ var format = require('../../../utils/util.js'); | @@ -3,6 +3,7 @@ var format = require('../../../utils/util.js'); | ||
3 | const reg_18_Number = /^[0-9]{18}$/; | 3 | const reg_18_Number = /^[0-9]{18}$/; |
4 | const reg_9_n_a = /^([a-zA-z]|[0-9]){9}$/; | 4 | const reg_9_n_a = /^([a-zA-z]|[0-9]){9}$/; |
5 | const reg_15_n_a = /^([a-zA-z]|[0-9]){15}$/; | 5 | const reg_15_n_a = /^([a-zA-z]|[0-9]){15}$/; |
6 | +const reg_20_n_a = /^([a-zA-z]|[0-9]){20}$/; | ||
6 | var baseUrl = getApp().globalData.baseUrl; | 7 | var baseUrl = getApp().globalData.baseUrl; |
7 | let Authorization = ''; | 8 | let Authorization = ''; |
8 | Page({ | 9 | Page({ |
@@ -94,15 +95,9 @@ Page({ | @@ -94,15 +95,9 @@ Page({ | ||
94 | this.showtoast('请输入姓名'); | 95 | this.showtoast('请输入姓名'); |
95 | return | 96 | return |
96 | } | 97 | } |
97 | - //todo 需要跟喜文确认 中英文姓名规则 | ||
98 | name = name.replace(/(^\s*)|(\s*$)/g, ""); | 98 | name = name.replace(/(^\s*)|(\s*$)/g, ""); |
99 | - if (type.indexOf('中国护照') > -1) { | ||
100 | - if (!regname_c.test(name)) { | ||
101 | - this.showtoast('请输入正确的中文名'); | ||
102 | - return | ||
103 | - } | ||
104 | - } else if (!regname_e.test(name)) { | ||
105 | - this.showtoast('请输入正确的英文名'); | 99 | + if (!regname_c.test(name) && !regname_e.test(name)) { |
100 | + this.showtoast('请输入正确的姓名'); | ||
106 | return | 101 | return |
107 | } | 102 | } |
108 | if (idCardNo.length < 1) { | 103 | if (idCardNo.length < 1) { |
@@ -110,14 +105,17 @@ Page({ | @@ -110,14 +105,17 @@ Page({ | ||
110 | return | 105 | return |
111 | } | 106 | } |
112 | if (type.indexOf('居住证') > -1 && !reg_18_Number.test(idCardNo)) { | 107 | if (type.indexOf('居住证') > -1 && !reg_18_Number.test(idCardNo)) { |
108 | + this.showtoast('证照号码有误0'); | ||
109 | + return | ||
110 | + }else if (type.indexOf('中国护照') > -1 && !reg_9_n_a.test(idCardNo)) { | ||
113 | this.showtoast('证照号码有误'); | 111 | this.showtoast('证照号码有误'); |
114 | return | 112 | return |
115 | - } | ||
116 | - if (type.indexOf('中国护照') > -1 && !reg_9_n_a.test(idCardNo)) { | 113 | + }else if (type.indexOf('永久居留') > -1 && !reg_15_n_a.test(idCardNo)) { |
117 | this.showtoast('证照号码有误'); | 114 | this.showtoast('证照号码有误'); |
118 | return | 115 | return |
119 | } | 116 | } |
120 | - if (type.indexOf('永久居留') > -1 && !reg_15_n_a.test(idCardNo)) { | 117 | + |
118 | + if (type.indexOf('居住证') < 0 && type.indexOf('中国护照') < 0 && type.indexOf('永久居留') < 0 &&!reg_20_n_a.test(idCardNo)) { | ||
121 | this.showtoast('证照号码有误'); | 119 | this.showtoast('证照号码有误'); |
122 | return | 120 | return |
123 | } | 121 | } |
@@ -135,8 +133,8 @@ Page({ | @@ -135,8 +133,8 @@ Page({ | ||
135 | 'content-type': 'application/json', | 133 | 'content-type': 'application/json', |
136 | "Authorization": Authorization | 134 | "Authorization": Authorization |
137 | }, | 135 | }, |
138 | - success: function (res) { | ||
139 | - console.log("SUCC",res.data) | 136 | + success: function(res) { |
137 | + console.log("SUCC", res.data) | ||
140 | if (res.data.code && res.data.code >= 300) { | 138 | if (res.data.code && res.data.code >= 300) { |
141 | wx.navigateTo({ | 139 | wx.navigateTo({ |
142 | url: 'verify_result/verify_result?result=fail', | 140 | url: 'verify_result/verify_result?result=fail', |
@@ -167,7 +165,7 @@ Page({ | @@ -167,7 +165,7 @@ Page({ | ||
167 | return; | 165 | return; |
168 | } | 166 | } |
169 | wx.navigateTo({ | 167 | wx.navigateTo({ |
170 | - url: 'verify_idcard/verify_idcard', | 168 | + url: 'verify_idcard/verify_idcard?input_name=' + name + '&input_card_number=' + idCardNo, |
171 | }) | 169 | }) |
172 | } | 170 | } |
173 | }, | 171 | }, |
@@ -44,12 +44,13 @@ | @@ -44,12 +44,13 @@ | ||
44 | <view class="divide_line_30"></view> | 44 | <view class="divide_line_30"></view> |
45 | 45 | ||
46 | <view style='padding-left: 30rpx;padding-right: 30rpx;'> | 46 | <view style='padding-left: 30rpx;padding-right: 30rpx;'> |
47 | - <text class='text_777_30 float_left' style='line-height: 90rpx'>身份证件号码</text> | ||
48 | <view wx:if="{{is_foreigner=='false'}}"> | 47 | <view wx:if="{{is_foreigner=='false'}}"> |
49 | - <input class='input_wrap' placeholder='请输入您的身份证号码' placeholder-class='text_999_30' name='id_card_no' maxlength='18' value='{{card_number}}' bindinput="bindinputcardnum" type='idcard'></input> | 48 | + <text class='text_777_30 float_left' style='line-height: 90rpx'>身份证号码</text> |
49 | + <input class='input_wrap' placeholder='请输入您的身份证号码' placeholder-class='text_999_30' name='id_card_no' maxlength='18' value='{{card_number}}' bindinput="bindinputcardnum" type='idcard'></input> | ||
50 | </view> | 50 | </view> |
51 | <view wx:else> | 51 | <view wx:else> |
52 | - <input class='input_wrap' placeholder='请输入您的证件号码' placeholder-class='text_999_30' name='id_card_no' maxlength='20' value='{{card_number}}' bindinput="bindinputcardnum" ></input> | 52 | + <text class='text_777_30 float_left' style='line-height: 90rpx'>证照号码</text> |
53 | + <input class='input_wrap' placeholder='请输入您的证件号码' placeholder-class='text_999_30' name='id_card_no' maxlength='20' value='{{card_number}}' bindinput="bindinputcardnum"></input> | ||
53 | </view> | 54 | </view> |
54 | </view> | 55 | </view> |
55 | </view> | 56 | </view> |
@@ -4,11 +4,12 @@ | @@ -4,11 +4,12 @@ | ||
4 | "ignore": [] | 4 | "ignore": [] |
5 | }, | 5 | }, |
6 | "setting": { | 6 | "setting": { |
7 | - "urlCheck": true, | 7 | + "urlCheck": false, |
8 | "es6": true, | 8 | "es6": true, |
9 | "postcss": true, | 9 | "postcss": true, |
10 | "minified": true, | 10 | "minified": true, |
11 | - "newFeature": true | 11 | + "newFeature": true, |
12 | + "checkInvalidKey": true | ||
12 | }, | 13 | }, |
13 | "compileType": "miniprogram", | 14 | "compileType": "miniprogram", |
14 | "libVersion": "2.4.2", | 15 | "libVersion": "2.4.2", |
请
注册
或
登录
后发表评论