Merge branch 'feature/import' of git.yoho.cn:fe/yoho-miniapp-eshop into feature/import
Showing
5 changed files
with
14 additions
and
6 deletions
@@ -171,7 +171,9 @@ Page(Object.assign({ | @@ -171,7 +171,9 @@ Page(Object.assign({ | ||
171 | page: 1, | 171 | page: 1, |
172 | limit: 20 | 172 | limit: 20 |
173 | }; | 173 | }; |
174 | - this.data.productList = []; | 174 | + this.setData({ |
175 | + productList: [] | ||
176 | + }); | ||
175 | params.resetScroll = true; | 177 | params.resetScroll = true; |
176 | this.productList(params); | 178 | this.productList(params); |
177 | }, | 179 | }, |
@@ -64,7 +64,9 @@ Page({ | @@ -64,7 +64,9 @@ Page({ | ||
64 | this.data.addFilter = true; | 64 | this.data.addFilter = true; |
65 | 65 | ||
66 | this._resetPage(); | 66 | this._resetPage(); |
67 | - this.data.productList = []; | 67 | + this.setData({ |
68 | + productList: [] | ||
69 | + }); | ||
68 | this._productList(); | 70 | this._productList(); |
69 | }, | 71 | }, |
70 | 72 |
@@ -63,7 +63,7 @@ Page({ | @@ -63,7 +63,7 @@ Page({ | ||
63 | this.data.addFilter = true; | 63 | this.data.addFilter = true; |
64 | 64 | ||
65 | this._resetPage(); | 65 | this._resetPage(); |
66 | - this.data.productList = []; | 66 | + this.setData({ productList: [] }); |
67 | this._productList(); | 67 | this._productList(); |
68 | }, | 68 | }, |
69 | 69 | ||
@@ -117,6 +117,7 @@ Page({ | @@ -117,6 +117,7 @@ Page({ | ||
117 | this.data.page += 1; | 117 | this.data.page += 1; |
118 | this.data.totalPage = res.data && res.data.page_total || 1; | 118 | this.data.totalPage = res.data && res.data.page_total || 1; |
119 | 119 | ||
120 | + | ||
120 | this.setData({ | 121 | this.setData({ |
121 | showLoading: false, | 122 | showLoading: false, |
122 | noResult: this.data.totalPage === 0, | 123 | noResult: this.data.totalPage === 0, |
@@ -9,8 +9,9 @@ | @@ -9,8 +9,9 @@ | ||
9 | </view> | 9 | </view> |
10 | <view wx:if="{{productList.length}}"> | 10 | <view wx:if="{{productList.length}}"> |
11 | <product-list list="{{productList}}" | 11 | <product-list list="{{productList}}" |
12 | - show-loading="{{showLoading}}" | ||
13 | - show-no-more="{{allLoaded}}"></product-list> | 12 | + show-loading="{{showLoading}}" |
13 | + show-no-more="{{allLoaded}}"> | ||
14 | + </product-list> | ||
14 | </view> | 15 | </view> |
15 | </view> | 16 | </view> |
16 | <copyright class="copy-right"></copyright> | 17 | <copyright class="copy-right"></copyright> |
@@ -61,7 +61,9 @@ Page({ | @@ -61,7 +61,9 @@ Page({ | ||
61 | this.data.gender = gender; | 61 | this.data.gender = gender; |
62 | 62 | ||
63 | this._resetPage(); | 63 | this._resetPage(); |
64 | - this.data.productList = []; | 64 | + this.setData({ |
65 | + productList: [] | ||
66 | + }); | ||
65 | this._productList(); | 67 | this._productList(); |
66 | }, | 68 | }, |
67 | 69 |
-
Please register or login to post a comment