diff --git a/pages/user/assistance/task_assistance.js b/pages/user/assistance/task_assistance.js index 72ddae2..222a0b8 100644 --- a/pages/user/assistance/task_assistance.js +++ b/pages/user/assistance/task_assistance.js @@ -661,7 +661,6 @@ Page({ ctx.drawImage(head_list_img[a], left , 505 * unit - imagesize / 2, imagesize, imagesize); ctx.restore(); left += imagesize + spacing; - } //这个是还未助力的位置 for (var i = 0; i < q_num; i++) { @@ -826,12 +825,11 @@ Page({ info_head: async function(func) { var th = this; var images = th.data.dynamic.zlHelpUser; + console.log(images,"图片长度", images.length); var arr = new Array(); var block = th.data.block; - if (images && block == 0) { - th.setData({ - block: 1 - }); + if (images) { + th.data.head_pic_arr.length = 0; for (var i in images) { var img_path = images[i].headPic; await getApp().request.promise_downimg(img_path).then(res => { diff --git a/pages/user/coupons/coupons.js b/pages/user/coupons/coupons.js index b4a1052..bfbf0ac 100644 --- a/pages/user/coupons/coupons.js +++ b/pages/user/coupons/coupons.js @@ -57,6 +57,7 @@ Page({ b_isuse_arr:null,//包邮券的已使用的内容 isloading:0, //正在加载中的代码 + isset:0, }, // 点击选中二维码 click: function(e) { @@ -235,7 +236,7 @@ Page({ if(big_arr.length==0 && this.data.b_can_arr){ big_arr=this.data.b_can_arr; } - init_num=this.data.b_can_arr.length; + if(this.data.b_can_arr) init_num=this.data.b_can_arr.length; wx.showLoading(); th.data.isloading=1; getApp().request.promiseGet("/api/weshop/users/listQuan", { @@ -246,6 +247,8 @@ Page({ var a = res.data; val = a.data.total; var details = a.data.pageData; + + th.setData({isset:1}); //没有找到优惠券的时候 if (details.length == 0 && th.data.current_page==1) { @@ -289,6 +292,7 @@ Page({ }, overdue:function(){ + if(this.data.isloading) return; var len = this.data.details.length; @@ -348,7 +352,6 @@ Page({ }); - setTimeout(function () { if(th.data.current_page==1) details=big_arr; for (var i = 0; i < details.length; i++) { diff --git a/pages/user/coupons/coupons.wxml b/pages/user/coupons/coupons.wxml index 83ec009..2aea6bb 100644 --- a/pages/user/coupons/coupons.wxml +++ b/pages/user/coupons/coupons.wxml @@ -20,7 +20,7 @@ ({{number}}) - + 没有微券? 快去兑换吧