Commit 46ab4175cf36ffd35afc361cb274be7a8c2bf4b5
1 parent
09f630d2
优惠券的空白的问题解决
Showing
1 changed file
with
14 additions
and
11 deletions
pages/user/coupons/coupons.js
| ... | ... | @@ -170,6 +170,7 @@ Page({ |
| 170 | 170 | |
| 171 | 171 | console.log("参数", user_id, store_id); |
| 172 | 172 | rq.get("/api/weshop/users/getinfo/" + os.stoid + "/" + user_id, { |
| 173 | + isShowLoading: 0, | |
| 173 | 174 | success: function (su) { |
| 174 | 175 | |
| 175 | 176 | var data = su.data.data; |
| ... | ... | @@ -191,9 +192,9 @@ Page({ |
| 191 | 192 | page: e.data.current_page |
| 192 | 193 | }; |
| 193 | 194 | var big_arr = this.data.details; |
| 195 | + wx.showLoading(); | |
| 194 | 196 | await getApp().request.promiseGet("/api/weshop/users/listQuan", { |
| 195 | - data: get_data, | |
| 196 | - isShowLoading: 1, | |
| 197 | + data: get_data, | |
| 197 | 198 | }).then(res => { |
| 198 | 199 | var a = res.data; |
| 199 | 200 | val = a.data.total; |
| ... | ... | @@ -216,12 +217,13 @@ Page({ |
| 216 | 217 | details: big_arr, |
| 217 | 218 | }); |
| 218 | 219 | setTimeout(function () { |
| 219 | - for (var i = 0; i < details.length; i++) { | |
| 220 | - var no = i + len; | |
| 221 | - qrcode('qrcode' + no, details[i].CashRepNo, 460, 460); | |
| 222 | - | |
| 223 | - } | |
| 224 | - }, 100) | |
| 220 | + | |
| 221 | + for (var i = 0; i < details.length; i++) { | |
| 222 | + var no = i + len; | |
| 223 | + qrcode('qrcode' + no, details[i].CashRepNo, 460, 460); | |
| 224 | + } | |
| 225 | + wx.hideLoading(); | |
| 226 | + }, 1000) | |
| 225 | 227 | |
| 226 | 228 | }) |
| 227 | 229 | this.setData({ |
| ... | ... | @@ -240,7 +242,6 @@ Page({ |
| 240 | 242 | await getApp().request.promiseGet("/api/weshop/users/listQuan" |
| 241 | 243 | , { |
| 242 | 244 | data: get_data, |
| 243 | - isShowLoading: 1 | |
| 244 | 245 | }).then(res => { |
| 245 | 246 | var a = res.data; |
| 246 | 247 | number= a.data.total; |
| ... | ... | @@ -272,10 +273,10 @@ Page({ |
| 272 | 273 | page: e.data.current_page |
| 273 | 274 | }; |
| 274 | 275 | var big_arr= this.data.details; |
| 276 | + wx.showLoading(); | |
| 275 | 277 | await getApp().request.promiseGet("/api/weshop/users/listQuan" |
| 276 | 278 | , { |
| 277 | 279 | data: get_data, |
| 278 | - isShowLoading: 1 | |
| 279 | 280 | }).then(res => { |
| 280 | 281 | var a = res.data; |
| 281 | 282 | number = a.data.total; |
| ... | ... | @@ -304,7 +305,9 @@ Page({ |
| 304 | 305 | qrcode('qrcode' + no, details[i].CashRepNo, 460, 460); |
| 305 | 306 | |
| 306 | 307 | } |
| 307 | - }, 100) | |
| 308 | + wx.hideLoading(); | |
| 309 | + | |
| 310 | + }, 800) | |
| 308 | 311 | }) |
| 309 | 312 | }, |
| 310 | 313 | //---加载更多是靠这个函数---- | ... | ... |