更新
This commit is contained in:
@@ -105,59 +105,65 @@
|
||||
scanType: 'qrCode',
|
||||
onlyFromCamera: false,
|
||||
success: (resResult) => {
|
||||
console.log('%c 扫码结果↓','color:red;font-size:30px')
|
||||
console.log(resResult)
|
||||
// innerAudioContext.play()
|
||||
console.log('play滴~')
|
||||
let res = resResult.result
|
||||
console.log(res)
|
||||
let loginUser = uni.getStorageSync('loginUser')
|
||||
if (res.substring(0, 6) == 'XOILUC' && (loginUser.channelCode !== 'XOIL' || loginUser
|
||||
.secondChannelCode)) {
|
||||
uni.showModal({
|
||||
content: '该油站不支持付款码支付',
|
||||
showCancel:false,
|
||||
complete:res => {
|
||||
if(res.confirm) {
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
uni.setStorageSync('qrCode', res)
|
||||
this.once = true
|
||||
let url = ''
|
||||
// console.log('这里是顺丰测试',res.substring(0,7))
|
||||
const tag = res.substring(0, 2);
|
||||
// 老星油 XM , HT G7 , 则一 ZEYI , 新星油 XOIL new则一 XINGYOU
|
||||
if (res.indexOf('fykc') != -1 ){
|
||||
url = '/pages/stationDetail/ZYSite?type=fykc'
|
||||
console.log('这里是测试福佑' ,res.substring(0,7))
|
||||
}else if (tag == "SP") {
|
||||
url = '/pages/stationDetail/ZYSite?type=G7'
|
||||
} else if (tag == "XM" || tag == "HT" || tag == "G7") {
|
||||
if (res.indexOf('fykc') != -1) {
|
||||
url = '/pages/stationDetail/ZYSite?type=fykc'
|
||||
// console.log('这里是测试福佑', res.substring(0, 7))
|
||||
} else if (tag == "SP") {
|
||||
url = '/pages/stationDetail/ZYSite?type=G7'
|
||||
} else if (tag == "XM" || tag == "HT" || tag == "G7") {
|
||||
url = '/pages/stationDetail/stationDetail?type=G7'
|
||||
} else if (res.indexOf('ZEYI') != -1 ){
|
||||
console.log('这里是测试则一sss' ,res.substring(0,7))
|
||||
url = '/pages/stationDetail/ZYSite?type=ZEYI'
|
||||
} else if (res.substring(0, 4) == 'XING' || res.substring(0, 4) == 'XOIL' ) {
|
||||
console.log('这里是测试XING' ,res.substring(0,7))
|
||||
url = '/pages/stationDetail/ZYSite?type=xoli'
|
||||
} else if (res.substring(0,8) == 'SHUNFENG') {
|
||||
console.log('这里是顺丰')
|
||||
} else if (res.indexOf('ZEYI') != -1) {
|
||||
// console.log('这里是测试则一sss', res.substring(0, 7))
|
||||
url = '/pages/stationDetail/ZYSite?type=ZEYI'
|
||||
} else if (res.substring(0, 4) == 'XING' || res.substring(0, 4) == 'XOIL' || res.substring(
|
||||
0, 6) == 'XOILUC') {
|
||||
|
||||
// console.log('这里是测试XING', res.substring(0, 7))
|
||||
url = '/pages/stationDetail/ZYSite?type=xoli'
|
||||
} else if (res.substring(0, 8) == 'SHUNFENG') {
|
||||
// console.log('这里是顺丰')
|
||||
url = '/pages/stationDetail/ZYSite?type=shunfeng'
|
||||
} else if (res.substring(0, 4) == 'RIRI'){
|
||||
url = '/pages/stationDetail/ZYSite?type=RIRISHUN'
|
||||
} else if (res.indexOf('OP') != -1 ){
|
||||
url = '/pages/stationDetail/openStationDetail'
|
||||
}else{
|
||||
} else if (res.substring(0, 4) == 'RIRI') {
|
||||
url = '/pages/stationDetail/ZYSite?type=RIRISHUN'
|
||||
} else if (res.indexOf('OP') != -1) {
|
||||
url = '/pages/stationDetail/openStationDetail'
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '未知二维码',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
})
|
||||
uni.navigateBack({})
|
||||
}, 800)
|
||||
return false;
|
||||
}
|
||||
console.log(tag)
|
||||
// return
|
||||
// console.log(tag)
|
||||
uni.redirectTo({
|
||||
// url: `/pages/stationDetail/stationDetail`,
|
||||
url: url,
|
||||
fail: (err) => {
|
||||
// console.log(err)
|
||||
},
|
||||
success: (res) => {
|
||||
// console.log('chengg', res)
|
||||
}
|
||||
url: url
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
|
||||
Reference in New Issue
Block a user