improve: 装修改变数据更新

This commit is contained in:
From-wh 2023-02-23 09:26:14 +08:00
parent cbb4e6a688
commit 24c98db310
2 changed files with 4 additions and 1 deletions

View File

@ -64,9 +64,10 @@
colorChange('category').then(res => {
let status = res.data.status;
this.category = status
uni.setStorageSync('is_diy', res.data.is_diy)
this.status = res.data.status
this.$refs.classOne.is_diy = res.data.is_diy
this.$nextTick(e => {
this.$refs.classOne.is_diy = this.is_diy
if (this.status == 2 || this.status == 3) {
uni.hideTabBar();
} else if (this.status == 1) {

View File

@ -41,7 +41,9 @@
getVersion(name) {
getVersion(name).then(res => {
this.version = res.data.version
this.isDiy = res.data.is_diy
this.loading = true
uni.setStorageSync('is_diy', res.data.is_diy)
if (!uni.getStorageSync('DIY_VERSION') || res.data.version != uni.getStorageSync(
'DIY_VERSION')) {
if (uni.getStorageSync('DIY_VERSION')) {