-
Status changed to merged
-
mentioned in commit 1866b0ac9e86856a70ecee2988cd29653e58b09c
-
2. 活动剩余时间实际是还有剩余29天23小时,29后面应该显示天 (小程序ok) 3.小程序,可否控制点击礼包详情四个字区域也会进行跳转到礼包详情界面 (小程序ok) 4.小程序,当未设置助力活动,但是小程序还是有显示 (ok)
Showing
13 changed files
app.json
... | ... | @@ -16,7 +16,6 @@ |
16 | 16 | "pages/user/visit_log/visit_log", |
17 | 17 | "pages/user/address_list/address_list", |
18 | 18 | "pages/user/userinfo/userinfo", |
19 | - "pages/user/account/account", | |
20 | 19 | "pages/user/return_goods_list/return_goods_list", |
21 | 20 | "pages/user/userinfo_edit/userinfo_edit", |
22 | 21 | "pages/user/collect_list/collect_list", | ... | ... |
pages/activity/seckill_list/seckill_list.wxml
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | <view class="xc-strip-blank rel"> |
20 | 20 | |
21 | 21 | <view class="flex-vertical rel total"> |
22 | - <view class="t-c abs xc-fill"style="width:{{type==1?100-(item.buy_num+item.virtual) /(item.goods_num+item.virtual)*100:'100'}}%;background:{{type==1?'#e4374d':'#059de5'}};"> | |
22 | + <view class="t-c abs xc-fill"style="width:{{type==1?(100-(item.buy_num+item.virtual) /(item.goods_num+item.virtual)*100)>3?(100-(item.buy_num+item.virtual) /(item.goods_num+item.virtual)*100):'3':'100'}}%;background:{{type==1?'#e4374d':'#059de5'}};"> | |
23 | 23 | </view> |
24 | 24 | <text class="fs20 white abs xc-fill-text" style="">剩余{{type==1?filters.toFix(100-(item.buy_num+item.virtual)/(item.goods_num+item.virtual)*100,0):'100'}}%</text> |
25 | 25 | </view> | ... | ... |
pages/user/account/account.js deleted
1 | -var e = getApp(); | |
2 | - | |
3 | -Page({ | |
4 | - data: { | |
5 | - url: e.globalData.setting.url, | |
6 | - resourceUrl: e.globalData.setting.resourceUrl, | |
7 | - iurl: e.globalData.setting.imghost, | |
8 | - userMoney: 0 | |
9 | - }, | |
10 | - onShow: function() { | |
11 | - var t = this; | |
12 | - e.getUserInfo(function(e) { | |
13 | - t.setData({ | |
14 | - userMoney: e.user_money | |
15 | - }); | |
16 | - }); | |
17 | - } | |
18 | -}); | |
19 | 0 | \ No newline at end of file |
pages/user/account/account.json deleted
pages/user/account/account.wxml deleted
1 | -<view class="container"> | |
2 | - <view class="cover" style="background:url('{{resourceUrl}}/static/images/zjgl.jpg') no-repeat 0 0;background-size:cover"> | |
3 | - <view class="detail"> | |
4 | - <view class="price-text">可用余额</view> | |
5 | - <view>{{userMoney}}</view> | |
6 | - </view> | |
7 | - <view class="operate"> | |
8 | - <navigator url="/pages/user/recharge/recharge?money={{userMoney}}"> | |
9 | - <view class="op-item">账户充值</view> | |
10 | - </navigator> | |
11 | - <navigator url="/pages/user/withdrawals/withdrawals?money={{userMoney}}"> | |
12 | - <view class="op-item">申请提现</view> | |
13 | - </navigator> | |
14 | - </view> | |
15 | - </view> | |
16 | - <view class="list"> | |
17 | - <navigator url="/pages/user/account_list/account_list"> | |
18 | - <view class="item">余额明细 | |
19 | - <image class="wh100 arrow" src="{{iurl}}/miniapp/images/icon-arrowdown.png"></image> | |
20 | - </view> | |
21 | - </navigator> | |
22 | - <navigator url="/pages/user/points_list/points_list"> | |
23 | - <view class="item">积分明细 | |
24 | - <image class="wh100 arrow" src="{{iurl}}/miniapp/images/icon-arrowdown.png"></image> | |
25 | - </view> | |
26 | - </navigator> | |
27 | - <navigator url="/pages/user/recharge_list/recharge_list"> | |
28 | - <view class="item">充值记录 | |
29 | - <image class="wh100 arrow" src="{{iurl}}/miniapp/images/icon-arrowdown.png"></image> | |
30 | - </view> | |
31 | - </navigator> | |
32 | - <navigator url="/pages/user/withdrawals_list/withdrawals_list"> | |
33 | - <view class="item">提现记录 | |
34 | - <image class="wh100 arrow" src="{{iurl}}/miniapp/images/icon-arrowdown.png"></image> | |
35 | - </view> | |
36 | - </navigator> | |
37 | - </view> | |
38 | -</view> |
pages/user/account/account.wxss deleted
1 | -.cover { | |
2 | - background-color: red; | |
3 | - color: white; | |
4 | - height: 540rpx; | |
5 | - text-align: center; | |
6 | - position: relative; | |
7 | -} | |
8 | - | |
9 | -.detail { | |
10 | - font-size: 36rpx; | |
11 | - margin-top: 150rpx; | |
12 | - line-height: 60rpx; | |
13 | -} | |
14 | - | |
15 | -.price-text { | |
16 | - font-size: 30rpx; | |
17 | -} | |
18 | - | |
19 | -.operate { | |
20 | - position: absolute; | |
21 | - bottom: 0; | |
22 | - width: 100%; | |
23 | -} | |
24 | - | |
25 | -.op-item { | |
26 | - width: 50%; | |
27 | - float: left; | |
28 | - padding-bottom: 25rpx; | |
29 | - font-size: 28rpx; | |
30 | -} | |
31 | - | |
32 | -.list { | |
33 | - margin-top: 20rpx; | |
34 | -} | |
35 | - | |
36 | -.item { | |
37 | - font-size: 32rpx; | |
38 | - background-color: white; | |
39 | - padding: 25rpx 35rpx; | |
40 | - border-bottom: 1rpx; | |
41 | -} | |
42 | - | |
43 | -.arrow { | |
44 | - margin-top: 5rpx; | |
45 | - width: 25rpx; | |
46 | - height: 28rpx; | |
47 | - float: right; | |
48 | -} | |
49 | 0 | \ No newline at end of file |
pages/user/assistance/assistance.wxml
pages/user/assistance/assistance_success.js
... | ... | @@ -12,6 +12,7 @@ Page({ |
12 | 12 | user:app_d.userInfo, |
13 | 13 | zl_act:null, //助力活动 |
14 | 14 | s_num:0, //分享的人数 |
15 | + taskId:0, | |
15 | 16 | }, |
16 | 17 | |
17 | 18 | /** |
... | ... | @@ -19,6 +20,8 @@ Page({ |
19 | 20 | */ |
20 | 21 | onLoad: function (options) { |
21 | 22 | var helpid=options.helpid; |
23 | + var taskId = options.taskId; | |
24 | + this.data.taskId = taskId; | |
22 | 25 | this.init(helpid); |
23 | 26 | var nav_b = this.selectComponent("#nav_b"); //组件的id |
24 | 27 | nav_b.set_name("助力", "/pages/user/assistance/assistance"); |
... | ... | @@ -48,8 +51,9 @@ Page({ |
48 | 51 | th.setData({zl_act:res.data.data}); |
49 | 52 | return getApp().request.promiseGet("/api/weshop/marketing/help/involve/help/act/people/count", { |
50 | 53 | data: { |
51 | - storeId: store_id, | |
52 | - helpId: helpid | |
54 | + storeId: store_id, | |
55 | + helpId: helpid, | |
56 | + taskId:th.data.taskId | |
53 | 57 | } |
54 | 58 | }) |
55 | 59 | } | ... | ... |
pages/user/assistance/friend_assistance.js
... | ... | @@ -66,7 +66,7 @@ Page({ |
66 | 66 | }).then(res => { |
67 | 67 | if (res.data.code == 0) { |
68 | 68 | th.data.userId = res.data.data.userId; |
69 | - th.data.taskId = res.data.data.taskId; | |
69 | + th.data.taskId = res.data.data.helpTaskId; | |
70 | 70 | th.data.helpId=res.data.data.helpFormId; |
71 | 71 | //获取活动的时间 |
72 | 72 | return getApp().request.promiseGet("/api/weshop/marketing/help/help/act/get", { |
... | ... | @@ -86,7 +86,8 @@ Page({ |
86 | 86 | return getApp().request.promiseGet("/api/weshop/marketing/help/involve/help/act/people/count", { |
87 | 87 | data: { |
88 | 88 | helpId: res.data.data.id, |
89 | - storeId: os.stoid | |
89 | + storeId: os.stoid, | |
90 | + taskId:th.data.taskId, | |
90 | 91 | } |
91 | 92 | }) |
92 | 93 | } |
... | ... | @@ -140,7 +141,7 @@ Page({ |
140 | 141 | //点击关闭礼盒 |
141 | 142 | clike_none: function() { |
142 | 143 | this.setData({is_show: 0}); |
143 | - getApp().goto("/pages/user/assistance/assistance_success?helpid="+this.data.helpId); | |
144 | + getApp().goto("/pages/user/assistance/assistance_success?helpid="+this.data.helpId+"&taskId="+this.data.taskId); | |
144 | 145 | }, |
145 | 146 | //导航球 |
146 | 147 | close: function() { | ... | ... |
pages/user/assistance/friend_assistance.wxml
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | </view> |
20 | 20 | </view> |
21 | 21 | <view class="cklie_button t-c flex-center" bindtap="cklie_button">帮他拆礼盒</view> |
22 | -<view class="fs26 white t-c" wx:if="{{s_num}}">已有{{s_num}}人领取礼盒</view> | |
22 | +<view class="fs26 white t-c" wx:if="{{s_num}}"> 该任务已被领取了{{s_num}}次</view> | |
23 | 23 | <!-- 礼盒弹框 --> |
24 | 24 | <view class="cover-layer" wx:if='{{is_show!=0}}' bindtap="clike_none"></view> |
25 | 25 | <view class="libao_frame t-c" wx:if='{{is_show!=0}}'> | ... | ... |
pages/user/assistance/task_assistance.js
... | ... | @@ -209,6 +209,7 @@ Page({ |
209 | 209 | }); |
210 | 210 | //判断是不是领取的任务 |
211 | 211 | th.get_user_task(); |
212 | + th.get_user_task_num(); | |
212 | 213 | } |
213 | 214 | } |
214 | 215 | |
... | ... | @@ -223,7 +224,7 @@ Page({ |
223 | 224 | //会员任务列表 |
224 | 225 | this.user_task_list(); |
225 | 226 | //获取助力活动参与的人数 |
226 | - this.get_user_task_num(); | |
227 | + | |
227 | 228 | |
228 | 229 | }, |
229 | 230 | //记录加载更多 |
... | ... | @@ -350,6 +351,7 @@ Page({ |
350 | 351 | } |
351 | 352 | //判断是不是领取的任务 |
352 | 353 | th.get_user_task(); |
354 | + th.get_user_task_num(); | |
353 | 355 | |
354 | 356 | }, |
355 | 357 | //导航球 |
... | ... | @@ -456,10 +458,17 @@ Page({ |
456 | 458 | get_user_task_num: function () { |
457 | 459 | var th = this; |
458 | 460 | var help_id = th.data.help_id; |
461 | + | |
462 | + var aitem = this.data.aitem; //任务的数据集 | |
463 | + var sw_index = this.data.sw_index; //轮播的下标 | |
464 | + //任务id | |
465 | + var taskid = aitem[sw_index].id; | |
466 | + | |
459 | 467 | rq.get("/api/weshop/marketing/help/involve/help/act/people/count", { |
460 | 468 | data: { |
461 | 469 | helpId: help_id, |
462 | 470 | storeId: os.stoid, |
471 | + taskId: taskid | |
463 | 472 | }, |
464 | 473 | success: function (su) { |
465 | 474 | if (su.data.code == 0) { |
... | ... | @@ -1043,7 +1052,7 @@ Page({ |
1043 | 1052 | is_dismantle: 0, |
1044 | 1053 | bc_page: 1, |
1045 | 1054 | }) |
1046 | - | |
1055 | + this.get_user_task_num(); | |
1047 | 1056 | |
1048 | 1057 | }, |
1049 | 1058 | ... | ... |
pages/user/assistance/task_assistance.wxml
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 | </view> |
10 | 10 | <view class="activity-data t-c fs28 white"> |
11 | 11 | 活动剩余时间: |
12 | - <text class='tui-conutdown-box'> {{aitem[0].djs.day}}</text>: | |
12 | + <block wx:if="{{aitem[0].djs.day}}"><text class='tui-conutdown-box'> {{aitem[0].djs.day}}天 </text></block> | |
13 | 13 | <text class='tui-conutdown-box'>{{aitem[0].djs.hou}}</text>: |
14 | 14 | <text class='tui-conutdown-box'>{{aitem[0].djs.min}}</text>: |
15 | 15 | <text class='tui-conutdown-box tui-countdown-bg'>{{aitem[0].djs.sec}}</text> |
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 | <swiper-item class="rel" wx:for="{{aitem}}" wx:for-item="aitem" wx:for-index="pidx"> |
25 | 25 | |
26 | 26 | <image class="xc-center-img" bindtap="libao_details" data-taskid="{{aitem.id}}" src="{{aitem.giftBagUrl!=null&&aitem.giftBagUrl!=''?iurl+aitem.giftBagUrl:swpie_img}}"></image> |
27 | - <view class="abs select_details fs26 white">礼包详情</view> | |
27 | + <view bindtap="libao_details" data-taskid="{{aitem.id}}" class="abs select_details fs26 white">礼包详情</view> | |
28 | 28 | |
29 | 29 | </swiper-item> |
30 | 30 | </swiper> |
... | ... | @@ -146,7 +146,10 @@ |
146 | 146 | <view class="line"></view> |
147 | 147 | </view> |
148 | 148 | <view class="flex-center white bottom" wx:if="{{usercount>0}}"> |
149 | - <view>已有{{usercount}}人领取了任务</view> | |
149 | + <view>该任务已被领取了{{usercount}}次</view> | |
150 | + </view> | |
151 | + <view class="flex-center white bottom" wx:else> | |
152 | + <view>暂无领取记录</view> | |
150 | 153 | </view> |
151 | 154 | </view> |
152 | 155 | ... | ... |
pages/user/index/index.js
... | ... | @@ -599,11 +599,12 @@ Page({ |
599 | 599 | }, |
600 | 600 | // 判断助力活动是不是存在 |
601 | 601 | is_assistance: function() { |
602 | - var th = this; | |
602 | + var th = this,r=Math.random()*100; | |
603 | 603 | rq.get("/api/weshop/marketing/help/act/judge", { |
604 | 604 | data: { |
605 | 605 | storeId: os.stoid, |
606 | - userId: app_d.user_id | |
606 | + userId: app_d.user_id, | |
607 | + r:r, | |
607 | 608 | }, |
608 | 609 | success: function(res) { |
609 | 610 | var code = res.data.code; |
... | ... | @@ -611,7 +612,11 @@ Page({ |
611 | 612 | th.setData({ |
612 | 613 | is_assistance: 1 |
613 | 614 | }); |
614 | - } | |
615 | + }else{ | |
616 | + th.setData({ | |
617 | + is_assistance: 0 | |
618 | + }); | |
619 | + } | |
615 | 620 | |
616 | 621 | } |
617 | 622 | }) | ... | ... |