xiaoe_mp_npm 1.0.26 → 1.0.28

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 (157) hide show
  1. package/miniprogram_dist/Task/TaskBubble/index.js +55 -42
  2. package/miniprogram_dist/Task/TaskBubble/index.json +3 -3
  3. package/miniprogram_dist/Task/TaskBubble/index.scss +125 -125
  4. package/miniprogram_dist/Task/TaskBubble/index.wxml +22 -22
  5. package/miniprogram_dist/Task/TaskIcon/index.js +29 -29
  6. package/miniprogram_dist/Task/TaskIcon/index.json +4 -4
  7. package/miniprogram_dist/Task/TaskIcon/index.scss +70 -70
  8. package/miniprogram_dist/Task/TaskIcon/index.wxml +5 -5
  9. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.js +41 -39
  10. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.json +6 -6
  11. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.scss +39 -39
  12. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.wxml +20 -19
  13. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.js +401 -381
  14. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.json +5 -5
  15. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.scss +165 -165
  16. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxml +66 -66
  17. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxs +7 -7
  18. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.js +198 -194
  19. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.json +7 -7
  20. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.scss +66 -66
  21. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.wxml +41 -40
  22. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.js +88 -84
  23. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.json +9 -9
  24. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.scss +62 -62
  25. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.wxml +44 -43
  26. package/miniprogram_dist/Task/TaskPopup/index.js +138 -134
  27. package/miniprogram_dist/Task/TaskPopup/index.json +7 -7
  28. package/miniprogram_dist/Task/TaskPopup/index.scss +140 -140
  29. package/miniprogram_dist/Task/TaskPopup/index.wxml +79 -77
  30. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.js +131 -131
  31. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.json +5 -5
  32. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.scss +191 -191
  33. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxml +64 -64
  34. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxs +78 -78
  35. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.js +40 -40
  36. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.json +5 -5
  37. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.scss +6 -6
  38. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.wxml +1 -1
  39. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/base.wxml +50 -50
  40. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/html2json.js +623 -623
  41. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/htmlparser.js +183 -183
  42. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/iframeParse.js +216 -216
  43. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/loop.wxml +3563 -3563
  44. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/showdown.js +2364 -2364
  45. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxDiscode.js +209 -209
  46. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.js +269 -269
  47. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.wxml +1276 -1276
  48. package/miniprogram_dist/Task/TaskQuizPopup/index.js +225 -225
  49. package/miniprogram_dist/Task/TaskQuizPopup/index.json +7 -7
  50. package/miniprogram_dist/Task/TaskQuizPopup/index.scss +158 -158
  51. package/miniprogram_dist/Task/TaskQuizPopup/index.wxml +96 -96
  52. package/miniprogram_dist/Task/taskQuizRemindPopup/index.js +74 -74
  53. package/miniprogram_dist/Task/taskQuizRemindPopup/index.json +5 -5
  54. package/miniprogram_dist/Task/taskQuizRemindPopup/index.scss +107 -107
  55. package/miniprogram_dist/Task/taskQuizRemindPopup/index.wxml +27 -27
  56. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.js +57 -57
  57. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.json +6 -6
  58. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.scss +123 -123
  59. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxml +70 -70
  60. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxs +48 -48
  61. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.js +44 -44
  62. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.json +6 -6
  63. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.scss +106 -106
  64. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.wxml +38 -38
  65. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.wxs +48 -48
  66. package/miniprogram_dist/Task/taskReceivePopup/index.js +8 -4
  67. package/miniprogram_dist/Task/taskReceivePopup/index.json +13 -13
  68. package/miniprogram_dist/Task/taskReceivePopup/index.wxml +1 -0
  69. package/miniprogram_dist/Task/taskReceivePopup/integral/index.js +24 -14
  70. package/miniprogram_dist/Task/taskReceivePopup/integral/index.json +6 -6
  71. package/miniprogram_dist/Task/taskReceivePopup/integral/index.scss +60 -60
  72. package/miniprogram_dist/Task/taskReceivePopup/integral/index.wxml +12 -12
  73. package/package.json +1 -1
  74. package/project.config.json +79 -54
  75. package/src/CustomPopup/index.wxss +22 -22
  76. package/src/Task/TaskBubble/index.js +55 -42
  77. package/src/Task/TaskBubble/index.json +3 -3
  78. package/src/Task/TaskBubble/index.scss +125 -125
  79. package/src/Task/TaskBubble/index.wxml +22 -22
  80. package/src/Task/TaskBubble/index.wxss +289 -289
  81. package/src/Task/TaskIcon/index.js +29 -29
  82. package/src/Task/TaskIcon/index.json +4 -4
  83. package/src/Task/TaskIcon/index.scss +70 -70
  84. package/src/Task/TaskIcon/index.wxml +5 -5
  85. package/src/Task/TaskIcon/index.wxss +130 -130
  86. package/src/Task/TaskPopup/component/RewardList/index.js +41 -39
  87. package/src/Task/TaskPopup/component/RewardList/index.json +6 -6
  88. package/src/Task/TaskPopup/component/RewardList/index.scss +39 -39
  89. package/src/Task/TaskPopup/component/RewardList/index.wxml +20 -19
  90. package/src/Task/TaskPopup/component/RewardList/index.wxss +18 -18
  91. package/src/Task/TaskPopup/component/TaskItem/index.js +401 -381
  92. package/src/Task/TaskPopup/component/TaskItem/index.json +5 -5
  93. package/src/Task/TaskPopup/component/TaskItem/index.scss +165 -165
  94. package/src/Task/TaskPopup/component/TaskItem/index.wxml +66 -66
  95. package/src/Task/TaskPopup/component/TaskItem/index.wxs +7 -7
  96. package/src/Task/TaskPopup/component/TaskList/index.js +198 -194
  97. package/src/Task/TaskPopup/component/TaskList/index.json +7 -7
  98. package/src/Task/TaskPopup/component/TaskList/index.scss +66 -66
  99. package/src/Task/TaskPopup/component/TaskList/index.wxml +41 -40
  100. package/src/Task/TaskPopup/component/TaskList/index.wxss +118 -118
  101. package/src/Task/TaskPopup/component/TaskType/index.js +88 -84
  102. package/src/Task/TaskPopup/component/TaskType/index.json +9 -9
  103. package/src/Task/TaskPopup/component/TaskType/index.scss +62 -62
  104. package/src/Task/TaskPopup/component/TaskType/index.wxml +44 -43
  105. package/src/Task/TaskPopup/component/TaskType/index.wxss +110 -110
  106. package/src/Task/TaskPopup/index.js +138 -134
  107. package/src/Task/TaskPopup/index.json +7 -7
  108. package/src/Task/TaskPopup/index.scss +140 -140
  109. package/src/Task/TaskPopup/index.wxml +79 -77
  110. package/src/Task/TaskPopup/index.wxss +406 -406
  111. package/src/Task/TaskQuizPopup/components/quizContent/index.js +131 -131
  112. package/src/Task/TaskQuizPopup/components/quizContent/index.json +5 -5
  113. package/src/Task/TaskQuizPopup/components/quizContent/index.scss +191 -191
  114. package/src/Task/TaskQuizPopup/components/quizContent/index.wxml +64 -64
  115. package/src/Task/TaskQuizPopup/components/quizContent/index.wxs +78 -78
  116. package/src/Task/TaskQuizPopup/components/quizRichText/index.js +40 -40
  117. package/src/Task/TaskQuizPopup/components/quizRichText/index.json +5 -5
  118. package/src/Task/TaskQuizPopup/components/quizRichText/index.scss +6 -6
  119. package/src/Task/TaskQuizPopup/components/quizRichText/index.wxml +1 -1
  120. package/src/Task/TaskQuizPopup/components/wxParse/base.wxml +50 -50
  121. package/src/Task/TaskQuizPopup/components/wxParse/html2json.js +623 -623
  122. package/src/Task/TaskQuizPopup/components/wxParse/htmlparser.js +183 -183
  123. package/src/Task/TaskQuizPopup/components/wxParse/iframeParse.js +216 -216
  124. package/src/Task/TaskQuizPopup/components/wxParse/loop.wxml +3563 -3563
  125. package/src/Task/TaskQuizPopup/components/wxParse/showdown.js +2364 -2364
  126. package/src/Task/TaskQuizPopup/components/wxParse/wxDiscode.js +209 -209
  127. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.js +269 -269
  128. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.wxml +1276 -1276
  129. package/src/Task/TaskQuizPopup/index.js +225 -225
  130. package/src/Task/TaskQuizPopup/index.json +7 -7
  131. package/src/Task/TaskQuizPopup/index.scss +158 -158
  132. package/src/Task/TaskQuizPopup/index.wxml +96 -96
  133. package/src/Task/taskQuizRemindPopup/index.js +74 -74
  134. package/src/Task/taskQuizRemindPopup/index.json +5 -5
  135. package/src/Task/taskQuizRemindPopup/index.scss +107 -107
  136. package/src/Task/taskQuizRemindPopup/index.wxml +27 -27
  137. package/src/Task/taskReceivePopup/coupon/index.js +57 -57
  138. package/src/Task/taskReceivePopup/coupon/index.json +6 -6
  139. package/src/Task/taskReceivePopup/coupon/index.scss +123 -123
  140. package/src/Task/taskReceivePopup/coupon/index.wxml +70 -70
  141. package/src/Task/taskReceivePopup/coupon/index.wxs +48 -48
  142. package/src/Task/taskReceivePopup/customPrizes/index.js +44 -44
  143. package/src/Task/taskReceivePopup/customPrizes/index.json +6 -6
  144. package/src/Task/taskReceivePopup/customPrizes/index.scss +106 -106
  145. package/src/Task/taskReceivePopup/customPrizes/index.wxml +38 -38
  146. package/src/Task/taskReceivePopup/customPrizes/index.wxs +48 -48
  147. package/src/Task/taskReceivePopup/customPrizes/index.wxss +220 -220
  148. package/src/Task/taskReceivePopup/index.js +8 -4
  149. package/src/Task/taskReceivePopup/index.json +13 -13
  150. package/src/Task/taskReceivePopup/index.wxml +1 -0
  151. package/src/Task/taskReceivePopup/index.wxss +1 -1
  152. package/src/Task/taskReceivePopup/integral/index.js +24 -14
  153. package/src/Task/taskReceivePopup/integral/index.json +6 -6
  154. package/src/Task/taskReceivePopup/integral/index.scss +60 -60
  155. package/src/Task/taskReceivePopup/integral/index.wxml +12 -12
  156. package/src/Task/taskReceivePopup/integral/index.wxss +94 -94
  157. package/project.private.config.json +0 -7
