Merge branch 'release/6.8.6' into 'master'
Release/6.8.6 See merge request !12
Showing
12 changed files
with
53 additions
and
221 deletions
@@ -40,6 +40,17 @@ | @@ -40,6 +40,17 @@ | ||
40 | <block wx:elif="{{status === 6}}"> | 40 | <block wx:elif="{{status === 6}}"> |
41 | <view class="action-item over">活动已结束</view> | 41 | <view class="action-item over">活动已结束</view> |
42 | </block> | 42 | </block> |
43 | + | ||
44 | + <block wx:elif="{{status === 7}}"> | ||
45 | + <block wx:if="{{num > 0}}"> | ||
46 | + <view class="action-item confirm" bindtap="goMyList"> | ||
47 | + 我的抽奖码({{num}}) | ||
48 | + </view> | ||
49 | + </block> | ||
50 | + <block wx:else> | ||
51 | + <view class="action-item over">活动已结束</view> | ||
52 | + </block> | ||
53 | + </block> | ||
43 | </view> | 54 | </view> |
44 | 55 | ||
45 | <new-lucky-alert wx:if="{{show}}" bindhiddenalert="hiddenAlert"> | 56 | <new-lucky-alert wx:if="{{show}}" bindhiddenalert="hiddenAlert"> |
@@ -54,16 +65,6 @@ | @@ -54,16 +65,6 @@ | ||
54 | </form> | 65 | </form> |
55 | <view class="share-desc">1个好友参加=1个抽奖码=中奖几率UP!</view> | 66 | <view class="share-desc">1个好友参加=1个抽奖码=中奖几率UP!</view> |
56 | </view> | 67 | </view> |
57 | - | ||
58 | - <!-- <form bindsubmit='submitFormId' report-submit='true'> | ||
59 | - <view class="foot"> | ||
60 | - <button class="foot-item info" plain="true" hover-class="none" form-type="submit" bindtap="goShare">去分享</button> | ||
61 | - <button class="foot-item" plain="true" hover-class="none" form-type="submit" bindtap="cancelAlert">取消</button> | ||
62 | - </view> | ||
63 | - </form> --> | ||
64 | - | ||
65 | - <!-- <view class="foot-item info" bindtap="goShare">去分享</view> | ||
66 | - <view class="foot-item" bindtap="cancelAlert">取消</view> --> | ||
67 | </new-lucky-alert> | 68 | </new-lucky-alert> |
68 | 69 | ||
69 | <zero-alert wx:if="{{error}}"> | 70 | <zero-alert wx:if="{{error}}"> |
1 | -// page/subPackage/pages/zeroSell/components/head-counter.js | ||
2 | -Component({ | ||
3 | - /** | ||
4 | - * 组件的属性列表 | ||
5 | - */ | ||
6 | - properties: { | ||
7 | - count: { | ||
8 | - type: Number | ||
9 | - }, | ||
10 | - num: { | ||
11 | - type: Number | ||
12 | - }, | ||
13 | - status: { | ||
14 | - type: Number | ||
15 | - } | ||
16 | - }, | ||
17 | - | ||
18 | - /** | ||
19 | - * 组件的初始数据 | ||
20 | - */ | ||
21 | - data: { | ||
22 | - | ||
23 | - }, | ||
24 | - | ||
25 | - /** | ||
26 | - * 组件的方法列表 | ||
27 | - */ | ||
28 | - methods: { | ||
29 | - | ||
30 | - } | ||
31 | -}) |
1 | -<!--page/subPackage/pages/zeroSell/components/head-counter.wxml--> | ||
2 | -<wxs src="./helper.wxs" module="helper" /> | ||
3 | - | ||
4 | -<!-- <view class="head-counter"> --> | ||
5 | - <!-- <view class="title"> | ||
6 | - <view class="txt">已有</view> | ||
7 | - <block wx:for="{{helper.formatN('000000', count)}}"> | ||
8 | - <view class="num-wrapper"> | ||
9 | - <text>{{item}}</text> | ||
10 | - <view class="mask"></view> | ||
11 | - </view> | ||
12 | - </block> | ||
13 | - <view class="txt">参与</view> | ||
14 | - </view> | ||
15 | - | ||
16 | - <view style="font-size: 28rpx;" wx:if="{{status === 0}}"> 活动结束 </view> | ||
17 | - <view style="font-size: 28rpx;" wx:elif="{{status === 1 || status === 2}}"> 达到{{num}}人开奖 </view> | ||
18 | - <view style="font-size: 28rpx;" wx:elif="{{status === 3}}"> 等待开奖中 </view> | ||
19 | - <view style="font-size: 28rpx;" wx:elif="{{status === 4}}"> 已开奖 </view> | ||
20 | - <view style="font-size: 28rpx;" wx:elif="{{status === 5}}"> 人数不足 活动结束 </view> --> | ||
21 | -<!-- </view> --> | ||
22 | - | ||
23 | -<view class="container"> | ||
24 | -<view class="text"> | ||
25 | -已有{{count}}人参加, | ||
26 | -<text wx:if="{{status === 0}}"> 活动结束 </text> | ||
27 | - <text wx:elif="{{status === 1 || status === 2}}"> 达到{{num}}人开奖 </text> | ||
28 | - <text wx:elif="{{status === 3}}"> 等待开奖中 </text> | ||
29 | - <text wx:elif="{{status === 4}}"> 已开奖 </text> | ||
30 | - <text wx:elif="{{status === 5}}"> 人数不足 活动结束 </text> | ||
31 | -</view> | ||
32 | - | ||
33 | -</view> | ||
34 | - |
1 | -/* page/subPackage/pages/zeroSell/components/head-counter.wxss */ | ||
2 | - | ||
3 | - | ||
4 | -.head-counter { | ||
5 | - margin-bottom: 60rpx; | ||
6 | - text-align: center; | ||
7 | -} | ||
8 | - | ||
9 | -.title { | ||
10 | - margin-bottom: 20rpx; | ||
11 | -} | ||
12 | - | ||
13 | -.txt { | ||
14 | - display: inline-block; | ||
15 | - width: 90rpx; | ||
16 | - height: 72rpx; | ||
17 | - font-size: 28rpx; | ||
18 | - line-height: 72rpx; | ||
19 | - vertical-align: top; | ||
20 | -} | ||
21 | - | ||
22 | -.num-wrapper { | ||
23 | - display: inline-block; | ||
24 | - position: relative; | ||
25 | - width: 56rpx; | ||
26 | - height: 72rpx; | ||
27 | - font-size: 56rpx; | ||
28 | - line-height: 72rpx; | ||
29 | - background: black; | ||
30 | - color: white; | ||
31 | - font-weight: bolder; | ||
32 | -} | ||
33 | - | ||
34 | -.num-wrapper + .num-wrapper { | ||
35 | - margin-left: 10rpx; | ||
36 | -} | ||
37 | - | ||
38 | -.mask { | ||
39 | - position: absolute; | ||
40 | - width: 100%; | ||
41 | - height: 50%; | ||
42 | - top: 0; | ||
43 | - left: 0; | ||
44 | - opacity: 0.4; | ||
45 | - background-color: black; | ||
46 | -} | ||
47 | - | ||
48 | -.text { | ||
49 | - font-family: PingFang-SC-Medium; | ||
50 | - font-size: 28rpx; | ||
51 | - color: #FFFFFF; | ||
52 | - letter-spacing: -0.36rpx; | ||
53 | - text-align: center; | ||
54 | - display: inline-block; | ||
55 | - margin-top: 15rpx; | ||
56 | -} | ||
57 | - | ||
58 | -.container { | ||
59 | - width: 600rpx; | ||
60 | - height: 64rpx; | ||
61 | - background-color: #222; | ||
62 | - text-align: center; | ||
63 | - margin: 0 auto; | ||
64 | -} |
@@ -13,11 +13,11 @@ | @@ -13,11 +13,11 @@ | ||
13 | </block> | 13 | </block> |
14 | 14 | ||
15 | <block wx:elif="{{item.status === 3}}"> | 15 | <block wx:elif="{{item.status === 3}}"> |
16 | - <view class="btn">等待开奖中</view> | 16 | + <view class="btn">待开奖</view> |
17 | </block> | 17 | </block> |
18 | 18 | ||
19 | <block wx:elif="{{item.status === 5}}"> | 19 | <block wx:elif="{{item.status === 5}}"> |
20 | - <view class="btn">人数不足 活动结束</view> | 20 | + <view class="btn">待开奖</view> |
21 | </block> | 21 | </block> |
22 | 22 | ||
23 | <block wx:else> | 23 | <block wx:else> |
1 | <view> | 1 | <view> |
2 | <block wx:if="{{product.status === 0}}"> | 2 | <block wx:if="{{product.status === 0}}"> |
3 | - <view class="btn cancel" >活动结束</view> | 3 | + <view class="btn cancel" >活动已结束</view> |
4 | </block> | 4 | </block> |
5 | 5 | ||
6 | <block wx:elif="{{product.status === 1}}"> | 6 | <block wx:elif="{{product.status === 1}}"> |
@@ -11,12 +11,16 @@ | @@ -11,12 +11,16 @@ | ||
11 | <view class="btn ok" catchtap="onClick">参加抽奖</view> | 11 | <view class="btn ok" catchtap="onClick">参加抽奖</view> |
12 | </block> | 12 | </block> |
13 | 13 | ||
14 | - <block wx:elif="{{product.status === 3 || product.status === 4}}"> | ||
15 | - <view class="btn cancel">活动结束</view> | 14 | + <block wx:elif="{{product.status === 3}}"> |
15 | + <view class="btn cancel">待开奖</view> | ||
16 | + </block> | ||
17 | + | ||
18 | + <block wx:elif="{{product.status === 4}}"> | ||
19 | + <view class="btn cancel">活动已结束</view> | ||
16 | </block> | 20 | </block> |
17 | 21 | ||
18 | <block wx:elif="{{product.status === 5}}"> | 22 | <block wx:elif="{{product.status === 5}}"> |
19 | - <view class="btn cancel">人数不足 活动结束</view> | 23 | + <view class="btn cancel">待开奖</view> |
20 | </block> | 24 | </block> |
21 | 25 | ||
22 | <block wx:else> | 26 | <block wx:else> |
1 | -// page/subPackage/pages/zeroSell/detail.js | ||
2 | - | ||
3 | import ZeroSellService from './service/zero-sell' | 1 | import ZeroSellService from './service/zero-sell' |
4 | import CommonService from './service/common' | 2 | import CommonService from './service/common' |
5 | import { | 3 | import { |
@@ -31,18 +29,10 @@ const ACTIVITY = { | @@ -31,18 +29,10 @@ const ACTIVITY = { | ||
31 | READY: 1, // 活动未开始 | 29 | READY: 1, // 活动未开始 |
32 | START: 2, // 活动开始 | 30 | START: 2, // 活动开始 |
33 | END: 3, // 活动结束 | 31 | END: 3, // 活动结束 |
34 | - LUCK: 4, // 抽奖结束 | 32 | + LUCK: 4, // 活动已开奖、抽奖结束 |
35 | END_LESS_PEOPLE: 5 // 人数不足 | 33 | END_LESS_PEOPLE: 5 // 人数不足 |
36 | } | 34 | } |
37 | 35 | ||
38 | -const STEP = { | ||
39 | - ZERO: 0, | ||
40 | - FIRST: 1, | ||
41 | - SECOND: 2, | ||
42 | - THIRD: 3, | ||
43 | - FOURTH: 4, | ||
44 | -} | ||
45 | - | ||
46 | const ACTION_BAR_STATUS = { | 36 | const ACTION_BAR_STATUS = { |
47 | UNKNOWN: 0, | 37 | UNKNOWN: 0, |
48 | READY: 1, // 未开始 | 38 | READY: 1, // 未开始 |
@@ -51,6 +41,7 @@ const ACTION_BAR_STATUS = { | @@ -51,6 +41,7 @@ const ACTION_BAR_STATUS = { | ||
51 | WAIT: 4, // 等待抽奖中 | 41 | WAIT: 4, // 等待抽奖中 |
52 | LUCK: 5, // 抽奖结束 | 42 | LUCK: 5, // 抽奖结束 |
53 | END: 6, // 活动结束 | 43 | END: 6, // 活动结束 |
44 | + PEOPLE_LIMIT_WAIT: 7 // 人数达到活动限制、已满员、人数不足统一为待开奖状态 | ||
54 | } | 45 | } |
55 | 46 | ||
56 | let app = getApp(); | 47 | let app = getApp(); |
@@ -66,12 +57,10 @@ Page(Object.assign({ | @@ -66,12 +57,10 @@ Page(Object.assign({ | ||
66 | actPrizeId: '', | 57 | actPrizeId: '', |
67 | shareUid: 0, | 58 | shareUid: 0, |
68 | scene: '', | 59 | scene: '', |
69 | - participantCount: 0, | ||
70 | myPrizeCount: 0, | 60 | myPrizeCount: 0, |
71 | product: {}, | 61 | product: {}, |
72 | avatars: [], | 62 | avatars: [], |
73 | recommends: [], | 63 | recommends: [], |
74 | - step: STEP.ZERO, | ||
75 | actionStatus: ACTION_BAR_STATUS.UNKNOWN, | 64 | actionStatus: ACTION_BAR_STATUS.UNKNOWN, |
76 | snapData: {}, | 65 | snapData: {}, |
77 | hasUnionID: false, | 66 | hasUnionID: false, |
@@ -346,8 +335,6 @@ Page(Object.assign({ | @@ -346,8 +335,6 @@ Page(Object.assign({ | ||
346 | product_qrCode: qrcode | 335 | product_qrCode: qrcode |
347 | }; | 336 | }; |
348 | 337 | ||
349 | - let participantCount = r1.code === 200 ? r1.data.joinNum : 0; | ||
350 | - | ||
351 | this.setData({ | 338 | this.setData({ |
352 | product: product, | 339 | product: product, |
353 | recommends: r2.code === 200 ? r2.data : [], | 340 | recommends: r2.code === 200 ? r2.data : [], |
@@ -358,14 +345,12 @@ Page(Object.assign({ | @@ -358,14 +345,12 @@ Page(Object.assign({ | ||
358 | }), | 345 | }), |
359 | 346 | ||
360 | myPrizeCount: r1.code === 200 ? r1.data.myCodeNum : 0, | 347 | myPrizeCount: r1.code === 200 ? r1.data.myCodeNum : 0, |
361 | - participantCount, | ||
362 | snapData, | 348 | snapData, |
363 | notice: JSON.parse(product.notice || '{}'), | 349 | notice: JSON.parse(product.notice || '{}'), |
364 | lottery: JSON.parse(product.lottery_info || '{}') | 350 | lottery: JSON.parse(product.lottery_info || '{}') |
365 | }); | 351 | }); |
366 | 352 | ||
367 | this._setActionStatus(); | 353 | this._setActionStatus(); |
368 | - this._setStep(); | ||
369 | } else { | 354 | } else { |
370 | return Promise.reject(); | 355 | return Promise.reject(); |
371 | } | 356 | } |
@@ -383,40 +368,6 @@ Page(Object.assign({ | @@ -383,40 +368,6 @@ Page(Object.assign({ | ||
383 | }) | 368 | }) |
384 | }) | 369 | }) |
385 | }, | 370 | }, |
386 | - | ||
387 | - _setStep() { | ||
388 | - let step = STEP.ZERO; | ||
389 | - let activityStatus = this.data.product.status; | ||
390 | - let myPrizeCount = this.data.myPrizeCount; | ||
391 | - | ||
392 | - if (myPrizeCount === 0) { | ||
393 | - step = STEP.ZERO | ||
394 | - } else { | ||
395 | - if (activityStatus === ACTIVITY.START) { | ||
396 | - let myPrizeCount = this.data.myPrizeCount; | ||
397 | - | ||
398 | - if (myPrizeCount === 0) { | ||
399 | - step = STEP.ZERO; | ||
400 | - } else if (myPrizeCount === 1) { | ||
401 | - step = STEP.FIRST; | ||
402 | - } else if (myPrizeCount >= 2) { | ||
403 | - step = STEP.SECOND; | ||
404 | - } else { | ||
405 | - step = STEP.ZERO; | ||
406 | - } | ||
407 | - } else if (activityStatus === ACTIVITY.END || activityStatus === ACTIVITY.LUCK) { | ||
408 | - step = STEP.THIRD; | ||
409 | - } else if (activityStatus === ACTIVITY.END_LESS_PEOPLE) { | ||
410 | - step = STEP.FOURTH; | ||
411 | - } else { | ||
412 | - step = STEP.ZERO; | ||
413 | - } | ||
414 | - } | ||
415 | - | ||
416 | - this.setData({ | ||
417 | - step: step | ||
418 | - }); | ||
419 | - }, | ||
420 | _setActionStatus() { | 371 | _setActionStatus() { |
421 | let status = ACTION_BAR_STATUS.START; | 372 | let status = ACTION_BAR_STATUS.START; |
422 | let activityStatus = this.data.product.status; | 373 | let activityStatus = this.data.product.status; |
@@ -425,15 +376,25 @@ Page(Object.assign({ | @@ -425,15 +376,25 @@ Page(Object.assign({ | ||
425 | status = ACTION_BAR_STATUS.END; | 376 | status = ACTION_BAR_STATUS.END; |
426 | } else if (activityStatus === ACTIVITY.READY) { | 377 | } else if (activityStatus === ACTIVITY.READY) { |
427 | status = ACTION_BAR_STATUS.READY; | 378 | status = ACTION_BAR_STATUS.READY; |
428 | - } else if (activityStatus >= ACTIVITY.END) { | 379 | + } |
380 | + | ||
381 | + else if (activityStatus >= ACTIVITY.END) { | ||
429 | if (this._isInActivity()) { | 382 | if (this._isInActivity()) { |
430 | if (activityStatus === ACTIVITY.LUCK) { | 383 | if (activityStatus === ACTIVITY.LUCK) { |
431 | status = ACTION_BAR_STATUS.LUCK; | 384 | status = ACTION_BAR_STATUS.LUCK; |
432 | - } else { | 385 | + } |
386 | + else if (activityStatus === ACTIVITY.END_LESS_PEOPLE || activityStatus === ACTIVITY.END) { | ||
387 | + status = ACTION_BAR_STATUS.WAIT; | ||
388 | + } | ||
389 | + else { | ||
433 | status = ACTION_BAR_STATUS.WAIT; | 390 | status = ACTION_BAR_STATUS.WAIT; |
434 | } | 391 | } |
435 | } else { | 392 | } else { |
436 | - status = ACTION_BAR_STATUS.END; | 393 | + if (activityStatus === ACTIVITY.END_LESS_PEOPLE || activityStatus === ACTIVITY.END) { |
394 | + status = ACTION_BAR_STATUS.PEOPLE_LIMIT_WAIT; | ||
395 | + } else { | ||
396 | + status = ACTION_BAR_STATUS.END; | ||
397 | + } | ||
437 | } | 398 | } |
438 | } else { | 399 | } else { |
439 | if (this._isInActivity()) { | 400 | if (this._isInActivity()) { |
@@ -586,7 +547,6 @@ Page(Object.assign({ | @@ -586,7 +547,6 @@ Page(Object.assign({ | ||
586 | var that = this; | 547 | var that = this; |
587 | if (e.detail.errMsg === 'getPhoneNumber:ok') { | 548 | if (e.detail.errMsg === 'getPhoneNumber:ok') { |
588 | decodePhoneNumber(e.detail.iv, e.detail.encryptedData, '', function (result) { | 549 | decodePhoneNumber(e.detail.iv, e.detail.encryptedData, '', function (result) { |
589 | - // console.log('!!!!result',result) | ||
590 | if (result.code != 200) { | 550 | if (result.code != 200) { |
591 | that.wetoast.toast({ | 551 | that.wetoast.toast({ |
592 | title: result.message, | 552 | title: result.message, |
@@ -4,7 +4,6 @@ | @@ -4,7 +4,6 @@ | ||
4 | "usingComponents": { | 4 | "usingComponents": { |
5 | "product-item": "./components/product-item", | 5 | "product-item": "./components/product-item", |
6 | "product-header": "./components/product-detail-header", | 6 | "product-header": "./components/product-detail-header", |
7 | - "counter": "./components/head-counter", | ||
8 | "prize-progress": "./components/prize-progress", | 7 | "prize-progress": "./components/prize-progress", |
9 | "more": "./components/more", | 8 | "more": "./components/more", |
10 | "desc": "./components/desc", | 9 | "desc": "./components/desc", |
@@ -2,10 +2,6 @@ | @@ -2,10 +2,6 @@ | ||
2 | 2 | ||
3 | <product-header product="{{product}}" shareFlag="{{shareFlag}}" avatars="{{avatars}}"></product-header> | 3 | <product-header product="{{product}}" shareFlag="{{shareFlag}}" avatars="{{avatars}}"></product-header> |
4 | </view> | 4 | </view> |
5 | -<block wx:if="{{false}}"> | ||
6 | - <counter count="{{participantCount}}" num="{{product.limit}}" status="{{product.status}}"></counter> | ||
7 | - <prize-progress step="{{step}}"></prize-progress> | ||
8 | -</block> | ||
9 | <view class="machine {{shareFlag ? 'machine-t-m' : 'machine-t-l'}}"> | 5 | <view class="machine {{shareFlag ? 'machine-t-m' : 'machine-t-l'}}"> |
10 | <view class="open-shadow"></view> | 6 | <view class="open-shadow"></view> |
11 | <view class="code-list" animation="{{animation}}"> | 7 | <view class="code-list" animation="{{animation}}"> |
@@ -64,16 +60,20 @@ | @@ -64,16 +60,20 @@ | ||
64 | <view class="action-item action-list" bindtap="goList"> | 60 | <view class="action-item action-list" bindtap="goList"> |
65 | <image class="action-image" src="./images/list_icon@2x.png"></image> | 61 | <image class="action-image" src="./images/list_icon@2x.png"></image> |
66 | </view> | 62 | </view> |
67 | - <block wx:if="{{product.status === 1 || product.status === 2}}"> | ||
68 | - <block wx:if="{{product.status === 1}}"> | ||
69 | - <button class="action-item over" bindtap="goLogin">即将开始</button> | ||
70 | - </block> | ||
71 | - <block wx:if="{{product.status === 2}}"> | ||
72 | - <button class="action-item confirm" bindtap="goLogin">0元参加抽奖</button> | ||
73 | - </block> | ||
74 | - </block> | ||
75 | - <block wx:else> | ||
76 | - <view class="action-item over">活动已结束</view> | 63 | + <block wx:if="{{product.status === 1}}"> |
64 | + <button class="action-item over" bindtap="goLogin">即将开始</button> | ||
65 | + </block> | ||
66 | + <block wx:if="{{product.status === 2}}"> | ||
67 | + <button class="action-item confirm" bindtap="goLogin">0元参加抽奖</button> | ||
68 | + </block> | ||
69 | + <block wx:if="{{product.status === 3}}"> | ||
70 | + <button class="action-item over" bindtap="goLogin">待开奖</button> | ||
71 | + </block> | ||
72 | + <block wx:if="{{product.status === 4}}"> | ||
73 | + <button class="action-item over" bindtap="goLogin">活动已结束</button> | ||
74 | + </block> | ||
75 | + <block wx:if="{{product.status === 5}}"> | ||
76 | + <button class="action-item over" bindtap="goLogin">待开奖</button> | ||
77 | </block> | 77 | </block> |
78 | </view> | 78 | </view> |
79 | </block> | 79 | </block> |
@@ -312,6 +312,7 @@ Page(Object.assign({ | @@ -312,6 +312,7 @@ Page(Object.assign({ | ||
312 | let oldData = my_zero_list[type].data; | 312 | let oldData = my_zero_list[type].data; |
313 | let key = `my_zero_list[${type}].data`; | 313 | let key = `my_zero_list[${type}].data`; |
314 | let keyPage = `my_zero_list[${type}].page`; | 314 | let keyPage = `my_zero_list[${type}].page`; |
315 | + page = page + 1; | ||
315 | this.service.getMyList({type, page}).then(res => { | 316 | this.service.getMyList({type, page}).then(res => { |
316 | let data = [] | 317 | let data = [] |
317 | if (res && res.code === 200) { | 318 | if (res && res.code === 200) { |
@@ -319,7 +320,7 @@ Page(Object.assign({ | @@ -319,7 +320,7 @@ Page(Object.assign({ | ||
319 | } | 320 | } |
320 | this.setData({ | 321 | this.setData({ |
321 | [key]: oldData.concat(data), | 322 | [key]: oldData.concat(data), |
322 | - [keyPage]: ++page | 323 | + [keyPage]: page |
323 | }) | 324 | }) |
324 | if (data.length === 0) { | 325 | if (data.length === 0) { |
325 | this.setData({ | 326 | this.setData({ |
-
Please register or login to post a comment