Commit e5434229 by 李嘉林

reload

parent be90f6af
...@@ -104,9 +104,17 @@ export default { ...@@ -104,9 +104,17 @@ export default {
}, },
onShow(){ onShow(){
console.log('--onShow--') console.log('--onShow--')
this.loadPage();
},
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; let reloadTabbarPage = wx.getStorageSync("reloadTabbarPage") || 0;
if(reloadTabbarPage == 1){ if(reloadTabbarPage == 1 || includesPage.length>0){
this.showPage = false; this.showPage = false;
setTimeout(() => { setTimeout(() => {
this.showPage = true; this.showPage = true;
...@@ -114,7 +122,6 @@ export default { ...@@ -114,7 +122,6 @@ export default {
wx.removeStorageSync("reloadTabbarPage"); wx.removeStorageSync("reloadTabbarPage");
} }
}, },
methods: {
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