Просмотр исходного кода

improve: 装修改变数据更新

From-wh 2 лет назад
Родитель
Сommit
24c98db310

+ 2 - 1
template/uni-app/pages/goods_cate/goods_cate.vue

@@ -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) {

+ 2 - 0
template/uni-app/pages/index/index.vue

@@ -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')) {