| | |
| | | import CryptoJS from './node_modules/crypto-js/crypto-js.js' |
| | | const baseUrl = 'https://tmy.xjzbh.com/api/' |
| | | const baseUrl = 'https://qxg1996.lllykj.com/api/' |
| | | const cryptKey = '2025Shop2025Shop' |
| | | const cryptIv = '2025Shop2025Shop' |
| | | |
| | |
| | | } |
| | | |
| | | const getHeader = () => { |
| | | let token = uni.getStorageSync('lzsc-token') |
| | | let token = uni.getStorageSync('pig-token') |
| | | let header = { |
| | | 'Accept': 'application/json', |
| | | 'Content-type': 'application/json', |
| | |
| | | } |
| | | |
| | | const checkLogin = (url = '', burl = '') => { |
| | | let token = uni.getStorageSync('lzsc-token') ? uni.getStorageSync('lzsc-token') : null |
| | | console.log('url', url) |
| | | let token = uni.getStorageSync('pig-token') ? uni.getStorageSync('pig-token') : null |
| | | if(token == null){ |
| | | uni.showModal({ |
| | | title: '温馨提示', |
| | |
| | | } |
| | | |
| | | const checkGoPages = (url = '', burl = '', isgo = 1) => { |
| | | let token = uni.getStorageSync('lzsc-token') ? uni.getStorageSync('lzsc-token') : null |
| | | let token = uni.getStorageSync('pig-token') ? uni.getStorageSync('pig-token') : null |
| | | console.log('token', token) |
| | | if(token == null){ |
| | | uni.showModal({ |
| | |
| | | }) |
| | | return false |
| | | } else { |
| | | 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 |
| | | } |
| | | // 隐藏掉实名认证 |
| | | // 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 |
| | | // } |
| | | } |
| | | } |
| | | |