Commit ca970168564ce5ed46f5bfabd7ea80bc96187946
1 parent
a8e36028
商户券明细
Showing
3 changed files
with
24 additions
and
23 deletions
pages.json
@@ -14,6 +14,14 @@ | @@ -14,6 +14,14 @@ | ||
14 | "pages": [ | 14 | "pages": [ |
15 | // pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages | 15 | // pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages |
16 | { | 16 | { |
17 | + "path": "pages/rechargeDetail/rechargeDetail", | ||
18 | + "style": { | ||
19 | + "navigationBarTitleText": "充值明细", | ||
20 | + "enablePullDownRefresh": true | ||
21 | + } | ||
22 | + | ||
23 | + }, | ||
24 | + { | ||
17 | "path": "pages/businessCard/cardDetail", | 25 | "path": "pages/businessCard/cardDetail", |
18 | "style": { | 26 | "style": { |
19 | "navigationBarTitleText": "商户卡券明细", | 27 | "navigationBarTitleText": "商户卡券明细", |
@@ -132,14 +140,7 @@ | @@ -132,14 +140,7 @@ | ||
132 | } | 140 | } |
133 | } | 141 | } |
134 | }, | 142 | }, |
135 | - { | ||
136 | - "path": "pages/rechargeDetail/rechargeDetail", | ||
137 | - "style": { | ||
138 | - "navigationBarTitleText": "充值明细", | ||
139 | - "enablePullDownRefresh": true | ||
140 | - } | ||
141 | 143 | ||
142 | - }, | ||
143 | { | 144 | { |
144 | "path": "pages/rechargeDetail/outDetail", | 145 | "path": "pages/rechargeDetail/outDetail", |
145 | "style": { | 146 | "style": { |
pages/businessCard/cardDetail.vue
@@ -278,7 +278,13 @@ export default { | @@ -278,7 +278,13 @@ export default { | ||
278 | // 上拉加载触发 | 278 | // 上拉加载触发 |
279 | onReachBottom() { | 279 | onReachBottom() { |
280 | console.log('上拉加载触发') | 280 | console.log('上拉加载触发') |
281 | - this.fetchData(); // 每次滑动请求接口,实现上拉加载更多数据 | 281 | + if (this.totalPages == this.dataList.length) { |
282 | + this.status = 'no-more' | ||
283 | + console.log('111') | ||
284 | + return | ||
285 | + } else { | ||
286 | + this.pageNum++; | ||
287 | + } | ||
282 | 288 | ||
283 | 289 | ||
284 | }, | 290 | }, |
@@ -294,13 +300,7 @@ export default { | @@ -294,13 +300,7 @@ export default { | ||
294 | fetchData: function () { | 300 | fetchData: function () { |
295 | console.log(this.totalPages) | 301 | console.log(this.totalPages) |
296 | console.log(this.dataList.length) | 302 | console.log(this.dataList.length) |
297 | - if (this.totalPages == this.dataList.length) { | ||
298 | - this.status = 'no-more' | ||
299 | - console.log('111') | ||
300 | - return | ||
301 | - } else { | ||
302 | - this.pageNum++; | ||
303 | - } | 303 | + |
304 | let that = this | 304 | let that = this |
305 | that.status = 'loading' | 305 | that.status = 'loading' |
306 | let paramsData = { | 306 | let paramsData = { |
pages/rechargeDetail/rechargeDetail.vue
@@ -135,7 +135,13 @@ | @@ -135,7 +135,13 @@ | ||
135 | // 上拉加载触发 | 135 | // 上拉加载触发 |
136 | onReachBottom() { | 136 | onReachBottom() { |
137 | this.fetchData(); | 137 | this.fetchData(); |
138 | - | 138 | + if (this.totalPages == this.orderList.length) { |
139 | + this.status = 'no-more' | ||
140 | + console.log('111') | ||
141 | + return | ||
142 | + } else { | ||
143 | + this.page++; | ||
144 | + } | ||
139 | }, | 145 | }, |
140 | 146 | ||
141 | computed: { | 147 | computed: { |
@@ -239,13 +245,7 @@ | @@ -239,13 +245,7 @@ | ||
239 | fetchData() { | 245 | fetchData() { |
240 | console.log(this.totalPages) | 246 | console.log(this.totalPages) |
241 | console.log(this.orderList.length) | 247 | console.log(this.orderList.length) |
242 | - if (this.totalPages == this.orderList.length) { | ||
243 | - this.status = 'no-more' | ||
244 | - console.log('111') | ||
245 | - return | ||
246 | - } else { | ||
247 | - this.page++; | ||
248 | - } | 248 | + |
249 | let that = this | 249 | let that = this |
250 | that.status = 'loading' | 250 | that.status = 'loading' |
251 | 251 |