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