diff --git a/BagAuth/pages/login/login.vue b/BagAuth/pages/login/login.vue index ee6ad10..158989b 100644 --- a/BagAuth/pages/login/login.vue +++ b/BagAuth/pages/login/login.vue @@ -35,8 +35,8 @@ - diff --git a/pages/index/startPage/startPage.vue b/pages/index/startPage/startPage.vue index 4d0af27..65ce356 100644 --- a/pages/index/startPage/startPage.vue +++ b/pages/index/startPage/startPage.vue @@ -67,7 +67,7 @@ const updateManager = uni.getUpdateManager(); updateManager.onCheckForUpdate(function(res) { // 请求完新版本信息的回调 - console.log('请求完新版本信息的回调', res.hasUpdate); + // console.log('请求完新版本信息的回调', res.hasUpdate); if (!res.hasUpdate) { that.initFn(that.option) } @@ -95,20 +95,20 @@ async initFn(option) { const token = uni.getStorageSync('Authorization') const openid = uni.getStorageSync('openid') - this.key = ''; - let isOnline = false; - if(token){ - await oilSiteApi.isLoginSuccess().then(res=>{ - if(res.code==20000) isOnline = true - }).catch(err=>{}) - } + // this.key = ''; + let isOnline = false; + if (token) { + await oilSiteApi.isLoginSuccess().then(res => { + if (res.code == 20000) isOnline = true + }).catch(err => {}) + } // console.log(isOnline,'isOnline') + // if (isOnline) { + // this.key = '在线' + // } else { + // this.key = '离线' + // } if (isOnline) { - this.key = '在线' - } else { - this.key = '离线' - } - if (this.key == '在线') { if (!uni.getStorageSync('filterData')) { this.getFilterData() } else if (uni.getStorageSync('filterData')[0].detailList.length < 2) { @@ -130,24 +130,18 @@ disposable: true }) } - if (this.key == '在线') { - // console.log(type, 'typetypetypetype'); - - uni.switchTab({ - url: `/pages/tabbar/home/home`, - success() {}, - fail: (err) => { - console.log(err) - } - }) - } else { - uni.redirectTo({ - url: '/BagAuth/pages/login/login' - }) - } + uni.switchTab({ + url: `/pages/tabbar/home/home` + }) + // if (this.key == '在线') { + // } else { + // uni.redirectTo({ + // url: '/BagAuth/pages/login/login' + // }) + // } }, Interceptor(id) { - let taht = this + // let taht = this // console.log(`%c 检测到参数拦截器启动`, 'color:red;font-size:50px'); // this.tools.overallInterceptor((opentype) => { // uni.removeInterceptor(opentype); diff --git a/pages/tabbar/home/home.vue b/pages/tabbar/home/home.vue index d56fb77..90df6a9 100644 --- a/pages/tabbar/home/home.vue +++ b/pages/tabbar/home/home.vue @@ -158,7 +158,7 @@ - + @@ -335,9 +335,7 @@ onReady() { - - let _that = this - let IsOtherUser = _that.isOther + let IsOtherUser = this.isOther if (IsOtherUser) { uni.showToast({ title: '卡力用户只支持跳转登录', @@ -348,12 +346,11 @@ }) return } - console.log('首页 非卡力 进入') + // console.log('首页 非卡力 进入') }, onShow() { this.refreshLocation() - let _that = this - let IsOtherUser = _that.isOther + let IsOtherUser = this.isOther if (IsOtherUser) { uni.showToast({ title: '卡力用户只支持跳转登录', @@ -367,9 +364,7 @@ }, onLoad(e) { // uni.hideTabBar() - - let _that = this - let IsOtherUser = _that.isOther + let IsOtherUser = this.isOther if (IsOtherUser) { // 卡力 @@ -543,8 +538,7 @@ getAuthInfo() { oilSiteApi.getUserAuthInfo().then(res => { if (res.code === 20000) { - let _that = this - let IsOtherUser = _that.isOther + let IsOtherUser = this.isOther if (IsOtherUser) { uni.showToast({ title: '卡力用户只支持跳转登录', @@ -726,10 +720,7 @@ if (!uni.getStorageSync('user')) { data1.params.role = 1 oilSiteApi.readOnlySites(data1).then(res => { - let _that = this - let IsOtherUser = _that.isOther - console.log(IsOtherUser, '这里是判断是否为卡力') - console.log('这里是readOnlySites', IsOtherUser, '++++++') + let IsOtherUser = this.isOther if (IsOtherUser) { uni.showToast({ title: '卡力用户只支持跳转登录', diff --git a/utils/request.js b/utils/request.js index dd7714e..050b339 100644 --- a/utils/request.js +++ b/utils/request.js @@ -5,10 +5,10 @@ import utils from '@/utils/encode' // const env = 'test' const env = 'production' // 45 -const testUrl = 'http://192.168.1.132:38080' -const productUrl = 'https://www.xingoil.com/adminapi' +const testUrl = 'http://192.168.110.77:38080' +// const productUrl = 'https://www.xingoil.com/adminapi' -// const productUrl = 'http://uat.xingoil.com/adminapi' +const productUrl = 'http://uat.xingoil.com/adminapi' // const productUrl = 'http://192.168.0.191:38080' // const productUrl = 'http://121.196.213.68/adminapi' const service = axios.create({