Commit 082f2d33f6cb91328e4ab5c9ea0a3c0245b2d66e

Authored by yvan.ni
2 parents bc8ab39f 19a48f7a

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev

pages/user/assistance/assistance.js
@@ -6,7 +6,9 @@ var t = getApp(), @@ -6,7 +6,9 @@ var t = getApp(),
6 ut = i, 6 ut = i,
7 s = require("../../../utils/common.js"); 7 s = require("../../../utils/common.js");
8 var regeneratorRuntime = require('../../../utils/runtime.js'); 8 var regeneratorRuntime = require('../../../utils/runtime.js');
9 -var oo = t.globalData.setting,os=oo, ut= require("../../../utils/util.js"); 9 +var oo = t.globalData.setting,
  10 + os = oo,
  11 + ut = require("../../../utils/util.js");
10 Page({ 12 Page({
11 13
12 /** 14 /**
@@ -22,10 +24,10 @@ Page({ @@ -22,10 +24,10 @@ Page({
22 cur_page: 1, //页码 24 cur_page: 1, //页码
23 page_num: 5, //每页多少个 25 page_num: 5, //每页多少个
24 is_show_more: 0, //是否加载更多 26 is_show_more: 0, //是否加载更多
25 - help_id:"",//助力活动的id  
26 - timer:"",//任务列表的定时器  
27 - s_num:"",//多少人已经领取任务  
28 - page:1,//我的任务的当前页 27 + help_id: "", //助力活动的id
  28 + timer: "", //任务列表的定时器
  29 + s_num: "", //多少人已经领取任务
  30 + page: 1, //我的任务的当前页
29 }, 31 },
30 32
31 /** 33 /**
@@ -36,79 +38,85 @@ Page({ @@ -36,79 +38,85 @@ Page({
36 var nav_b = th.selectComponent("#nav_b"); //组件的id 38 var nav_b = th.selectComponent("#nav_b"); //组件的id
37 nav_b.set_name("助力", "/pages/user/assistance/assistance"); 39 nav_b.set_name("助力", "/pages/user/assistance/assistance");
38 // 助力活动 40 // 助力活动
39 - this.assistance(); 41 + th.assistance();
40 }, 42 },
41 43
42 /** 44 /**
43 * 生命周期函数--监听页面显示 45 * 生命周期函数--监听页面显示
44 */ 46 */
45 onShow: function() { 47 onShow: function() {
46 - 48 +
47 }, 49 },
48 // 助力活动 50 // 助力活动
49 - assistance() {  
50 - var th=this; 51 + assistance() {
  52 + var th = this;
51 var user_id = getApp().globalData.user_id; 53 var user_id = getApp().globalData.user_id;
52 var store_id = os.stoid; 54 var store_id = os.stoid;
53 -  
54 getApp().request.promiseGet("/api/weshop/marketing/help/act/judge", { 55 getApp().request.promiseGet("/api/weshop/marketing/help/act/judge", {
  56 + isShowLoading: true,
55 data: { 57 data: {
56 storeId: store_id, 58 storeId: store_id,
57 userId: user_id 59 userId: user_id
58 } 60 }
59 }).then(res => { 61 }).then(res => {
60 if (res.data.code == 0) { 62 if (res.data.code == 0) {
61 - var help_data=res.data.data;  
62 - th.setData({ zl_act:help_data, help_id:help_data.id });  
63 - if (th.data.help_id != "" && th.data.help_id!=null) {  
64 - //我的任务 63 + var help_data = res.data.data;
  64 + help_data.remark = help_data.remark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"');
  65 + th.setData({
  66 + zl_act: help_data,
  67 + help_id: help_data.id
  68 + });
  69 + if (th.data.help_id != "" && th.data.help_id != null) {
  70 + //我的任务
65 th.get_list(); 71 th.get_list();
66 - }  
67 -  
68 - return getApp().request.promiseGet("/api/weshop/marketing/help/involve/help/act/people/count", {  
69 - data: {  
70 - helpId: help_data.id, storeId: store_id  
71 - }  
72 - })  
73 - 72 + }
  73 + return getApp().request.promiseGet("/api/weshop/marketing/help/involve/help/act/people/count", {
  74 + isShowLoading: true,
  75 + data: {
  76 + helpId: help_data.id,
  77 + storeId: store_id
  78 + }
  79 + })
74 } 80 }
75 - return ut.null_promise();  
76 - }).then(res=>{  
77 - if(res.data.code==0)  
78 - th.setData({s_num:res.data.data.countAll})  
79 - })  
80 -  
81 - 81 + return ut.null_promise();
  82 + }).then(res => {
  83 + if (res.data.code == 0)
  84 + th.setData({
  85 + s_num: res.data.data.countAll
  86 + })
  87 + })
  88 +
  89 +
82 }, 90 },
83 91
84 //--点击获取用户任务列表--会员的任务列表 92 //--点击获取用户任务列表--会员的任务列表
85 - get_list:function() {  
86 - 93 + get_list: function() {
  94 +
87 var th = this; 95 var th = this;
88 - var page=th.data.page;  
89 - var help_id=this.data.help_id; 96 + var page = th.data.page;
  97 + var help_id = this.data.help_id;
90 t.request.get("/api/weshop/marketing/help/help/user/page", { 98 t.request.get("/api/weshop/marketing/help/help/user/page", {
  99 + isShowLoading: true,
91 data: { 100 data: {
92 - userId:getApp().globalData.user_id, 101 + userId: getApp().globalData.user_id,
93 storeId: os.stoid, 102 storeId: os.stoid,
94 helpId: help_id, 103 helpId: help_id,
95 page: page, 104 page: page,
96 - pageSize:5 105 + pageSize: 5
97 }, 106 },
98 success: function(res) { 107 success: function(res) {
99 clearTimeout(th.data.timer); 108 clearTimeout(th.data.timer);
100 -  
101 - if (!th.data.is_load)  
102 - th.setData({  
103 - is_load: 1  
104 - })  
105 -  
106 - 109 +
  110 + if (!th.data.is_load)
  111 + th.setData({
  112 + is_load: 1
  113 + })
  114 +
107 if (res.data.code == 0) { 115 if (res.data.code == 0) {
108 - 116 +
109 var list = th.data.zl_user_list; 117 var list = th.data.zl_user_list;
110 //连接数组 118 //连接数组
111 - list = list.concat(res.data.data.pageData); 119 + list = list.concat(res.data.data.pageData);
112 th.setData({ 120 th.setData({
113 zl_user_list: list, 121 zl_user_list: list,
114 is_load: 1, 122 is_load: 1,
@@ -117,20 +125,19 @@ Page({ @@ -117,20 +125,19 @@ Page({
117 th.setData({ 125 th.setData({
118 is_show_more: 1 126 is_show_more: 1
119 }) 127 })
120 - }else{ 128 + } else {
121 var page = th.data.page + 1; 129 var page = th.data.page + 1;
122 th.setData({ 130 th.setData({
123 is_show_more: 0, 131 is_show_more: 0,
124 page: page 132 page: page
125 }) 133 })
126 } 134 }
127 -  
128 } else { 135 } else {
129 -  
130 - getApp().showWarning("暂无更多内容",0); 136 +
  137 + getApp().showWarning("暂无更多内容", 0);
131 th.setData({ 138 th.setData({
132 is_show_more: 1, 139 is_show_more: 1,
133 - page: page 140 + page: page
134 }) 141 })
135 } 142 }
136 143
@@ -140,11 +147,11 @@ Page({ @@ -140,11 +147,11 @@ Page({
140 147
141 //-----跳转到领取礼包的页面------ 148 //-----跳转到领取礼包的页面------
142 go_task: function() { 149 go_task: function() {
143 -  
144 - var help_id=this.data.help_id;  
145 - getApp().goto("/pages/user/assistance/task_assistance?help_id="+help_id); 150 + var th = this;
  151 + var help_id = th.data.help_id;
  152 + getApp().goto("/pages/user/assistance/task_assistance?help_id=" + help_id);
146 }, 153 },
147 - switch_head: function (e) { 154 + switch_head: function(e) {
148 var th = this; 155 var th = this;
149 var index = e.currentTarget.dataset.index; //获取当前选择的是任务还是活动说明 156 var index = e.currentTarget.dataset.index; //获取当前选择的是任务还是活动说明
150 var switch_head = th.data.switch_head; //0任务,1活动说明 157 var switch_head = th.data.switch_head; //0任务,1活动说明
@@ -156,22 +163,22 @@ Page({ @@ -156,22 +163,22 @@ Page({
156 }, 163 },
157 164
158 //关闭导航 165 //关闭导航
159 - close: function () { 166 + close: function() {
160 var th = this; 167 var th = this;
161 var nav_b = th.selectComponent("#nav_b"); //组件的id 168 var nav_b = th.selectComponent("#nav_b"); //组件的id
162 nav_b.close_box(); 169 nav_b.close_box();
163 }, 170 },
  171 +
164 // 领取礼包 172 // 领取礼包
165 - get_libao:function(e){  
166 - var libao_id=e.currentTarget.dataset.libaoid;  
167 - var completeid= e.currentTarget.dataset.completeid;  
168 -  
169 - getApp().goto("/pages/user/assistance/giftpacklist?libao_id=" + libao_id + "&is_libao=" + 1 + "&completeid=" + completeid); 173 + get_libao: function(e) {
  174 + var libao_id = e.currentTarget.dataset.libaoid;
  175 + getApp().goto("/pages/user/assistance/giftpacklist?libao_id=" + libao_id + "&is_libao=" + 1);
170 }, 176 },
  177 +
171 //查看礼包id 178 //查看礼包id
172 - select_libao:function(){  
173 - var libao_id = e.currentTarget.dataset.libaoid;  
174 - var ordersn = e.currentTarget.dataset.orderid;  
175 - getApp().goto("/pages/user/assistance/giftpacklist?libao_id=" + libao_id + "&is_libao=" + 0 + "&ordersn=" + ordersn ); 179 + select_libao: function() {
  180 + var orderSn = e.currentTarget.dataset.orderSn;//订单号
  181 + getApp().goto("/pages/user/assistance/giftpacklist?orderSn=" + orderSn);
176 } 182 }
  183 +
177 }) 184 })
178 \ No newline at end of file 185 \ No newline at end of file
pages/user/assistance/assistance.json
1 { 1 {
2 "navigationBarTitleText": "好友助力,得好礼", 2 "navigationBarTitleText": "好友助力,得好礼",
3 - "navigationStyle": "custom",  
4 "usingComponents": { 3 "usingComponents": {
5 "warn": "/components/long_warn/long_warn", 4 "warn": "/components/long_warn/long_warn",
6 "my_confirm": "/components/my_confirm/my_confirm", 5 "my_confirm": "/components/my_confirm/my_confirm",
pages/user/assistance/assistance.wxml
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <view class="flex-center"> 8 <view class="flex-center">
9 <image class="getgift" src="{{iurl+'miniapp/images/friendhelp/getgift.png'}}" lazy-load="true"></image> 9 <image class="getgift" src="{{iurl+'miniapp/images/friendhelp/getgift.png'}}" lazy-load="true"></image>
10 </view> 10 </view>
11 - <view class="flex-center fs32"> 11 + <view class="flex-center fs32">
12 <view class="excitation">机会总是留给最有行动力的人</view> 12 <view class="excitation">机会总是留给最有行动力的人</view>
13 </view> 13 </view>
14 <view class="flex-center"> 14 <view class="flex-center">
@@ -48,31 +48,30 @@ @@ -48,31 +48,30 @@
48 <view class="flex-center width"> 48 <view class="flex-center width">
49 <view class="ellipsis-1">{{item.helpTaskName}}</view> 49 <view class="ellipsis-1">{{item.helpTaskName}}</view>
50 </view> 50 </view>
51 - 51 +
52 <!-- 已完成的颜色nostate --> 52 <!-- 已完成的颜色nostate -->
53 <view class="flex-center width state" wx:if="{{item.status==1}}"> 53 <view class="flex-center width state" wx:if="{{item.status==1}}">
54 - <view class="ellipsis-1"bindtap="get_libao"data-libaoid="{{item.helpListGiftBagId}}"  
55 - data-completeid="{{item.id}}" >领取礼包</view> 54 + <view class="ellipsis-1" bindtap="get_libao" data-libaoid="{{item.helpListGiftBagId}}">领取礼包</view>
  55 + </view>
  56 + <view class="flex-center width state" wx:if="{{item.status==0}}">
  57 + <view class="ellipsis-1">{{item.zlHelpNum}}/{{item.helpNum}}</view>
  58 + </view>
  59 + <view class="flex-center width state" wx:if="{{item.status==2}}">
  60 + <view class="ellipsis-1" bindtap="select_libao" data-orderSn="{{item.orderSn}}">查看礼包</view>
56 </view> 61 </view>
57 - <view class="flex-center width state" wx:if="{{item.status==0}}">  
58 - <view class="ellipsis-1">{{item.zlHelpNum}}/{{item.helpNum}}</view>  
59 - </view>  
60 - <view class="flex-center width state" wx:if="{{item.status==2}}">  
61 - <view class="ellipsis-1" bindtap="select_libao" data-orderid="{{item.ordersn}}" data-libaoid="{{item.helpListGiftBagId}}">查看礼包</view>  
62 - </view>  
63 -  
64 - 62 +
  63 +
65 </view> 64 </view>
66 <!-- 加载更多 --> 65 <!-- 加载更多 -->
67 - <block wx:if="{{is_show_more==0}}">  
68 - <view class="fs28 flex-center">  
69 - <view class="line"></view>  
70 - <view class="load" bindtap="get_list">点击加载更多</view>  
71 - <view class="line"></view>  
72 - </view>  
73 - </block> 66 + <block wx:if="{{is_show_more==0}}">
  67 + <view class="fs28 flex-center">
  68 + <view class="line"></view>
  69 + <view class="load" bindtap="get_list">点击加载更多</view>
  70 + <view class="line"></view>
  71 + </view>
  72 + </block>
74 </view> 73 </view>
75 - 74 +
76 75
77 <view class="fs30" style="margin-top: 30rpx;"> 76 <view class="fs30" style="margin-top: 30rpx;">
78 <view class="flex-center nothing" wx:if="{{is_load && zl_user_list.length==0}}"> 77 <view class="flex-center nothing" wx:if="{{is_load && zl_user_list.length==0}}">
@@ -93,11 +92,14 @@ @@ -93,11 +92,14 @@
93 <view wx:if="{{switch_head}}" class="white"> 92 <view wx:if="{{switch_head}}" class="white">
94 <view class="items"> 93 <view class="items">
95 <view class="content fs28 padding"> 94 <view class="content fs28 padding">
96 - <!-- <view>{{zl_act.remark}}</view> -->  
97 - <rich-text nodes="{{zl_act.remark}}"></rich-text> 95 + <block wx:if="{{zl_act.remark!=''}}">
  96 + <rich-text nodes="{{zl_act.remark}}" style="word-break:break-all;word-wrap:break-word"></rich-text>
  97 + </block>
  98 + <block wx:else>
  99 + <view>暂无活动说明</view>
  100 + </block>
98 </view> 101 </view>
99 </view> 102 </view>
100 -  
101 </view> 103 </view>
102 104
103 </view> 105 </view>
pages/user/assistance/assistance_success.json
1 { 1 {
2 "navigationBarTitleText": "好友助力,得好礼", 2 "navigationBarTitleText": "好友助力,得好礼",
3 - "navigationStyle": "custom",  
4 "usingComponents": { 3 "usingComponents": {
5 "warn": "/components/long_warn/long_warn", 4 "warn": "/components/long_warn/long_warn",
6 "my_confirm": "/components/my_confirm/my_confirm", 5 "my_confirm": "/components/my_confirm/my_confirm",
pages/user/assistance/friend_assistance.json
1 { 1 {
2 "navigationBarTitleText": "好友助力,得好礼", 2 "navigationBarTitleText": "好友助力,得好礼",
3 - "navigationStyle": "custom",  
4 "usingComponents": { 3 "usingComponents": {
5 "warn": "/components/long_warn/long_warn", 4 "warn": "/components/long_warn/long_warn",
6 "my_confirm": "/components/my_confirm/my_confirm", 5 "my_confirm": "/components/my_confirm/my_confirm",
pages/user/assistance/friend_assistance.wxml
1 <wxs module="filter" src="c_filter.wxs"></wxs> 1 <wxs module="filter" src="c_filter.wxs"></wxs>
2 <view class="top-back" style="background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)"> 2 <view class="top-back" style="background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)">
3 <view class="flex-vertical user_assis"> 3 <view class="flex-vertical user_assis">
4 - <image class="circle user_img" src="{{user.head_pic}}"></image> 4 + <image class="circle user_img" src="{{user.head_pic}}" lazy-load="true"></image>
5 <view class="user_name white fs28 ellipsis-1">{{user.nickname}}</view> 5 <view class="user_name white fs28 ellipsis-1">{{user.nickname}}</view>
6 </view> 6 </view>
7 <view class="caption_title white fs32 t-c"> 7 <view class="caption_title white fs32 t-c">
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 </view> 9 </view>
10 <!-- 礼包图片 --> 10 <!-- 礼包图片 -->
11 <view class="t-c"> 11 <view class="t-c">
12 -<image class="assis_liba" src="{{iurl}}/miniapp/images/friendhelp/libao_asiss.png"> 12 +<image class="assis_liba" src="{{iurl}}/miniapp/images/friendhelp/libao_asiss.png" lazy-load="true">
13 </image> 13 </image>
14 </view> 14 </view>
15 <view class="flex jc-center"> 15 <view class="flex jc-center">
pages/user/assistance/giftpacklist.js
@@ -10,7 +10,6 @@ Page({ @@ -10,7 +10,6 @@ Page({
10 url: a.url, //接口网址 10 url: a.url, //接口网址
11 iurl: a.imghost, //图片前缀网址 11 iurl: a.imghost, //图片前缀网址
12 isBuy: 0, 12 isBuy: 0,
13 - getGiftID: '', //礼包id  
14 giftImage: '', 13 giftImage: '',
15 giftTitle: '', 14 giftTitle: '',
16 giftDate: '', 15 giftDate: '',
@@ -29,39 +28,47 @@ Page({ @@ -29,39 +28,47 @@ Page({
29 c_state: "0", //判断是否已经使用, 0正常 1已使用 2已过期 28 c_state: "0", //判断是否已经使用, 0正常 1已使用 2已过期
30 is_lb: 0, //是否有礼包 29 is_lb: 0, //是否有礼包
31 receiveState: 0, //0未领取 1已领取 30 receiveState: 0, //0未领取 1已领取
32 - completeid: "",  
33 is_sub: 0, //判断是否重复提交 31 is_sub: 0, //判断是否重复提交
34 is_libao: 0, //0轮播查看活动 1领取礼包 2.查看礼包详情 32 is_libao: 0, //0轮播查看活动 1领取礼包 2.查看礼包详情
35 held_id: "", //活动id 33 held_id: "", //活动id
36 taskId: "", //任务id 34 taskId: "", //任务id
37 orderSn: "", //订单号 35 orderSn: "", //订单号
  36 + is_type:"",//类型 0.轮播过来的 1.领取礼包过来的 2.查看礼包过来的
  37 + is_head:0,//数据是否加载完成
  38 + giftBagId:"",//礼包id
38 }, 39 },
39 onLoad: function(options) { 40 onLoad: function(options) {
40 var th = this; 41 var th = this;
41 if (options.is_libao == 0) { 42 if (options.is_libao == 0) {
42 th.setData({ 43 th.setData({
43 - held_id: options.help_id, //options.help_id  
44 - taskId: options.taskId, //options.libao_id 44 + held_id: options.help_id,
  45 + taskId: options.taskId,
  46 + is_type:0
45 }) 47 })
46 th.help(); 48 th.help();
47 } 49 }
48 if (options.is_libao == 1) { 50 if (options.is_libao == 1) {
49 th.setData({ 51 th.setData({
50 - taskId: options.libao_id,  
51 - held_id: options.held_id 52 + giftBagId: options.libao_id,
  53 + is_type: 1
52 }) 54 })
53 th.GetBuyGiftList(); 55 th.GetBuyGiftList();
54 } 56 }
55 if (options.order_sn) { 57 if (options.order_sn) {
56 th.setData({ 58 th.setData({
57 - orderSn: options.orderSn 59 + orderSn: options.orderSn,
  60 + is_type: 2
58 }) 61 })
59 th.GetMyGiftList(); 62 th.GetMyGiftList();
60 } 63 }
61 - th.close();  
62 }, 64 },
63 onShow: function() { 65 onShow: function() {
64 - 66 + var th = this;
  67 + var is_read = th.data.is_read;
  68 + if (is_read){
  69 + var nav_b = th.selectComponent("#nav_b"); //组件的id
  70 + nav_b.set_name("助力", "/pages/user/assistance/assistance");
  71 + }
65 }, 72 },
66 //助力活动查看礼包详情调用 73 //助力活动查看礼包详情调用
67 help: function(e) { 74 help: function(e) {
@@ -78,7 +85,8 @@ Page({ @@ -78,7 +85,8 @@ Page({
78 if (res.data.code == 0) { 85 if (res.data.code == 0) {
79 th.setData({ 86 th.setData({
80 giftImage: th.data.iurl + res.data.data.lbUrl, 87 giftImage: th.data.iurl + res.data.data.lbUrl,
81 - giftTitle: res.data.data.giftTitle 88 + giftTitle: res.data.data.giftTitle,
  89 + is_head:1
82 }) 90 })
83 if (res.data.data.giftRemark == '') { 91 if (res.data.data.giftRemark == '') {
84 th.setData({ 92 th.setData({
@@ -90,22 +98,7 @@ Page({ @@ -90,22 +98,7 @@ Page({
90 }) 98 })
91 } 99 }
92 100
93 - // //---获取日期的时间戳---  
94 - // var t_endtime = res.data.data.endTime;  
95 - // t_endtime = t_endtime.replace(/-/g, '/');  
96 - // var t_date = new Date(t_endtime) / 1000;  
97 - // var t_now = ut.gettimestamp();  
98 -  
99 - // if (res.data.data.goodsUseState) th.setData({  
100 - // c_state: 1  
101 - // })  
102 - // else if (t_date <= t_now)  
103 - // th.setData({  
104 - // c_state: 2  
105 - // })  
106 -  
107 th.setData({ 101 th.setData({
108 - giftDate: res.data.data.endTime,  
109 giftPosPrice: res.data.data.giftPosPrice, 102 giftPosPrice: res.data.data.giftPosPrice,
110 giftQty: res.data.data.giftQty, 103 giftQty: res.data.data.giftQty,
111 giftIntegral: res.data.data.payIntegral, 104 giftIntegral: res.data.data.payIntegral,
@@ -145,7 +138,8 @@ Page({ @@ -145,7 +138,8 @@ Page({
145 if (res.data.code == 0) { 138 if (res.data.code == 0) {
146 th.setData({ 139 th.setData({
147 giftImage: th.data.iurl + res.data.data.lbUrl, 140 giftImage: th.data.iurl + res.data.data.lbUrl,
148 - giftTitle: res.data.data.giftTitle 141 + giftTitle: res.data.data.giftTitle,
  142 + is_head:1
149 }) 143 })
150 if (res.data.data.giftRemark == '') { 144 if (res.data.data.giftRemark == '') {
151 th.setData({ 145 th.setData({
@@ -210,9 +204,9 @@ Page({ @@ -210,9 +204,9 @@ Page({
210 is_sub: 1 204 is_sub: 1
211 }) 205 })
212 var json = { 206 var json = {
213 - "actId": th.data.completeid, //活动Id 207 + "actId": th.data.held_id, //活动Id
214 "actType": 5, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 208 "actType": 5, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
215 - "giftBagId": th.data.giftID, //礼包Id 209 + "giftBagId": th.data.giftBagId, //礼包Id
216 "storeId": a.stoid, //商家Id 210 "storeId": a.stoid, //商家Id
217 "userId": d.user_id //用户ID 211 "userId": d.user_id //用户ID
218 }; 212 };
@@ -248,13 +242,14 @@ Page({ @@ -248,13 +242,14 @@ Page({
248 data: { 242 data: {
249 "storeId": a.stoid, //商家ID 243 "storeId": a.stoid, //商家ID
250 "userId": d.user_id, //用户ID 244 "userId": d.user_id, //用户ID
251 - "giftBagId": th.taskId 245 + "giftBagId": th.giftBagId
252 }, 246 },
253 success: function(res) { 247 success: function(res) {
254 if (res.data.code == 0) { 248 if (res.data.code == 0) {
255 _this2.setData({ 249 _this2.setData({
256 giftImage: th.iurl + res.data.data.lbUrl, 250 giftImage: th.iurl + res.data.data.lbUrl,
257 - giftTitle: res.data.data.giftTitle 251 + giftTitle: res.data.data.giftTitle,
  252 + is_head:1
258 }) 253 })
259 if (res.data.data.giftRemark == '') { 254 if (res.data.data.giftRemark == '') {
260 255
@@ -267,7 +262,6 @@ Page({ @@ -267,7 +262,6 @@ Page({
267 }) 262 })
268 } 263 }
269 _this2.setData({ 264 _this2.setData({
270 - giftDate: res.data.data.endTime,  
271 giftPosPrice: res.data.data.giftPosPrice, 265 giftPosPrice: res.data.data.giftPosPrice,
272 giftQty: res.data.data.giftQty, 266 giftQty: res.data.data.giftQty,
273 giftIntegral: res.data.data.payIntegral, 267 giftIntegral: res.data.data.payIntegral,
@@ -345,6 +339,5 @@ Page({ @@ -345,6 +339,5 @@ Page({
345 var th = this; 339 var th = this;
346 var nav_b = th.selectComponent("#nav_b"); //组件的id 340 var nav_b = th.selectComponent("#nav_b"); //组件的id
347 nav_b.close_box(); 341 nav_b.close_box();
348 - nav_b.set_name("礼包", "/pages/giftpack/buygiftpack/giftpackbuy");  
349 } 342 }
350 }); 343 });
351 \ No newline at end of file 344 \ No newline at end of file
pages/user/assistance/giftpacklist.json
1 { 1 {
2 - "navigationBarTitleText": "助力详情", 2 + "navigationBarTitleText": "礼包详情",
3 "usingComponents": { 3 "usingComponents": {
4 "warn": "/components/long_warn/long_warn", 4 "warn": "/components/long_warn/long_warn",
5 "my_confirm": "/components/my_confirm/my_confirm", 5 "my_confirm": "/components/my_confirm/my_confirm",
pages/user/assistance/giftpacklist.wxml
1 -<view class="box data-v-3a5b7e36"> 1 +<view wx:if="{{is_head}}" class="box data-v-3a5b7e36" bindtap="close">
2 <view class="box_top data-v-3a5b7e36"> 2 <view class="box_top data-v-3a5b7e36">
3 <image src="{{giftImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="giftImage"></image> 3 <image src="{{giftImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="giftImage"></image>
4 </view> 4 </view>
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <view class="top_title data-v-3a5b7e36"> 6 <view class="top_title data-v-3a5b7e36">
7 <text class="data-v-3a5b7e36 ellipsis-2">{{giftTitle}}</text> 7 <text class="data-v-3a5b7e36 ellipsis-2">{{giftTitle}}</text>
8 </view> 8 </view>
9 - <view wx:if="{{giftDate}}" class="top_time data-v-3a5b7e36"> 9 + <view wx:if="{{giftDate!=''}}" class="top_time data-v-3a5b7e36">
10 <text class="data-v-3a5b7e36">{{"兑换截至时间:"+giftDate}}</text> 10 <text class="data-v-3a5b7e36">{{"兑换截至时间:"+giftDate}}</text>
11 </view> 11 </view>
12 <view class="top_price data-v-3a5b7e36"> 12 <view class="top_price data-v-3a5b7e36">
@@ -65,27 +65,30 @@ @@ -65,27 +65,30 @@
65 <view class="box_ware_item_qty data-v-3a5b7e36"> 65 <view class="box_ware_item_qty data-v-3a5b7e36">
66 <text class="data-v-3a5b7e36 ellipsis-1">{{"数量:"+item.num}}</text> 66 <text class="data-v-3a5b7e36 ellipsis-1">{{"数量:"+item.num}}</text>
67 </view> 67 </view>
68 - <view class="box_ware_code data-v-3a5b7e36">  
69 - <block wx:if="{{c_state==0}}">  
70 - <block wx:if="{{item.lbType==1}}">  
71 - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="getcode" class="data-v-3a5b7e36"></image> 68 + <!-- 已完成方可显示 -->
  69 + <block wx:if="{{is_type==2}}">
  70 + <view class="box_ware_code data-v-3a5b7e36">
  71 + <block wx:if="{{c_state==0}}">
  72 + <block wx:if="{{item.lbType==1}}">
  73 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="getcode" class="data-v-3a5b7e36"></image>
  74 + </block>
72 </block> 75 </block>
73 - </block>  
74 - <block wx:else>  
75 - <block wx:if="{{isBuy==0&item.lbType==1}}">  
76 - <image src="{{iurl+'/miniapp/images/giftbag/gift08.png'}}" lazy-load="true" class="data-v-3a5b7e36"></image> 76 + <block wx:else>
  77 + <block wx:if="{{isBuy==0&item.lbType==1}}">
  78 + <image src="{{iurl+'/miniapp/images/giftbag/gift08.png'}}" lazy-load="true" class="data-v-3a5b7e36"></image>
  79 + </block>
77 </block> 80 </block>
78 - </block>  
79 - <block wx:if="{{item.lbType==2}}">  
80 - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/coupons/coupons" bindtap="goto"></image>  
81 - </block>  
82 - <block wx:if="{{item.lbType==3}}">  
83 - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/my_service/i_service" bindtap="goto"></image>  
84 - </block>  
85 - <block wx:if="{{item.lbType>3}}">  
86 - <text class="data-v-3a5b7e36">奖励已发放</text>  
87 - </block>  
88 - </view> 81 + <block wx:if="{{item.lbType==2}}">
  82 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/coupons/coupons" bindtap="goto"></image>
  83 + </block>
  84 + <block wx:if="{{item.lbType==3}}">
  85 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/my_service/i_service" bindtap="goto"></image>
  86 + </block>
  87 + <block wx:if="{{item.lbType>3}}">
  88 + <text class="data-v-3a5b7e36">奖励已发放</text>
  89 + </block>
  90 + </view>
  91 + </block>
89 </view> 92 </view>
90 </view> 93 </view>
91 </block> 94 </block>
@@ -99,21 +102,14 @@ @@ -99,21 +102,14 @@
99 </view> 102 </view>
100 </view> 103 </view>
101 <view class="foot_empty data-v-3a5b7e36"></view> 104 <view class="foot_empty data-v-3a5b7e36"></view>
102 - <block wx:if="{{isBuy==0}}">  
103 - <view class="foot_button data-v-3a5b7e36">  
104 - <block wx:if="{{true}}">  
105 - <block wx:if="{{receiveState}}">  
106 - <view class="foot_button_buy data-v-3a5b7e36 overdue">  
107 - <text class="data-v-3a5b7e36">已领取</text>  
108 - </view>  
109 - </block>  
110 - <block wx:else>  
111 - <view class="foot_button_buy data-v-3a5b7e36" bindtap="GetReceive">  
112 - <text class="data-v-3a5b7e36">一键全部领取</text>  
113 - </view>  
114 - </block> 105 + <view class="foot_button data-v-3a5b7e36">
  106 + <block wx:if="{{is_type!=0}}">
  107 + <block wx:if="{{is_type==1}}">
  108 + <view class="foot_button_buy data-v-3a5b7e36" bindtap="GetReceive">
  109 + <text class="data-v-3a5b7e36">一键全部领取</text>
  110 + </view>
115 </block> 111 </block>
116 - <block wx:else> 112 + <block wx:if="{{is_type==2}}">
117 <block wx:if="{{is_lb!=1}}"> 113 <block wx:if="{{is_lb!=1}}">
118 <view class="foot_button_buy data-v-3a5b7e36 overdue"> 114 <view class="foot_button_buy data-v-3a5b7e36 overdue">
119 <text class="data-v-3a5b7e36">无核销商品</text> 115 <text class="data-v-3a5b7e36">无核销商品</text>
@@ -131,8 +127,13 @@ @@ -131,8 +127,13 @@
131 </view> 127 </view>
132 </block> 128 </block>
133 </block> 129 </block>
134 - </view>  
135 - </block> 130 + </block>
  131 + <block wx:else>
  132 + <view class="foot_button_buy data-v-3a5b7e36" bindtap="goto" data-url="/pages/index/index/index">
  133 + <text class="data-v-3a5b7e36">回到首页</text>
  134 + </view>
  135 + </block>
  136 + </view>
136 </view> 137 </view>
137 <!-- 引入提示组件 --> 138 <!-- 引入提示组件 -->
138 <warn id="warn"></warn> 139 <warn id="warn"></warn>
@@ -140,4 +141,4 @@ @@ -140,4 +141,4 @@
140 <!-- 弹出框扫描 --> 141 <!-- 弹出框扫描 -->
141 <qr_code id="qc_com"></qr_code> 142 <qr_code id="qc_com"></qr_code>
142 <!-- 制作一个圆球导航 --> 143 <!-- 制作一个圆球导航 -->
143 -<nav_b id="nav_b"></nav_b>  
144 \ No newline at end of file 144 \ No newline at end of file
  145 +<nav_b wx:if="{{is_head}}" id="nav_b"></nav_b>
145 \ No newline at end of file 146 \ No newline at end of file
pages/user/assistance/giftpacklist.wxss
1 - @charset "UTF-8"; 1 +@charset "UTF-8";
2 2
3 /* Author XGQ 3 /* Author XGQ
4 * 2019-12-12 4 * 2019-12-12
@@ -96,6 +96,7 @@ @@ -96,6 +96,7 @@
96 border: 2rpx solid #999; 96 border: 2rpx solid #999;
97 width: 120rpx; 97 width: 120rpx;
98 height: 120rpx; 98 height: 120rpx;
  99 + /* background-color: rgba(153, 153, 153, 0.664); */
99 } 100 }
100 101
101 .box_ware_item.data-v-3a5b7e36 { 102 .box_ware_item.data-v-3a5b7e36 {
@@ -239,6 +240,7 @@ page.data-v-3a5b7e36 { @@ -239,6 +240,7 @@ page.data-v-3a5b7e36 {
239 .foot_box_remark.data-v-3a5b7e36 .img { 240 .foot_box_remark.data-v-3a5b7e36 .img {
240 line-height: 0; 241 line-height: 0;
241 } 242 }
242 -.overdue.data-v-3a5b7e36{  
243 - background-color: rgb(153,153,153);  
244 -}  
245 \ No newline at end of file 243 \ No newline at end of file
  244 +
  245 +.overdue.data-v-3a5b7e36 {
  246 + background-color: rgb(153, 153, 153);
  247 +}
pages/user/assistance/task_assistance.js
@@ -59,8 +59,10 @@ Page({ @@ -59,8 +59,10 @@ Page({
59 * 生命周期函数--监听页面加载 59 * 生命周期函数--监听页面加载
60 */ 60 */
61 onLoad: function(options) { 61 onLoad: function(options) {
62 - var help_id = options.help_id;  
63 var th = this; 62 var th = this;
  63 + var help_id = options.help_id;
  64 + var nav_b = th.selectComponent("#nav_b"); //组件的id
  65 + nav_b.set_name("助力", "/pages/user/assistance/assistance");
64 th.setData({ 66 th.setData({
65 help_id: help_id 67 help_id: help_id
66 }); 68 });
@@ -179,7 +181,6 @@ Page({ @@ -179,7 +181,6 @@ Page({
179 }); 181 });
180 var task_number = data_aissa[0].giftQty - data_aissa[0].useGiftQty; 182 var task_number = data_aissa[0].giftQty - data_aissa[0].useGiftQty;
181 var taskid = data_aissa[0].id; 183 var taskid = data_aissa[0].id;
182 - console.log("参考", data_aissa);  
183 th.setData({ 184 th.setData({
184 aitem: data_aissa, 185 aitem: data_aissa,
185 task_number: task_number, 186 task_number: task_number,
@@ -248,7 +249,7 @@ Page({ @@ -248,7 +249,7 @@ Page({
248 is_bc_show:1 249 is_bc_show:1
249 }) 250 })
250 }else{ 251 }else{
251 - getApp().showWarning("暂无更多内容", 0); 252 + getApp().showWarning("暂无更多内容", 0,th);
252 } 253 }
253 254
254 th.setData({ 255 th.setData({
@@ -265,15 +266,13 @@ Page({ @@ -265,15 +266,13 @@ Page({
265 }, 266 },
266 // 领取礼包 267 // 领取礼包
267 get_libao: function(e) { 268 get_libao: function(e) {
268 - var libao_id = e.currentTarget.dataset.libaoid;  
269 - var completeid = e.currentTarget.dataset.completeid;  
270 - console.log("礼包id", libao_id);  
271 - getApp().goto("/pages/user/assistance/giftpacklist?libao_id=" + libao_id + "&is_libao=" + 1 + "&completeid=" + completeid); 269 + var libao_id = e.currentTarget.dataset.libaoid;//礼包id
  270 + getApp().goto("/pages/user/assistance/giftpacklist?libao_id=" + libao_id + "&is_libao=" + 1);
272 }, 271 },
273 //查看礼包id 272 //查看礼包id
274 - select_libao: function() {  
275 - var libao_id = e.currentTarget.dataset.libaoid;  
276 - getApp().goto("/pages/user/assistance/giftpacklist?libao_id=" + libao_id + "&is_libao=" + 0); 273 + select_libao: function(e) {
  274 + var orderSn = e.currentTarget.dataset.orderSn;
  275 + getApp().goto("/pages/user/assistance/giftpacklist?orderSn=" + orderSn);
277 }, 276 },
278 277
279 //划动的时候监听 278 //划动的时候监听
@@ -283,8 +282,6 @@ Page({ @@ -283,8 +282,6 @@ Page({
283 var aitem = this.data.aitem; 282 var aitem = this.data.aitem;
284 var task_number = aitem[ind].giftQty - aitem[ind].useGiftQty; 283 var task_number = aitem[ind].giftQty - aitem[ind].useGiftQty;
285 var task_id = aitem[ind].id; 284 var task_id = aitem[ind].id;
286 - console.log("划动的任务总数", task_number, "任务所有的参数", aitem,  
287 - "任务id", task_id);  
288 th.setData({ 285 th.setData({
289 sw_index: ind, 286 sw_index: ind,
290 task_number: task_number, 287 task_number: task_number,
@@ -304,7 +301,6 @@ Page({ @@ -304,7 +301,6 @@ Page({
304 var th = this; 301 var th = this;
305 var nav_b = th.selectComponent("#nav_b"); //组件的id 302 var nav_b = th.selectComponent("#nav_b"); //组件的id
306 nav_b.close_box(); 303 nav_b.close_box();
307 - nav_b.set_name("助力", "/pages/user/assistance/assistance");  
308 }, 304 },
309 // 获取会员的参与的任务列表 我的任务 305 // 获取会员的参与的任务列表 我的任务
310 user_task_list: function(e) { 306 user_task_list: function(e) {
@@ -340,6 +336,7 @@ Page({ @@ -340,6 +336,7 @@ Page({
340 rw_page: rw_page, 336 rw_page: rw_page,
341 is_show: 1 337 is_show: 1
342 }) 338 })
  339 + getApp().my_warnning();
343 getApp().showWarning("暂无更多内容", 0); 340 getApp().showWarning("暂无更多内容", 0);
344 }else{ 341 }else{
345 var rw_page = th.data.rw_page + 1; 342 var rw_page = th.data.rw_page + 1;
@@ -389,7 +386,6 @@ Page({ @@ -389,7 +386,6 @@ Page({
389 storeId: os.stoid, 386 storeId: os.stoid,
390 }, 387 },
391 success: function(su) { 388 success: function(su) {
392 - console.log(su.data.code, "获取助力活动参与的人数", su.data)  
393 if (su.data.code == 0) { 389 if (su.data.code == 0) {
394 var usercount = su.data.data.countAll; 390 var usercount = su.data.data.countAll;
395 391
@@ -413,7 +409,6 @@ Page({ @@ -413,7 +409,6 @@ Page({
413 swiperError: swiperError 409 swiperError: swiperError
414 }) 410 })
415 if (swiperError >= 3) { //在开关被触发3次以上 411 if (swiperError >= 3) { //在开关被触发3次以上
416 - console.error(this.data.swiperError)  
417 this.setData({ 412 this.setData({
418 sw_index: this.data.preIndex 413 sw_index: this.data.preIndex
419 }); //,重置current为正确索引 414 }); //,重置current为正确索引
@@ -504,7 +499,6 @@ Page({ @@ -504,7 +499,6 @@ Page({
504 499
505 // var o = endTimeList[i]; 500 // var o = endTimeList[i];
506 var endTime = th.data.endDate; 501 var endTime = th.data.endDate;
507 - console.log("结束时间5555555", endTime);  
508 // if (o.status == 0) endTime = o.start_time 502 // if (o.status == 0) endTime = o.start_time
509 503
510 var obj = null; 504 var obj = null;
@@ -590,90 +584,75 @@ Page({ @@ -590,90 +584,75 @@ Page({
590 wx.getImageInfo({ 584 wx.getImageInfo({
591 src: iurl + images[0], 585 src: iurl + images[0],
592 success: function(res) { 586 success: function(res) {
593 - console.log(res + i);  
594 //res.path是网络图片的本地地址 587 //res.path是网络图片的本地地址
595 images[0] = res.path; 588 images[0] = res.path;
596 }, 589 },
597 fail: function(res) { 590 fail: function(res) {
598 - console.log(res.toString() + "" + i);  
599 } 591 }
600 }); 592 });
601 wx.getImageInfo({ 593 wx.getImageInfo({
602 src: iurl + images[1], 594 src: iurl + images[1],
603 success: function(res) { 595 success: function(res) {
604 - console.log(res + i);  
605 //res.path是网络图片的本地地址 596 //res.path是网络图片的本地地址
606 images[1] = res.path; 597 images[1] = res.path;
607 }, 598 },
608 fail: function(res) { 599 fail: function(res) {
609 - console.log(res.toString() + "" + i);  
610 } 600 }
611 }); 601 });
612 wx.getImageInfo({ 602 wx.getImageInfo({
613 src: iurl + images[2], 603 src: iurl + images[2],
614 success: function(res) { 604 success: function(res) {
615 - console.log(res + i);  
616 //res.path是网络图片的本地地址 605 //res.path是网络图片的本地地址
617 images[2] = res.path; 606 images[2] = res.path;
618 }, 607 },
619 fail: function(res) { 608 fail: function(res) {
620 - console.log(res.toString() + "" + i); 609 +
621 } 610 }
622 }); 611 });
623 wx.getImageInfo({ 612 wx.getImageInfo({
624 src: iurl + images[3], 613 src: iurl + images[3],
625 success: function(res) { 614 success: function(res) {
626 - console.log(res + i);  
627 //res.path是网络图片的本地地址 615 //res.path是网络图片的本地地址
628 images[3] = res.path; 616 images[3] = res.path;
629 }, 617 },
630 fail: function(res) { 618 fail: function(res) {
631 - console.log(res.toString() + "" + i);  
632 } 619 }
633 }); 620 });
634 wx.getImageInfo({ 621 wx.getImageInfo({
635 src: iurl + images[4], 622 src: iurl + images[4],
636 success: function(res) { 623 success: function(res) {
637 - console.log(res + i);  
638 //res.path是网络图片的本地地址 624 //res.path是网络图片的本地地址
639 images[4] = res.path; 625 images[4] = res.path;
640 }, 626 },
641 fail: function(res) { 627 fail: function(res) {
642 - console.log(res.toString() + "" + i);  
643 } 628 }
644 }); 629 });
645 wx.getImageInfo({ 630 wx.getImageInfo({
646 src: iurl + images[5], 631 src: iurl + images[5],
647 success: function(res) { 632 success: function(res) {
648 - console.log(res + i);  
649 //res.path是网络图片的本地地址 633 //res.path是网络图片的本地地址
650 images[5] = res.path; 634 images[5] = res.path;
651 }, 635 },
652 fail: function(res) { 636 fail: function(res) {
653 - console.log(res.toString() + "" + i);  
654 } 637 }
655 }); 638 });
656 wx.getImageInfo({ 639 wx.getImageInfo({
657 src: iurl + images[6], 640 src: iurl + images[6],
658 success: function(res) { 641 success: function(res) {
659 - console.log(res + i);  
660 //res.path是网络图片的本地地址 642 //res.path是网络图片的本地地址
661 images[6] = res.path; 643 images[6] = res.path;
662 }, 644 },
663 fail: function(res) { 645 fail: function(res) {
664 - console.log(res.toString() + "" + i);  
665 } 646 }
666 }); 647 });
667 648
668 wx.getImageInfo({ 649 wx.getImageInfo({
669 src: iurl + images[7], 650 src: iurl + images[7],
670 success: function(res) { 651 success: function(res) {
671 - console.log(res + i);  
672 //res.path是网络图片的本地地址 652 //res.path是网络图片的本地地址
673 images[7] = res.path; 653 images[7] = res.path;
674 }, 654 },
675 fail: function(res) { 655 fail: function(res) {
676 - console.log(res.toString() + "" + i);  
677 } 656 }
678 }) 657 })
679 th.setData({ 658 th.setData({
@@ -734,7 +713,6 @@ Page({ @@ -734,7 +713,6 @@ Page({
734 ctx.drawImage(images[2], 65 * unit, 445 * unit, 320 * unit, 12 * unit); 713 ctx.drawImage(images[2], 65 * unit, 445 * unit, 320 * unit, 12 * unit);
735 ctx.drawImage(images[3], 65 * unit, 445 * unit, 320 * unit * c, 12 * unit); 714 ctx.drawImage(images[3], 65 * unit, 445 * unit, 320 * unit * c, 12 * unit);
736 // var dynamic = th.data.dynamic; //助力的微信头像 715 // var dynamic = th.data.dynamic; //助力的微信头像
737 - // console.log(dynamic[0].headPic + "动态图片显示");  
738 for (var i = 0; i < 6; i++) { 716 for (var i = 0; i < 6; i++) {
739 if (i < 0) { 717 if (i < 0) {
740 // ctx.beginPath(); 718 // ctx.beginPath();
@@ -960,7 +938,6 @@ Page({ @@ -960,7 +938,6 @@ Page({
960 var th = this; 938 var th = this;
961 var images = th.data.dynamic; 939 var images = th.data.dynamic;
962 if (images[0] != null && images[0] != "" && images[0] != undefined) { 940 if (images[0] != null && images[0] != "" && images[0] != undefined) {
963 - console.log(images[0].headPic + "就将计就计");  
964 wx.getImageInfo({ 941 wx.getImageInfo({
965 src: images[0].headPic, 942 src: images[0].headPic,
966 success: function(res) { 943 success: function(res) {
pages/user/assistance/task_assistance.json
1 { 1 {
2 "navigationBarTitleText": "好友助力,得好礼", 2 "navigationBarTitleText": "好友助力,得好礼",
3 - "navigationStyle": "custom",  
4 "usingComponents": { 3 "usingComponents": {
5 "warn": "/components/long_warn/long_warn", 4 "warn": "/components/long_warn/long_warn",
6 "my_confirm": "/components/my_confirm/my_confirm", 5 "my_confirm": "/components/my_confirm/my_confirm",
pages/user/assistance/task_assistance.wxml
1 - <wxs module="filter" src="../../../utils/filter.wxs"></wxs>  
2 -<view class="top-back" style="background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)"> 1 +<wxs module="filter" src="../../../utils/filter.wxs"></wxs>
  2 +<view class="top-back" style="background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)" bindtap="close">
3 <!-- 助力活动头部 --> 3 <!-- 助力活动头部 -->
4 <view class="top-frame"> 4 <view class="top-frame">
5 - <view class="top-title white fs36 t-c">  
6 - {{aitem[sw_index].helpTaskName}} 5 + <view class="flex-center">
  6 + <view class="top-title white fs36 t-c ellipsis-1">
  7 + {{aitem[sw_index].helpTaskName}}
  8 + </view>
7 </view> 9 </view>
8 <view class="activity-data t-c fs28 white"> 10 <view class="activity-data t-c fs28 white">
9 - 活动剩余时间:<text class='tui-conutdown-box'> {{aitem[0].djs.day}}</text>:<text class='tui-conutdown-box'>{{aitem[0].djs.hou}}</text>:<text class='tui-conutdown-box'>{{aitem[0].djs.min}}</text>:<text class='tui-conutdown-box tui-countdown-bg'>{{aitem[0].djs.sec}}</text>  
10 - </view> 11 + 活动剩余时间:
  12 + <text class='tui-conutdown-box'> {{aitem[0].djs.day}}</text>:
  13 + <text class='tui-conutdown-box'>{{aitem[0].djs.hou}}</text>:
  14 + <text class='tui-conutdown-box'>{{aitem[0].djs.min}}</text>:
  15 + <text class='tui-conutdown-box tui-countdown-bg'>{{aitem[0].djs.sec}}</text>
  16 + </view>
11 </view> 17 </view>
12 <!-- 图片的轮播图 --> 18 <!-- 图片的轮播图 -->
13 <view class="xc-specific-more-frame flex-center"> 19 <view class="xc-specific-more-frame flex-center">
@@ -16,10 +22,10 @@ @@ -16,10 +22,10 @@
16 </view> 22 </view>
17 <swiper bindanimationfinish="changeGoodsSwip" current="{{sw_index}}" style='width:82.7%; height:100%' bindchange='onSli' indicator-dots="{{false}}" autoplay="{{false}}"> 23 <swiper bindanimationfinish="changeGoodsSwip" current="{{sw_index}}" style='width:82.7%; height:100%' bindchange='onSli' indicator-dots="{{false}}" autoplay="{{false}}">
18 <swiper-item class="rel" wx:for="{{aitem}}" wx:for-item="aitem" wx:for-index="pidx"> 24 <swiper-item class="rel" wx:for="{{aitem}}" wx:for-item="aitem" wx:for-index="pidx">
19 - 25 +
20 <image class="xc-center-img" bindtap="libao_details" src="{{iurl+aitem.giftBagUrl}}"></image> 26 <image class="xc-center-img" bindtap="libao_details" src="{{iurl+aitem.giftBagUrl}}"></image>
21 - <view class="abs select_details fs26 white">礼包详情</view>  
22 - 27 + <view class="abs select_details fs26 white">礼包详情</view>
  28 +
23 </swiper-item> 29 </swiper-item>
24 </swiper> 30 </swiper>
25 31
@@ -28,25 +34,25 @@ @@ -28,25 +34,25 @@
28 </view> 34 </view>
29 </view> 35 </view>
30 <view class="plan-frame flex ai-center" wx:if="{{is_user_task}}"> 36 <view class="plan-frame flex ai-center" wx:if="{{is_user_task}}">
31 - <view class="plan_num rel">  
32 - <view class="is_plam abs" style="width:{{(is_user_task.zlHelpNum/is_user_task.helpNum)*100}}%"></view>  
33 - </view>  
34 - 37 + <view class="plan_num rel">
  38 + <view class="is_plam abs" style="width:{{(is_user_task.zlHelpNum/is_user_task.helpNum)*100}}%"></view>
  39 + </view>
  40 +
  41 +
  42 + <text class="white fs24">{{is_user_task.zlHelpNum}}/{{is_user_task.helpNum}}</text>
35 43
36 - <text class="white fs24">{{is_user_task.zlHelpNum}}/{{is_user_task.helpNum}}</text>  
37 -  
38 </view> 44 </view>
39 <view class="task-number fs28 white t-c "> 45 <view class="task-number fs28 white t-c ">
40 今天剩余可领{{task_number}}个任务 46 今天剩余可领{{task_number}}个任务
41 </view> 47 </view>
42 48
43 - <view wx:if="{{is_user_task==null}}" class="task_clike fs40 t-c flex-center"data-taskid="{{taskid}}" bindtap="add_onlicke"> 49 + <view wx:if="{{is_user_task==null}}" class="task_clike fs40 t-c flex-center" data-taskid="{{taskid}}" bindtap="add_onlicke">
44 就选它了 50 就选它了
45 </view> 51 </view>
46 - <view wx:if="{{is_user_task!=null}}" class="task_clike fs40 t-c flex-center" bindtap="save_share">  
47 - 好友拆一拆 52 + <view wx:if="{{is_user_task!=null}}" class="task_clike fs40 t-c flex-center" bindtap="save_share">
  53 + 好友拆一拆
48 </view> 54 </view>
49 - <!-- <view wx:if="{{is_user_task!=null}}" class="task_clike fs40 t-c flex-center"data-taskid="{{is_user_task.id}}" bindtap="test"> 55 + <!-- <view wx:if="{{is_user_task!=null}}" class="task_clike fs40 t-c flex-center"data-taskid="{{is_user_task.id}}" bindtap="test">
50 测试专用 56 测试专用
51 </view> --> 57 </view> -->
52 58
@@ -67,66 +73,65 @@ @@ -67,66 +73,65 @@
67 </view> 73 </view>
68 74
69 <view class="white"> 75 <view class="white">
70 - 76 +
71 <view class="items" wx:if="{{is_task==0}}"> 77 <view class="items" wx:if="{{is_task==0}}">
72 -  
73 - <view class="item fs26 flex-vertical-between padding" wx:for="{{user_task_list}}"wx:key="*this"> 78 +
  79 + <view class="item fs26 flex-vertical-between padding" wx:for="{{user_task_list}}" wx:key="*this">
74 <view class="flex-center width"> 80 <view class="flex-center width">
75 <view class="ellipsis-1">{{item.helpTaskName}} 81 <view class="ellipsis-1">{{item.helpTaskName}}
76 </view> 82 </view>
77 </view> 83 </view>
78 <view class="flex-center width state"> 84 <view class="flex-center width state">
79 <view class="ellipsis-1"> 85 <view class="ellipsis-1">
80 - <text wx:if="{{item.status==0}}">{{item.zlHelpNum}}/{{item.helpNum}}</text>  
81 - <text wx:if="{{item.status==2}}"bindtap="select_libao" data-libaoid="{{item.order_sn}}">查看礼包</text>  
82 - <text wx:if="{{item.status==1}}"bindtap="get_libao"data-orderid="{{item.ordersn}}" data-libaoid="{{item.helpListGiftBagId}}"  
83 - data-completeid="{{item.id}}">领取礼包 </text> 86 + <text wx:if="{{item.status==0}}">{{item.zlHelpNum}}/{{item.helpNum}}</text>
  87 + <text wx:if="{{item.status==2}}" bindtap="select_libao" data-orderSn="{{item.orderSn}}">查看礼包</text>
  88 + <text wx:if="{{item.status==1}}" bindtap="get_libao" data-libaoid="{{item.helpListGiftBagId}}">领取礼包 </text>
84 </view> 89 </view>
85 </view> 90 </view>
86 91
87 </view> 92 </view>
88 93
89 <view class="fs30" wx:if="{{user_task_list==null || user_task_list==''}}"> 94 <view class="fs30" wx:if="{{user_task_list==null || user_task_list==''}}">
90 - <view class="flex-center nothing white">  
91 - <view>暂无任务记录</view>  
92 - </view>  
93 - </view> 95 + <view class="flex-center nothing white">
  96 + <view>暂无任务记录</view>
  97 + </view>
  98 + </view>
94 </view> 99 </view>
95 100
96 - 101 +
97 </view> 102 </view>
98 - 103 +
99 104
100 <view class="items" wx:if="{{is_task==1}}"> 105 <view class="items" wx:if="{{is_task==1}}">
101 - <block wx:if="{{ dismantle!=null|| dismantle!=''}}"> 106 + <block wx:if="{{ dismantle!=null|| dismantle!=''}}">
102 107
103 108
104 - <view class="item fs26 flex flex-vertical-between padding" wx:for="{{dismantle}}"wx:for-index="idx">  
105 -  
106 - <view class="flex white" style="justify-content: space-around; width: 90%;margin:auto">  
107 - <image class="circle user_img" src="{{item.headPic}}"></image>  
108 - <view class="ellipsis-1">{{item.nickName}}  
109 - </view>  
110 - <view class="ellipsis-1">{{filter.format_time(item.zltime)}} 109 + <view class="item fs26 flex flex-vertical-between padding" wx:for="{{dismantle}}" wx:for-index="idx">
  110 +
  111 + <view class="flex white" style="justify-content: space-around; width: 90%;margin:auto">
  112 + <image class="circle user_img" src="{{item.headPic}}"></image>
  113 + <view class="ellipsis-1">{{item.nickName}}
  114 + </view>
  115 + <view class="ellipsis-1">{{filter.format_time(item.zltime)}}
  116 + </view>
111 </view> 117 </view>
112 </view> 118 </view>
113 - </view>  
114 119
115 - <view class="flex-center fs32" wx:if="{{is_bc_show==1}}">  
116 - <view class="line"></view>  
117 - <view class="load white" bindtap="dismantle_record">点击加载更多</view>  
118 - <view class="line"></view>  
119 - </view>  
120 - </block>  
121 -  
122 - <view class="fs30" wx:if="{{dismantle==null|| dismantle==''}}">  
123 - <view class="flex-center nothing white">  
124 - <view>暂无任务记录</view> 120 + <view class="flex-center fs32" wx:if="{{is_bc_show==1}}">
  121 + <view class="line"></view>
  122 + <view class="load white" bindtap="dismantle_record">点击加载更多</view>
  123 + <view class="line"></view>
  124 + </view>
  125 + </block>
  126 +
  127 + <view class="fs30" wx:if="{{dismantle==null|| dismantle==''}}">
  128 + <view class="flex-center nothing white">
  129 + <view>暂无任务记录</view>
  130 + </view>
125 </view> 131 </view>
  132 +
126 </view> 133 </view>
127 -  
128 - </view>  
129 - 134 +
130 135
131 </view> 136 </view>
132 <!-- 加载更多 --> 137 <!-- 加载更多 -->
@@ -145,14 +150,14 @@ @@ -145,14 +150,14 @@
145 150
146 151
147 <!--********** 钱巧玲 --> 152 <!--********** 钱巧玲 -->
148 -<view wx:if="{{is_share}}" > 153 +<view wx:if="{{is_share}}">
149 154
150 <view class="dust"></view> 155 <view class="dust"></view>
151 <view class="canvas" style="width:100%;"> 156 <view class="canvas" style="width:100%;">
152 <view class="flex-center"> 157 <view class="flex-center">
153 <canvas canvas-id="share_id" style="width:600rpx;height:1000rpx;" bindtap="preview"></canvas> 158 <canvas canvas-id="share_id" style="width:600rpx;height:1000rpx;" bindtap="preview"></canvas>
154 </view> 159 </view>
155 - <view class="closes flex-center"> 160 + <view class="closes flex-center">
156 <image class="close" src="{{iurl}}/miniapp/images/plus/Close.png" bindtap="close_share"></image> 161 <image class="close" src="{{iurl}}/miniapp/images/plus/Close.png" bindtap="close_share"></image>
157 </view> 162 </view>
158 </view> 163 </view>
pages/user/assistance/task_assistance.wxss
1 -page{ 1 +page {
2 background: #d01119; 2 background: #d01119;
3 width: 100%; 3 width: 100%;
4 - height: 100%  
5 - 4 + height: 100%;
6 } 5 }
7 -.top-back{ 6 +
  7 +.top-back {
8 width: 100%; 8 width: 100%;
9 height: 60%; 9 height: 60%;
10 - background-repead:no-repead;  
11 - background-size:100% 100%;  
12 - 10 + background-repead: no-repead;
  11 + background-size: 100% 100%;
13 } 12 }
14 -.top-frame{ 13 +
  14 +.top-frame {
15 width: 100%; 15 width: 100%;
16 height: auto; 16 height: auto;
17 - padding-top: 50rpx 17 + padding-top: 50rpx;
18 } 18 }
19 -.top-title{  
20 - letter-spacing:10rpx 19 +
  20 +.top-title {
  21 + letter-spacing: 10rpx;
  22 + width: 300rpx;
21 } 23 }
22 -.activity-data{ 24 +
  25 +.activity-data {
23 padding-top: 10rpx; 26 padding-top: 10rpx;
24 letter-spacing: 10rpx; 27 letter-spacing: 10rpx;
25 -  
26 } 28 }
27 -.xc-specific-more-frame{ 29 +
  30 +.xc-specific-more-frame {
28 width: 100%; 31 width: 100%;
29 height: 40%; 32 height: 40%;
30 -  
31 margin-top: 20rpx; 33 margin-top: 20rpx;
32 } 34 }
33 -.task-number{  
34 - margin-top: 50rpx 35 +
  36 +.task-number {
  37 + margin-top: 50rpx;
35 } 38 }
36 -.task_clike{ 39 +
  40 +.task_clike {
37 margin: auto; 41 margin: auto;
38 width: 60%; 42 width: 60%;
39 height: 65rpx; 43 height: 65rpx;
40 border-radius: 50rpx; 44 border-radius: 50rpx;
41 margin-top: 20rpx; 45 margin-top: 20rpx;
42 background: #fbda0e; 46 background: #fbda0e;
43 - color:#d01119; 47 + color: #d01119;
44 line-height: 65rpx; 48 line-height: 65rpx;
45 letter-spacing: 5rpx; 49 letter-spacing: 5rpx;
46 - box-shadow: 0rpx 7rpx 0rpx 0rpx rgb(245, 119, 6); 50 + box-shadow: 0rpx 7rpx 0rpx 0rpx rgb(245, 119, 6);
47 } 51 }
48 -/* 底部列表样式 */  
49 52
  53 +/* 底部列表样式 */
50 54
51 .head { 55 .head {
52 border-bottom: 4rpx solid rgb(253, 193, 7); 56 border-bottom: 4rpx solid rgb(253, 193, 7);
@@ -73,7 +77,7 @@ page{ @@ -73,7 +77,7 @@ page{
73 } 77 }
74 78
75 .unfinished { 79 .unfinished {
76 - width:35rpx; 80 + width: 35rpx;
77 height: 35rpx; 81 height: 35rpx;
78 margin-right: 10rpx; 82 margin-right: 10rpx;
79 } 83 }
@@ -110,27 +114,31 @@ page{ @@ -110,27 +114,31 @@ page{
110 .receive { 114 .receive {
111 padding-bottom: 50rpx; 115 padding-bottom: 50rpx;
112 } 116 }
113 -.xc-center-img{ 117 +
  118 +.xc-center-img {
114 width: 100%; 119 width: 100%;
115 - height: 100% 120 + height: 100%;
116 } 121 }
117 122
118 -.xc-left{ 123 +.xc-left {
119 width: 40rpx; 124 width: 40rpx;
120 height: 40rpx; 125 height: 40rpx;
121 } 126 }
122 -.bcolor {  
123 -border-color: #fff;  
124 127
  128 +.bcolor {
  129 + border-color: #fff;
125 } 130 }
126 -.xc-right{ 131 +
  132 +.xc-right {
127 width: 40rpx; 133 width: 40rpx;
128 height: 40rpx; 134 height: 40rpx;
129 } 135 }
130 -.user_img{ 136 +
  137 +.user_img {
131 width: 50rpx; 138 width: 50rpx;
132 - height: 50rpx; 139 + height: 50rpx;
133 } 140 }
  141 +
134 .dust { 142 .dust {
135 position: fixed; 143 position: fixed;
136 width: 100%; 144 width: 100%;
@@ -140,40 +148,43 @@ border-color: #fff; @@ -140,40 +148,43 @@ border-color: #fff;
140 } 148 }
141 149
142 .closes { 150 .closes {
143 - margin-top: 20rpx; 151 + margin-top: 20rpx;
144 } 152 }
145 153
146 .canvas { 154 .canvas {
147 position: fixed; 155 position: fixed;
148 z-index: 11; 156 z-index: 11;
149 width: 100%; 157 width: 100%;
150 - top:20rpx; 158 + top: 20rpx;
151 } 159 }
152 160
153 .close { 161 .close {
154 width: 70rpx; 162 width: 70rpx;
155 height: 70rpx; 163 height: 70rpx;
156 } 164 }
157 -.plan-frame{  
158 - width: 86%;  
159 - margin: auto; 165 +
  166 +.plan-frame {
  167 + width: 86%;
  168 + margin: auto;
160 margin-top: 50rpx; 169 margin-top: 50rpx;
161 -  
162 } 170 }
163 -.plan-frame .plan_num{  
164 - width: 90%;  
165 - background: #ffe7ab;  
166 - border-radius: 20rpx;  
167 - height: 22rpx; 171 +
  172 +.plan-frame .plan_num {
  173 + width: 90%;
  174 + background: #ffe7ab;
  175 + border-radius: 20rpx;
  176 + height: 22rpx;
168 margin-right: 10rpx; 177 margin-right: 10rpx;
169 } 178 }
170 -.is_plam{  
171 - border-radius: 20rpx; 179 +
  180 +.is_plam {
  181 + border-radius: 20rpx;
172 background: #fcc001; 182 background: #fcc001;
173 - height: 100%;  
174 - top: 0rpx;  
175 - left: 0rpx; 183 + height: 100%;
  184 + top: 0rpx;
  185 + left: 0rpx;
176 } 186 }
  187 +
177 .dust { 188 .dust {
178 position: fixed; 189 position: fixed;
179 width: 100%; 190 width: 100%;
@@ -183,26 +194,28 @@ border-color: #fff; @@ -183,26 +194,28 @@ border-color: #fff;
183 } 194 }
184 195
185 .closes { 196 .closes {
186 - margin-top: 20rpx; 197 + margin-top: 20rpx;
187 } 198 }
188 199
189 .canvas { 200 .canvas {
190 position: fixed; 201 position: fixed;
191 z-index: 20; 202 z-index: 20;
192 width: 100%; 203 width: 100%;
193 - top:20rpx; 204 + top: 20rpx;
194 } 205 }
195 206
196 .close { 207 .close {
197 width: 70rpx; 208 width: 70rpx;
198 height: 70rpx; 209 height: 70rpx;
199 } 210 }
200 -.select_details{ 211 +
  212 +.select_details {
201 width: 100%; 213 width: 100%;
202 height: 50rpx; 214 height: 50rpx;
203 line-height: 50rpx; 215 line-height: 50rpx;
204 text-align: center; 216 text-align: center;
205 - background: #000;  
206 - opacity:0.6; filter: alpha(opacity=60); 217 + background: #000;
  218 + opacity: 0.6;
  219 + filter: alpha(opacity=60);
207 bottom: 0rpx; 220 bottom: 0rpx;
208 -}  
209 \ No newline at end of file 221 \ No newline at end of file
  222 +}