更新
This commit is contained in:
24
App.vue
24
App.vue
@@ -67,7 +67,7 @@
|
|||||||
value: item.id
|
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[0].detailList = this.menuList[0].detailList.concat(channelCodes)
|
||||||
this.menuList[1].detailList = this.menuList[1].detailList.concat(productCodes)
|
this.menuList[1].detailList = this.menuList[1].detailList.concat(productCodes)
|
||||||
this.menuList[2].detailList = this.menuList[2].detailList.concat(siteBrands)
|
this.menuList[2].detailList = this.menuList[2].detailList.concat(siteBrands)
|
||||||
@@ -95,9 +95,11 @@
|
|||||||
if(view.route === 'BagStation/pages/stationDetail/stationDetail') {
|
if(view.route === 'BagStation/pages/stationDetail/stationDetail') {
|
||||||
uni.removeStorageSync('refuseLogin')
|
uni.removeStorageSync('refuseLogin')
|
||||||
}
|
}
|
||||||
|
// console.log('white.includes(view.route)',white.includes(view.route))
|
||||||
// // 是否跳过登陆
|
// // 是否跳过登陆
|
||||||
let isRefuseLogin = uni.getStorageSync('refuseLogin')
|
let isRefuseLogin = uni.getStorageSync('refuseLogin')
|
||||||
if(isRefuseLogin || white.includes(view.route) || view.route.includes('BagAuth')) return
|
if(isRefuseLogin || white.includes(view.route) || view.route.includes('BagAuth')) return
|
||||||
|
// console.log('111111111111111')
|
||||||
this.getAmount()
|
this.getAmount()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -106,10 +108,14 @@
|
|||||||
// clearTimeout(loginTimer)
|
// clearTimeout(loginTimer)
|
||||||
accountApi.getTotalOilCardInfo().then(res => {
|
accountApi.getTotalOilCardInfo().then(res => {
|
||||||
if (res.code == 42011) {
|
if (res.code == 42011) {
|
||||||
|
uni.setStorageSync('Authorization',null)
|
||||||
|
uni.setStorageSync('openid',null)
|
||||||
|
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '需要您重新登录',
|
title: '需要您重新登录',
|
||||||
content: res.msg,
|
content: res.msg,
|
||||||
duration: '3000',
|
duration: '3000',
|
||||||
|
showCancel:false,
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
@@ -126,12 +132,16 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onUnload() {
|
||||||
|
uni.hideLoading()
|
||||||
|
},
|
||||||
|
|
||||||
onShow: function(option) {
|
onShow: function(option) {
|
||||||
const token = uni.getStorageSync('Authorization')
|
// const token = uni.getStorageSync('Authorization')
|
||||||
const openid = uni.getStorageSync('openid')
|
// const openid = uni.getStorageSync('openid')
|
||||||
if (token && openid) {
|
// if (token && openid) {
|
||||||
this.getAmount()
|
// this.getAmount()
|
||||||
}
|
// }
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
@@ -142,7 +152,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
||||||
|
|||||||
@@ -153,7 +153,7 @@
|
|||||||
<!-- <button class="cu-btn block lg margin-top " @tap="delOrder">删除订单</button> -->
|
<!-- <button class="cu-btn block lg margin-top " @tap="delOrder">删除订单</button> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="customer-service" @click="arousePhone">
|
<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>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log('mounted')
|
// console.log('mounted')
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.option = option;
|
this.option = option;
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
onReady(option) {},
|
onReady(option) {},
|
||||||
methods: {
|
methods: {
|
||||||
versionUpdate() {
|
versionUpdate() {
|
||||||
console.log('versionUpdate')
|
// console.log('versionUpdate')
|
||||||
let that = this
|
let that = this
|
||||||
const updateManager = uni.getUpdateManager();
|
const updateManager = uni.getUpdateManager();
|
||||||
updateManager.onCheckForUpdate(function(res) {
|
updateManager.onCheckForUpdate(function(res) {
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
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) {
|
if (isOnline) {
|
||||||
this.key = '在线'
|
this.key = '在线'
|
||||||
} else {
|
} else {
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (this.key == '在线') {
|
if (this.key == '在线') {
|
||||||
console.log(type, 'typetypetypetype');
|
// console.log(type, 'typetypetypetype');
|
||||||
|
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: `/pages/tabbar/home/home`,
|
url: `/pages/tabbar/home/home`,
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
},
|
},
|
||||||
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);
|
||||||
// wxCode.getQrCodeType({
|
// wxCode.getQrCodeType({
|
||||||
@@ -181,7 +181,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getFilterData() {
|
getFilterData() {
|
||||||
console.log('wodefenzhi')
|
// console.log('wodefenzhi')
|
||||||
oilSiteApi.getCheckInfo().then(res => {
|
oilSiteApi.getCheckInfo().then(res => {
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
|
|
||||||
@@ -206,13 +206,13 @@
|
|||||||
value: item.id
|
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[0].detailList = this.menuList[0].detailList.concat(channelCodes)
|
||||||
this.menuList[1].detailList = this.menuList[1].detailList.concat(productCodes)
|
this.menuList[1].detailList = this.menuList[1].detailList.concat(productCodes)
|
||||||
this.menuList[2].detailList = this.menuList[2].detailList.concat(siteBrands)
|
this.menuList[2].detailList = this.menuList[2].detailList.concat(siteBrands)
|
||||||
uni.setStorageSync('filterData', this.menuList)
|
uni.setStorageSync('filterData', this.menuList)
|
||||||
uni.setStorageSync('productCodeList', res.data.productCodeList)
|
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)
|
// this.$refs.slFilter.resetMenuList(this.menuList)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user