11
This commit is contained in:
6
App.vue
6
App.vue
@@ -75,6 +75,7 @@
|
||||
},
|
||||
onShareAppMessage() {
|
||||
wx.onAppRoute(() => {
|
||||
let white = ['BagStation/pages/stationDetail/stationDetail']
|
||||
// console.log('当前页面路由发生变化 触发该事件onShareAppMessage')
|
||||
const pages = getCurrentPages() //获取加载的页面
|
||||
const view = pages[pages.length - 1] //获取当前页面的对象
|
||||
@@ -94,11 +95,14 @@
|
||||
console.log(view.route)
|
||||
clearTimeout(loginTimer)
|
||||
clearTimeout(onlineTimer)
|
||||
|
||||
if (view.route != 'pages/index/startPage/startPage' && view.route.indexOf('BagAuth') == -1) {
|
||||
const token = uni.getStorageSync('Authorization')
|
||||
const openid = uni.getStorageSync('openid')
|
||||
if (token && openid) {
|
||||
this.getAmount()
|
||||
if(!white.includes(view.route)){
|
||||
this.getAmount()
|
||||
}
|
||||
onlineTimer = setTimeout(() => {
|
||||
if (this.loginStatus == 'offline') {
|
||||
uni.clearStorageSync()
|
||||
|
||||
@@ -4,11 +4,11 @@ import utils from '@/utils/encode'
|
||||
// const env = process.env.NODE_ENV
|
||||
const env = 'production'/* */
|
||||
// const env = 'test'
|
||||
const testUrl = 'http://192.168.0.65:38080'
|
||||
const testUrl = 'http://192.168.0.45:38080'
|
||||
// const productUrl = 'http://121.196.213.68/adminapi' //预生产
|
||||
|
||||
const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
|
||||
// const productUrl = 'http://uat.xingoil.com/adminapi' // 生产,加密 new
|
||||
// const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
|
||||
const productUrl = 'http://uat.xingoil.com/adminapi' // 生产,加密 new
|
||||
const service = axios.create({
|
||||
baseURL: env == 'production' ? productUrl : testUrl,
|
||||
// baseURL: testUrl,
|
||||
|
||||
Reference in New Issue
Block a user