广告弹窗相关更新
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
},
|
||||
watch: {
|
||||
forceUpdate(val,oldval) {
|
||||
console.log(val,oldval)
|
||||
// 在 forceUpdate 改变时执行更新操作
|
||||
let time = uni.cache.get('popUpTime') ? new Date().getTime() - uni.cache.get('popUpTime') : 1000;
|
||||
if ( time >= 1000 ) {
|
||||
|
||||
@@ -338,7 +338,6 @@
|
||||
},
|
||||
async onShow() {
|
||||
// 判断显示那个页面
|
||||
|
||||
if (uni.cache.get('shopUser') && uni.cache.get('token')) {
|
||||
this.showindex = false
|
||||
uni.cache.set('types', 'index');
|
||||
@@ -351,10 +350,9 @@
|
||||
uni.cache.set('shopUserInfo',this.usershopUserinfo)
|
||||
}
|
||||
this.loginwxuserInfo() //个人信息接口
|
||||
if ( !uni.cache.get('forceUpdate') ) {
|
||||
if ( uni.cache.get('forceUpdate') == 1) {
|
||||
this.forceUpdate = !this.forceUpdate;
|
||||
}
|
||||
uni.cache.set('forceUpdate',false)
|
||||
this.getShopExtend()
|
||||
this.timersetInterval = '0'
|
||||
} else {
|
||||
|
||||
@@ -62,18 +62,22 @@
|
||||
methods: {
|
||||
scanCodehandle(i) {
|
||||
console.log(1)
|
||||
setTimeout(()=>{
|
||||
uni.cache.set('forceUpdate',2)
|
||||
},200)
|
||||
if (i == 0) {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
let tableCode = this.getQueryString(decodeURIComponent(res.result), 'code')
|
||||
uni.cache.set('tableCode', tableCode)
|
||||
if (tableCode) {
|
||||
uni.cache.set('forceUpdate',true)
|
||||
uni.pro.navigateTo('order_food/order_food', {
|
||||
// shopId_id: uni.cache.get('shopUser'),
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
fail: () => {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
// this.shopId = e.shopId;
|
||||
// this.init();
|
||||
// }
|
||||
console.log(e)
|
||||
uni.cache.set('forceUpdate',1)
|
||||
if (e.q) {
|
||||
this.shopId = this.getQueryString(decodeURIComponent(e.q), 'shopId')
|
||||
this.tokenShow = false;
|
||||
|
||||
@@ -99,7 +99,8 @@
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.shopId_id = e.shopId_id
|
||||
this.shopId_id = e.shopId_id;
|
||||
uni.cache.set('forceUpdate',1)
|
||||
},
|
||||
onShow() {
|
||||
this.init();
|
||||
|
||||
@@ -209,6 +209,7 @@
|
||||
}
|
||||
this.swiperCurrent = ''
|
||||
this.init_fn()
|
||||
uni.cache.set('forceUpdate',1)
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.navtabindex == 1) {
|
||||
|
||||
@@ -474,8 +474,8 @@
|
||||
},
|
||||
async onShow() {
|
||||
let _this = this;
|
||||
this.forceUpdate = !this.forceUpdate;
|
||||
this.orderdetailFlag = true;
|
||||
|
||||
uni.pageScrollTo({
|
||||
scrollTop: 0,
|
||||
duration: 0
|
||||
@@ -1115,6 +1115,10 @@
|
||||
setTimeout(() => {
|
||||
this.getElementTop();
|
||||
}, 500);
|
||||
this.forceUpdate = !this.forceUpdate;
|
||||
setTimeout(()=>{
|
||||
uni.cache.set('forceUpdate',1);
|
||||
},300)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -73,7 +73,9 @@
|
||||
shopExtend: null,
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
onLoad() {
|
||||
uni.cache.set('forceUpdate',1)
|
||||
},
|
||||
computed: {
|
||||
HeighT() { //手机类型的尺寸
|
||||
return this.$store.getters.is_BarHeight
|
||||
|
||||
Reference in New Issue
Block a user