Commit 6d6ed33ffa5d1bb3dcbc7ccc559dbd41c4da2c3d
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
3 changed files
with
9 additions
and
8 deletions
pages/user/assistance/task_assistance.js
... | ... | @@ -661,7 +661,6 @@ Page({ |
661 | 661 | ctx.drawImage(head_list_img[a], left , 505 * unit - imagesize / 2, imagesize, imagesize); |
662 | 662 | ctx.restore(); |
663 | 663 | left += imagesize + spacing; |
664 | - | |
665 | 664 | } |
666 | 665 | //这个是还未助力的位置 |
667 | 666 | for (var i = 0; i < q_num; i++) { |
... | ... | @@ -826,12 +825,11 @@ Page({ |
826 | 825 | info_head: async function(func) { |
827 | 826 | var th = this; |
828 | 827 | var images = th.data.dynamic.zlHelpUser; |
828 | + console.log(images,"图片长度", images.length); | |
829 | 829 | var arr = new Array(); |
830 | 830 | var block = th.data.block; |
831 | - if (images && block == 0) { | |
832 | - th.setData({ | |
833 | - block: 1 | |
834 | - }); | |
831 | + if (images) { | |
832 | + th.data.head_pic_arr.length = 0; | |
835 | 833 | for (var i in images) { |
836 | 834 | var img_path = images[i].headPic; |
837 | 835 | await getApp().request.promise_downimg(img_path).then(res => { | ... | ... |
pages/user/coupons/coupons.js
... | ... | @@ -57,6 +57,7 @@ Page({ |
57 | 57 | b_isuse_arr:null,//包邮券的已使用的内容 |
58 | 58 | |
59 | 59 | isloading:0, //正在加载中的代码 |
60 | + isset:0, | |
60 | 61 | }, |
61 | 62 | // 点击选中二维码 |
62 | 63 | click: function(e) { |
... | ... | @@ -235,7 +236,7 @@ Page({ |
235 | 236 | if(big_arr.length==0 && this.data.b_can_arr){ |
236 | 237 | big_arr=this.data.b_can_arr; |
237 | 238 | } |
238 | - init_num=this.data.b_can_arr.length; | |
239 | + if(this.data.b_can_arr) init_num=this.data.b_can_arr.length; | |
239 | 240 | |
240 | 241 | wx.showLoading(); th.data.isloading=1; |
241 | 242 | getApp().request.promiseGet("/api/weshop/users/listQuan", { |
... | ... | @@ -246,6 +247,8 @@ Page({ |
246 | 247 | var a = res.data; |
247 | 248 | val = a.data.total; |
248 | 249 | var details = a.data.pageData; |
250 | + | |
251 | + th.setData({isset:1}); | |
249 | 252 | |
250 | 253 | //没有找到优惠券的时候 |
251 | 254 | if (details.length == 0 && th.data.current_page==1) { |
... | ... | @@ -289,6 +292,7 @@ Page({ |
289 | 292 | }, |
290 | 293 | |
291 | 294 | overdue:function(){ |
295 | + | |
292 | 296 | if(this.data.isloading) return; |
293 | 297 | |
294 | 298 | var len = this.data.details.length; |
... | ... | @@ -348,7 +352,6 @@ Page({ |
348 | 352 | }); |
349 | 353 | |
350 | 354 | |
351 | - | |
352 | 355 | setTimeout(function () { |
353 | 356 | if(th.data.current_page==1) details=big_arr; |
354 | 357 | for (var i = 0; i < details.length; i++) { | ... | ... |
pages/user/coupons/coupons.wxml
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | (<text class='y_sz'>{{number}}</text>)</view> |
21 | 21 | </view> |
22 | 22 | |
23 | -<view class='noCoupons' wx:if='{{details.length==0}}'> | |
23 | +<view class='noCoupons' wx:if='{{details.length==0 && isset}}'> | |
24 | 24 | <image src='{{iurl}}miniapp/images/user/wqnone.png'></image> |
25 | 25 | <view class='no_wz1'>没有微券?</view> |
26 | 26 | <view class='no_wz2'>快去兑换吧</view> | ... | ... |