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,8 +1,6 @@
1
1
  <wxs src="./index.wxs" module="filter" />
2
2
 
3
- <view
4
- class="item-box {{lineClass?'line-class':''}} {{listType === 'error' && itemIndex === 0?'bg-change':''}} {{isRadius?'radius':''}} {{isMb?'mb':''}}"
5
- >
3
+ <view class="item-box {{lineClass?'line-class':''}} {{listType === 'error' && itemIndex === 0?'bg-change':''}} {{isRadius?'radius':''}} {{isMb?'mb':''}}">
6
4
  <!-- 左侧任务详情 -->
7
5
  <view class="left">
8
6
  <!-- 任务标题 && 奖励 -->
@@ -12,17 +10,16 @@
12
10
  <view class="title" wx:if="{{listType === 'reward'}}">{{ rewardText }}</view>
13
11
 
14
12
  <!-- 奖励内容 -->
15
- <view class="reward" wx:if="{{listType === 'task' || listType === 'error'}}">
13
+ <view class="reward" wx:if="{{isShowReward}}">
16
14
  <image class="reward-img" src="{{rewardIcon}}" />
17
15
  <view class="reward-text">{{ rewardText }}</view>
18
16
  </view>
19
17
  </view>
20
18
 
21
19
  <!-- 任务时间 -->
22
- <view
23
- class="time"
24
- wx:if="{{listType === 'task' || listType === 'error'}}"
25
- >任务时间:{{taskItem.show_start_at}} 至 {{taskItem.show_end_at}}</view>
20
+ <view class="time" wx:if="{{listType === 'task' || listType === 'error'}}">
21
+ 任务时间:{{taskItem.show_start_at}} 至 {{taskItem.show_end_at}}
22
+ </view>
26
23
 
27
24
  <view class="time" wx:if="{{listType === 'reward'}}">获得方式:{{ taskTitle }}</view>
28
25
 
@@ -36,12 +33,34 @@
36
33
 
37
34
  <!-- 奖励发放异常提示 -->
38
35
  <view class="task-tip" wx:if="{{taskItem.is_show_reward_info}}">奖励发放中,请稍后查看</view>
39
- <view class="task-tip" wx:if="{{listType === 'task' && taskItem.reward_state === 3}}">奖品异常,无法领取,请联系商家处理</view>
36
+ <view class="task-tip" wx:if="{{listType === 'task' && taskItem.reward_state === 3 && taskItem.task_condition !== '10'}}">
37
+ 奖品异常,无法领取,请联系商家处理
38
+ </view>
39
+
40
+ <!-- 答题任务没完成的提示情况处理 -->
41
+ <view class="task-tip" wx:if="{{showAnswerTaskIntroduce}}">
42
+ <!-- 完成但不满足条件 -->
43
+ <text class="warning-text" wx:if="{{!taskItem.qs_is_pass}}">未达到获奖条件:答对 {{taskItem.reward_frequency}} 题</text>
44
+ <!-- 完成 -->
45
+ <text wx:else class="finish-text">已达到获奖条件:答对 {{taskItem.reward_frequency}} 题</text>
46
+ <!-- 查看解析按钮, 只有开启了解析查看才会显示 -->
47
+ <view
48
+ wx:if="{{taskItem.is_show_answer === 1}}"
49
+ class="show-answer"
50
+ catch:tap="handleAnswerAnalysis"
51
+ >
52
+ 查看解析
53
+ <image class="analysis-icon" src="https://commonresource-1252524126.cdn.xiaoeknow.com/image/lyqwwwi10xtb.svg" />
54
+ </view>
55
+ </view>
56
+
57
+ <!-- 超时没完成 -->
58
+ <view class="task-tip" wx:if="{{taskItem.join_state === 0 && taskItem.state === 2}}">已超时,未获得奖励</view>
40
59
  </view>
41
60
 
42
61
  <!-- 右侧按钮 -->
