Commit a8e3602891f6de8d0fdfb6a53dddfd87d9f9aeba
1 parent
8cb110bc
add 我的钱包 小程序支付 接口联调
Showing
2 changed files
with
25 additions
and
25 deletions
pages/moneyRecharge/moneyRecharge.vue
... | ... | @@ -145,6 +145,7 @@ |
145 | 145 | rechargeType: '2', |
146 | 146 | acctType: '1', |
147 | 147 | paySrcType: '204', |
148 | + payType:'4', | |
148 | 149 | realPayMoney: payMoney, |
149 | 150 | rechargeFee: payMoney, |
150 | 151 | }; |
... | ... | @@ -156,7 +157,7 @@ |
156 | 157 | }).then(res => { |
157 | 158 | |
158 | 159 | console.log(res) |
159 | - that.MakeWxPay(that.$common.requestSign(data)) | |
160 | + that.MakeWxPay(res) | |
160 | 161 | |
161 | 162 | }) |
162 | 163 | }, | ... | ... |
pages/rechargeDetail/rechargeDetail.vue
... | ... | @@ -68,7 +68,7 @@ |
68 | 68 | <text>{{item.opTime}}</text> |
69 | 69 | </view> |
70 | 70 | </uni-list> |
71 | - <view class="grace-loading text-center jy-fix-height34" v-if="isLoadAll">{{ loadingTxt }}</view> | |
71 | + <uni-load-more :status="status" /> | |
72 | 72 | |
73 | 73 | </view> |
74 | 74 | |
... | ... | @@ -104,11 +104,11 @@ |
104 | 104 | beginDate: currentDate, |
105 | 105 | overDate: currentDate, |
106 | 106 | orderList: [], |
107 | - isLoadAll: false, | |
107 | + // isLoadAll: false, | |
108 | 108 | totalPages: 1, // 总页数 |
109 | 109 | page: 1, |
110 | 110 | pageSize: 10, |
111 | - loadingTxt: '加载中...', | |
111 | + status: 'no-more', | |
112 | 112 | |
113 | 113 | } |
114 | 114 | }, |
... | ... | @@ -124,25 +124,17 @@ |
124 | 124 | }, |
125 | 125 | // 下拉刷新触发 |
126 | 126 | onPullDownRefresh(val) { |
127 | + | |
127 | 128 | this.page = 1 |
128 | 129 | this.pageSize = this.pageSize |
129 | 130 | this.totalPages = 1 |
131 | + this.orderList = [] | |
130 | 132 | console.log('下拉刷新', val) |
131 | 133 | this.fetchData() |
132 | 134 | }, |
133 | 135 | // 上拉加载触发 |
134 | 136 | onReachBottom() { |
135 | - console.log('11') | |
136 | - // | |
137 | - if (this.totalPages === this.orderList.length) { | |
138 | - this.isLoadAll = true; | |
139 | - this.loadingTxt = '没有更多数据啦~'; | |
140 | - } else { | |
141 | - this.page++; | |
142 | - this.isLoadAll = true; | |
143 | - this.loadingTxt = '加载中...'; | |
144 | - this.fetchData(); // 每次滑动请求接口,实现上拉加载更多数据 | |
145 | - } | |
137 | + this.fetchData(); | |
146 | 138 | |
147 | 139 | }, |
148 | 140 | |
... | ... | @@ -245,7 +237,18 @@ |
245 | 237 | }, |
246 | 238 | |
247 | 239 | fetchData() { |
240 | + console.log(this.totalPages) | |
241 | + 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 |
250 | + that.status = 'loading' | |
251 | + | |
249 | 252 | let paramsData = { |
250 | 253 | pageNum: that.page, |
251 | 254 | pageSize: that.pageSize, |
... | ... | @@ -260,19 +263,15 @@ |
260 | 263 | method: 'POST', |
261 | 264 | data: that.$common.requestSign(paramsData) |
262 | 265 | }).then(res => { |
263 | - | |
264 | - const resDataArray = that.orderList.concat(res.data.dataList); | |
265 | - if (that.orderList.length === res.data.pageTotals) { | |
266 | - that.isLoadAll = true; | |
267 | - that.loadingTxt = '没有更多数据啦~'; | |
268 | - that.orderList = resDataArray; | |
266 | + if (res.data.pageTotals < 10) { | |
267 | + this.status = 'no-more' | |
269 | 268 | } else { |
270 | - that.totalPages = res.data.pageTotals; | |
271 | - that.isLoadAll = true; | |
272 | - that.loadingTxt = '上拉加载更多数据'; | |
273 | - that.orderList = resDataArray | |
269 | + this.status = 'more' | |
274 | 270 | } |
275 | 271 | |
272 | + that.totalPages = res.data.pageTotals; | |
273 | + that.orderList = that.orderList.concat(res.data.dataList) | |
274 | + | |
276 | 275 | |
277 | 276 | }) |
278 | 277 | ... | ... |