xiaoe_mp_npm 1.0.0-live2 → 1.0.0-live20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/miniprogram_dist/Task/TaskBubble/index.js +47 -2
  2. package/miniprogram_dist/Task/TaskBubble/index.scss +2 -2
  3. package/miniprogram_dist/Task/TaskBubble/index.wxml +18 -25
  4. package/miniprogram_dist/Task/TaskBubble/index.wxss +6 -6
  5. package/miniprogram_dist/Task/TaskIcon/index.js +16 -5
  6. package/miniprogram_dist/Task/TaskIcon/index.scss +1 -0
  7. package/miniprogram_dist/Task/TaskIcon/index.wxml +2 -2
  8. package/miniprogram_dist/Task/TaskIcon/index.wxss +3 -0
  9. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.js +13 -1
  10. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.scss +40 -0
  11. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.wxml +10 -1
  12. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.wxss +18 -0
  13. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.js +43 -12
  14. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.scss +9 -1
  15. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxml +5 -5
  16. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxss +36 -4
  17. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.js +53 -18
  18. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.scss +20 -0
  19. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.wxml +17 -3
  20. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.wxss +80 -0
  21. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.js +39 -2
  22. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.wxml +1 -1
  23. package/miniprogram_dist/Task/TaskPopup/index.js +46 -2
  24. package/miniprogram_dist/Task/TaskPopup/index.scss +14 -1
  25. package/miniprogram_dist/Task/TaskPopup/index.wxml +25 -13
  26. package/miniprogram_dist/Task/TaskPopup/index.wxss +60 -4
  27. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.js +20 -0
  28. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.scss +8 -0
  29. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxml +22 -19
  30. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxs +48 -0
  31. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxss +24 -0
  32. package/miniprogram_dist/Task/taskReceivePopup/index.js +9 -9
  33. package/miniprogram_dist/Task/taskReceivePopup/index.wxml +15 -4
  34. package/miniprogram_dist/Task/taskReceivePopup/integral/index.js +5 -0
  35. package/miniprogram_dist/Task/taskReceivePopup/integral/index.wxml +1 -1
  36. package/package.json +1 -1
  37. package/src/LiveGoodsList/index.wxss +230 -230
  38. package/src/Task/TaskBubble/index.js +47 -2
  39. package/src/Task/TaskBubble/index.scss +2 -2
  40. package/src/Task/TaskBubble/index.wxml +18 -25
  41. package/src/Task/TaskBubble/index.wxss +289 -1
  42. package/src/Task/TaskIcon/index.js +16 -5
  43. package/src/Task/TaskIcon/index.scss +1 -0
  44. package/src/Task/TaskIcon/index.wxml +2 -2
  45. package/src/Task/TaskIcon/index.wxss +130 -1
  46. package/src/Task/TaskPopup/component/RewardList/index.js +13 -1
  47. package/src/Task/TaskPopup/component/RewardList/index.scss +40 -0
  48. package/src/Task/TaskPopup/component/RewardList/index.wxml +10 -1
  49. package/src/Task/TaskPopup/component/RewardList/index.wxss +18 -0
  50. package/src/Task/TaskPopup/component/TaskItem/index.js +43 -12
  51. package/src/Task/TaskPopup/component/TaskItem/index.scss +9 -1
  52. package/src/Task/TaskPopup/component/TaskItem/index.wxml +5 -5
  53. package/src/Task/TaskPopup/component/TaskItem/index.wxss +394 -1
  54. package/src/Task/TaskPopup/component/TaskList/index.js +53 -18
  55. package/src/Task/TaskPopup/component/TaskList/index.scss +20 -0
  56. package/src/Task/TaskPopup/component/TaskList/index.wxml +17 -3
  57. package/src/Task/TaskPopup/component/TaskList/index.wxss +118 -1
  58. package/src/Task/TaskPopup/component/TaskType/index.js +39 -2
  59. package/src/Task/TaskPopup/component/TaskType/index.wxml +1 -1
  60. package/src/Task/TaskPopup/component/TaskType/index.wxss +98 -1
  61. package/src/Task/TaskPopup/index.js +46 -2
  62. package/src/Task/TaskPopup/index.scss +14 -1
  63. package/src/Task/TaskPopup/index.wxml +25 -13
  64. package/src/Task/TaskPopup/index.wxss +306 -1
  65. package/src/Task/taskReceivePopup/coupon/index.js +20 -0
  66. package/src/Task/taskReceivePopup/coupon/index.scss +8 -0
  67. package/src/Task/taskReceivePopup/coupon/index.wxml +22 -19
  68. package/src/Task/taskReceivePopup/coupon/index.wxs +48 -0
  69. package/src/Task/taskReceivePopup/coupon/index.wxss +187 -1
  70. package/src/Task/taskReceivePopup/index.js +9 -9
  71. package/src/Task/taskReceivePopup/index.wxml +15 -4
  72. package/src/Task/taskReceivePopup/index.wxss +1 -1
  73. package/src/Task/taskReceivePopup/integral/index.js +5 -0
  74. package/src/Task/taskReceivePopup/integral/index.wxml +1 -1
  75. package/src/Task/taskReceivePopup/integral/index.wxss +94 -1