43
- <view
44
- 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':''}}"
45
- catch:tap="btnClick"
46
- >{{btnText}}</view>
62
+ <view 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'}} {{getFailStatus && 'orange-btn'}}" catch:tap="btnClick">
63
+ {{btnText}}
64
+ </view>
47
65
  </view>
66
+
@@ -71,8 +71,27 @@
71
71
  margin-top: 1.06667vmin;
72
72
  font-size: 3.2vmin;
73
73
  color: #FF5429;
74
+ font-family: "PingFang SC";
75
+ line-height: 4.26667vmin;
76
+ align-items: center;
77
+ }
78
+ .item-box .left .task-tip .finish-text {
79
+ display: inline-block;
80
+ color: #999999;
81
+ }
82
+ .item-box .left .task-tip .show-answer {
83
+ display: inline-flex;
84
+ align-items: center;
85
+ margin-left: 2.66667vmin;
86
+ font-style: normal;
87
+ font-weight: 400;
74
88
  line-height: 4.26667vmin;
75
89
  }
90
+ .item-box .left .task-tip .show-answer .analysis-icon {
91
+ width: 3.2vmin;
92
+ height: 3.2vmin;
93
+ margin-left: -vmin(4);
94
+ }
76
95
  .item-box .btn {
77
96
  width: 19.2vmin;
78
97
  height: 7.46667vmin;
@@ -95,6 +114,11 @@
95
114
  background: #F5F5F5;
96
115
  color: #B2B2B2;
97
116
  }
117
+ .item-box .btn.orange-btn {
118
+ color: #ffffff;
119
+ opacity: 0.4;
120
+ background: #ff5429;
121
+ }
98
122
  @media screen and (min-width: 768px) and (orientation: portrait) {
99
123
  .item-box {
100
124
  display: flex;
@@ -169,8 +193,27 @@
169
193
  margin-top: 0.52083vmin;
170
194
  font-size: 1.5625vmin;
171
195
  color: #FF5429;
196
+ font-family: "PingFang SC";
197
+ line-height: 2.08333vmin;
198
+ align-items: center;
199
+ }
200
+ .item-box .left .task-tip .finish-text {
201
+ display: inline-block;
202
+ color: #999999;
203
+ }
204
+ .item-box .left .task-tip .show-answer {
205
+ display: inline-flex;
206
+ align-items: center;
207
+ margin-left: 1.30208vmin;
208
+ font-style: normal;
209
+ font-weight: 400;
172
210
  line-height: 2.08333vmin;
173
211
  }
212
+ .item-box .left .task-tip .show-answer .analysis-icon {
213
+ width: 1.5625vmin;
214
+ height: 1.5625vmin;
215
+ margin-left: -vmin(4);
216
+ }
174
217
  .item-box .btn {
175
218
  width: 9.375vmin;
176
219
  height: 3.64583vmin;
@@ -193,6 +236,11 @@
193
236
  background: #F5F5F5;
194
237
  color: #B2B2B2;
195
238
  }
239
+ .item-box .btn.orange-btn {
240
+ color: #ffffff;
241
+ opacity: 0.4;
242
+ background: #ff5429;
243
+ }
196
244
  }
197
245
  @media screen and (min-height: 630px) and (orientation: landscape) {
198
246
  .item-box {
@@ -268,8 +316,27 @@
268
316
  margin-top: 0.63492vmin;
269
317
  font-size: 1.90476vmin;
270
318
  color: #FF5429;
319
+ font-family: "PingFang SC";
320
+ line-height: 2.53968vmin;
321
+ align-items: center;
322
+ }
323
+ .item-box .left .task-tip .finish-text {
324
+ display: inline-block;
325
+ color: #999999;
326
+ }
327
+ .item-box .left .task-tip .show-answer {
328
+ display: inline-flex;
329
+ align-items: center;
330
+ margin-left: 1.5873vmin;
331
+ font-style: normal;
332
+ font-weight: 400;
271
333
  line-height: 2.53968vmin;
272
334
  }
335
+ .item-box .left .task-tip .show-answer .analysis-icon {
336
+ width: 1.90476vmin;
337
+ height: 1.90476vmin;
338
+ margin-left: -vmin(4);
339
+ }
273
340
  .item-box .btn {
274
341
  width: 11.42857vmin;
275
342
  height: 4.44444vmin;
@@ -292,6 +359,11 @@
292
359
  background: #F5F5F5;
293
360
  color: #B2B2B2;
294
361
  }
362
+ .item-box .btn.orange-btn {
363
+ color: #ffffff;
364
+ opacity: 0.4;
365
+ background: #ff5429;
366
+ }
295
367
  }
