|
|
|
@ -153,11 +153,16 @@ |
|
|
|
|
sessionKey: '', |
|
|
|
|
nickName: '', |
|
|
|
|
loginOut: uni.getStorageSync('loginOut') ? true : false, |
|
|
|
|
scanningParams:null |
|
|
|
|
// scanningParams:null |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad(options) { |
|
|
|
|
let scanningParamsLocale = uni.getStorageSync('scanningParams') |
|
|
|
|
uni.clearStorageSync() |
|
|
|
|
if(scanningParamsLocale || options.scanningParams) { |
|
|
|
|
// 用于扫码进入油站详情页面 |
|
|
|
|
uni.setStorageSync('scanningParams',options.scanningParams || scanningParamsLocale) |
|
|
|
|
} |
|
|
|
|
this.refreshLocation() |
|
|
|
|
uni.login({ |
|
|
|
|
provider: 'weixin', |
|
|
|
@ -166,10 +171,6 @@ |
|
|
|
|
this.onceCode = code |
|
|
|
|
oilIdentityApi.sendCode(this.onceCode).then(res => { |
|
|
|
|
if (res.code === 20000) { |
|
|
|
|
if(options.scanningParams) { |
|
|
|
|
// 用于扫码进入油站详情页面 |
|
|
|
|
this.scanningParams = options.scanningParams |
|
|
|
|
} |
|
|
|
|
this.sessionKey = res.data.sessionKey |
|
|
|
|
uni.setStorageSync('openid', res.data.openId) |
|
|
|
|
uni.setStorageSync('unionid', res.data.unionId) |
|
|
|
@ -225,7 +226,7 @@ |
|
|
|
|
}, |
|
|
|
|
refuseEmpower() { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: `/BagAuth/pages/login/oldLogin?scanningParams=${this.scanningParams}` |
|
|
|
|
url: '/BagAuth/pages/login/oldLogin' |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -280,9 +281,10 @@ |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, 1000); |
|
|
|
|
if(this.scanningParams) { |
|
|
|
|
let scanningParams = uni.getStorageSync('scanningParams') |
|
|
|
|
if(scanningParams) { |
|
|
|
|
uni.redirectTo({ |
|
|
|
|
url: `/BagStation/pages/stationDetail/stationDetail?q=${this.scanningParams}` |
|
|
|
|
url: `/BagStation/pages/stationDetail/stationDetail?q=${scanningParams}` |
|
|
|
|
}) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|