@@ -1,17 +1,17 @@
1
1
  const computedBehavior = require('miniprogram-computed').behavior
2
2
  const task_title = {
3
- 2:{
4
- "1": "发表评论",
5
- "2": "转发直播间",
6
- "3": "完成点赞"
3
+ 2: {
4
+ 1: '发表评论',
5
+ 2: '转发直播间',
6
+ 3: '完成点赞',
7
+ },
8
+ 4: {
9
+ 6: '完成打赏',
10
+ 7: '完成投票',
11
+ 8: '完成问卷',
12
+ 9: '完成签到',
13
+ 10: '完成答题',
7
14
  },
8
- 4:{
9
- "6": "完成打赏",
10
- "7": "完成投票",
11
- "8": "完成问卷",
12
- "9": "完成签到",
13
- "10": "完成答题"
14
- }
15
15
  }
16
16
  Component({
17
17
  behaviors: [computedBehavior],
@@ -27,6 +27,10 @@ Component({
27
27
  type: Number,
28
28
  value: 1,
29
29
  },
30
+ teamId: {
31
+ type: String,
32
+ value: '',
33
+ },
30
34
  },
31
35
 
32
36
  /**
@@ -35,53 +39,62 @@ Component({
35
39
  data: {
36
40
  animationData: {},
37
41
  taskIcon: {
38
- 1: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltoab3rb0ypq.png",
39
- 2: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltp6qpua0u1u.png",
40
- 3: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltoab3rc0gd6.png",
41
- 4: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltoab3rc0b4q.png",
42
- 5: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltoab3r90jil.png"
43
- }
42
+ 1: 'https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltoab3rb0ypq.png',
43
+ 2: 'https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltp6qpua0u1u.png',
44
+ 3: 'https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltoab3rc0gd6.png',
45
+ 4: 'https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltoab3rc0b4q.png',
46
+ 5: 'https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltoab3r90jil.png',
47
+ },
44
48
  },
45
49
 
46
50
  computed: {
47
51
  // 奖品类型
48
- rewardValue(data){
49
- if(data.taskMsg.live_task?.task_type){
52
+ rewardValue(data) {
53
+ if (data.taskMsg.live_task?.task_type) {
50
54
  const { task_type, task_condition, reward_frequency } = data.taskMsg.live_task
51
- if(task_type === 1){
52
- const hours = Math.floor(task_condition / 60);
53
- const remainingMinutes = task_condition % 60;
55
+ if (task_type === 1) {
56
+ const hours = Math.floor(task_condition / 60)
57
+ const remainingMinutes = task_condition % 60
54
58
 
55
59
  if (hours === 0) {
56
- return `达${remainingMinutes}分钟`;
60
+ return `达${remainingMinutes}分钟`
57
61
  } else if (remainingMinutes === 0) {
58
- return `达${hours}小时`;
62
+ return `达${hours}小时`
59
63
  } else {
60
- return `达${hours}小时${remainingMinutes}分钟`;
64
+ return `达${hours}小时${remainingMinutes}分钟`
61
65
  }
62
- }else if(task_type === 3){
63
- if(task_condition === "4") return `成功消费 ${reward_frequency}笔订单数`
64
- if(task_condition === "5") return `成功消费 ${(reward_frequency/100).toFixed(2)}元`
65
- }else {
66
- console.log("rewardValue",task_title)
66
+ } else if (task_type === 3) {
67
+ if (task_condition === '4') return `成功消费 ${reward_frequency}笔订单数`
68
+ if (task_condition === '5') return `成功消费 ${(reward_frequency / 100).toFixed(2)}元`
69
+ } else {
70
+ console.log('rewardValue', task_title)
67
71
  return task_title[task_type][task_condition]
68
72
  }
69
- }
73
+ }
70
74
  },
71
75
  // 奖品icon
72
- taskIconImg(data){
76
+ taskIconImg(data) {
73
77
  return data.taskIcon[data.taskMsg.live_task?.reward_type]
74
78
  },
75
79
  // 奖品数量
76
- prizeNum(data){
77
- if(data.taskMsg?.live_task){
80
+ prizeNum(data) {
81
+ if (data.taskMsg?.live_task) {
78
82
  const { coupon_list } = data.taskMsg
79
- const { reward_type, reward_value } = data.taskMsg.live_task
80
- if(reward_type === 1) return reward_value
81
- if(reward_type === 2) return coupon_list.length
83
+ const { reward_type, reward_value, reward_pay_type, team_pay_config } = data.taskMsg.live_task
84
+ if (reward_type === 1) return reward_value
85
+ if (reward_type === 2) return coupon_list.length
86
+ if (reward_type === 3) {
87
+ if (reward_pay_type === 0) {
88
+ return `${(reward_value.money / 100).toFixed(2)}`
89
+ } else if (reward_pay_type === 10 && team_pay_config) {
90
+ const storeList = JSON.parse(team_pay_config)
91
+ const storeItem = storeList.find((item) => item.team_id === data.teamId)
92
+ if (storeItem) return `${(storeItem.money / 100).toFixed(2)}`
93
+ }
94
+ }
82
95
  return 1
83
- }
84
- }
96
+ }
97
+ },
85
98
  },
86
99
 
87
100
  lifetimes: {},
@@ -91,10 +104,10 @@ Component({
91
104
  */
92
105
  methods: {
93
106
  // 气泡点击事件
94
- bubbleClick(){
95
- this.triggerEvent("bubbleClick")
107
+ bubbleClick() {
108
+ this.triggerEvent('bubbleClick')
96
109
  },
97
-
110
+
98
111
  // 显示气泡动画
99
112
  showBubble() {
100
113
  const animation = wx.createAnimation({
@@ -1,4 +1,4 @@
1
- {
2
- "component": true,
3
- "usingComponents": {}
1
+ {
2
+ "component": true,
3
+ "usingComponents": {}
4
4
  }
@@ -1,125 +1,125 @@
1
- @function vmin($rpx) {
2
- @return #{$rpx * 100 / $deviceWidth}vmin;
3
- }
4
-
5
- $deviceWidth: 750;
6
-
7
- @mixin barrage-container {
8
- color: #fff;
9
- font-size: vmin(20);
10
- .barrage-wrap {
11
- display: flex;
12
- .barrage-item {
13
- position: relative;
14
- background: linear-gradient(270deg, #ff552b00 0%, #ff552bc7 21.42%, #ff8b25eb 46.71%, #FC0 100%);
15
- height: vmin(64);
16
- font-size: vmin(24);
17
- line-height: vmin(64);
18
- border-radius: vmin(92);
19
- transition: 0.3s;
20
- transform: translateX(vmin(-500));
21
-
22
- .barrage-content {
23
- display: flex;
24
- align-items: center;
25
- }
26
-
27
- .task-completion-icon {
28
- width: vmin(48);
29
- height: vmin(48);
30
- border-radius: 50%;
31
- margin-left: vmin(10);
32
- margin-right: vmin(8);
33
- flex-shrink: 0;
34
- }
35
- .task-type {
36
- display: flex;
37
- flex-direction: column;
38
- margin-right: vmin(8);
39
- overflow: hidden;
40
- text-overflow: ellipsis;
41
- white-space: nowrap;
42
- view {
43
- width: 100%;
44
- overflow: hidden;
45
- text-overflow: ellipsis;
46
- white-space: nowrap;
47
- }
48
- }
49
- .prize-icon {
50
- width: vmin(56);
51
- height: vmin(56);
52
- display: flex;
53
- justify-content: center;
54
- align-items: center;
55
- margin: 0 vmin(8);
56
- }
57
- .prize-num {
58
- color: #FFF5CC;
59
- font-weight: 500;
60
- margin-right: vmin(8);
61
- }
62
- .right-arrow-icon{
63
- height: vmin(40);
64
- width: vmin(40);
65
- margin-right: vmin(52);
66
- }
67
- &.barrage-item-show {
68
- animation: taskFadeInLeft 1.5s both;
69
- }
70
- &.barrage-item-hide {
71
- animation: taskFadeOut 1.5s both;
72
- }
73
- }
74
- @keyframes taskFadeInLeft {
75
- 0% {
76
- transform: translateX(vmin(-500));
77
- opacity: 1;
78
- }
79
- 100% {
80
- transform: translateX(0);
81
- opacity: 1;
82
- }
83
- }
84
- @keyframes taskFadeOut {
85
- 0% {
86
- transform: translateX(0);
87
- opacity: 1;
88
- }
89
- 100% {
90
- transform: translateX(0);
91
- opacity: 0;
92
- }
93
- }
94
- @keyframes moveRight {
95
- from {
96
- transform: translateX(-100%);
97
- }
98
- to {
99
- transform: translateX(0);
100
- }
101
- }
102
- }
103
- }
104
-
105
- .barrage-container {
106
- @include barrage-container;
107
- }
108
-
109
- // 竖屏pad
110
- @media screen and (min-width: 768px) and (orientation: portrait) {
111
- $deviceWidth: 1536 !global;
112
-
113
- .barrage-container {
114
- @include barrage-container;
115
- }
116
- }
117
-
118
- // 横屏pad
119
- @media screen and (min-height: 768px) and (orientation: landscape) {
120
- $deviceWidth: 1536 !global;
121
-
122
- .barrage-container {
123
- @include barrage-container;
124
- }
125
- }
1
+ @function vmin($rpx) {
2
+ @return #{$rpx * 100 / $deviceWidth}vmin;
3
+ }
4
+
5
+ $deviceWidth: 750;
6
+
7
+ @mixin barrage-container {
8
+ color: #fff;
9
+ font-size: vmin(20);
10
+ .barrage-wrap {
11
+ display: flex;
12
+ .barrage-item {
13
+ position: relative;
14
+ background: linear-gradient(270deg, #ff552b00 0%, #ff552bc7 21.42%, #ff8b25eb 46.71%, #FC0 100%);
15
+ height: vmin(64);
16
+ font-size: vmin(24);
17
+ line-height: vmin(64);
18
+ border-radius: vmin(92);
19
+ transition: 0.3s;
20
+ transform: translateX(vmin(-500));
21
+
22
+ .barrage-content {
23
+ display: flex;
24
+ align-items: center;
25
+ }
26
+
27
+ .task-completion-icon {
28
+ width: vmin(48);
29
+ height: vmin(48);
30
+ border-radius: 50%;
31
+ margin-left: vmin(10);
32
+ margin-right: vmin(8);
33
+ flex-shrink: 0;
34
+ }
35
+ .task-type {
36
+ display: flex;
37
+ flex-direction: column;
38
+ margin-right: vmin(8);
39
+ overflow: hidden;
40
+ text-overflow: ellipsis;
41
+ white-space: nowrap;
42
+ view {
43
+ width: 100%;
44
+ overflow: hidden;
45
+ text-overflow: ellipsis;
46
+ white-space: nowrap;
47
+ }
48
+ }
49
+ .prize-icon {
50
+ width: vmin(56);
51
+ height: vmin(56);
52
+ display: flex;
53
+ justify-content: center;
54
+ align-items: center;
55
+ margin: 0 vmin(8);
56
+ }
57
+ .prize-num {
58
+ color: #FFF5CC;
59
+ font-weight: 500;
60
+ margin-right: vmin(8);
61
+ }
62
+ .right-arrow-icon{
63
+ height: vmin(40);
64
+ width: vmin(40);
65
+ margin-right: vmin(52);
66
+ }
67
+ &.barrage-item-show {
68
+ animation: taskFadeInLeft 1.5s both;
69
+ }
70
+ &.barrage-item-hide {
71
+ animation: taskFadeOut 1.5s both;
72
+ }
73
+ }
74
+ @keyframes taskFadeInLeft {
75
+ 0% {
76
+ transform: translateX(vmin(-500));
77
+ opacity: 1;
78
+ }
79
+ 100% {
80
+ transform: translateX(0);
81
+ opacity: 1;
82
+ }
83
+ }
84
+ @keyframes taskFadeOut {
85
+ 0% {
86
+ transform: translateX(0);
87
+ opacity: 1;
88
+ }
89
+ 100% {
90
+ transform: translateX(0);
91
+ opacity: 0;
92
+ }
93
+ }
94
+ @keyframes moveRight {
95
+ from {
96
+ transform: translateX(-100%);
97
+ }
98
+ to {
99
+ transform: translateX(0);
100
+ }
101
+ }
102
+ }
103
+ }
104
+
105
+ .barrage-container {
106
+ @include barrage-container;
107
+ }
108
+
109
+ // 竖屏pad
110
+ @media screen and (min-width: 768px) and (orientation: portrait) {
111
+ $deviceWidth: 1536 !global;
112
+
113
+ .barrage-container {
114
+ @include barrage-container;
115
+ }
116
+ }
117
+
118
+ // 横屏pad
119
+ @media screen and (min-height: 768px) and (orientation: landscape) {
120
+ $deviceWidth: 1536 !global;
121
+
122
+ .barrage-container {
123
+ @include barrage-container;
124
+ }
125
+ }
@@ -1,22 +1,22 @@
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
- />
19
- </view>
20
- </view>
21
- </view>
22
- </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
+ />
19
+ </view>
20
+ </view>
21
+ </view>
22
+ </view>
@@ -1,29 +1,29 @@
1
- Component({
2
- /**
3
- * 组件的属性列表
4
- */
5
- properties: {
6
- aliveMode:{
7
- type: Number,
8
- value: 1
9
- },
10
- iconText:{
11
- type: String,
12
- value: '得奖励'
13
- },
14
- },
15
-
16
- /**
17
- * 组件的初始数据
18
- */
19
- data: {},
20
-
21
- /**
22
- * 组件的方法列表
23
- */
24
- methods: {
25
- iconClick(){
26
- this.triggerEvent("iconClick")
27
- }
28
- },
29
- })
1
+ Component({
2
+ /**
3
+ * 组件的属性列表
4
+ */
5
+ properties: {
6
+ aliveMode:{
7
+ type: Number,
8
+ value: 1
9
+ },
10
+ iconText:{
11
+ type: String,
12
+ value: '得奖励'
13
+ },
14
+ },
15
+
16
+ /**
17
+ * 组件的初始数据
18
+ */
19
+ data: {},
20
+
21
+ /**
22
+ * 组件的方法列表
23
+ */
24
+ methods: {
25
+ iconClick(){
26
+ this.triggerEvent("iconClick")
27
+ }
28
+ },
29
+ })
@@ -1,4 +1,4 @@
1
- {
2
- "component": true,
3
- "usingComponents": {}
4
- }
1
+ {
2
+ "component": true,
3
+ "usingComponents": {}
4
+ }
@@ -1,70 +1,70 @@
1
- @function vmin($rpx) {
2
- @return #{$rpx * 100 / $deviceWidth}vmin;
3
- }
4
-
5
- $deviceWidth: 750;
6
-
7
- @mixin taskIcon {
8
- z-index: 9;
9
- box-sizing: border-box;
10
- width: vmin(72);
11
- height: vmin(72);
12
- text-align: center;
13
- padding: 0;
14
- position: relative;
15
- display: flex;
16
- flex-direction: column;
17
- align-items: center;
18
- font-size: vmin(16);
19
- height: 100%;
20
- border-radius: vmin(16);
21
- margin: 0 vmin(32) vmin(24) 0;
22
- pointer-events: auto;
23
- .task-icon {
24
- flex-shrink: 0;
25
- display: block;
26
- width: vmin(64);
27
- height: vmin(64);
28
- background-image: url('https://commonresource-1252524126.cdn.xiaoeknow.com/image/lopok62p0l77.png');
29
- background-size: 100% 100%;
30
- }
31
- .task-text {
32
- width: vmin(64);
33
- height: vmin(24);
34
- line-height: vmin(24);
35
- border-radius: vmin(12);
36
- font-size: vmin(16);
37
- background: rgba($color: #000000, $alpha: 0.4);
38
- color: #fff;
39
- }
40
- &.verticalStyle{
41
- margin: 0;
42
- background: rgba($color: #000000, $alpha: 0.2);
43
- .task-text{
44
- position: absolute;
45
- bottom: vmin(-2);
46
- }
47
- }
48
- }
49
-
50
- .taskIcon {
51
- @include taskIcon;
52
- }
53
-
54
- // 竖屏pad
55
- @media screen and (min-width: 768px) and (orientation: portrait) {
56
- $deviceWidth: 1536 !global;
57
-
58
- .taskIcon {
59
- @include taskIcon;
60
- }
61
- }
62
-
63
- // 横屏pad
64
- @media screen and (min-height: 768px) and (orientation: landscape) {
65
- $deviceWidth: 1536 !global;
66
-
67
- .taskIcon {
68
- @include taskIcon;
69
- }
70
- }
1
+ @function vmin($rpx) {
2
+ @return #{$rpx * 100 / $deviceWidth}vmin;
3
+ }
4
+
5
+ $deviceWidth: 750;
6
+
7
+ @mixin taskIcon {
8
+ z-index: 9;
9
+ box-sizing: border-box;
10
+ width: vmin(72);
11
+ height: vmin(72);
12
+ text-align: center;
13
+ padding: 0;
14
+ position: relative;
15
+ display: flex;
16
+ flex-direction: column;
17
+ align-items: center;
18
+ font-size: vmin(16);
19
+ height: 100%;
20
+ border-radius: vmin(16);
21
+ margin: 0 vmin(32) vmin(24) 0;
22
+ pointer-events: auto;
23
+ .task-icon {
24
+ flex-shrink: 0;
25
+ display: block;
26
+ width: vmin(64);
27
+ height: vmin(64);
28
+ background-image: url('https://commonresource-1252524126.cdn.xiaoeknow.com/image/lopok62p0l77.png');
29
+ background-size: 100% 100%;
30
+ }
31
+ .task-text {
32
+ width: vmin(64);
33
+ height: vmin(24);
34
+ line-height: vmin(24);
35
+ border-radius: vmin(12);
36
+ font-size: vmin(16);
37
+ background: rgba($color: #000000, $alpha: 0.4);
38
+ color: #fff;
39
+ }
40
+ &.verticalStyle{
41
+ margin: 0;
42
+ background: rgba($color: #000000, $alpha: 0.2);
43
+ .task-text{
44
+ position: absolute;
45
+ bottom: vmin(-2);
46
+ }
47
+ }
48
+ }
49
+
50
+ .taskIcon {
51
+ @include taskIcon;
52
+ }
53
+
54
+ // 竖屏pad
55
+ @media screen and (min-width: 768px) and (orientation: portrait) {
56
+ $deviceWidth: 1536 !global;
57
+
58
+ .taskIcon {
59
+ @include taskIcon;
60
+ }
61
+ }
62
+
63
+ // 横屏pad
64
+ @media screen and (min-height: 768px) and (orientation: landscape) {
65
+ $deviceWidth: 1536 !global;
66
+
67
+ .taskIcon {
68
+ @include taskIcon;
69
+ }
70
+ }
@@ -1,5 +1,5 @@
1
- <view class="taskIcon {{aliveMode === 1? 'verticalStyle' : ''}}" catch:tap="iconClick">
2
- <view class="task-icon" />
3
- <view class="task-text">{{iconText}}</view>
4
- </view>
5
-
1
+ <view class="taskIcon {{aliveMode === 1? 'verticalStyle' : ''}}" catch:tap="iconClick">
2
+ <view class="task-icon" />
3
+ <view class="task-text">{{iconText}}</view>
4
+ </view>
5
+