guhongwei 2 سال پیش
والد
کامیت
80b0039f98
2فایلهای تغییر یافته به همراه8 افزوده شده و 10 حذف شده
  1. 1 1
      pagesMy/address/add.vue
  2. 7 9
      pagesMy/address/index.vue

+ 1 - 1
pagesMy/address/add.vue

@@ -102,7 +102,7 @@
 		},
 		onLoad: function(e) {
 			const that = this;
-			that.$set(that, `id`, e.id || '635f13fc42e87c7a2880ed52');
+			that.$set(that, `id`, e.id || '');
 			that.searchPor();
 			that.watchLogin();
 		},

+ 7 - 9
pagesMy/address/index.vue

@@ -66,16 +66,13 @@
 				scrollTop: 0,
 			};
 		},
-		onLoad: function() {},
-		onShow: function() {
+		onLoad: function() {
 			const that = this;
 			that.searchConfig();
 			that.watchLogin();
 		},
-		onHide: function() {
-			const that = this;
-			that.clearPage()
-		},
+		onShow: function() {},
+		onHide: function() {},
 		methods: {
 			// 查询基本设置
 			searchConfig() {
@@ -120,6 +117,8 @@
 					...info
 				})
 				if (res.errcode == '0') {
+					console.log(that.list);
+					console.log(res.data);
 					let list = [...that.list, ...res.data];
 					that.$set(that, `list`, list);
 					that.$set(that, `total`, res.total)
@@ -189,7 +188,7 @@
 										})
 									}
 								},
-								fail: function(err) {
+								fail: async function(err) {
 									that.clearPage();
 									that.search();
 								}
@@ -227,7 +226,6 @@
 			// 编辑
 			toCommon(e) {
 				const that = this;
-				that.clearPage();
 				uni.navigateTo({
 					url: `/pagesMy/address/add?id=${e&&e.id?e.id:''}`
 				})
@@ -263,7 +261,7 @@
 				const that = this;
 				that.$set(that, `list`, [])
 				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 5)
+				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			}
 		},