From c4037672f4f286188c92f3977da200b7d97fc0c3 Mon Sep 17 00:00:00 2001 From: From-wh Date: Fri, 5 May 2023 17:36:15 +0800 Subject: [PATCH] =?UTF-8?q?improve:=20=E9=A6=96=E9=A1=B5=E7=BD=91=E7=BB=9C?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E4=BC=98=E5=8C=96;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/pages/index/diy/index.vue | 9 +-------- template/uni-app/pages/index/index.vue | 18 ++++++++++++++---- .../pages/index/visualization/index.vue | 8 +------- 3 files changed, 16 insertions(+), 19 deletions(-) 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 });