更新
This commit is contained in:
@@ -99,7 +99,6 @@
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
if(option){
|
||||
if(option.companyId === '1460872936910831616'){
|
||||
this.otherUser = true
|
||||
uni.clearStorageSync()
|
||||
@@ -108,7 +107,6 @@
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
let IsOtherUser = uni.getStorageSync('isOther')
|
||||
// console.log('这里是onload',IsOtherUser)
|
||||
if(IsOtherUser){
|
||||
@@ -119,6 +117,7 @@
|
||||
this.otherUser = true
|
||||
return
|
||||
} else{
|
||||
|
||||
this.weChatLogin()
|
||||
}
|
||||
// console.log('小程序跳转参数接收onLoad----')
|
||||
@@ -132,11 +131,10 @@
|
||||
methods: {
|
||||
weChatLogin(option){
|
||||
let isJump = uni.getStorageSync('isJump');
|
||||
|
||||
let siteId = uni.getStorageSync('siteId')
|
||||
uni.clearStorageSync();
|
||||
if(isJump){
|
||||
uni.setStorageSync('isJump',isJump)
|
||||
}
|
||||
if(isJump) uni.setStorageSync('isJump',isJump)
|
||||
if(siteId) uni.setStorageSync('siteId',siteId)
|
||||
this.refreshLocation()
|
||||
let _that = this
|
||||
uni.login({
|
||||
@@ -144,15 +142,15 @@
|
||||
success: (loginRes) => {
|
||||
const code = loginRes.code
|
||||
this.onceCode = code
|
||||
console.log('这里是code')
|
||||
console.log(this.onceCode)
|
||||
// console.log('这里是code')
|
||||
// console.log(this.onceCode)
|
||||
oilIdentityApi.sendCode(this.onceCode).then(res => {
|
||||
if (res.code === 20000) {
|
||||
console.log('这里是sendCode',res)
|
||||
// console.log('这里是sendCode',res)
|
||||
this.sessionKey = res.data.sessionKey
|
||||
uni.setStorageSync('openid', res.data.openId)
|
||||
uni.setStorageSync('unionid', res.data.unionId)
|
||||
console.log('这里是213','++++++')
|
||||
// console.log('这里是213','++++++')
|
||||
if(option){
|
||||
if(option.companyId == '1460872936910831616'){
|
||||
let sysCustomerInfos = {
|
||||
@@ -169,17 +167,17 @@
|
||||
}
|
||||
uni.setStorageSync('isOther',_that.otherUser)
|
||||
uni.setStorageSync('otherUserInfo',sysCustomerInfos)
|
||||
console.log('此处为data参数:',data)
|
||||
console.log('当前为卡利用户:companyId 为',sysCustomerInfos.companyId)
|
||||
// console.log('此处为data参数:',data)
|
||||
// console.log('当前为卡利用户:companyId 为',sysCustomerInfos.companyId)
|
||||
oilIdentityApi.wechatLogin(data).then(res=>{
|
||||
console.log('这里是wechatLogin',res)
|
||||
// console.log('这里是wechatLogin',res)
|
||||
this.OtherloginSuccess(res)
|
||||
console.log(res)
|
||||
// console.log(res)
|
||||
})
|
||||
return
|
||||
}
|
||||
}else{
|
||||
console.log('这里是213','----')
|
||||
// console.log('这里是213','----')
|
||||
this.autoLogin()
|
||||
}
|
||||
// uni.setStorageSync('isOther',_that.otherUser)
|
||||
@@ -312,6 +310,13 @@
|
||||
}
|
||||
})
|
||||
}, 1000);
|
||||
let siteId = uni.getStorageSync('siteId')
|
||||
if(siteId) {
|
||||
uni.redirectTo({
|
||||
url: `/BagStation/pages/stationDetail/stationDetail?siteId=${siteId}`
|
||||
})
|
||||
return
|
||||
}
|
||||
// 这里有问题
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/home'
|
||||
|
||||
@@ -351,6 +351,13 @@
|
||||
icon: 'none'
|
||||
})
|
||||
}, 1000);
|
||||
let siteId = uni.getStorageSync('siteId')
|
||||
if(siteId) {
|
||||
uni.redirectTo({
|
||||
url: `/BagStation/pages/stationDetail/stationDetail?siteId=${siteId}`
|
||||
})
|
||||
return
|
||||
}
|
||||
// 这里有问题
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/home'
|
||||
|
||||
@@ -217,8 +217,8 @@
|
||||
this.innerAudioContext?.stop()
|
||||
},
|
||||
onLoad(option) {
|
||||
let siteId = uni.getStorageSync('siteId') || option.siteId
|
||||
if(siteId) {
|
||||
// let siteId = uni.getStorageSync('siteId') ||
|
||||
if(option.siteId) {
|
||||
uni.setStorageSync('siteId',siteId)
|
||||
this.siteId = siteId
|
||||
this.getSiteInfo(siteId)
|
||||
|
||||
Reference in New Issue
Block a user