xiaoe_mp_npm 1.0.21 → 1.0.22-store2

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 (165) hide show
  1. package/.prettierrc.js +32 -6
  2. package/miniprogram_dist/GoodsItem/index.json +6 -6
  3. package/miniprogram_dist/GoodsItem/index.wxs +18 -18
  4. package/miniprogram_dist/LiveGoodsList/Header/index.js +54 -54
  5. package/miniprogram_dist/LiveGoodsList/Header/index.json +6 -6
  6. package/miniprogram_dist/LiveGoodsList/Header/index.less +45 -45
  7. package/miniprogram_dist/LiveGoodsList/Header/index.scss +105 -105
  8. package/miniprogram_dist/LiveGoodsList/Header/index.wxml +32 -32
  9. package/miniprogram_dist/LiveGoodsList/README.md +9 -9
  10. package/miniprogram_dist/LiveGoodsList/index.json +8 -8
  11. package/miniprogram_dist/LiveGoodsList/index.less +53 -53
  12. package/miniprogram_dist/LiveGoodsList/index.scss +92 -92
  13. package/miniprogram_dist/Task/TaskBubble/index.js +2 -1
  14. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.js +23 -21
  15. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.wxml +1 -0
  16. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.js +264 -169
  17. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.scss +26 -0
  18. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxml +32 -13
  19. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxss +96 -0
  20. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.js +8 -0
  21. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.wxml +1 -0
  22. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.js +4 -0
  23. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.wxml +1 -0
  24. package/miniprogram_dist/Task/TaskPopup/index.js +76 -70
  25. package/miniprogram_dist/Task/TaskPopup/index.json +2 -2
  26. package/miniprogram_dist/Task/TaskPopup/index.wxml +2 -0
  27. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.js +132 -0
  28. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.json +6 -0
  29. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.scss +192 -0
  30. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxml +65 -0
  31. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxs +79 -0
  32. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxss +521 -0
  33. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.js +40 -0
  34. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.json +6 -0
  35. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.scss +7 -0
  36. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.wxml +2 -0
  37. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.wxss +298 -0
  38. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/base.wxml +50 -0
  39. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/html2json.js +623 -0
  40. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/htmlparser.js +183 -0
  41. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/iframeParse.js +216 -0
  42. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/loop.wxml +3563 -0
  43. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/showdown.js +2364 -0
  44. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxDiscode.js +209 -0
  45. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.js +269 -0
  46. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.wxml +1276 -0
  47. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.wxss +316 -0
  48. package/miniprogram_dist/Task/TaskQuizPopup/index.js +225 -0
  49. package/miniprogram_dist/Task/TaskQuizPopup/index.json +8 -0
  50. package/miniprogram_dist/Task/TaskQuizPopup/index.scss +159 -0
  51. package/miniprogram_dist/Task/TaskQuizPopup/index.wxml +97 -0
  52. package/miniprogram_dist/Task/TaskQuizPopup/index.wxss +478 -0
  53. package/miniprogram_dist/Task/taskQuizRemindPopup/index.js +74 -0
  54. package/miniprogram_dist/Task/taskQuizRemindPopup/index.json +6 -0
  55. package/miniprogram_dist/Task/taskQuizRemindPopup/index.scss +108 -0
  56. package/miniprogram_dist/Task/taskQuizRemindPopup/index.wxml +27 -0
  57. package/miniprogram_dist/Task/taskQuizRemindPopup/index.wxss +286 -0
  58. package/miniprogram_dist/common/utils/tool.js +54 -48
  59. package/package.json +1 -1
  60. package/src/AliveInvite/LiveRoomVertical/index.wxss +252 -252
  61. package/src/CollectionAddress/index.wxss +5 -5
  62. package/src/ConfirmOrder/components/AddressEdit/index.wxss +120 -120
  63. package/src/ConfirmOrder/components/AddressManage/index.wxss +98 -98
  64. package/src/ConfirmOrder/components/AddressSelect/index.wxss +67 -67
  65. package/src/ConfirmOrder/components/ChoosePicker/index.wxss +18 -18
  66. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityGiftList/index.wxss +45 -45
  67. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/index.wxss +100 -100
  68. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/index.wxss +55 -55
  69. package/src/ConfirmOrder/components/GoodsInfo/components/ImageData/index.wxss +13 -13
  70. package/src/ConfirmOrder/components/Header/index.wxss +26 -26
  71. package/src/ConfirmOrder/components/IntegralSelect/componenets/integralTips/index.wxss +85 -85
  72. package/src/ConfirmOrder/components/Invoice/components/InvoiceSelect/index.wxss +155 -155
  73. package/src/ConfirmOrder/components/Invoice/components/InvoiceTip/index.wxss +51 -51
  74. package/src/ConfirmOrder/components/ModeSelect/index.wxss +44 -44
  75. package/src/ConfirmOrder/components/PickupSelect/index.wxss +22 -22
  76. package/src/ConfirmOrder/components/SelectSite/index.wxss +82 -82
  77. package/src/ConfirmOrder/components/Shipper/index.wxss +76 -76
  78. package/src/ConfirmOrder/components/ShipperEdit/index.wxss +78 -78
  79. package/src/ConfirmOrder/components/WechatAddress/index.wxss +22 -22
  80. package/src/ConfirmOrder/index.wxss +5 -5
  81. package/src/CouponList/couponMsg/index.wxss +3 -3
  82. package/src/CustomPopup/index.wxss +22 -22
  83. package/src/GoodsItem/index.json +6 -6
  84. package/src/GoodsItem/index.wxs +18 -18
  85. package/src/LiveGoodsList/Header/index.js +54 -54
  86. package/src/LiveGoodsList/Header/index.json +6 -6
  87. package/src/LiveGoodsList/Header/index.less +45 -45
  88. package/src/LiveGoodsList/Header/index.scss +105 -105
  89. package/src/LiveGoodsList/Header/index.wxml +32 -32
  90. package/src/LiveGoodsList/README.md +9 -9
  91. package/src/LiveGoodsList/index.json +8 -8
  92. package/src/LiveGoodsList/index.less +53 -53
  93. package/src/LiveGoodsList/index.scss +92 -92
  94. package/src/LiveGoodsList/index.wxss +218 -218
  95. package/src/PayComplete/Components/CouponItem/index.wxss +122 -122
  96. package/src/PayComplete/Components/Header/index.wxss +27 -27
  97. package/src/PayComplete/Components/LeadGroup/index.wxss +33 -33
  98. package/src/PayComplete/Components/PayGifts/index.wxss +157 -157
  99. package/src/PayComplete/Components/PayState/earnIntegral/index.wxss +23 -23
  100. package/src/PayComplete/Components/PayState/index.wxss +20 -20
  101. package/src/PayComplete/index.wxss +27 -27
  102. package/src/PayModule/wechatLoading/index.wxss +57 -57
  103. package/src/Recommend/index.wxss +110 -110
  104. package/src/Sku/Header/index.wxss +27 -27
  105. package/src/Sku/goods-info/index.wxss +52 -52
  106. package/src/Sku/index/index.wxss +52 -52
  107. package/src/Sku/row-item/index.wxss +50 -50
  108. package/src/Sku/step/index.wxss +11 -11
  109. package/src/Task/TaskBubble/index.js +2 -1
  110. package/src/Task/TaskBubble/index.wxss +289 -289
  111. package/src/Task/TaskIcon/index.wxss +130 -130
  112. package/src/Task/TaskPopup/component/RewardList/index.js +23 -21
  113. package/src/Task/TaskPopup/component/RewardList/index.wxml +1 -0
  114. package/src/Task/TaskPopup/component/RewardList/index.wxss +18 -18
  115. package/src/Task/TaskPopup/component/TaskItem/index.js +264 -169
  116. package/src/Task/TaskPopup/component/TaskItem/index.scss +26 -0
  117. package/src/Task/TaskPopup/component/TaskItem/index.wxml +32 -13
  118. package/src/Task/TaskPopup/component/TaskItem/index.wxss +1 -394
  119. package/src/Task/TaskPopup/component/TaskList/index.js +8 -0
  120. package/src/Task/TaskPopup/component/TaskList/index.wxml +1 -0
  121. package/src/Task/TaskPopup/component/TaskList/index.wxss +118 -118
  122. package/src/Task/TaskPopup/component/TaskType/index.js +4 -0
  123. package/src/Task/TaskPopup/component/TaskType/index.wxml +1 -0
  124. package/src/Task/TaskPopup/component/TaskType/index.wxss +110 -110
  125. package/src/Task/TaskPopup/index.js +76 -70
  126. package/src/Task/TaskPopup/index.json +2 -2
  127. package/src/Task/TaskPopup/index.wxml +2 -0
  128. package/src/Task/TaskPopup/index.wxss +406 -406
  129. package/src/Task/TaskQuizPopup/components/quizContent/index.js +132 -0
  130. package/src/Task/TaskQuizPopup/components/quizContent/index.json +6 -0
  131. package/src/Task/TaskQuizPopup/components/quizContent/index.scss +192 -0
  132. package/src/Task/TaskQuizPopup/components/quizContent/index.wxml +65 -0
  133. package/src/Task/TaskQuizPopup/components/quizContent/index.wxs +79 -0
  134. package/src/Task/TaskQuizPopup/components/quizContent/index.wxss +1 -0
  135. package/src/Task/TaskQuizPopup/components/quizRichText/index.js +40 -0
  136. package/src/Task/TaskQuizPopup/components/quizRichText/index.json +6 -0
  137. package/src/Task/TaskQuizPopup/components/quizRichText/index.scss +7 -0
  138. package/src/Task/TaskQuizPopup/components/quizRichText/index.wxml +2 -0
  139. package/src/Task/TaskQuizPopup/components/quizRichText/index.wxss +1 -0
  140. package/src/Task/TaskQuizPopup/components/wxParse/base.wxml +50 -0
  141. package/src/Task/TaskQuizPopup/components/wxParse/html2json.js +623 -0
  142. package/src/Task/TaskQuizPopup/components/wxParse/htmlparser.js +183 -0
  143. package/src/Task/TaskQuizPopup/components/wxParse/iframeParse.js +216 -0
  144. package/src/Task/TaskQuizPopup/components/wxParse/loop.wxml +3563 -0
  145. package/src/Task/TaskQuizPopup/components/wxParse/showdown.js +2364 -0
  146. package/src/Task/TaskQuizPopup/components/wxParse/wxDiscode.js +209 -0
  147. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.js +269 -0
  148. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.wxml +1276 -0
  149. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.wxss +283 -0
  150. package/src/Task/TaskQuizPopup/index.js +225 -0
  151. package/src/Task/TaskQuizPopup/index.json +8 -0
  152. package/src/Task/TaskQuizPopup/index.scss +159 -0
  153. package/src/Task/TaskQuizPopup/index.wxml +97 -0
  154. package/src/Task/TaskQuizPopup/index.wxss +1 -0
  155. package/src/Task/taskQuizRemindPopup/index.js +74 -0
  156. package/src/Task/taskQuizRemindPopup/index.json +6 -0
  157. package/src/Task/taskQuizRemindPopup/index.scss +108 -0
  158. package/src/Task/taskQuizRemindPopup/index.wxml +27 -0
  159. package/src/Task/taskQuizRemindPopup/index.wxss +1 -0
  160. package/src/Task/taskReceivePopup/customPrizes/index.wxss +220 -220
  161. package/src/Task/taskReceivePopup/index.wxss +1 -1
  162. package/src/Task/taskReceivePopup/integral/index.wxss +94 -94
  163. package/src/common/css/theme.wxss +16 -16
  164. package/src/common/utils/tool.js +54 -48
  165. package/src/miniprogram_npm/miniprogram-computed/index.js +1 -0
