diff --git a/addons/unishop/uniapp/uni-shop/pages/index/index.vue b/addons/unishop/uniapp/uni-shop/pages/index/index.vue index e458c41..01a24ab 100644 --- a/addons/unishop/uniapp/uni-shop/pages/index/index.vue +++ b/addons/unishop/uniapp/uni-shop/pages/index/index.vue @@ -260,9 +260,13 @@ // this.loadCateList(); // this.loadData(); }, - onShow() { + async onShow() { + let login = await this.$api.checkLogin(); + if (login) { this.loadCateList(); this.loadData(); + } + }, onReachBottom() { this.loadCateList(); @@ -287,8 +291,6 @@ */ async loadData() { let that = this; - let login = await this.$api.checkLogin(); - if (login) { //获取广告图 that.$api.request('/ads/index', 'GET').then((res) => { let carouselList = res; @@ -310,8 +312,6 @@ // this.getFlash(); // this.getProduct(); - } - }, // 获取产品列表 async getProduct() { diff --git a/addons/unishop/uniapp/uni-shop/pages/public/login.vue b/addons/unishop/uniapp/uni-shop/pages/public/login.vue index e344fa4..11d8b39 100644 --- a/addons/unishop/uniapp/uni-shop/pages/public/login.vue +++ b/addons/unishop/uniapp/uni-shop/pages/public/login.vue @@ -85,6 +85,9 @@ uni.switchTab({ url: '/pages/index/index' }) + setTimeout(()=>{ + location.reload() + }) }, 2000) } else { diff --git a/addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/index.html b/addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/index.html index 94ff7d3..64d2130 100644 --- a/addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/index.html +++ b/addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/index.html @@ -1,3 +1,3 @@