|
|
|
@ -170,6 +170,7 @@ |
|
|
|
|
import msgModels from '../../components/showModels.vue' |
|
|
|
|
import accountApi from '@/api/account.js' |
|
|
|
|
import Financial from '@/api/Financial.js' |
|
|
|
|
import financeServe from '@/api/oil-finance.js' |
|
|
|
|
import threeSites from '@/components/three-sites.vue' |
|
|
|
|
import oilSiteApi from '@/api/oil-site.js' |
|
|
|
|
import siteItem from '@/components/site-item/site-item.vue' |
|
|
|
@ -410,6 +411,7 @@ |
|
|
|
|
const openid = uni.getStorageSync('openid') |
|
|
|
|
if (token && openid) { |
|
|
|
|
this.getAuthInfo() |
|
|
|
|
|
|
|
|
|
this.refreshLocation() |
|
|
|
|
} else { |
|
|
|
|
uni.showToast({ |
|
|
|
@ -425,6 +427,42 @@ |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
logOut() { |
|
|
|
|
accountApi.logout('authSystem').then(res => { |
|
|
|
|
if (res.code == '20000') { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '该油卡已被禁用', |
|
|
|
|
icon:'none' |
|
|
|
|
}) |
|
|
|
|
uni.clearStorageSync() |
|
|
|
|
uni.setStorageSync('loginOut', true) |
|
|
|
|
setTimeout(() => { |
|
|
|
|
uni.reLaunch({ |
|
|
|
|
url: '/BagAuth/pages/login/login' |
|
|
|
|
}) |
|
|
|
|
}, 2000) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
getInfoByParam() { |
|
|
|
|
let storage = uni.getStorageSync('companyCard') |
|
|
|
|
if (storage) { |
|
|
|
|
let cardInfo = JSON.parse(storage) |
|
|
|
|
// console.log('cardInfo',cardInfo) |
|
|
|
|
financeServe.getInfoByParam({ |
|
|
|
|
companyId: cardInfo.companyId, |
|
|
|
|
customerId: cardInfo.customerId |
|
|
|
|
}).then(res => { |
|
|
|
|
if (res.code === 20000) { |
|
|
|
|
if(res.data.accountState == 0) { |
|
|
|
|
this.logOut() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
swiperClick(item, index) { |
|
|
|
|
if (item?.JumpPage) { |
|
|
|
|
switch (item.JumpPage) { |
|
|
|
@ -519,7 +557,8 @@ |
|
|
|
|
} |
|
|
|
|
this.getAmount() |
|
|
|
|
this.getSiteList() |
|
|
|
|
// realStatus: 0 vehicleStatus: 0 |
|
|
|
|
this.getInfoByParam() |
|
|
|
|
|
|
|
|
|
if (this.showAuthFrzen <= new Date().getTime()) { |
|
|
|
|
this.showAuthFrror = res.data.realStatus && res.data.vehicleStatus ? false : |
|
|
|
|
true |
|
|
|
|