Commit a8e3602891f6de8d0fdfb6a53dddfd87d9f9aeba

Authored by chenbiao
1 parent 8cb110bc

add 我的钱包 小程序支付 接口联调

pages/moneyRecharge/moneyRecharge.vue
@@ -145,6 +145,7 @@ @@ -145,6 +145,7 @@
145 rechargeType: '2', 145 rechargeType: '2',
146 acctType: '1', 146 acctType: '1',
147 paySrcType: '204', 147 paySrcType: '204',
  148 + payType:'4',
148 realPayMoney: payMoney, 149 realPayMoney: payMoney,
149 rechargeFee: payMoney, 150 rechargeFee: payMoney,
150 }; 151 };
@@ -156,7 +157,7 @@ @@ -156,7 +157,7 @@
156 }).then(res => { 157 }).then(res => {
157 158
158 console.log(res) 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,7 +68,7 @@
68 <text>{{item.opTime}}</text> 68 <text>{{item.opTime}}</text>
69 </view> 69 </view>
70 </uni-list> 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 </view> 73 </view>
74 74
@@ -104,11 +104,11 @@ @@ -104,11 +104,11 @@
104 beginDate: currentDate, 104 beginDate: currentDate,
105 overDate: currentDate, 105 overDate: currentDate,
106 orderList: [], 106 orderList: [],
107 - isLoadAll: false, 107 + // isLoadAll: false,
108 totalPages: 1, // 总页数 108 totalPages: 1, // 总页数
109 page: 1, 109 page: 1,
110 pageSize: 10, 110 pageSize: 10,
111 - loadingTxt: '加载中...', 111 + status: 'no-more',
112 112
113 } 113 }
114 }, 114 },
@@ -124,25 +124,17 @@ @@ -124,25 +124,17 @@
124 }, 124 },
125 // 下拉刷新触发 125 // 下拉刷新触发
126 onPullDownRefresh(val) { 126 onPullDownRefresh(val) {
  127 +
127 this.page = 1 128 this.page = 1
128 this.pageSize = this.pageSize 129 this.pageSize = this.pageSize
129 this.totalPages = 1 130 this.totalPages = 1
  131 + this.orderList = []
130 console.log('下拉刷新', val) 132 console.log('下拉刷新', val)
131 this.fetchData() 133 this.fetchData()
132 }, 134 },
133 // 上拉加载触发 135 // 上拉加载触发
134 onReachBottom() { 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,7 +237,18 @@
245 }, 237 },
246 238
247 fetchData() { 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 let that = this 249 let that = this
  250 + that.status = 'loading'
  251 +
249 let paramsData = { 252 let paramsData = {
250 pageNum: that.page, 253 pageNum: that.page,
251 pageSize: that.pageSize, 254 pageSize: that.pageSize,
@@ -260,19 +263,15 @@ @@ -260,19 +263,15 @@
260 method: 'POST', 263 method: 'POST',
261 data: that.$common.requestSign(paramsData) 264 data: that.$common.requestSign(paramsData)
262 }).then(res => { 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 } else { 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