Commit 152a7f833168434907a723a98c61df3c7b2fd8a2

Authored by 后端开发-许程
1 parent 25e8a259

助力查询及助力选中

pages/user/assistance/assistance.js
@@ -162,6 +162,7 @@ Page({ @@ -162,6 +162,7 @@ Page({
162 //查看礼包id 162 //查看礼包id
163 select_libao:function(){ 163 select_libao:function(){
164 var libao_id = e.currentTarget.dataset.libaoid; 164 var libao_id = e.currentTarget.dataset.libaoid;
165 - getApp().goto("/pages/user/assistance/giftpacklist?libao_id=" + libao_id + "&is_libao=" +0 ); 165 + var ordersn = e.currentTarget.dataset.orderid;
  166 + getApp().goto("/pages/user/assistance/giftpacklist?libao_id=" + libao_id + "&is_libao=" + 0 + "&ordersn=" + ordersn );
166 } 167 }
167 }) 168 })
168 \ No newline at end of file 169 \ No newline at end of file
pages/user/assistance/assistance.wxml
1 <wxs module="filter" src="c_filter.wxs"></wxs> 1 <wxs module="filter" src="c_filter.wxs"></wxs>
  2 +<wxs module="filter_s" src="../../../utils/filter.wxs"></wxs>
2 <view class="page" bindtap="close"> 3 <view class="page" bindtap="close">
3 <!-- 背景图片 --> 4 <!-- 背景图片 -->
4 <image class="lumi" src="{{iurl+'miniapp/images/friendhelp/lumi.png'}}" lazy-load="true"></image> 5 <image class="lumi" src="{{iurl+'miniapp/images/friendhelp/lumi.png'}}" lazy-load="true"></image>
@@ -15,7 +16,7 @@ @@ -15,7 +16,7 @@
15 </view> 16 </view>
16 <view class="flex-center fs26 time"> 17 <view class="flex-center fs26 time">
17 <view>活动时间:</view> 18 <view>活动时间:</view>
18 - <view>{{filter.fm_time(zl_act.beginDate)}}-{{filter.fm_time(zl_act.endDate)}} 19 + <view>{{filter_s.format_time(zl_act.beginDate,0)}} 至 {{filter_s.format_time(zl_act.endDate,0)}}
19 </view> 20 </view>
20 </view> 21 </view>
21 <view class="flex-center" bindtap="go_task"> 22 <view class="flex-center" bindtap="go_task">
@@ -57,7 +58,7 @@ @@ -57,7 +58,7 @@
57 <view class="ellipsis-1">{{item.zlHelpNum}}/{{item.helpNum}}</view> 58 <view class="ellipsis-1">{{item.zlHelpNum}}/{{item.helpNum}}</view>
58 </view> 59 </view>
59 <view class="flex-center width state" wx:if="{{item.status==2}}"> 60 <view class="flex-center width state" wx:if="{{item.status==2}}">
60 - <view class="ellipsis-1" bindtap="select_libao" data-libaoid="{{item.helpListGiftBagId}}">查看礼包</view> 61 + <view class="ellipsis-1" bindtap="select_libao" data-orderid="{{item.ordersn}}" data-libaoid="{{item.helpListGiftBagId}}">查看礼包</view>
61 </view> 62 </view>
62 63
63 64
pages/user/assistance/task_assistance.js
@@ -254,9 +254,9 @@ Page({ @@ -254,9 +254,9 @@ Page({
254 // 领取礼包 254 // 领取礼包
255 get_libao: function (e) { 255 get_libao: function (e) {
256 var libao_id = e.currentTarget.dataset.libaoid; 256 var libao_id = e.currentTarget.dataset.libaoid;
257 - var completeid = e.currentTarget.dataset.completeid; 257 + // var completeid = e.currentTarget.dataset.completeid;
258 console.log("礼包id", libao_id); 258 console.log("礼包id", libao_id);
259 - getApp().goto("/pages/user/assistance/giftpacklist?libao_id=" + libao_id + "&is_libao=" + 1 + "&completeid=" + completeid); 259 + getApp().goto("/pages/user/assistance/giftpacklist?libao_id=" + libao_id + "&is_libao="+1 );
260 }, 260 },
261 //查看礼包id 261 //查看礼包id
262 select_libao: function () { 262 select_libao: function () {
@@ -377,9 +377,7 @@ Page({ @@ -377,9 +377,7 @@ Page({
377 th.setData({ 377 th.setData({
378 usercount: usercount 378 usercount: usercount
379 }); 379 });
380 - } else {  
381 -  
382 - } 380 + }
383 } 381 }
384 }) 382 })
385 383
@@ -424,8 +422,7 @@ Page({ @@ -424,8 +422,7 @@ Page({
424 var aitem = this.data.aitem; 422 var aitem = this.data.aitem;
425 var task_number = aitem[index].giftQty - aitem[index].useGiftQty; 423 var task_number = aitem[index].giftQty - aitem[index].useGiftQty;
426 var task_id = aitem[index].id; 424 var task_id = aitem[index].id;
427 - console.log("轮播图点击左边", "任务id", task_id, "任务总的data", aitem,  
428 - "任务总库存", task_number); 425 + console.log("轮播图点击左边");
429 this.setData({ 426 this.setData({
430 sw_index: index, 427 sw_index: index,
431 task_number: task_number, 428 task_number: task_number,
@@ -447,8 +444,7 @@ Page({ @@ -447,8 +444,7 @@ Page({
447 var aitem = this.data.aitem; 444 var aitem = this.data.aitem;
448 var task_number = aitem[index].giftQty - aitem[index].useGiftQty; 445 var task_number = aitem[index].giftQty - aitem[index].useGiftQty;
449 var task_id = aitem[index].id; 446 var task_id = aitem[index].id;
450 - console.log("轮播图点击右边", "任务id", task_id, "任务总的data",aitem,  
451 - "任务总库存", task_number); 447 + console.log("轮播图点击右边");
452 this.setData({ 448 this.setData({
453 sw_index: index, 449 sw_index: index,
454 task_number: task_number, 450 task_number: task_number,
@@ -1030,10 +1026,10 @@ Page({ @@ -1030,10 +1026,10 @@ Page({
1030 }, 1026 },
1031 //好友猜一猜 1027 //好友猜一猜
1032 save_share: function (e) { 1028 save_share: function (e) {
1033 - var aitem = this.data.aitem; //任务的数据集  
1034 - var sw_index = this.data.sw_index; //轮播的下标 1029 + // var aitem = this.data.aitem; //任务的数据集
  1030 + // var sw_index = this.data.sw_index; //轮播的下标
1035 //任务id 1031 //任务id
1036 - var taskid = aitem[sw_index].id; 1032 + var taskid = e.currentTarget.dataset.taskid;
1037 console.log("好友猜一猜的任务id", taskid); 1033 console.log("好友猜一猜的任务id", taskid);
1038 var th = this; 1034 var th = this;
1039 1035
@@ -1144,5 +1140,14 @@ Page({ @@ -1144,5 +1140,14 @@ Page({
1144 dynamic: images 1140 dynamic: images
1145 }) 1141 })
1146 }, 1142 },
  1143 + test:function(e){
  1144 + var task_id=e.currentTarget.dataset.taskid;
  1145 + console.log("正在进行中任务的id",task_id);
  1146 + },
  1147 + //礼包的详情 轮播图
  1148 + libao_details:function(e){
  1149 + var giftbagid=e.currentTarget.dataset.giftbagid;
  1150 + getApp().goto("/pages/user/assistance/giftpacklist?libao_id=" + giftbagid + "&is_libao=" + 0);
  1151 + }
1147 1152
1148 }) 1153 })
1149 \ No newline at end of file 1154 \ No newline at end of file
pages/user/assistance/task_assistance.wxml
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 </view> 17 </view>
18 <swiper bindanimationfinish="changeGoodsSwip" current="{{sw_index}}" style='width:82.7%; height:100%' bindchange='onSli' indicator-dots="{{false}}" autoplay="{{false}}"> 18 <swiper bindanimationfinish="changeGoodsSwip" current="{{sw_index}}" style='width:82.7%; height:100%' bindchange='onSli' indicator-dots="{{false}}" autoplay="{{false}}">
19 <swiper-item wx:for="{{aitem}}" wx:for-item="aitem" wx:for-index="pidx"> 19 <swiper-item wx:for="{{aitem}}" wx:for-item="aitem" wx:for-index="pidx">
20 - <image class="xc-center-img " src="{{iurl+aitem.giftBagUrl}}"></image> 20 + <image class="xc-center-img"bindtap="libao_details" data-giftbagid="{{aitem.giftbagid}}" src="{{iurl+aitem.giftBagUrl}}"></image>
21 </swiper-item> 21 </swiper-item>
22 </swiper> 22 </swiper>
23 23
@@ -41,9 +41,12 @@ @@ -41,9 +41,12 @@
41 <view wx:if="{{is_user_task==null}}" class="task_clike fs40 t-c flex-center"data-taskid="{{taskid}}" bindtap="add_onlicke"> 41 <view wx:if="{{is_user_task==null}}" class="task_clike fs40 t-c flex-center"data-taskid="{{taskid}}" bindtap="add_onlicke">
42 就选它了 42 就选它了
43 </view> 43 </view>
44 - <view wx:if="{{is_user_task!=null}}" class="task_clike fs40 t-c flex-center"data-taskid="{{taskid}}" bindtap="save_share"> 44 + <view wx:if="{{is_user_task!=null}}" class="task_clike fs40 t-c flex-center"data-taskid="{{is_user_task.id}}" bindtap="save_share">
45 好友拆一拆 45 好友拆一拆
46 </view> 46 </view>
  47 + <view wx:if="{{is_user_task!=null}}" class="task_clike fs40 t-c flex-center"data-taskid="{{is_user_task.id}}" bindtap="test">
  48 + 测试专用
  49 + </view>
47 50
48 </view> 51 </view>
49 <!-- 底部列表 --> 52 <!-- 底部列表 -->