Compare commits
1 Commits
zyj
...
xiaozy_星油统
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a2a1d79c9 |
@@ -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
Reference in New Issue
Block a user