Commit e5434229 by 李嘉林

reload

parent be90f6af
...@@ -104,17 +104,24 @@ export default { ...@@ -104,17 +104,24 @@ export default {
}, },
onShow(){ onShow(){
console.log('--onShow--') console.log('--onShow--')
// 重载页面 this.loadPage();
let reloadTabbarPage = wx.getStorageSync("reloadTabbarPage") || 0;
if(reloadTabbarPage == 1){
this.showPage = false;
setTimeout(() => {
this.showPage = true;
}, 0);
wx.removeStorageSync("reloadTabbarPage");
}
}, },
methods: { methods: {
loadPage() {
// 需要重新加载页面
let pageList = ['/shopCart/shoppingCart'];
let includesPage = pageList.filter(item => this.pageUrl.indexOf(item) > -1);
console.log(includesPage,'-----includesPage')
// 重载页面
let reloadTabbarPage = wx.getStorageSync("reloadTabbarPage") || 0;
if(reloadTabbarPage == 1 || includesPage.length>0){
this.showPage = false;
setTimeout(() => {
this.showPage = true;
}, 0);
wx.removeStorageSync("reloadTabbarPage");
}
},
handleError(data) { handleError(data) {
wx.showLoading({ wx.showLoading({
title: "网页加载失败 请右上角刷新", title: "网页加载失败 请右上角刷新",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment