pull/3/head
xiaozhiyong 2 years ago
parent 4fb1d03356
commit a7ae4cd7d9
  1. 20
      App.vue
  2. 18
      BagAuth/pages/login/login.vue
  3. 13
      BagAuth/pages/login/oldLogin.vue
  4. 11
      BagStation/pages/stationDetail/stationDetail.vue
  5. 2
      pages/tabbar/home/home.vue
  6. 2
      utils/request.js

@ -134,14 +134,17 @@
const openid = uni.getStorageSync('openid')
let jumpUrl = '/BagAuth/pages/login/login'
let urlTarget = this.obtainUrlPathParameterTarget(view.$page.fullPath)
console.log('urlTarget',urlTarget)
let target = {}
if(urlTarget.q) {
let originLink = decodeURIComponent(decodeURIComponent(urlTarget.q))
target = this.obtainUrlPathParameterTarget(originLink)
target.siteId && (jumpUrl += `?scanningParams=${decodeURIComponent(urlTarget.q)}`)
}
// if(view.route === 'BagStation/pages/stationDetail/stationDetail') {
// let urlTarget = this.obtainUrlPathParameterTarget(view.$page.fullPath)
// if(urlTarget.q) {
// let originLink = decodeURIComponent(decodeURIComponent(urlTarget.q))
// target = this.obtainUrlPathParameterTarget(originLink)
// target.siteId && (jumpUrl += `?scanningParams=${decodeURIComponent(urlTarget.q)}`)
// }
// }
// console.log('jumpUrl',jumpUrl)
if (token && openid) {
this.getAmount()
@ -277,6 +280,9 @@
},
onHide: function() {
// console.log('App Hide')
},
onUnload:function() {
uni.removeStorageSync('scanningParams')
}
}
</script>

@ -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
}

@ -172,13 +172,6 @@
loginRes: {},
checked: false,
next: false,
scanningParams:null
}
},
onLoad(options) {
if(options.scanningParams) {
//
this.scanningParams = options.scanningParams
}
},
onShow() {},
@ -409,9 +402,11 @@
icon: 'none'
})
}, 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
}

@ -188,16 +188,9 @@
onLoad(option) {
// console.log('option',option)
// let userInfo = uni.getStorageSync('user')
// if(!userInfo && option.q) {
// uni.redirectTo({
// url: `/BagAuth/pages/login/login?scanningParams=${option.q}`
// })
// return
// }
if(option.q) {
uni.setStorageSync('scanningParams',option.q)
let originLink = decodeURIComponent(option.q)
let target = this.obtainUrlPathParameterTarget(originLink)
console.log('target',target)

@ -567,7 +567,7 @@
} else {
uni.showModal({
title:'请您登录',
content:"登录小星加油才可以加油 |˛˙꒳˙)♡",
content:"登录中品加油才可以加油 |˛˙꒳˙)♡",
confirmText:'去登陆',
success: (res) => {
if(res.confirm){

@ -4,7 +4,7 @@ import utils from '@/utils/encode'
// const env = process.env.NODE_ENV
// const env = 'production'/* */
const env = 'production'
const testUrl = 'http://192.168.110.230:38080'
const testUrl = 'http://192.168.110.10:38080'
// const productUrl = 'http://121.196.213.68/adminapi' //预生产
// const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new

Loading…
Cancel
Save