更新
This commit is contained in:
@@ -17,6 +17,14 @@ export default {
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 返回当前油卡信息
|
||||||
|
getInfoByParam(params) {
|
||||||
|
return request({
|
||||||
|
url: '/oil-finance/oilCustomerCompanyAccount/getInfoByParam',
|
||||||
|
method: 'POST',
|
||||||
|
data:params
|
||||||
|
})
|
||||||
|
},
|
||||||
//确认切换油卡
|
//确认切换油卡
|
||||||
chooseCompanyCard(data) {
|
chooseCompanyCard(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -170,6 +170,7 @@
|
|||||||
import msgModels from '../../components/showModels.vue'
|
import msgModels from '../../components/showModels.vue'
|
||||||
import accountApi from '@/api/account.js'
|
import accountApi from '@/api/account.js'
|
||||||
import Financial from '@/api/Financial.js'
|
import Financial from '@/api/Financial.js'
|
||||||
|
import financeServe from '@/api/oil-finance.js'
|
||||||
import threeSites from '@/components/three-sites.vue'
|
import threeSites from '@/components/three-sites.vue'
|
||||||
import oilSiteApi from '@/api/oil-site.js'
|
import oilSiteApi from '@/api/oil-site.js'
|
||||||
import siteItem from '@/components/site-item/site-item.vue'
|
import siteItem from '@/components/site-item/site-item.vue'
|
||||||
@@ -333,8 +334,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
onReady() {
|
onReady() {
|
||||||
|
|
||||||
|
|
||||||
let _that = this
|
let _that = this
|
||||||
let IsOtherUser = _that.isOther
|
let IsOtherUser = _that.isOther
|
||||||
if (IsOtherUser) {
|
if (IsOtherUser) {
|
||||||
@@ -366,7 +367,7 @@
|
|||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
// uni.hideTabBar()
|
// uni.hideTabBar()
|
||||||
|
|
||||||
let _that = this
|
let _that = this
|
||||||
let IsOtherUser = _that.isOther
|
let IsOtherUser = _that.isOther
|
||||||
|
|
||||||
@@ -410,6 +411,7 @@
|
|||||||
const openid = uni.getStorageSync('openid')
|
const openid = uni.getStorageSync('openid')
|
||||||
if (token && openid) {
|
if (token && openid) {
|
||||||
this.getAuthInfo()
|
this.getAuthInfo()
|
||||||
|
|
||||||
this.refreshLocation()
|
this.refreshLocation()
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -425,6 +427,42 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
swiperClick(item, index) {
|
||||||
if (item?.JumpPage) {
|
if (item?.JumpPage) {
|
||||||
switch (item.JumpPage) {
|
switch (item.JumpPage) {
|
||||||
@@ -519,7 +557,8 @@
|
|||||||
}
|
}
|
||||||
this.getAmount()
|
this.getAmount()
|
||||||
this.getSiteList()
|
this.getSiteList()
|
||||||
// realStatus: 0 vehicleStatus: 0
|
this.getInfoByParam()
|
||||||
|
|
||||||
if (this.showAuthFrzen <= new Date().getTime()) {
|
if (this.showAuthFrzen <= new Date().getTime()) {
|
||||||
this.showAuthFrror = res.data.realStatus && res.data.vehicleStatus ? false :
|
this.showAuthFrror = res.data.realStatus && res.data.vehicleStatus ? false :
|
||||||
true
|
true
|
||||||
@@ -1040,4 +1079,4 @@
|
|||||||
.my-icon-sm .text-sm {
|
.my-icon-sm .text-sm {
|
||||||
line-height: 1rem;
|
line-height: 1rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user