正在显示
3 个修改的文件
包含
33 行增加
和
14 行删除
| @@ -217,6 +217,9 @@ Page({ | @@ -217,6 +217,9 @@ Page({ | ||
| 217 | }, | 217 | }, |
| 218 | 218 | ||
| 219 | gonext: function () { | 219 | gonext: function () { |
| 220 | + var frontdata = this.data.front_card_info | ||
| 221 | + var backdata = this.data.back_card_info | ||
| 222 | + var that = this | ||
| 220 | if (this.data.already_getdata) { | 223 | if (this.data.already_getdata) { |
| 221 | var id_Info = this.data.idInfo; | 224 | var id_Info = this.data.idInfo; |
| 222 | if(this.data.input_name!=id_Info.name){ | 225 | if(this.data.input_name!=id_Info.name){ |
| @@ -228,12 +231,13 @@ Page({ | @@ -228,12 +231,13 @@ Page({ | ||
| 228 | return; | 231 | return; |
| 229 | } | 232 | } |
| 230 | //提交数据 | 233 | //提交数据 |
| 234 | + var Authorization = getApp().globalData.Authorization; | ||
| 231 | wx.request({ | 235 | wx.request({ |
| 232 | url: baseUrl + 'uaa/v1/users/auth', | 236 | url: baseUrl + 'uaa/v1/users/auth', |
| 233 | method: 'POST', | 237 | method: 'POST', |
| 234 | data: { | 238 | data: { |
| 235 | - id_card_front: front_card_copy, | ||
| 236 | - id_card_back: back_card_copy | 239 | + id_card_front: frontdata, |
| 240 | + id_card_back: backdata | ||
| 237 | }, | 241 | }, |
| 238 | header: { | 242 | header: { |
| 239 | 'content-type': 'application/json', | 243 | 'content-type': 'application/json', |
| @@ -241,20 +245,33 @@ Page({ | @@ -241,20 +245,33 @@ Page({ | ||
| 241 | }, | 245 | }, |
| 242 | success: function (res) { | 246 | success: function (res) { |
| 243 | if (res.statusCode && res.statusCode >= 300) { | 247 | if (res.statusCode && res.statusCode >= 300) { |
| 244 | - this.showtoast(res.data.message); | 248 | + that.showtoast(res.data.message); |
| 249 | + wx.redirectTo({ | ||
| 250 | + url: '../verify_result/verify_result?result=fail', | ||
| 251 | + }) | ||
| 245 | } else { | 252 | } else { |
| 246 | - this.showtoast('提交成功'); | ||
| 247 | - wx.navigateBack({}) | 253 | + that.showtoast('提交成功'); |
| 254 | + wx.redirectTo({ | ||
| 255 | + url: '../verify_result/verify_result?result=succ', | ||
| 256 | + }) | ||
| 248 | } | 257 | } |
| 258 | + }, | ||
| 259 | + fail(res){ | ||
| 260 | + that.showtoast(res.data.message); | ||
| 249 | } | 261 | } |
| 250 | }) | 262 | }) |
| 251 | - wx.navigateTo({ | ||
| 252 | - url: '../verify_result/verify_result?result=succ', | ||
| 253 | - }) | ||
| 254 | } else { | 263 | } else { |
| 255 | - wx.navigateTo({ | ||
| 256 | - url: '../verify_result/verify_result?result=fail', | ||
| 257 | - }) | 264 | + // wx.redirectTo({ |
| 265 | + // url: '../verify_result/verify_result?result=fail', | ||
| 266 | + // }) | ||
| 267 | + if (!frontdata || !frontdata.object_id) { | ||
| 268 | + this.showtoast('请上传证件照'); | ||
| 269 | + return; | ||
| 270 | + } | ||
| 271 | + if (!backdata || !backdata.object_id) { | ||
| 272 | + this.showtoast('请上传证件照'); | ||
| 273 | + return; | ||
| 274 | + } | ||
| 258 | } | 275 | } |
| 259 | }, | 276 | }, |
| 260 | 277 |
| @@ -49,11 +49,13 @@ Page({ | @@ -49,11 +49,13 @@ Page({ | ||
| 49 | 49 | ||
| 50 | done:function(){ | 50 | done:function(){ |
| 51 | if('succ'==this.data.verify_status){ | 51 | if('succ'==this.data.verify_status){ |
| 52 | - wx.redirectTo({ | 52 | + wx.reLaunch({ |
| 53 | url: '../../guide/guide', | 53 | url: '../../guide/guide', |
| 54 | }) | 54 | }) |
| 55 | }else{ | 55 | }else{ |
| 56 | - wx.navigateBack({}) | 56 | + wx.navigateBack({ |
| 57 | + delta: 1 | ||
| 58 | + }) | ||
| 57 | } | 59 | } |
| 58 | }, | 60 | }, |
| 59 | 61 |
请
注册
或
登录
后发表评论