Commit ca970168564ce5ed46f5bfabd7ea80bc96187946

Authored by 刘淇
1 parent a8e36028

商户券明细

pages.json
... ... @@ -14,6 +14,14 @@
14 14 "pages": [
15 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 25 "path": "pages/businessCard/cardDetail",
18 26 "style": {
19 27 "navigationBarTitleText": "商户卡券明细",
... ... @@ -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 145 "path": "pages/rechargeDetail/outDetail",
145 146 "style": {
... ...
pages/businessCard/cardDetail.vue
... ... @@ -278,7 +278,13 @@ export default {
278 278 // 上拉加载触发
279 279 onReachBottom() {
280 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 300 fetchData: function () {
295 301 console.log(this.totalPages)
296 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 304 let that = this
305 305 that.status = 'loading'
306 306 let paramsData = {
... ...
pages/rechargeDetail/rechargeDetail.vue
... ... @@ -135,7 +135,13 @@
135 135 // 上拉加载触发
136 136 onReachBottom() {
137 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 147 computed: {
... ... @@ -239,13 +245,7 @@
239 245 fetchData() {
240 246 console.log(this.totalPages)
241 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 249 let that = this
250 250 that.status = 'loading'
251 251  
... ...