xiaozy_星油统一加油码
xiaozhiyong 1 year ago
parent 28500d9d0b
commit 2a2a1d79c9
  1. 5
      pages/home/home.vue
  2. 24
      pages/login/boforeLogin/boforeLogin.vue
  3. 25
      pages/login/posLogin/posLogin.vue
  4. 74
      pages/station-info/scan-camera/scan-camera.vue
  5. 495
      pages/stationDetail/ZYSite.vue

@ -450,6 +450,7 @@
this.changeChannel.username = this.loginUser.userPhone
uni.setStorageSync('channelId', items.channelId)
oilIdentityApi.changeChannelLogin(this.changeChannel).then((res) => {
if (res.code == 20000) {
uni.setStorageSync('siteOli', items.otherSiteName)
this.accountName = items.otherSiteName
@ -462,7 +463,9 @@
uni.setStorageSync('loginUser', {
id: res.data.authTokenDTO.loginUser.id,
name: res.data.authTokenDTO.loginUser.name,
userPhone: res.data.authTokenDTO.loginUser.userPhone
userPhone: res.data.authTokenDTO.loginUser.userPhone,
channelCode: items.channelCode,
secondChannelCode: items.secondChannelCode
})
this.getSiteInfo(res.data.authTokenDTO.loginUser.channelId)
this.getUserInfo(id)

@ -199,9 +199,9 @@
unionId: uni.getStorageSync('unionid'),
openId: uni.getStorageSync('openid')
}
console.log(data, '这里是自动登录data')
// console.log(data, 'data')
oilIdentityApi.loginPersonal(data).then(res => { //
console.log(res, '这里是自动登录res')
// console.log(res, 'res')
if (res.data.authTokenDTO.loginFlag == true) {
this.setStored(res)
}
@ -227,21 +227,21 @@
key: 'Authorization',
data: res.data.authTokenDTO.accessToken,
success: () => {
console.log('Authorization成功', res.data.authTokenDTO.accessToken)
// console.log('Authorization', res.data.authTokenDTO.accessToken)
}
})
uni.setStorage({
key: 'device',
data: openId,
success: () => {
console.log('deviceopenid', openId)
// console.log('deviceopenid', openId)
}
})
uni.setStorage({
key: 'unionId',
data: unionId,
success: () => {
console.log('deviceunionId', unionId)
// console.log('deviceunionId', unionId)
}
})
uni.setStorageSync('userMenu', res.data.authTokenDTO.loginUser.roleMenus) //
@ -251,9 +251,9 @@
userPhone: res.data.authTokenDTO.loginUser.userPhone
})
//
console.log('这里是获取手机号登录')
// console.log('')
oliUserApi.getByPhone(phone).then((res) => {
console.log('这里是获取手机号登录', res)
// console.log('', res)
if (res.code == 20000) {
uni.setStorageSync('oliList', res.data) //
//
@ -266,7 +266,7 @@
uni.reLaunch({
url: '/pages/index/index',
fail: (err) => {
console.log(err)
// console.log(err)
}
})
} else {
@ -342,8 +342,8 @@
getUserInfo({
detail
}) {
console.log('三方登录只演示登录api能力,暂未关联云端数据');
console.log('detail', detail)
// console.log('api');
// console.log('detail', detail)
if (detail.userInfo) {
this.loginLocal(detail.userInfo.nickName);
} else {
@ -369,10 +369,10 @@
uni.reLaunch({
url: '/pages/index/index',
success: () => {
console.log('success')
// console.log('success')
},
fail: err => {
console.log(err)
// console.log(err)
}
});
} else {

@ -210,23 +210,22 @@
}
},
checkOli(n) {
if (!this.checked) {
this.$refs.popup.open('center')
if (!this.auth.phone) {
uni.showToast({
title: '请输入手机号',
icon: "none"
})
return
}
this.checkType = n
if (n == 0) {
this.loginRandom()
//console.log('')
} else {
if (!this.auth.phone) {
uni.showToast({
title: '请输入手机号',
icon: "none"
})
if (!this.checked) {
this.$refs.popup.open('center')
return
}
this.loginRandom()
} else {
if (!this.auth.password) {
uni.showToast({
title: '请输入密码',
@ -234,6 +233,10 @@
})
return
}
if (!this.checked) {
this.$refs.popup.open('center')
return
}
this.loginPwd()
}
},

@ -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) => {

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save