improve: 首页网络判断优化;

This commit is contained in:
From-wh 2023-05-05 17:36:15 +08:00
parent 90c7df5e8e
commit c4037672f4
3 changed files with 16 additions and 19 deletions

View File

@ -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;
}

View File

@ -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
})
},
// 微信分享;

View File

@ -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
});