@@ -1,304 +1,399 @@
1
1
  const computedBehavior = require('miniprogram-computed').behavior
2
2
 
3
3
  const getHoursMinutes = (minutes) => {
4
- const hours = Math.floor(minutes / 60);
5
- const remainingMinutes = minutes % 60;
6
- return `${hours>0?hours+'小时':''}${remainingMinutes>0?remainingMinutes+'分钟':''}`
4
+ const hours = Math.floor(minutes / 60)
5
+ const remainingMinutes = minutes % 60
6
+ return `${hours > 0 ? hours + '小时' : ''}${remainingMinutes > 0 ? remainingMinutes + '分钟' : ''}`
7
7
  }
8
8
 
9
9
  const task_config = {
10
- 1:{
11
- 1:{
10
+ 1: {
11
+ 1: {
12
12
  taskBelongType: 1,
13
- taskBtnText: "去观看",
14
- event: "view"
15
- }
13
+ taskBtnText: '去观看',
14
+ event: 'view',
15
+ },
16
16
  },
17
- 2:{
18
- 1:{
17
+ 2: {
18
+ 1: {
19
19
  taskBelongType: 2,
20
- taskBtnText: "去评论",
21
- handle: "toComment",
22
- event: "input"
20
+ taskBtnText: '去评论',
21
+ handle: 'toComment',
22
+ event: 'input',
23
23
  },
24
- 2:{
24
+ 2: {
25
25
  taskBelongType: 3,
26
- taskBtnText: "去转发",
27
- handle: "toShare",
28
- event: "share"
26
+ taskBtnText: '去转发',
27
+ handle: 'toShare',
28
+ event: 'share',
29
29
  },
30
- 3:{
30
+ 3: {
31
31
  taskBelongType: 4,
32
- taskBtnText: "去点赞",
33
- event: "like"
32
+ taskBtnText: '去点赞',
33
+ event: 'like',
34
34
  },
35
35
  },
36
- 3:{
37
- 4:{
36
+ 3: {
37
+ 4: {
38
38
  taskBelongType: 5,
39
- taskBtnText: "去下单",
40
- handle: "toGoods",
41
- event: "order"
39
+ taskBtnText: '去下单',
40
+ handle: 'toGoods',
41
+ event: 'order',
42
42
  },
43
- 5:{
43
+ 5: {
44
44
  taskBelongType: 6,
45
- taskBtnText: "去消费",
46
- handle: "toGoods",
47
- event: "consumption"
48
- }
45
+ taskBtnText: '去消费',
46
+ handle: 'toGoods',
47
+ event: 'consumption',
48
+ },
49
49
  },
50
- 4:{
51
- 6:{
50
+ 4: {
51
+ 6: {
52
52
  taskBelongType: 7,
53
- taskBtnText: "去打赏",
54
- handle: "toGive",
55
- event: "give"
53
+ taskBtnText: '去打赏',
54
+ handle: 'toGive',
55
+ event: 'give',
56
56
  },
57
- 7:{
57
+ 7: {
58
58
  taskBelongType: 8,
59
- taskBtnText: "去投票",
60
- event: "vote"
59
+ taskBtnText: '去投票',
60
+ event: 'vote',
61
61
  },
62
- 8:{
62
+ 8: {
63
63
  taskBelongType: 9,
64
- taskBtnText: "去完成",
65
- event: "questionnaire"
64
+ taskBtnText: '去完成',
65
+ event: 'questionnaire',
66
66
  },
67
- 9:{
67
+ 9: {
68
68
  taskBelongType: 10,
69
- taskBtnText: "去签到",
70
- handle: "toSign",
71
- event: "sign"
72
- }
73
- }
69
+ taskBtnText: '去签到',
70
+ handle: 'toSign',
71
+ event: 'sign',
72
+ },
73
+ 10: {
74
+ taskBelongType: 11,
75
+ taskBtnText: '去答题',
76
+ handle: 'toQuiz',
77
+ event: 'quiz',
78
+ },
79
+ },
74
80
  }
75
81
 
76
82
  const list_type_config = {
77
- "reward": {
78
- btnText: "去使用",
79
- btnClick: "reward"
83
+ reward: {
84
+ btnText: '去使用',
85
+ btnClick: 'reward',
86
+ },
87
+ error: {
88
+ btnText: '领奖励',
89
+ btnClick: 'toRetry',
80
90
  },
81
- "error": {
82
- btnText: "领奖励",
83
- btnClick: "toRetry"
84
- }
85
91
  }
86
92
 
87
93
  // 奖励icon配置
88
94
  const reward_config = {
89
95
  1: {
90
- label: "积分",
91
- icon: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltrgz5y1064s.png"
96
+ label: '积分',
97
+ icon: 'https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltrgz5y1064s.png',
92
98
  },
93
99
  2: {
94
- label: "优惠券",
95
- icon: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltrgz5y00wfn.png"
100
+ label: '优惠券',
101
+ icon: 'https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltrgz5y00wfn.png',
96
102
  },
97
103
  3: {
98
- label: "红包",
99
- icon: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltrgz5xy0i8g.png"
104
+ label: '红包',
105
+ icon: 'https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltrgz5xy0i8g.png',
100
106
  },
101
107
  4: {
102
- label: "课程",
103
- icon: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltrgz5xu04is.png"
108
+ label: '课程',
109
+ icon: 'https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltrgz5xu04is.png',
104
110
  },
105
111
  5: {
106
- label: "奖品",
107
- icon: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltrgz5xz08pf.png"
108
- }
112
+ label: '奖品',
113
+ icon: 'https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltrgz5xz08pf.png',
114
+ },
109
115
  }
110
116
 
111
117
  Component({
112
118
  behaviors: [computedBehavior],
113
119
  properties: {
114
- taskItem:{
120
+ // 任务详情数据
121
+ // id 直播间任务ID
122
+ // is_show_answer c端是否展示答案解析,0不展示,1展示
123
+ // task_type 任务类型:1=观看任务,2=互动任务,3=消费任务,4=活跃任务
124
+ // task_condition 直播任务条件:观看任务时填写具体分钟值,互动任务时:1-评论 2-分享 3-点赞,消费任务时:4-下单笔数 5-消费金额,活跃任务时:6-打赏 7-投票 8-问卷 9-签到 10-答题任务
125
+ // state 任务状态:1-正常,2-已停止
126
+ // reward_type 奖励类型:1=积分,2=优惠券,3=红包,4=课程/商品,5=自定义奖品
127
+ // reward_frequency 满足奖励所需频次,消费任务时:满足多少笔、或多少金额 ;答题任务时,答对多少题
128
+ // finish_frequency 已经完成奖励频次,消费任务时:满足多少笔、多少金额单位分
129
+ // reward_value 奖励值:积分数值、优惠券码、红包、商品、自定义奖品等。如果奖品存在多个字段,存储成json格式)
130
+ // start_at 任务开始时间
131
+ // end_at任务结束时间
132
+ // join_state 参与状态:0=未参与,1=参与中,2=已完成
133
+ // reward_state 奖励状态:1-待发放,2-发放成功,3-发放失败
134
+ // qs_is_pass 答题任务时,true-满足条件,false-不满足条件
135
+ taskItem: {
115
136
  type: Object,
116
- value:()=>{
137
+ value: () => {
117
138
  return {}
118
- }
139
+ },
119
140
  },
120
- isRadius:{
121
- type:Boolean,
122
- value: false
141
+ isRadius: {
142
+ type: Boolean,
143
+ value: false,
123
144
  },
124
- listType:{
125
- type:String,
126
- value: "task"
145
+ listType: {
146
+ type: String,
147
+ value: 'task',
127
148
  },
128
- itemIndex:{
149
+ itemIndex: {
129
150
  type: Number,
130
- value: 0
151
+ value: 0,
131
152
  },
132
- isMb:{
153
+ isMb: {
133
154
  type: Boolean,
134
- value: false
155
+ value: false,
135
156
  },
136
- viewingInProgress:{
157
+ viewingInProgress: {
137
158
  type: Array,
138
- value:()=>{
159
+ value: () => {
139
160
  return []
140
- }
141
- }
161
+ },
162
+ },
163
+ teamId: {
164
+ type: String,
165
+ value: '',
166
+ },
142
167
  },
143
168
  data: {
144
- activeNames:["1"],
169
+ activeNames: ['1'],
145
170
  taskBelongType: null, // 任务类型归属 1-观看 2-评论 3-转发 4-点赞
146
171
  },
147
- watch:{
148
- taskItem:function(newVal){
172
+ watch: {
173
+ taskItem: function (newVal) {
149
174
  const { task_type, task_condition } = newVal
150
- const { taskBelongType } = this.getTaskConfig(task_type,task_condition)
175
+ const { taskBelongType } = this.getTaskConfig(task_type, task_condition)
151
176
  this.setData({
152
- taskBelongType
177
+ taskBelongType,
153
178
  })
154
- }
179
+ },
155
180
  },
156
- computed:{
181
+ computed: {
182
+ // 是否展示奖励
183
+ isShowReward(data) {
184
+ const { listType, taskItem, isQuizTask } = data
185
+ // 答题任务&&已参与&&没满足条件,即已提交(没成功获取奖励情况),需要隐藏奖励
186
+ if (isQuizTask && taskItem.join_state === 2 && !taskItem.qs_is_pass) {
187
+ return false
188
+ }
189
+ return listType === 'task' || listType === 'error'
190
+ },
191
+ // 是否是答题任务
192
+ isQuizTask(data) {
193
+ const { taskItem } = data
194
+ return taskItem.task_type === 4 && taskItem.task_condition === '10'
195
+ },
196
+ // 未完成及已提交状态
197
+ getFailStatus(data) {
198
+ const { taskItem, isQuizTask } = data
199
+ return (
200
+ (isQuizTask && taskItem.join_state === 2 && !taskItem.qs_is_pass) ||
201
+ (taskItem.join_state === 0 && taskItem.state === 2)
202
+ )
203
+ },
204
+ // 展示答题任务中,说明模块, 答题任务&&(任务结束||参与了)&&(任务结束&&没参与————这个有单独的提示)
205
+ showAnswerTaskIntroduce(data) {
206
+ const { taskItem, isQuizTask } = data
207
+ return (
208
+ isQuizTask &&
209
+ (taskItem.state === 2 || taskItem.join_state === 2) &&
210
+ !(taskItem.state === 2 && taskItem.join_state === 0)
211
+ )
212
+ },
157
213
  // 任务标题
158
- taskTitle(data){
159
- let title = ""
214
+ taskTitle(data) {
215
+ let title = ''
160
216
  const { task_condition, reward_frequency } = data.taskItem
161
- switch(data.taskBelongType){
217
+ switch (data.taskBelongType) {
162
218
  case 1:
163
219
  title = `观看时长${getHoursMinutes(task_condition)}`
164
- break;
220
+ break
165
221
  case 2:
166
- title = "评论1次"
167
- break;
222
+ title = '评论1次'
223
+ break
168
224
  case 3:
169
- title = "转发1次"
170
- break;
225
+ title = '转发1次'
226
+ break
171
227
  case 4:
172
- title = "点赞1次"
173
- break;
228
+ title = '点赞1次'
229
+ break
174
230
  case 5:
175
231
  title = `成功消费 ${reward_frequency} 笔订单数`
176
- break;
232
+ break
177
233
  case 6:
178
- title = `成功消费 ${(reward_frequency/100).toFixed(2)} 元`
179
- break;
234
+ title = `成功消费 ${(reward_frequency / 100).toFixed(2)} 元`
235
+ break
180
236
  case 7:
181
237
  title = `完成打赏`
182
- break;
238
+ break
183
239
  case 8:
184
240
  title = `完成投票`
185
- break;
241
+ break
186
242
  case 9:
187
243
  title = `完成问卷`
188
- break;
244
+ break
189
245
  case 10:
190
246
  title = `完成签到`
191
- break;
247
+ break
248
+ case 11:
249
+ title = `完成答题,并答对${reward_frequency}题`
250
+ break
192
251
  }
193
252
  return title
194
253
  },
195
254
 
196
255
  // 任务按钮
197
- btnText(data){
198
- if(data.listType !== 'task'){
256
+ btnText(data) {
257
+ if (data.listType !== 'task') {
199
258
  return list_type_config[data.listType]?.btnText
200
- }else{
259
+ } else {
201
260
  // 正常任务列表
202
- const {join_state, state, task_type, task_condition} = data.taskItem
203
- if(join_state === 2) return "已完成"
204
- if(state === 2) return "已结束"
205
- if(join_state === 0) return "未开始"
206
- return task_config[task_type][task_type===1?1:task_condition]?.taskBtnText || "去参与"
207
- }
261
+ const { join_state, state, task_type, task_condition, qs_is_pass } = data.taskItem
262
+ // 答题任务&&已参与&&没满足条件
263
+ if (data.isQuizTask && join_state === 2 && !qs_is_pass) {
264
+ //已提交
265
+ return '已提交'
266
+ }
267
+ if (join_state === 2) return '已完成'
268
+ if (state === 2) return '未完成'
269
+ if (join_state === 0) return '未开始'
270
+ return task_config[task_type][task_type === 1 ? 1 : task_condition]?.taskBtnText || '去参与'
271
+ }
208
272
  },
209
273
 
210
274
  // 奖励内容
211
- rewardText(data){
212
- const { reward_type, reward_value } = data.taskItem
213
- const onlyOneType = [2,4,5]
214
- if(onlyOneType.includes(reward_type)){
275
+ rewardText(data) {
276
+ const { reward_type, reward_value, reward_pay_type, team_pay_config } = data.taskItem
277
+ const onlyOneType = [2, 4, 5]
278
+ if (onlyOneType.includes(reward_type)) {
215
279
  return `+1 ${reward_config[reward_type]?.label}`
216
- }else if(reward_type === 3){
217
- return `+${(reward_value.money/100).toFixed(2)} ${reward_config[reward_type]?.label}`
218
- }else{
280
+ } else if (reward_type === 3) {
281
+ if (reward_pay_type === 0) {
282
+ return `+${(reward_value.money / 100).toFixed(2)} ${reward_config[reward_type]?.label}`
283
+ } else if (reward_pay_type === 10 && team_pay_config) {
284
+ const storeList = JSON.parse(team_pay_config)
285
+ const storeItem = storeList.find((item) => item.team_id === data.teamId)
286
+ if (storeItem) return `+${(storeItem.money / 100).toFixed(2)} ${reward_config[reward_type]?.label}`
287
+ }
288
+ } else {
219
289
  return `+${reward_value} ${reward_config[reward_type]?.label}`
220
290
  }
221
291
  },
222
-
292
+
223
293
  // 奖励图标
224
- rewardIcon(data){
294
+ rewardIcon(data) {
225
295
  const { reward_type } = data.taskItem
226
296
  return reward_config[reward_type]?.icon
227
297
  },
228
298
 
229
299
  // 任务完成剩余条件
230
- residueCondition(data){
300
+ residueCondition(data) {
231
301
  const { join_state, state, task_type, task_condition, reward_value, reward_type, id } = data.taskItem
232
- if(join_state!==1 || state ===2) return ""
233
-
234
- if(task_type === 1){
302
+ if (join_state !== 1 || state === 2) return ''
303
+
304
+ if (task_type === 1) {
235
305
  // 观看任务
236
- if(data.viewingInProgress.length){
237
- const { residue_time } = data.viewingInProgress.find(item => item.id === id)
238
- return residue_time && residue_time > 60 ? '再观看 '+ Math.floor(residue_time / 60) + '分钟 '+ '获得奖励':'即将获得奖励'
239
- }
240
- }else if(task_type === 3 && task_condition === "4"){
306
+ if (data.viewingInProgress.length) {
307
+ const { residue_time } = data.viewingInProgress.find((item) => item.id === id)
308
+ return residue_time && residue_time > 60
309
+ ? '再观看 ' + Math.floor(residue_time / 60) + '分钟 ' + '获得奖励'
310
+ : '即将获得奖励'
311
+ }
312
+ } else if (task_type === 3 && task_condition === '4') {
241
313
  // 下单笔数
242
314
  const { reward_frequency, finish_frequency } = data.taskItem
243
- return reward_frequency && finish_frequency ? `再下${reward_frequency - finish_frequency}单 获得奖励`:''
244
- }else if(task_type === 3 && task_condition === "5"){
315
+ return reward_frequency && finish_frequency ? `再下${reward_frequency - finish_frequency}单 获得奖励` : ''
316
+ } else if (task_type === 3 && task_condition === '5') {
245
317
  // 消费金额
246
- const { reward_frequency, finish_frequency } = data.taskItem
247
- return reward_frequency && finish_frequency ? `再消费${((reward_frequency - finish_frequency)/100).toFixed(2)}元 获得奖励`:''
248
- }else{
249
- return ""
318
+ const { reward_frequency, finish_frequency } = data.taskItem
319
+ return reward_frequency && finish_frequency
320
+ ? `再消费${((reward_frequency - finish_frequency) / 100).toFixed(2)}元 获得奖励`
321
+ : ''
322
+ } else {
323
+ return ''
250
324
  }
251
325
  },
252
326
 
253
- // 红包奖励剩余个数
254
- redEnvelopeNum(data){
255
- const { join_state, state, reward_value, reward_type } = data.taskItem
256
- if(join_state!==1 || state ===2 || reward_type !==3) return ""
257
- return reward_value.remain_nums ? `领取名额还剩 ${reward_value.remain_nums}个` : '领取名额还剩 0个,无法领取'
258
- }
327
+ // 红包奖励剩余个数
328
+ redEnvelopeNum(data) {
329
+ const { join_state, state, reward_value, reward_type, reward_pay_type, team_pay_config } = data.taskItem
330
+ if (join_state !== 1 || state === 2 || reward_type !== 3 || (join_state === 0 && state === 2)) {
331
+ return ''
332
+ }
333
+
334
+ if (reward_pay_type === 0) {
335
+ return reward_value.remain_nums ? `领取名额还剩 ${reward_value.remain_nums}个` : '领取名额还剩 0个,无法领取'
336
+ } else if (reward_pay_type === 10 && team_pay_config) {
337
+ const storeList = JSON.parse(team_pay_config)
338
+ const storeItem = storeList.find((item) => item.team_id === data.teamId)
339
+ if (storeItem) {
340
+ return storeItem.limit_person ? `领取名额还剩 ${storeItem.limit_person}个` : '领取名额还剩 0个,无法领取'
341
+ } else {
342
+ return ''
343
+ }
344
+ } else {
345
+ return ''
346
+ }
347
+ },
259
348
  },
260
349
  lifetimes: {
261
350
  // 生命周期函数,可以为函数,或一个在methods段中定义的方法名
262
- attached: function () {
263
-
264
- },
265
- moved: function () { },
266
- detached: function () { },
351
+ attached: function () {},
352
+ moved: function () {},
353
+ detached: function () {},
267
354
  },
268
355
  methods: {
269
- getHoursMinutes(minutes){
270
- const hours = Math.floor(minutes / 60);
271
- const remainingMinutes = minutes % 60;
272
- return `${hours>0?hours+'小时':''}${remainingMinutes>0?remainingMinutes+'分钟':''}`
356
+ // 打开答题任务答案解析
357
+ handleAnswerAnalysis() {
358
+ this.triggerEvent('btnClick', {
359
+ type: 'quizAnalysis',
360
+ taskItem: this.data.taskItem,
361
+ })
362
+ },
363
+ getHoursMinutes(minutes) {
364
+ const hours = Math.floor(minutes / 60)
365
+ const remainingMinutes = minutes % 60
366
+ return `${hours > 0 ? hours + '小时' : ''}${remainingMinutes > 0 ? remainingMinutes + '分钟' : ''}`
273
367
  },
274
- btnClick(){
275
- console.log("data.viewingInProgress btnClick",this.properties.viewingInProgress)
368
+ btnClick() {
369
+ console.log('data.viewingInProgress btnClick', this.properties.viewingInProgress)
276
370
  const { reward_type, task_type, task_condition, reward_value, id } = this.data.taskItem
277
- if(this.data.listType === "task"){
278
- if(this.data.btnText === "已完成" || this.data.btnText === "已结束" || this.data.btnText === "未开始") return
371
+ if (this.data.listType === 'task') {
372
+ if (['已完成', '未开始', '未完成', '已提交'].includes(this.data.btnText)) return
279
373
  const { handle } = this.getTaskConfig(task_type, task_condition)
280
- if(handle){
281
- this.triggerEvent("btnClick", {
282
- type: handle
374
+ if (handle) {
375
+ this.triggerEvent('btnClick', {
376
+ type: handle,
377
+ taskItem: this.data.taskItem,
283
378
  })
284
- }else{
285
- this.triggerEvent("btnClick",{
286
- type: "closePopup"
379
+ } else {
380
+ this.triggerEvent('btnClick', {
381
+ type: 'closePopup',
287
382
  })
288
383
  }
289
- }else{
384
+ } else {
290
385
  const { event } = this.getTaskConfig(task_type, task_condition)
291
- this.triggerEvent("btnClick",{
386
+ this.triggerEvent('btnClick', {
292
387
  type: list_type_config[this.data.listType]?.btnClick,
293
388
  reward_type,
294
389
  taskBelongType: event,
295
390
  reward_value,
296
- id
391
+ id,
297
392
  })
298
393
  }
299
394
  },
300
- getTaskConfig(task_type,task_condition){
301
- if(task_type === 1) task_condition = 1
395
+ getTaskConfig(task_type, task_condition) {
396
+ if (task_type === 1) task_condition = 1
302
397
  return task_config[task_type][task_condition]
303
398
  },
304
399
  },
@@ -77,7 +77,28 @@ $deviceWidth: 750;
77
77
  margin-top: vmin(8);
78
78
  font-size: vmin(24);
79
79
  color: #FF5429;
80
+ font-family: "PingFang SC";
80
81
  line-height: vmin(32);
82
+ align-items: center;
83
+ .warning-text {
84
+ }
85
+ .finish-text {
86
+ display: inline-block;
87
+ color: #999999;
88
+ }
89
+ .show-answer {
90
+ display: inline-flex;
91
+ align-items: center;
92
+ margin-left: vmin(20);
93
+ font-style: normal;
94
+ font-weight: 400;
95
+ line-height: vmin(32);
96
+ .analysis-icon {
97
+ width: vmin(24);
98
+ height: vmin(24);
99
+ margin-left: -vmin(4);
100
+ }
101
+ }
81
102
  }
82
103
  }
83
104
 
@@ -104,6 +125,11 @@ $deviceWidth: 750;
104
125
  background: #F5F5F5;
105
126
  color: #B2B2B2;
106
127
  }
128
+ &.orange-btn{
129
+ color: #ffffff;
130
+ opacity: 0.4;
131
+ background: #ff5429;
132
+ }
107
133
  }
108
134
 
109
135
  }