296
368
  @media screen and (min-height: 768px) and (orientation: landscape) {
297
369
  .item-box {
@@ -367,8 +439,27 @@
367
439
  margin-top: 0.52083vmin;
368
440
  font-size: 1.5625vmin;
369
441
  color: #FF5429;
442
+ font-family: "PingFang SC";
443
+ line-height: 2.08333vmin;
444
+ align-items: center;
445
+ }
446
+ .item-box .left .task-tip .finish-text {
447
+ display: inline-block;
448
+ color: #999999;
449
+ }
450
+ .item-box .left .task-tip .show-answer {
451
+ display: inline-flex;
452
+ align-items: center;
453
+ margin-left: 1.30208vmin;
454
+ font-style: normal;
455
+ font-weight: 400;
370
456
  line-height: 2.08333vmin;
371
457
  }
458
+ .item-box .left .task-tip .show-answer .analysis-icon {
459
+ width: 1.5625vmin;
460
+ height: 1.5625vmin;
461
+ margin-left: -vmin(4);
462
+ }
372
463
  .item-box .btn {
373
464
  width: 9.375vmin;
374
465
  height: 3.64583vmin;
@@ -391,4 +482,9 @@
391
482
  background: #F5F5F5;
392
483
  color: #B2B2B2;
393
484
  }
485
+ .item-box .btn.orange-btn {
486
+ color: #ffffff;
487
+ opacity: 0.4;
488
+ background: #ff5429;
489
+ }
394
490
  }
@@ -47,6 +47,10 @@ const taskTypeConfig = {
47
47
  9:{
48
48
  title: "签到",
49
49
  icon: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltpfaylp019h.png"
50
+ },
51
+ 10:{
52
+ title: "答题",
53
+ icon: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lzl1plgd0mex.png"
50
54
  }
51
55
  }
52
56
  }
@@ -74,6 +78,10 @@ Component({
74
78
  value:()=>{
75
79
  return []
76
80
  }
81
+ },
82
+ teamId:{
83
+ type: String,
84
+ value: '',
77
85
  }
78
86
  },
