更新
This commit is contained in:
26
App.vue
26
App.vue
@@ -67,7 +67,7 @@
|
||||
value: item.id
|
||||
})
|
||||
})
|
||||
console.log(channelCodes, productCodes, siteBrands)
|
||||
// console.log(channelCodes, productCodes, siteBrands)
|
||||
this.menuList[0].detailList = this.menuList[0].detailList.concat(channelCodes)
|
||||
this.menuList[1].detailList = this.menuList[1].detailList.concat(productCodes)
|
||||
this.menuList[2].detailList = this.menuList[2].detailList.concat(siteBrands)
|
||||
@@ -95,10 +95,12 @@
|
||||
if(view.route === 'BagStation/pages/stationDetail/stationDetail') {
|
||||
uni.removeStorageSync('refuseLogin')
|
||||
}
|
||||
// console.log('white.includes(view.route)',white.includes(view.route))
|
||||
// // 是否跳过登陆
|
||||
let isRefuseLogin = uni.getStorageSync('refuseLogin')
|
||||
if(isRefuseLogin || white.includes(view.route) || view.route.includes('BagAuth')) return
|
||||
this.getAmount()
|
||||
// console.log('111111111111111')
|
||||
this.getAmount()
|
||||
})
|
||||
},
|
||||
// 是否token过期或ip更改
|
||||
@@ -106,10 +108,14 @@
|
||||
// clearTimeout(loginTimer)
|
||||
accountApi.getTotalOilCardInfo().then(res => {
|
||||
if (res.code == 42011) {
|
||||
uni.setStorageSync('Authorization',null)
|
||||
uni.setStorageSync('openid',null)
|
||||
|
||||
uni.showModal({
|
||||
title: '需要您重新登录',
|
||||
content: res.msg,
|
||||
duration: '3000',
|
||||
showCancel:false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
@@ -125,13 +131,17 @@
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
onUnload() {
|
||||
uni.hideLoading()
|
||||
},
|
||||
|
||||
onShow: function(option) {
|
||||
const token = uni.getStorageSync('Authorization')
|
||||
const openid = uni.getStorageSync('openid')
|
||||
if (token && openid) {
|
||||
this.getAmount()
|
||||
}
|
||||
// const token = uni.getStorageSync('Authorization')
|
||||
// const openid = uni.getStorageSync('openid')
|
||||
// if (token && openid) {
|
||||
// this.getAmount()
|
||||
// }
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: function(res) {
|
||||
@@ -142,7 +152,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
<!-- <button class="cu-btn block lg margin-top " @tap="delOrder">删除订单</button> -->
|
||||
</view>
|
||||
<view class="customer-service" @click="arousePhone">
|
||||
<image src="../../static/img/customer-service.png"></image>
|
||||
<image src="../../BagStation/static/img/customer-service.png"></image>
|
||||
联系客服
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log('mounted')
|
||||
// console.log('mounted')
|
||||
},
|
||||
onLoad(option) {
|
||||
this.option = option;
|
||||
@@ -62,7 +62,7 @@
|
||||
onReady(option) {},
|
||||
methods: {
|
||||
versionUpdate() {
|
||||
console.log('versionUpdate')
|
||||
// console.log('versionUpdate')
|
||||
let that = this
|
||||
const updateManager = uni.getUpdateManager();
|
||||
updateManager.onCheckForUpdate(function(res) {
|
||||
@@ -102,7 +102,7 @@
|
||||
if(res.code==20000) isOnline = true
|
||||
}).catch(err=>{})
|
||||
}
|
||||
console.log(isOnline,'isOnline')
|
||||
// console.log(isOnline,'isOnline')
|
||||
if (isOnline) {
|
||||
this.key = '在线'
|
||||
} else {
|
||||
@@ -131,7 +131,7 @@
|
||||
})
|
||||
}
|
||||
if (this.key == '在线') {
|
||||
console.log(type, 'typetypetypetype');
|
||||
// console.log(type, 'typetypetypetype');
|
||||
|
||||
uni.switchTab({
|
||||
url: `/pages/tabbar/home/home`,
|
||||
@@ -148,7 +148,7 @@
|
||||
},
|
||||
Interceptor(id) {
|
||||
let taht = this
|
||||
console.log(`%c 检测到参数拦截器启动`, 'color:red;font-size:50px');
|
||||
// console.log(`%c 检测到参数拦截器启动`, 'color:red;font-size:50px');
|
||||
// this.tools.overallInterceptor((opentype) => {
|
||||
// uni.removeInterceptor(opentype);
|
||||
// wxCode.getQrCodeType({
|
||||
@@ -181,7 +181,7 @@
|
||||
})
|
||||
},
|
||||
getFilterData() {
|
||||
console.log('wodefenzhi')
|
||||
// console.log('wodefenzhi')
|
||||
oilSiteApi.getCheckInfo().then(res => {
|
||||
if (res.code == 20000) {
|
||||
|
||||
@@ -206,13 +206,13 @@
|
||||
value: item.id
|
||||
})
|
||||
})
|
||||
console.log(channelCodes, productCodes, siteBrands)
|
||||
// console.log(channelCodes, productCodes, siteBrands)
|
||||
this.menuList[0].detailList = this.menuList[0].detailList.concat(channelCodes)
|
||||
this.menuList[1].detailList = this.menuList[1].detailList.concat(productCodes)
|
||||
this.menuList[2].detailList = this.menuList[2].detailList.concat(siteBrands)
|
||||
uni.setStorageSync('filterData', this.menuList)
|
||||
uni.setStorageSync('productCodeList', res.data.productCodeList)
|
||||
console.log(res, '%c 这里是启动页调用的菜单列表', 'font-size:36px;color:red;')
|
||||
// console.log(res, '%c 这里是启动页调用的菜单列表', 'font-size:36px;color:red;')
|
||||
// this.$refs.slFilter.resetMenuList(this.menuList)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user