diff --git a/template/uni-app/pages/index/diy/index.vue b/template/uni-app/pages/index/diy/index.vue index 92e7c82ca..cc1be78fe 100644 --- a/template/uni-app/pages/index/diy/index.vue +++ b/template/uni-app/pages/index/diy/index.vue @@ -715,14 +715,7 @@ icon: 'none', duration: 2000 }) - } - setTimeout(e => { - this.diyData(); - this.getIndexData(); - getShare().then(res => { - this.shareInfo = res.data; - }); - }, 2000) + } this.errorNetwork = true this.showSkeleton = false; } diff --git a/template/uni-app/pages/index/index.vue b/template/uni-app/pages/index/index.vue index b43deb225..845a2908f 100644 --- a/template/uni-app/pages/index/index.vue +++ b/template/uni-app/pages/index/index.vue @@ -26,9 +26,9 @@ }, onLoad() { uni.hideTabBar() - uni.$on('is_diy', (data) => { - this.isDiy = data - }) + // uni.$on('is_diy', (data) => { + // this.isDiy = data + // }) this.setOpenShare(); }, onShow() { @@ -41,6 +41,7 @@ getVersion(name) { uni.$emit('uploadFooter') getVersion(name).then(res => { + console.log(res, '11') this.version = res.data.version this.isDiy = res.data.is_diy this.loading = true @@ -58,7 +59,16 @@ uni.setStorageSync('DIY_VERSION', res.data.version) } else {} }).catch(err => { - this.loading = true + // #ifdef APP-PLUS + setTimeout(e => { + this.getVersion(0); + }, 1500) + // #endif + // #ifndef APP-PLUS + this.$util.Tips({ + title: err + }); + // #endiff }) }, // 微信分享; diff --git a/template/uni-app/pages/index/visualization/index.vue b/template/uni-app/pages/index/visualization/index.vue index 96bf02933..3dcdacbde 100644 --- a/template/uni-app/pages/index/visualization/index.vue +++ b/template/uni-app/pages/index/visualization/index.vue @@ -502,6 +502,7 @@ diyData() { let that = this; getDiy().then((res) => { + console.log('222', res) let data = res.data; that.headerSerch = data.headerSerch; that.swiperBg = data.swiperBg; @@ -534,13 +535,6 @@ icon: 'none', duration: 2000 }) - setTimeout(e => { - this.diyData(); - this.getIndexData(); - getShare().then(res => { - this.shareInfo = res.data; - }); - }, 2000) } // #endif });