正在显示
6 个修改的文件
包含
62 行增加
和
40 行删除
... | ... | @@ -144,8 +144,8 @@ App({ |
144 | 144 | // baseUrl: "http://192.144.144.220:20000/", |
145 | 145 | // baseUrl: "http://154.8.229.55:20000/", |
146 | 146 | // baseUrl: "http://47.110.250.177:20000/", |
147 | - baseUrl: "http://47.110.158.110:20000/", | |
148 | - // baseUrl: "https://api.workai.com.cn/", | |
147 | + // baseUrl: "http://47.110.158.110:20000/", | |
148 | + baseUrl: "https://api.workai.com.cn/", | |
149 | 149 | OSSUrl: "", //"https://oss.workai.com.cn/", |
150 | 150 | userInfo: null, |
151 | 151 | hostInfo: null, | ... | ... |
... | ... | @@ -8,6 +8,7 @@ Page({ |
8 | 8 | */ |
9 | 9 | data: { |
10 | 10 | isshow: false, |
11 | + onresume: false, | |
11 | 12 | has_verify: true |
12 | 13 | }, |
13 | 14 | |
... | ... | @@ -15,7 +16,7 @@ Page({ |
15 | 16 | * 生命周期函数--监听页面加载 |
16 | 17 | */ |
17 | 18 | onLoad: function(options) { |
18 | - | |
19 | + | |
19 | 20 | }, |
20 | 21 | |
21 | 22 | /** |
... | ... | @@ -29,6 +30,10 @@ Page({ |
29 | 30 | * 生命周期函数--监听页面显示 |
30 | 31 | */ |
31 | 32 | onShow: function() { |
33 | + console.log("onshow") | |
34 | + this.setData({ | |
35 | + onresume:true | |
36 | + }) | |
32 | 37 | this.checkUserInfo() |
33 | 38 | }, |
34 | 39 | |
... | ... | @@ -37,18 +42,19 @@ Page({ |
37 | 42 | var that = this; |
38 | 43 | Authorization = getApp().globalData.Authorization; |
39 | 44 | var real_auth_status = getApp().globalData.real_auth_status |
40 | - console.log("Authorization", Authorization) | |
45 | + console.log("real_auth_status", real_auth_status) | |
41 | 46 | console.log("Authorization", Authorization) |
42 | 47 | if (Authorization && Authorization.length > 10) { |
43 | 48 | // that.setData({ |
44 | 49 | // has_verify: false |
45 | 50 | // }) |
46 | - if (real_auth_status == 'active') { | |
51 | + if (real_auth_status == 'active') { //不需要再实名认证 | |
47 | 52 | that.setData({ |
48 | - has_verify: true | |
53 | + has_verify: true, | |
54 | + onresume: false, | |
49 | 55 | }) |
50 | 56 | that.taxconfirm(); |
51 | - } else { //不需要再实名认证 | |
57 | + } else { | |
52 | 58 | that.setData({ |
53 | 59 | has_verify: false |
54 | 60 | }) |
... | ... | @@ -213,14 +219,17 @@ Page({ |
213 | 219 | * 生命周期函数--监听页面隐藏 |
214 | 220 | */ |
215 | 221 | onHide: function() { |
216 | - | |
222 | + console.log("onhide") | |
223 | + this.setData({ | |
224 | + onresume: false | |
225 | + }) | |
217 | 226 | }, |
218 | 227 | |
219 | 228 | /** |
220 | 229 | * 生命周期函数--监听页面卸载 |
221 | 230 | */ |
222 | 231 | onUnload: function() { |
223 | - | |
232 | + | |
224 | 233 | }, |
225 | 234 | |
226 | 235 | /** | ... | ... |
... | ... | @@ -64,12 +64,12 @@ |
64 | 64 | |
65 | 65 | <image class='logout-img' bindtap='loginout' src='/images/icon_logout.png'></image> |
66 | 66 | |
67 | - <view class="mask" hidden="{{has_verify}}" bindtap='closeModalImg'></view> | |
67 | + <view class="mask" wx:if="{{!has_verify&&onresume}}"></view> | |
68 | 68 | |
69 | - <view style='top:180rpx;position:absolute;z-index:10;right:0;left:0;margin:auto;text-align:center;' hidden="{{has_verify}}"> | |
69 | + <view style='top:180rpx;position:absolute;z-index:10;right:0;left:0;margin:auto;text-align:center;' wx:if="{{!has_verify&&onresume}}"> | |
70 | 70 | <image style='height:860rpx' src='/images/verify_dialog.png'> |
71 | 71 | </image> |
72 | - <view style='position:absolute;top:660rpx;right:0;left:0;display:flex;flex-direction:column' bindtap='closeModalImg'> | |
72 | + <view style='position:absolute;top:660rpx;right:0;left:0;display:flex;flex-direction:column'> | |
73 | 73 | <view class='btn_blue_radius' bindtap="go_verify_idcard"> |
74 | 74 | <text style='font-size: 32rpx;color:#fff;text-align: center;line-height: 42px;' >立即认证</text> |
75 | 75 | </view> | ... | ... |
... | ... | @@ -405,8 +405,10 @@ Page({ |
405 | 405 | this.data.name = tax_info.name |
406 | 406 | this.data.other_name = tax_info.other_name |
407 | 407 | if (tax_info.certification_status == 'active' && tax_info.id_card_no.length) {//已通过拍摄身份证认证过,不能修改 |
408 | - this.data.genderData.disabled = true | |
409 | - this.data.birthDate.disabled = true | |
408 | + if (tax_info.id_card_type=='居民身份证'){ | |
409 | + this.data.genderData.disabled = true | |
410 | + this.data.birthDate.disabled = true | |
411 | + } | |
410 | 412 | this.data.cardtypeData.disabled = true |
411 | 413 | } |
412 | 414 | |
... | ... | @@ -420,7 +422,9 @@ Page({ |
420 | 422 | |
421 | 423 | this.data.other_card_number = tax_info.other_id_card_no |
422 | 424 | this.data.overseas = tax_info.is_overseas_personnel |
423 | - this.data.countryData.selected = tax_info.native | |
425 | + if (tax_info.native){ | |
426 | + this.data.countryData.selected = tax_info.native | |
427 | + } | |
424 | 428 | this.data.birthCountryData.selected = tax_info.birth_native |
425 | 429 | if (tax_info.taxpayer_type == 'non-resident') { |
426 | 430 | this.data.taxpayerTypeData.selected = '非居民' | ... | ... |
... | ... | @@ -3,7 +3,7 @@ var format = require('../../../utils/util.js'); |
3 | 3 | const reg_18_Number = /^[0-9]{18}$/; |
4 | 4 | const reg_9_n_a = /^([a-zA-z]|[0-9]){9}$/; |
5 | 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 | +const reg_20_n_a = /^([a-zA-z]|[0-9]){1,20}$/; | |
7 | 7 | var baseUrl = getApp().globalData.baseUrl; |
8 | 8 | let Authorization = ''; |
9 | 9 | Page({ |
... | ... | @@ -86,6 +86,8 @@ Page({ |
86 | 86 | var regname_c = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,30}$/; //中文 |
87 | 87 | var regname_e = /^[A-Za-z][A-Za-z\s]*[A-Za-z]$/; //英文 |
88 | 88 | console.log('cardtype', type) |
89 | + // this.showtoast(this.data.cardTypeArray.indexOf(type) + ""); | |
90 | + | |
89 | 91 | if (this.data.is_foreigner == 'true') { //非身份证 |
90 | 92 | if (type.length < 1) { |
91 | 93 | this.showtoast('请选择证照类型'); |
... | ... | @@ -114,7 +116,6 @@ Page({ |
114 | 116 | this.showtoast('证照号码有误'); |
115 | 117 | return |
116 | 118 | } |
117 | - | |
118 | 119 | if (type.indexOf('居住证') < 0 && type.indexOf('中国护照') < 0 && type.indexOf('永久居留') < 0 &&!reg_20_n_a.test(idCardNo)) { |
119 | 120 | this.showtoast('证照号码有误'); |
120 | 121 | return |
... | ... | @@ -126,7 +127,7 @@ Page({ |
126 | 127 | method: 'POST', |
127 | 128 | data: { |
128 | 129 | name: name, |
129 | - id_card_type: type, | |
130 | + id_card_type: that.data.cardTypeArray.indexOf(type)+2+"", | |
130 | 131 | id_card_no: idCardNo |
131 | 132 | }, |
132 | 133 | header: { |
... | ... | @@ -134,8 +135,8 @@ Page({ |
134 | 135 | "Authorization": Authorization |
135 | 136 | }, |
136 | 137 | success: function(res) { |
137 | - console.log("SUCC", res.data) | |
138 | - if (res.data.code && res.data.code >= 300) { | |
138 | + console.log("SUCC", res) | |
139 | + if (res.statusCode && res.statusCode >= 300) { | |
139 | 140 | wx.navigateTo({ |
140 | 141 | url: 'verify_result/verify_result?result=fail', |
141 | 142 | }) | ... | ... |
1 | 1 | // pages/main/verify/verify_result/verify_result.js |
2 | +var app = getApp(); | |
2 | 3 | Page({ |
3 | 4 | |
4 | 5 | /** |
5 | 6 | * Page initial data |
6 | 7 | */ |
7 | 8 | data: { |
8 | - verify_img:"/images/verify_succ.png", | |
9 | - verify_status:"succ", | |
10 | - verify_tip:"恭喜您!认证成功", | |
11 | - btn_text:"完成" | |
9 | + verify_img: "/images/verify_succ.png", | |
10 | + verify_status: "succ", | |
11 | + verify_tip: "恭喜您!认证成功", | |
12 | + btn_text: "完成" | |
12 | 13 | }, |
13 | 14 | |
14 | 15 | /** |
15 | 16 | * Lifecycle function--Called when page load |
16 | 17 | */ |
17 | - onLoad: function (options) { | |
18 | + onLoad: function(options) { | |
18 | 19 | console.log("options", options) |
19 | - if('succ'==options.result){ | |
20 | + if ('succ' == options.result) { | |
20 | 21 | this.setData({ |
21 | 22 | verify_img: "/images/verify_succ.png", |
22 | 23 | verify_status: "succ", |
23 | 24 | verify_tip: "恭喜您!认证成功", |
24 | 25 | btn_text: "完成" |
25 | 26 | }) |
26 | - }else if('fail'==options.result){ | |
27 | + } else if ('fail' == options.result) { | |
27 | 28 | this.setData({ |
28 | 29 | verify_img: "/images/verify_fail.png", |
29 | 30 | verify_status: "fail", |
... | ... | @@ -36,23 +37,30 @@ Page({ |
36 | 37 | /** |
37 | 38 | * Lifecycle function--Called when page is initially rendered |
38 | 39 | */ |
39 | - onReady: function () { | |
40 | + onReady: function() { | |
40 | 41 | |
41 | 42 | }, |
42 | 43 | |
43 | 44 | /** |
44 | 45 | * Lifecycle function--Called when page show |
45 | 46 | */ |
46 | - onShow: function () { | |
47 | + onShow: function() { | |
47 | 48 | |
48 | 49 | }, |
49 | 50 | |
50 | - done:function(){ | |
51 | - if('succ'==this.data.verify_status){ | |
52 | - wx.reLaunch({ | |
53 | - url: '../../guide/guide', | |
54 | - }) | |
55 | - }else{ | |
51 | + done: function() { | |
52 | + if ('succ' == this.data.verify_status) { | |
53 | + // var requestdata = { | |
54 | + // "grant_type": "refresh_token", | |
55 | + // "refresh_token": app.globalData.refresh_token, | |
56 | + // "scope": "global_access:end_user" | |
57 | + // }; | |
58 | + // app.getTokenByCode(requestdata, false, "") | |
59 | + app.globalData.real_auth_status = "active"; | |
60 | + wx.reLaunch({ | |
61 | + url: '../../guide/guide', | |
62 | + }) | |
63 | + } else { | |
56 | 64 | wx.navigateBack({ |
57 | 65 | delta: 1 |
58 | 66 | }) |
... | ... | @@ -62,35 +70,35 @@ Page({ |
62 | 70 | /** |
63 | 71 | * Lifecycle function--Called when page hide |
64 | 72 | */ |
65 | - onHide: function () { | |
73 | + onHide: function() { | |
66 | 74 | |
67 | 75 | }, |
68 | 76 | |
69 | 77 | /** |
70 | 78 | * Lifecycle function--Called when page unload |
71 | 79 | */ |
72 | - onUnload: function () { | |
80 | + onUnload: function() { | |
73 | 81 | |
74 | 82 | }, |
75 | 83 | |
76 | 84 | /** |
77 | 85 | * Page event handler function--Called when user drop down |
78 | 86 | */ |
79 | - onPullDownRefresh: function () { | |
87 | + onPullDownRefresh: function() { | |
80 | 88 | |
81 | 89 | }, |
82 | 90 | |
83 | 91 | /** |
84 | 92 | * Called when page reach bottom |
85 | 93 | */ |
86 | - onReachBottom: function () { | |
94 | + onReachBottom: function() { | |
87 | 95 | |
88 | 96 | }, |
89 | 97 | |
90 | 98 | /** |
91 | 99 | * Called when user click on the top right corner to share |
92 | 100 | */ |
93 | - onShareAppMessage: function () { | |
101 | + onShareAppMessage: function() { | |
94 | 102 | |
95 | 103 | } |
96 | 104 | }) |
\ No newline at end of file | ... | ... |
请
注册
或
登录
后发表评论