| | |
| | | // #endif |
| | | // #ifdef APP-PLUS |
| | | platform = uni.getSystemInfoSync().platform |
| | | // #endif |
| | | // #endif |
| | | header.platform = platform |
| | | return header |
| | | } |
| | |
| | | url: baseUrl + url, |
| | | data: {data: data}, |
| | | header: header, |
| | | dataType: 'json', |
| | | dataType: 'json', |
| | | }).then((response) => { |
| | | //console.log('response', response) |
| | | uni.hideLoading() |
| | | let respon = { |
| | | code: response.data.code, |
| | | data: response.data.data.length > 0 ? JSON.parse(decryptDes(response.data.data)) : [], |
| | | data: response.data.data.length > 0 ? JSON.parse(decryptDes(response.data.data)) : [], |
| | | msg: response.data.msg |
| | | } |
| | | resolve(respon) |
| | |
| | | url: baseUrl + url, |
| | | data: {data: data}, |
| | | header: header, |
| | | dataType: 'json', |
| | | dataType: 'json', |
| | | }).then((response) => { |
| | | let respon = { |
| | | code: response.data.code, |
| | | data: response.data.data.length > 0 ? JSON.parse(decryptDes(response.data.data)) : [], |
| | | data: response.data.data.length > 0 ? JSON.parse(decryptDes(response.data.data)) : [], |
| | | msg: response.data.msg |
| | | } |
| | | resolve(respon) |
| | |
| | | var idCardReg = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; |
| | | var errorMsg = ""; //错误提示信息 |
| | | var isPass = true; //身份证验证是否通过(true通过、false未通过) |
| | | |
| | | |
| | | //如果身份证不满足格式正则表达式 |
| | | if (!idCardReg.test(code)) { |
| | | errorMsg = "身份证格式有误!"; |
| | | isPass = false; |
| | | } |
| | | |
| | | |
| | | //区域数组中不包含需验证的身份证前两位 |
| | | else if (!city[code.substr(0, 2)]) { |
| | | errorMsg = "身份证地址编码有误!"; |
| | |
| | | success: function (res) { |
| | | if (res.confirm) { |
| | | let goUrl = '' |
| | | |
| | | |
| | | if(burl != ''){ |
| | | goUrl = '/pages/login/login?backUrl=' + burl |
| | | } else{ |
| | |
| | | }) |
| | | return false |
| | | } else { |
| | | return true |
| | | // let userInfo = getUserInfo() |
| | | // let goUrl = '' |
| | | // if(userInfo.idcard_auth == 0){ |
| | | // goUrl = '/pages/idcard/idcard' |
| | | // } else if(userInfo.face_auth == 0){ |
| | | // goUrl = '/pages/face/face' |
| | | // } else if(userInfo.job_auth == 0){ |
| | | // goUrl = '/pages/job/job' |
| | | // } else if(userInfo.bank_auth == 0){ |
| | | // goUrl = '/pages/addBank/addBank?backUrl=/pages/face/face' |
| | | // } |
| | | // console.log('goUrl', goUrl) |
| | | // if(goUrl != ''){ |
| | | // uni.showModal({ |
| | | // title: '温馨提示', |
| | | // content: '根据国家法律法规规定,使用本服务需要完成实名认证,是否前往认证?', |
| | | // success: function (res) { |
| | | // if (res.confirm) { |
| | | // uni.navigateTo({ |
| | | // url: goUrl |
| | | // }) |
| | | // } |
| | | // } |
| | | // }) |
| | | // return false |
| | | // } |
| | | // if(url != '' && isgo == 1){ |
| | | // uni.navigateTo({ |
| | | // url: url |
| | | // }) |
| | | // } else { |
| | | // return true |
| | | // } |
| | | // return true |
| | | let userInfo = getUserInfo() |
| | | let goUrl = '' |
| | | if(userInfo.idcard_auth == 0){ |
| | | goUrl = '/pages/idcard/idcard' |
| | | } else if(userInfo.face_auth == 0){ |
| | | goUrl = '/pages/face/face' |
| | | } else if(userInfo.job_auth == 0){ |
| | | goUrl = '/pages/job/job' |
| | | } else if(userInfo.bank_auth == 0){ |
| | | goUrl = '/pages/addBank/addBank?backUrl=/pages/face/face' |
| | | } |
| | | console.log('goUrl', goUrl) |
| | | if(goUrl != ''){ |
| | | uni.showModal({ |
| | | title: '温馨提示', |
| | | content: '根据国家法律法规规定,使用本服务需要完成实名认证,是否前往认证?', |
| | | success: function (res) { |
| | | if (res.confirm) { |
| | | uni.navigateTo({ |
| | | url: goUrl |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | return false |
| | | } |
| | | if(url != '' && isgo == 1){ |
| | | uni.navigateTo({ |
| | | url: url |
| | | }) |
| | | } else { |
| | | return true |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | const goSwitch = (url) => { |
| | | uni.switchTab({ |
| | |
| | | goAgree: goAgree, |
| | | checkLogin: checkLogin, |
| | | sendMsg: sendMsg, |
| | | } |
| | | } |