@@ -1,12 +1,18 @@
1
+ const computedBehavior = require('miniprogram-computed').behavior
1
2
  Component({
3
+ behaviors: [computedBehavior],
2
4
  /**
3
5
  * 组件的属性列表
4
6
  */
5
7
  properties: {
6
- messageContent: {
8
+ taskMsg: {
7
9
  type: Object,
8
10
  value: {},
9
11
  },
12
+ zIndex: {
13
+ type: Number,
14
+ value: 1,
15
+ },
10
16
  },
11
17
 
12
18
  /**
@@ -14,6 +20,38 @@ Component({
14
20
  */
15
21
  data: {
16
22
  animationData: {},
23
+ taskIcon: {
24
+ 1: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lopitz1y0v93.png",
25
+ 2: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lopitz1w0t4k.png"
26
+ }
27
+ },
28
+
29
+ computed: {
30
+ // 奖品类型
31
+ rewardValue(data){
32
+ if(data.taskMsg.live_task?.task_type === 1){
33
+ const hours = Math.floor(data.taskMsg.live_task?.task_condition / 60);
34
+ const remainingMinutes = data.taskMsg.live_task?.task_condition % 60;
35
+
36
+ if (hours === 0) {
37
+ return `达${remainingMinutes}分钟`;
38
+ } else if (remainingMinutes === 0) {
39
+ return `达${hours}小时`;
40
+ } else {
41
+ return `达${hours}小时${remainingMinutes}分钟`;
42
+ }
43
+ }else {
44
+ return ['', '发表评论', '转发直播间', '完成点赞'][data.taskMsg.live_task?.task_condition] || ''
45
+ }
46
+ },
47
+ // 奖品icon
48
+ taskIconImg(data){
49
+ return data.taskIcon[data.taskMsg.live_task?.reward_type]
50
+ },
51
+ // 奖品数量
52
+ prizeNum(data){
53
+ return data.taskMsg.live_task?.reward_type === 1? data.taskMsg.live_task?.reward_value: data.taskMsg.coupon_list?.length
54
+ }
17
55
  },
18
56
 
19
57
  lifetimes: {},
@@ -22,6 +60,12 @@ Component({
22
60
  * 组件的方法列表
23
61
  */
24
62
  methods: {
63
+ // 气泡点击事件
64
+ bubbleClick(){
65
+ this.triggerEvent("bubbleClick")
66
+ },
67
+
68
+ // 显示气泡动画
25
69
  showBubble() {
26
70
  const animation = wx.createAnimation({
27
71
  duration: 1500,
@@ -38,6 +82,7 @@ Component({
38
82
  }, 1500)
39
83
  },
40
84
 
85
+ // 隐藏气泡动画
41
86
  hideBubble() {
42
87
  const animation = wx.createAnimation({
43
88
  duration: 1500,
@@ -49,7 +94,6 @@ Component({
49
94
  this.setData({
50
95
  animationData: animation.export(),
51
96
  })
52
-
53
97
  // 在动画结束后调用还原元素位置的函数
54
98
  setTimeout(() => {
55
99
  this.restoreElement()
@@ -57,6 +101,7 @@ Component({
57
101
  }, 1500) // 设置延时与动画时长一致
58
102
  },
59
103
 
104
+ // 重置气泡位置
60
105
  restoreElement() {
61
106
  const animation = wx.createAnimation({
62
107
  duration: 0, // 立即执行,无过渡效果
@@ -7,7 +7,6 @@ $deviceWidth: 750;
7
7
  @mixin barrage-container {
8
8
  color: #fff;
9
9
  font-size: vmin(20);
10
- margin-bottom: vmin(76);
11
10
  .barrage-wrap {
12
11
  display: flex;
13
12
  .barrage-item {
@@ -30,12 +29,13 @@ $deviceWidth: 750;
30
29
  height: vmin(48);
31
30
  border-radius: 50%;
32
31
  margin-left: vmin(10);
32
+ margin-right: vmin(8);
33
33
  flex-shrink: 0;
34
34
  }
35
35
  .task-type {
36
36
  display: flex;
37
37
  flex-direction: column;
38
- margin-left: vmin(8);
38
+ margin-right: vmin(8);
39
39
  overflow: hidden;
40
40
  text-overflow: ellipsis;
41
41
  white-space: nowrap;
@@ -1,29 +1,22 @@
1
- <view>
2
- <view class="barrage-container">
3
- <view class="barrage-wrap">
4
- <view class="barrage-item" animation="{{animationData}}">
5
- <view class="barrage-content">
6
- <image
7
- class="task-completion-icon"
8
- src="https://commonresource-1252524126.cdn.xiaoeknow.com/image/lopitz1y0c73.png"
9
- alt
10
- />
11
- <view class="task-type">{{messageContent.id}}</view>
12
- <view>达1小时</view>
13
- <image
14
- class="prize-icon"
15
- src="https://commonresource-1252524126.cdn.xiaoeknow.com/image/lopitz1y0v93.png"
16
- alt="奖励"
17
- />
18
- <view class="prize-num">+1</view>
19
- <image
20
- class="right-arrow-icon"
21
- src="https://commonresource-1252524126.cdn.xiaoeknow.com/image/lopitz1k0dzj.png"
22
- alt
23
- />
24
- </view>
1
+ <view class="barrage-container" catch:tap="bubbleClick" style="{{zIndex?'z-index:'+zIndex:''}}">
2
+ <view class="barrage-wrap">
3
+ <view class="barrage-item" animation="{{animationData}}">
4
+ <view class="barrage-content">
5
+ <image
6
+ class="task-completion-icon"
7
+ src="https://commonresource-1252524126.cdn.xiaoeknow.com/image/lopitz1y0c73.png"
8
+ alt
9
+ />
10
+ <view wx:if="{{taskMsg.live_task.task_type === 1}}" class="task-type">观看时长</view>
11
+ <view>{{ rewardValue }}</view>
12
+ <image class="prize-icon" src="{{taskIconImg}}" alt="奖励" />
13
+ <view class="prize-num">+{{ prizeNum }}</view>
14
+ <image
15
+ class="right-arrow-icon"
16
+ src="https://commonresource-1252524126.cdn.xiaoeknow.com/image/lopitz1k0dzj.png"
17
+ alt
18
+ />
25
19
  </view>
26
20
  </view>
27
21
  </view>
28
22
  </view>
29
-
@@ -1,7 +1,6 @@
1
1
  .barrage-container {
2
2
  color: #fff;
3
3
  font-size: 2.66667vmin;
4
- margin-bottom: 10.13333vmin;
5
4
  }
6
5
  .barrage-container .barrage-wrap {
7
6
  display: flex;
@@ -25,12 +24,13 @@
25
24
  height: 6.4vmin;
26
25
  border-radius: 50%;
27
26
  margin-left: 1.33333vmin;
27
+ margin-right: 1.06667vmin;
28
28
  flex-shrink: 0;
29
29
  }
30
30
  .barrage-container .barrage-wrap .barrage-item .task-type {
31
31
  display: flex;
32
32
  flex-direction: column;
33
- margin-left: 1.06667vmin;
33
+ margin-right: 1.06667vmin;
34
34
  overflow: hidden;
35
35
  text-overflow: ellipsis;
36
36
  white-space: nowrap;
@@ -97,7 +97,6 @@
97
97
  .barrage-container {
98
98
  color: #fff;
99
99
  font-size: 1.30208vmin;
100
- margin-bottom: 4.94792vmin;
101
100
  }
102
101
  .barrage-container .barrage-wrap {
103
102
  display: flex;
@@ -121,12 +120,13 @@
121
120
  height: 3.125vmin;
122
121
  border-radius: 50%;
123
122
  margin-left: 0.65104vmin;
123
+ margin-right: 0.52083vmin;
124
124
  flex-shrink: 0;
125
125
  }
126
126
  .barrage-container .barrage-wrap .barrage-item .task-type {
127
127
  display: flex;
128
128
  flex-direction: column;
129
- margin-left: 0.52083vmin;
129
+ margin-right: 0.52083vmin;
130
130
  overflow: hidden;
131
131
  text-overflow: ellipsis;
132
132
  white-space: nowrap;
@@ -194,7 +194,6 @@
194
194
  .barrage-container {
195
195
  color: #fff;
196
196
  font-size: 1.30208vmin;
197
- margin-bottom: 4.94792vmin;
198
197
  }
199
198
  .barrage-container .barrage-wrap {
200
199
  display: flex;
@@ -218,12 +217,13 @@
218
217
  height: 3.125vmin;
219
218
  border-radius: 50%;
220
219
  margin-left: 0.65104vmin;
220
+ margin-right: 0.52083vmin;
221
221
  flex-shrink: 0;
222
222
  }
223
223
  .barrage-container .barrage-wrap .barrage-item .task-type {
224
224
  display: flex;
225
225
  flex-direction: column;
226
- margin-left: 0.52083vmin;
226
+ margin-right: 0.52083vmin;
227
227
  overflow: hidden;
228
228
  text-overflow: ellipsis;
229
229
  white-space: nowrap;
@@ -2,17 +2,28 @@ Component({
2
2
  /**
3
3
  * 组件的属性列表
4
4
  */
5
- properties: {},
5
+ properties: {
6
+ aliveMode:{
7
+ type: Number,
8
+ value: 1
9
+ },
10
+ iconText:{
11
+ type: String,
12
+ value: '得奖励'
13
+ },
14
+ },
6
15
 
7
16
  /**
8
17
  * 组件的初始数据
9
18
  */
10
- data: {
11
- alive_mode: 1,
12
- },
19
+ data: {},
13
20
 
14
21
  /**
15
22
  * 组件的方法列表
16
23
  */
17
- methods: {},
24
+ methods: {
25
+ iconClick(){
26
+ this.triggerEvent("iconClick")
27
+ }
28
+ },
18
29
  })
@@ -19,6 +19,7 @@ $deviceWidth: 750;
19
19
  height: 100%;
20
20
  border-radius: vmin(16);
21
21
  margin: 0 vmin(32) vmin(24) 0;
22
+ pointer-events: auto;
22
23
  .task-icon {
23
24
  flex-shrink: 0;
24
25
  display: block;
@@ -1,5 +1,5 @@
1
- <view class="taskIcon {{alive_mode === 1? 'verticalStyle' : ''}}">
1
+ <view class="taskIcon {{aliveMode === 1? 'verticalStyle' : ''}}" catch:tap="iconClick">
2
2
  <view class="task-icon" />
3
- <view class="task-text">得奖励</view>
3
+ <view class="task-text">{{iconText}}</view>
4
4
  </view>
5
5
 
@@ -13,6 +13,7 @@
13
13
  height: 100%;
14
14
  border-radius: 2.13333vmin;
15
15
  margin: 0 4.26667vmin 3.2vmin 0;
16
+ pointer-events: auto;
16
17
  }
17
18
  .taskIcon .task-icon {
18
19
  flex-shrink: 0;
@@ -55,6 +56,7 @@
55
56
  height: 100%;
56
57
  border-radius: 1.04167vmin;
57
58
  margin: 0 2.08333vmin 1.5625vmin 0;
59
+ pointer-events: auto;
58
60
  }
59
61
  .taskIcon .task-icon {
60
62
  flex-shrink: 0;
@@ -98,6 +100,7 @@
98
100
  height: 100%;
99
101
  border-radius: 1.04167vmin;
100
102
  margin: 0 2.08333vmin 1.5625vmin 0;
103
+ pointer-events: auto;
101
104
  }
102
105
  .taskIcon .task-icon {
103
106
  flex-shrink: 0;
@@ -8,6 +8,10 @@ Component({
8
8
  return []
9
9
  }
10
10
  },
11
+ refreshStatus:{
12
+ type:Boolean,
13
+ value: false
14
+ }
11
15
  },
12
16
  data: {
13
17
  activeNames:["1"],
@@ -21,7 +25,15 @@ Component({
21
25
  detached: function () { },
22
26
  },
23
27
  methods: {
24
- onChange(){}
28
+ btnClick(e){
29
+ this.triggerEvent("btnClick",e.detail)
30
+ },
31
+ onLoad(){
32
+ this.triggerEvent("onLoad","rewardList")
33
+ },
34
+ getMoreList(){
35
+ this.triggerEvent("getMoreList","rewardList")
36
+ }
25
37
  },
26
38
  observers: {},
27
39
  })
@@ -0,0 +1,40 @@
1
+ $deviceWidth: 750;
2
+
3
+ @function vmin($rpx) {
4
+ @return #{$rpx * 100 / $deviceWidth}vmin;
5
+ }
6
+
7
+ @mixin reward-list{
8
+ height: 100%;
9
+ }
10
+
11
+ .reward-list {
12
+ @include reward-list;
13
+ }
14
+
15
+ // 竖屏pad
16
+ @media screen and (min-width: 768px) and (orientation: portrait) {
17
+ $deviceWidth: 1536 !global;
18
+
19
+ .reward-list {
20
+ @include reward-list;
21
+ }
22
+ }
23
+
24
+ // PC 放大适配
25
+ @media screen and (min-height: 630px) and (orientation: landscape) {
26
+ $deviceWidth: 1260 !global;
27
+
28
+ .reward-list {
29
+ @include reward-list;
30
+ }
31
+ }
32
+
33
+ // 横屏pad
34
+ @media screen and (min-height: 768px) and (orientation: landscape) {
35
+ $deviceWidth: 1536 !global;
36
+
37
+ .reward-list {
38
+ @include reward-list;
39
+ }
40
+ }
@@ -1,4 +1,11 @@
1
- <scroll-view class="goods-list" scroll-y="true" bindrefresherrefresh="onLoad" refresher-enabled="{{true}}">
1
+ <scroll-view
2
+ class="reward-list"
3
+ scroll-y="true"
4
+ bindrefresherrefresh="onLoad"
5
+ refresher-enabled="{{true}}"
6
+ refresher-triggered="{{ refreshStatus }}"
7
+ bindscrolltolower="getMoreList"
8
+ >
2
9
  <task-item
3
10
  wx:for="{{rewardList}}"
4
11
  wx:for-item="item"
@@ -6,5 +13,7 @@
6
13
  listType="reward"
7
14
  isRadius="{{true}}"
8
15
  taskItem="{{item}}"
16
+ bind:btnClick="btnClick"
17
+ isMb="{{true}}"
9
18
  />
10
19
  </scroll-view>
@@ -0,0 +1,18 @@
1
+ .reward-list {
2
+ height: 100%;
3
+ }
4
+ @media screen and (min-width: 768px) and (orientation: portrait) {
5
+ .reward-list {
6
+ height: 100%;
7
+ }
8
+ }
9
+ @media screen and (min-height: 630px) and (orientation: landscape) {
10
+ .reward-list {
11
+ height: 100%;
12
+ }
13
+ }
14
+ @media screen and (min-height: 768px) and (orientation: landscape) {
15
+ .reward-list {
16
+ height: 100%;
17
+ }
18
+ }
@@ -25,6 +25,13 @@ const TASK_TYPE_TEXT = {
25
25
  4: "去点赞",
26
26
  };
27
27
 
28
+ const taskType = {
29
+ 1: "view",
30
+ 2: "input",
31
+ 3: "share",
32
+ 4: "like"
33
+ }
34
+
28
35
  Component({
29
36
  behaviors: [computedBehavior],
30
37
  properties: {
@@ -45,6 +52,10 @@ Component({
45
52
  itemIndex:{
46
53
  type: Number,
47
54
  value: 0
55
+ },
56
+ isMb:{
57
+ type: Boolean,
58
+ value: false
48
59
  }
49
60
  },
50
61
  data: {
@@ -61,15 +72,15 @@ Component({
61
72
  taskBelongType = 1
62
73
  }else if(task_type === 2){
63
74
  switch(task_condition){
64
- case 1:
75
+ case "1":
65
76
  // 评论
66
77
  taskBelongType = 2
67
78
  break;
68
- case 2:
79
+ case "2":
69
80
  // 转发
70
81
  taskBelongType = 3
71
82
  break;
72
- case 3:
83
+ case "3":
73
84
  // 点赞
74
85
  taskBelongType = 4
75
86
  break
@@ -87,7 +98,7 @@ Component({
87
98
  let title = ""
88
99
  switch(data.taskBelongType){
89
100
  case 1:
90
- let task_condition = data.listType === LIST_TYPE.REWARD?data.taskItem.live_task.task_condition:data.taskItem.task_condition
101
+ let task_condition = data.taskItem.task_condition
91
102
  title = `观看时长${getHoursMinutes(task_condition)}`
92
103
  break;
93
104
  case 2:
@@ -115,19 +126,28 @@ Component({
115
126
  return "领奖励"
116
127
  }
117
128
 
118
- // 任务状态 join_state 0-未开始 2-已完成 3-已结束
119
- if (JOIN_STATE_TEXT[data.taskItem.join_state]) {
120
- return JOIN_STATE_TEXT[data.taskItem.join_state];
129
+ // 任务状态已结束
130
+ if(data.taskItem.join_state === 2){
131
+ return "已完成"
132
+ }
133
+
134
+ // 任务状态已结束
135
+ if(data.taskItem.state === 2){
136
+ return "已结束"
121
137
  }
122
138
 
139
+ if(data.taskItem.join_state === 0){
140
+ return "未开始"
141
+ }
142
+
123
143
  // 正常参与任务
124
144
  return TASK_TYPE_TEXT[data.taskBelongType] || "去参与"
125
145
  },
126
146
 
127
147
  // 奖励内容
128
148
  rewardText(data){
129
- const { reward_type, reward_value } = data.listType === LIST_TYPE.REWARD?data.taskItem.live_task:data.taskItem
130
- return `+${reward_value} ${reward_type===1?'积分':'优惠券'}`
149
+ const { reward_type, reward_value } = data.taskItem
150
+ return `+${reward_type===1?reward_value:1} ${reward_type===1?'积分':'优惠券'}`
131
151
  },
132
152
 
133
153
  // 奖励图标
@@ -151,16 +171,27 @@ Component({
151
171
  return `${hours>0?hours+'小时':''}${remainingMinutes>0?remainingMinutes+'分钟':''}`
152
172
  },
153
173
  btnClick(){
174
+ const { reward_type } = this.data.taskItem
154
175
  if(this.data.btnText === TASK_TYPE_TEXT[2]){
155
176
  // 去评论
177
+ this.triggerEvent("btnClick","toComment")
178
+ return
179
+ }else if(this.data.btnText === TASK_TYPE_TEXT[3]){
180
+ // 去转发
181
+ this.triggerEvent("btnClick","toShare")
182
+ return
183
+ }else if(this.data.btnText === "去使用"){
184
+ // 去使用
156
185
  this.triggerEvent("btnClick",{
157
- data: "toComment"
186
+ type:"reward",
187
+ reward_type
158
188
  })
159
189
  return
160
- }else if(this.data.btnText === TASK_TYPE_TEXT[3]){
190
+ }else if(this.data.btnText === "领奖励"){
161
191
  // 去转发
162
192
  this.triggerEvent("btnClick",{
163
- data: "toShare"
193
+ type:"toRetry",
194
+ taskBelongType: taskType[this.data.taskBelongType]
164
195
  })
165
196
  return
166
197
  }
@@ -31,8 +31,11 @@ $deviceWidth: 750;
31
31
  &.radius{
32
32
  border-radius: vmin(16);
33
33
  }
34
+ &.mb{
35
+ margin-bottom: vmin(24);
36
+ }
34
37
  .left{
35
- max-width: vmin(462);
38
+ max-width: vmin(485);
36
39
  .first{
37
40
  line-height: vmin(40);
38
41
  display: flex;
@@ -41,6 +44,9 @@ $deviceWidth: 750;
41
44
  font-size: vmin(28);
42
45
  font-weight: 500;
43
46
  color: #333333;
47
+ word-wrap: break-word;
48
+ word-break: break-all;
49
+ max-width: vmin(290);
44
50
  }
45
51
  .reward{
46
52
  margin-left: vmin(16);
@@ -54,6 +60,8 @@ $deviceWidth: 750;
54
60
  }
55
61
  .reward-text{
56
62
  margin-left: vmin(8);
63
+ word-wrap: break-word;
64
+ word-break: break-all;
57
65
  }
58
66
  }
59
67
  }
@@ -1,7 +1,7 @@
1
1
  <wxs src="./index.wxs" module="filter" />
2
2
 
3
3
  <view
4
- class="item-box {{lineClass?'line-class':''}} {{listType === 'error' && itemIndex === 0?'bg-change':''}} {{isRadius?'radius':''}}"
4
+ class="item-box {{lineClass?'line-class':''}} {{listType === 'error' && itemIndex === 0?'bg-change':''}} {{isRadius?'radius':''}} {{isMb?'mb':''}}"
5
5
  >
6
6
  <!-- 左侧任务详情 -->
7
7
  <view class="left">
@@ -22,7 +22,7 @@
22
22
  <view
23
23
  class="time"
24
24
  wx:if="{{listType === 'task' || listType === 'error'}}"
25
- >任务时间:{{taskItem.start_at}} 至 {{taskItem.end_at}}</view>
25
+ >任务时间:{{taskItem.show_start_at}} 至 {{taskItem.show_end_at}}</view>
26
26
 
27
27
  <view class="time" wx:if="{{listType === 'reward'}}">获得方式:{{ taskTitle }}</view>
28
28
 
@@ -31,13 +31,13 @@
31
31
  <!-- 观看剩余时间 -->
32
32
  <view
33
33
  class="residue-time"
34
- wx:if="{{taskBelongType === 1 && listType === 'task' && taskItem.residue_time}}"
35
- >再观看 {{filter.secondsToMinutes(taskItem.residue_time)}}分钟 获得奖励</view>
34
+ wx:if="{{taskItem.task_type === 1 && listType === 'task' && taskItem.join_state === 1 && taskItem.residue_time && taskItem.state !==2}}"
35
+ >{{taskItem.residue_time > 60 ? '再观看 '+ filter.secondsToMinutes(taskItem.residue_time) + '分钟 '+ '获得奖励':'即将获得奖励'}}</view>
36
36
  </view>
37
37
 
38
38
  <!-- 右侧按钮 -->
39
39
  <view
40
- class="btn {{listType === 'reward'?'reward-btn':''}} {{listType==='task' && (taskItem.join_state === 2 || taskItem.join_state === 3 || taskItem.join_state === 0)?'gray-btn':''}}"
40
+ class="btn {{listType === 'reward'?'reward-btn':''}} {{listType==='task' && (taskItem.join_state === 2 || taskItem.join_state === 3 || taskItem.join_state === 0 || taskItem.state === 2)?'gray-btn':''}}"
41
41
  catch:tap="btnClick"
42
42
  >{{btnText}}</view>
43
43
  </view>