master
xiaozhiyong 7 months ago
parent 6f434e41bb
commit bd75b1f7ac
  1. 4
      BagAuth/pages/login/login.vue
  2. 52
      pages/index/startPage/startPage.vue
  3. 23
      pages/tabbar/home/home.vue
  4. 6
      utils/request.js

@ -35,8 +35,8 @@
<button class="cu-btn margin-top round lg" @tap="refuseEmpower"> <button class="cu-btn margin-top round lg" @tap="refuseEmpower">
输入手机号码登录 输入手机号码登录
</button> </button>
<button class="cu-btn margin-top bg-0 round lg" @tap="refuseLogin"> <button class="cu-btn margin-top bg-0 round lg" style="font-size: 28rpx;" @tap="refuseLogin">
跳过 跳过登录
</button> </button>
</view> </view>
<view class="isKLUser" v-if='otherUser'> <view class="isKLUser" v-if='otherUser'>

@ -67,7 +67,7 @@
const updateManager = uni.getUpdateManager(); const updateManager = uni.getUpdateManager();
updateManager.onCheckForUpdate(function(res) { updateManager.onCheckForUpdate(function(res) {
// //
console.log('请求完新版本信息的回调', res.hasUpdate); // console.log('', res.hasUpdate);
if (!res.hasUpdate) { if (!res.hasUpdate) {
that.initFn(that.option) that.initFn(that.option)
} }
@ -95,20 +95,20 @@
async initFn(option) { async initFn(option) {
const token = uni.getStorageSync('Authorization') const token = uni.getStorageSync('Authorization')
const openid = uni.getStorageSync('openid') const openid = uni.getStorageSync('openid')
this.key = ''; // this.key = '';
let isOnline = false; let isOnline = false;
if(token){ if (token) {
await oilSiteApi.isLoginSuccess().then(res=>{ await oilSiteApi.isLoginSuccess().then(res => {
if(res.code==20000) isOnline = true if (res.code == 20000) isOnline = true
}).catch(err=>{}) }).catch(err => {})
} }
// console.log(isOnline,'isOnline') // console.log(isOnline,'isOnline')
// if (isOnline) {
// this.key = '线'
// } else {
// this.key = '线'
// }
if (isOnline) { if (isOnline) {
this.key = '在线'
} else {
this.key = '离线'
}
if (this.key == '在线') {
if (!uni.getStorageSync('filterData')) { if (!uni.getStorageSync('filterData')) {
this.getFilterData() this.getFilterData()
} else if (uni.getStorageSync('filterData')[0].detailList.length < 2) { } else if (uni.getStorageSync('filterData')[0].detailList.length < 2) {
@ -130,24 +130,18 @@
disposable: true disposable: true
}) })
} }
if (this.key == '在线') { uni.switchTab({
// console.log(type, 'typetypetypetype'); url: `/pages/tabbar/home/home`
})
uni.switchTab({ // if (this.key == '线') {
url: `/pages/tabbar/home/home`, // } else {
success() {}, // uni.redirectTo({
fail: (err) => { // url: '/BagAuth/pages/login/login'
console.log(err) // })
} // }
})
} else {
uni.redirectTo({
url: '/BagAuth/pages/login/login'
})
}
}, },
Interceptor(id) { Interceptor(id) {
let taht = this // let taht = this
// console.log(`%c `, 'color:red;font-size:50px'); // console.log(`%c `, 'color:red;font-size:50px');
// this.tools.overallInterceptor((opentype) => { // this.tools.overallInterceptor((opentype) => {
// uni.removeInterceptor(opentype); // uni.removeInterceptor(opentype);

@ -158,7 +158,7 @@
</view> </view>
</view> </view>
<msg-models :showAuthFrror="showAuthFrror" @hideOneModal="hideModel"></msg-models> <msg-models :showAuthFrror="showAuthFrror" @hideOneModal="hideModel"></msg-models>
<three-sites @hideOneModal="showThreeSites=false" :showThreeSites="showThreeSites"></three-sites> <three-sites v-if="showThreeSites" @hideOneModal="showThreeSites=false" :showThreeSites="showThreeSites"></three-sites>
<transBlcok ref="transBlcok" /> <transBlcok ref="transBlcok" />
<!-- <tabbar :current-page="0"/> --> <!-- <tabbar :current-page="0"/> -->
</view> </view>
@ -335,9 +335,7 @@
onReady() { onReady() {
let IsOtherUser = this.isOther
let _that = this
let IsOtherUser = _that.isOther
if (IsOtherUser) { if (IsOtherUser) {
uni.showToast({ uni.showToast({
title: '卡力用户只支持跳转登录', title: '卡力用户只支持跳转登录',
@ -348,12 +346,11 @@
}) })
return return
} }
console.log('首页 非卡力 进入') // console.log(' ')
}, },
onShow() { onShow() {
this.refreshLocation() this.refreshLocation()
let _that = this let IsOtherUser = this.isOther
let IsOtherUser = _that.isOther
if (IsOtherUser) { if (IsOtherUser) {
uni.showToast({ uni.showToast({
title: '卡力用户只支持跳转登录', title: '卡力用户只支持跳转登录',
@ -367,9 +364,7 @@
}, },
onLoad(e) { onLoad(e) {
// uni.hideTabBar() // uni.hideTabBar()
let IsOtherUser = this.isOther
let _that = this
let IsOtherUser = _that.isOther
if (IsOtherUser) { if (IsOtherUser) {
// //
@ -543,8 +538,7 @@
getAuthInfo() { getAuthInfo() {
oilSiteApi.getUserAuthInfo().then(res => { oilSiteApi.getUserAuthInfo().then(res => {
if (res.code === 20000) { if (res.code === 20000) {
let _that = this let IsOtherUser = this.isOther
let IsOtherUser = _that.isOther
if (IsOtherUser) { if (IsOtherUser) {
uni.showToast({ uni.showToast({
title: '卡力用户只支持跳转登录', title: '卡力用户只支持跳转登录',
@ -726,10 +720,7 @@
if (!uni.getStorageSync('user')) { if (!uni.getStorageSync('user')) {
data1.params.role = 1 data1.params.role = 1
oilSiteApi.readOnlySites(data1).then(res => { oilSiteApi.readOnlySites(data1).then(res => {
let _that = this let IsOtherUser = this.isOther
let IsOtherUser = _that.isOther
console.log(IsOtherUser, '这里是判断是否为卡力')
console.log('这里是readOnlySites', IsOtherUser, '++++++')
if (IsOtherUser) { if (IsOtherUser) {
uni.showToast({ uni.showToast({
title: '卡力用户只支持跳转登录', title: '卡力用户只支持跳转登录',

@ -5,10 +5,10 @@ import utils from '@/utils/encode'
// const env = 'test' // const env = 'test'
const env = 'production' const env = 'production'
// 45 // 45
const testUrl = 'http://192.168.1.132:38080' const testUrl = 'http://192.168.110.77:38080'
const productUrl = 'https://www.xingoil.com/adminapi' // 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://192.168.0.191:38080'
// const productUrl = 'http://121.196.213.68/adminapi' // const productUrl = 'http://121.196.213.68/adminapi'
const service = axios.create({ const service = axios.create({

Loading…
Cancel
Save