79
87
  data: {
@@ -30,6 +30,7 @@
30
30
  wx:key="id"
31
31
  bind:btnClick="btnClick"
32
32
  viewingInProgress="{{viewingInProgress}}"
33
+ teamId="{{teamId}}"
33
34
  ></task-type>
34
35
 
35
36
  <!-- 空状态 -->
@@ -20,6 +20,10 @@ Component({
20
20
  value:()=>{
21
21
  return []
22
22
  }
23
+ },
24
+ teamId:{
25
+ type: String,
26
+ value: '',
23
27
  }
24
28
  },
25
29
  data: {
@@ -37,6 +37,7 @@
37
37
  taskItem="{{item}}"
38
38
  bind:btnClick="btnClick"
39
39
  viewingInProgress="{{viewingInProgress}}"
40
+ teamId="{{teamId}}"
40
41
  />
41
42
  </van-collapse-item>
42
43
  </van-collapse>
@@ -1,132 +1,138 @@
1
1
  const computedBehavior = require('miniprogram-computed').behavior
2
- import { rpxToVmin } from '../../common/utils/index.js'
2
+ import { rpxToVmin } from '../../npm-compoent/miniprogram_npm/xiaoe_mp_npm/common/utils/index.js'
3
3
  Component({
4
4
  options: {
5
5
  styleIsolation: 'shared',
6
6
  },
7
7
  behaviors: [computedBehavior],
8
8
  properties: {
9
- showPopup:{
9
+ showPopup: {
10
10
  type: Boolean,
11
- value: false
11
+ value: false,
12
12
  },
13
- taskList:{
14
- type:Array,
15
- value:()=>{
13
+ taskList: {
14
+ type: Array,
15
+ value: () => {
16
16
  return []
17
- }
17
+ },
18
18
  },
19
- errorList:{
20
- type:Array,
21
- value:()=>{
19
+ errorList: {
20
+ type: Array,
21
+ value: () => {
22
22
  return []
23
- }
23
+ },
24
24
  },
25
- rewardList:{
26
- type:Array,
27
- value:()=>{
25
+ rewardList: {
26
+ type: Array,
27
+ value: () => {
28
28
  return []
29
- }
29
+ },
30
30
  },
31
- hasRewardRecord:{
32
- type:Boolean,
33
- value: false
31
+ hasRewardRecord: {
32
+ type: Boolean,
33
+ value: false,
34
34
  },
35
35
  popPosition: {
36
36
  type: String,
37
- value: 'bottom'
37
+ value: 'bottom',
38
38
  },
39
- isShowClose:{
40
- type:Boolean,
41
- value: true
39
+ isShowClose: {
40
+ type: Boolean,
41
+ value: true,
42
42
  },
43
- rewardListRefreshStatus:{
44
- type:Boolean,
45
- value: false
43
+ rewardListRefreshStatus: {
44
+ type: Boolean,
45
+ value: false,
46
46
  },
47
- taskListRefreshStatus:{
48
- type:Boolean,
49
- value: false
47
+ taskListRefreshStatus: {
48
+ type: Boolean,
49
+ value: false,
50
50
  },
51
51
  orientation: {
52
52
  type: String,
53
- value: 'hor'
53
+ value: 'hor',
54
54
  },
55
55
  isFull: {
56
- type:Boolean,
57
- value: false
56
+ type: Boolean,
57
+ value: false,
58
58
  },
59
- viewingInProgress:{
60
- type:Array,
61
- value:()=>{
59
+ viewingInProgress: {
60
+ type: Array,
61
+ value: () => {
62
62
  return []
63
- }
63
+ },
64
+ },
65
+ teamId:{
66
+ type: String,
67
+ value: '',
64
68
  }
65
69
  },
66
70
  data: {
67
- isShowTaskList:true
71
+ isShowTaskList: true,
68
72
  },
69
73
  lifetimes: {
70
74
  // 生命周期函数,可以为函数,或一个在methods段中定义的方法名
71
- attached: function () {
72
-
73
- },
74
- moved: function () { },
75
- detached: function () { },
75
+ attached: function () {},
76
+ moved: function () {},
77
+ detached: function () {},
76
78
  },
77
79
  computed: {
78
80
  customStyle(properties) {
79
81
  const { popPosition, orientation } = properties
80
82
  const position = `position: ${orientation === 'ver' ? 'fixed' : 'absolute'}; left: 0; bottom: 0`
81
- return popPosition === "bottom" ? `${position}; width: ${orientation === 'ver' ? '100%' : ''}; height: calc(100% - ${rpxToVmin(422)});` : "height: 100%;width: 100vmin;"
82
- },
83
- popupContentBackground(data){
84
- if(data.isShowTaskList){
85
- return data.isFull ? 'background-image: url(https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltzgkkz00m0m.png)' : 'background-image: url(https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltqz384w02n9.png);'
86
- }else{
87
- return "background: #FFEFD7;"
83
+ return popPosition === 'bottom'
84
+ ? `${position}; width: ${orientation === 'ver' ? '100%' : ''}; height: calc(100% - ${rpxToVmin(422)});`
85
+ : 'height: 100%;width: 100vmin;'
86
+ },
87
+ popupContentBackground(data) {
88
+ if (data.isShowTaskList) {
89
+ return data.isFull
90
+ ? 'background-image: url(https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltzgkkz00m0m.png)'
91
+ : 'background-image: url(https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltqz384w02n9.png);'
92
+ } else {
93
+ return 'background: #FFEFD7;'
88
94
  }
89
- }
95
+ },
90
96
  },
91
97
  methods: {
92
- toReward(){
93
- if(!this.properties.hasRewardRecord){
98
+ toReward() {
99
+ if (!this.properties.hasRewardRecord) {
94
100
  wx.showToast({
95
- title: "还未完成任务,加油~",
96
- icon:"none"
101
+ title: '还未完成任务,加油~',
102
+ icon: 'none',
97
103
  })
98
104
  return
99
105
  }
100
- this.triggerEvent("toReward")
106
+ this.triggerEvent('toReward')
101
107
  this.setData({
102
- isShowTaskList: false
108
+ isShowTaskList: false,
103
109
  })
104
110
  },
105
- toBack(){
111
+ toBack() {
106
112
  this.setData({
107
- isShowTaskList: true
113
+ isShowTaskList: true,
108
114
  })
109
115
  },
110
- closePop(){
111
- this.triggerEvent("closePop")
116
+ closePop() {
117
+ this.triggerEvent('closePop')
112
118
  },
113
- btnClick(e){
114
- this.triggerEvent("btnClick",e.detail)
119
+ btnClick(e) {
120
+ this.triggerEvent('btnClick', e.detail)
115
121
  },
116
- onLoad(e){
117
- this.triggerEvent("onLoad",e)
122
+ onLoad(e) {
123
+ this.triggerEvent('onLoad', e)
124
+ },
125
+ getMoreList(e) {
126
+ this.triggerEvent('getMoreList', e)
118
127
  },
119
- getMoreList(e){
120
- this.triggerEvent("getMoreList",e)
121
- }
122
128
  },
123
129
  observers: {
124
- showPopup(newVal){
125
- if(newVal){
130
+ showPopup(newVal) {
131
+ if (newVal) {
126
132
  this.setData({
127
- isShowTaskList: true
133
+ isShowTaskList: true,
128
134
  })
129
135
  }
130
- }
136
+ },
131
137
  },
132
138
  })
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "component": true,
3
3
  "usingComponents": {
4
- "custom-popup": "../../CustomPopup/index",
4
+ "custom-popup": "../../npm-compoent/miniprogram_npm/xiaoe_mp_npm/CustomPopup/index",
5
5
  "task-list": "./component/TaskList",
6
6
  "reward-list": "./component/RewardList"
7
7
  }
8
- }
8
+ }
@@ -63,6 +63,7 @@
63
63
  bind:btnClick="btnClick"
64
64
  bind:onLoad="onLoad"
65
65
  refreshStatus="{{taskListRefreshStatus}}"
66
+ teamId="{{teamId}}"
66
67
  />
67
68
  <reward-list
68
69
  wx:else
@@ -71,6 +72,7 @@
71
72
  bind:onLoad="onLoad"
72
73
  bind:getMoreList="getMoreList"
73
74
  refreshStatus="{{rewardListRefreshStatus}}"
75
+ teamId="{{teamId}}"
74
76
  />
75
77
  </view>
76
78
  </custom-popup>
@@ -0,0 +1,132 @@
1
+ const computedBehavior = require('miniprogram-computed').behavior
2
+ Component({
3
+ behaviors: [computedBehavior],
4
+
5
+ /**
6
+ * 组件的属性列表
7
+ */
8
+ properties: {
9
+ // 展示的题目内容对象
10
+ questionContent: {
11
+ type: Object,
12
+ value: {},
13
+ observer(val){
14
+ // 获取正确答案和用户作答的选项
15
+ if (val?.id) {
16
+ // 获取富文本的内容操作
17
+ // this.getRichTextContent(val)
18
+ const correctAnswer = this.getAnswerMap(val, val.correct_answer)
19
+ const userAnswer = this.getAnswerMap(val, val.user_answer)
20
+ this.setData({
21
+ correctAnswer,
22
+ userAnswer
23
+ })
24
+ }
25
+ }
26
+ },
27
+ // 是否是结果解析
28
+ showAnalysis: {
29
+ type: Boolean,
30
+ value: false,
31
+ },
32
+ // 题目序号
33
+ quizIndex: {
34
+ type: Number,
35
+ value: 1,
36
+ },
37
+ },
38
+
39
+ /**
40
+ * 组件的初始数据
41
+ */
42
+ data: {
43
+ // 答案选项映射
44
+ optionIndexMap: [
45
+ 'A',
46
+ 'B',
47
+ 'C',
48
+ 'D',
49
+ 'E',
50
+ 'F',
51
+ 'G',
52
+ 'H',
53
+ 'I',
54
+ 'J',
55
+ 'K',
56
+ 'L',
57
+ 'M',
58
+ 'N',
59
+ 'O',
60
+ 'P',
61
+ 'Q',
62
+ 'R',
63
+ 'S',
64
+ 'T',
65
+ 'U',
66
+ 'V',
67
+ 'W',
68
+ 'X',
69
+ 'Y',
70
+ 'Z',
71
+ ],
72
+ correctAnswer: '', // 正确答案
73
+ userAnswer: '', // 用户作答选项
74
+ },
75
+ computed: {
76
+ // 单选题/多选题/判断题才会显示答案
77
+ isShowOptionList({ questionContent }) {
78
+ return [0, 1, 3].includes(questionContent?.qs_type)
79
+ },
80
+ // 用户是否回答正确
81
+ isSuccess({ questionContent }) {
82
+ let correctAnswer = questionContent?.correct_answer
83
+ let userAnswer = questionContent?.user_answer
84
+ return (
85
+ correctAnswer &&
86
+ userAnswer &&
87
+ userAnswer.length === correctAnswer.length &&
88
+ userAnswer.every((val) => correctAnswer.includes(val))
89
+ )
90
+ },
91
+ },
92
+ /**
93
+ * 组件的方法列表
94
+ */
95
+ methods: {
96
+ // 选择答案操作
97
+ clickOption(e) {
98
+ // 查看解析情况下,不能选择
99
+ if (this.data.showAnalysis) return
100
+ this.triggerEvent('clickOption', e.currentTarget.dataset.index)
101
+ },
102
+ /**
103
+ * 获取答案对应的结果
104
+ * @param questionContent 题目内容
105
+ * @param answerList 需要操作的答案列表
106
+ * @returns
107
+ */
108
+ getAnswerMap(questionContent, answerList) {
109
+ if (!this.data.showAnalysis) return ''
110
+ let letters = []
111
+ let temp = JSON.parse(JSON.stringify(answerList))
112
+ if (typeof temp === 'number') {
113
+ temp = [temp]
114
+ }
115
+ questionContent.options.forEach((item, index) => {
116
+ if (temp.indexOf(String(item.op_id)) >= 0) {
117
+ // 如果是判断题写入的是正确,错误
118
+ if (questionContent.qs_type === 3) {
119
+ letters.push(
120
+ this.data.optionIndexMap[index] === 'A'
121
+ ? '正确'
122
+ : '错误'
123
+ )
124
+ } else {
125
+ letters.push(this.data.optionIndexMap[index])
126
+ }
127
+ }
128
+ })
129
+ return letters.join(' ')
130
+ },
131
+ }
132
+ })
@@ -0,0 +1,6 @@
1
+ {
2
+ "component": true,
3
+ "usingComponents": {
4
+ "quizRichText": "../quizRichText/index"
5
+ }
6
+ }