Переглянути джерело

improve: 分类数据获取问题

From-wh 2 роки тому
батько
коміт
6c5af931dd

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

@@ -66,11 +66,11 @@
 					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 => {
 						if (this.status == 2 || this.status == 3) {
 							uni.hideTabBar();
 						} else if (this.status == 1) {
+							this.$refs.classOne.is_diy = res.data.is_diy
 							this.$refs.classOne.getNav();
 						}
 						if (status == 2) {

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

@@ -674,7 +674,7 @@
 					that.navActive = 0;
 					that.tabClick = 0;
 					that.categoryList = data;
-					that.categoryErList = res.data[0].children ? res.data[0].children : [];
+					that.categoryErList = data[0].children ? data[0].children : [];
 					that.page = 1;
 					that.loadend = false;
 					that.tempArr = [];

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

@@ -710,7 +710,7 @@
 					that.navActive = 0;
 					that.tabClick = 0;
 					that.categoryList = data;
-					that.categoryErList = res.data[0].children ? res.data[0].children : [];
+					that.categoryErList = data[0].children ? data[0].children : [];
 					that.page = 1;
 					that.loadend = false;
 					that.tempArr = [];