xiaoe_mp_npm 1.1.21 → 1.1.22-test02

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 (418) hide show
  1. package/.babelrc +10 -10
  2. package/.eslintrc.js +102 -102
  3. package/.gitlab-ci.yml +44 -44
  4. package/.prettierrc.js +34 -34
  5. package/.vscode/extensions.json +4 -4
  6. package/.vscode/settings.json +9 -9
  7. package/LICENSE +21 -21
  8. package/README.md +134 -134
  9. package/gulpfile.js +26 -26
  10. package/miniprogram_dist/AliveInvite/LiveRoomVertical/components/friends/friends.js +181 -181
  11. package/miniprogram_dist/AliveInvite/LiveRoomVertical/components/friends/friends.wxml +25 -25
  12. package/miniprogram_dist/AliveInvite/LiveRoomVertical/index.js +253 -253
  13. package/miniprogram_dist/AliveInvite/LiveRoomVertical/index.less +255 -255
  14. package/miniprogram_dist/AliveInvite/LiveRoomVertical/index.wxml +122 -122
  15. package/miniprogram_dist/CollectionAddress/index.js +288 -288
  16. package/miniprogram_dist/CollectionAddress/index.json +13 -13
  17. package/miniprogram_dist/CollectionAddress/index.less +4 -4
  18. package/miniprogram_dist/CollectionAddress/index.wxml +93 -93
  19. package/miniprogram_dist/ConfirmOrder/components/AddressEdit/index.json +10 -10
  20. package/miniprogram_dist/ConfirmOrder/components/AddressEdit/index.less +123 -123
  21. package/miniprogram_dist/ConfirmOrder/components/AddressEdit/index.wxml +51 -51
  22. package/miniprogram_dist/ConfirmOrder/components/AddressManage/index.js +168 -168
  23. package/miniprogram_dist/ConfirmOrder/components/AddressManage/index.json +7 -7
  24. package/miniprogram_dist/ConfirmOrder/components/AddressManage/index.less +95 -95
  25. package/miniprogram_dist/ConfirmOrder/components/AddressManage/index.wxml +36 -36
  26. package/miniprogram_dist/ConfirmOrder/components/AddressSelect/index.js +160 -160
  27. package/miniprogram_dist/ConfirmOrder/components/AddressSelect/index.json +4 -4
  28. package/miniprogram_dist/ConfirmOrder/components/AddressSelect/index.less +79 -79
  29. package/miniprogram_dist/ConfirmOrder/components/AddressSelect/index.wxml +33 -33
  30. package/miniprogram_dist/ConfirmOrder/components/ChoosePicker/index.js +115 -115
  31. package/miniprogram_dist/ConfirmOrder/components/ChoosePicker/index.json +5 -5
  32. package/miniprogram_dist/ConfirmOrder/components/ChoosePicker/index.less +20 -20
  33. package/miniprogram_dist/ConfirmOrder/components/ChoosePicker/index.wxml +9 -9
  34. package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.js +1819 -1819
  35. package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.json +27 -27
  36. package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.scss +44 -44
  37. package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.wxml +225 -225
  38. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.js +129 -129
  39. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.json +8 -8
  40. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.scss +58 -58
  41. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxml +25 -25
  42. package/miniprogram_dist/GoodsItem/index.js +180 -21
  43. package/miniprogram_dist/GoodsItem/index.scss +822 -627
  44. package/miniprogram_dist/GoodsItem/index.wxml +145 -108
  45. package/miniprogram_dist/GoodsItem/index.wxs +40 -40
  46. package/miniprogram_dist/GoodsItem/index.wxss +1149 -461
  47. package/miniprogram_dist/LiveGoodsList/Header/index.js +65 -65
  48. package/miniprogram_dist/LiveGoodsList/Header/index.json +6 -6
  49. package/miniprogram_dist/LiveGoodsList/Header/index.less +45 -45
  50. package/miniprogram_dist/LiveGoodsList/Header/index.scss +157 -137
  51. package/miniprogram_dist/LiveGoodsList/Header/index.wxml +39 -36
  52. package/miniprogram_dist/LiveGoodsList/Header/index.wxss +88 -12
  53. package/miniprogram_dist/LiveGoodsList/README.md +9 -9
  54. package/miniprogram_dist/LiveGoodsList/index.js +29 -10
  55. package/miniprogram_dist/LiveGoodsList/index.less +53 -53
  56. package/miniprogram_dist/LiveGoodsList/index.scss +173 -173
  57. package/miniprogram_dist/LiveGoodsList/index.wxml +9 -1
  58. package/miniprogram_dist/MatchList/index.js +445 -441
  59. package/miniprogram_dist/MatchList/index.json +5 -5
  60. package/miniprogram_dist/MatchList/index.scss +175 -175
  61. package/miniprogram_dist/MatchList/index.wxml +98 -97
  62. package/miniprogram_dist/MemberIntegralMultiplierBar/index.js +196 -196
  63. package/miniprogram_dist/MemberIntegralMultiplierBar/index.json +7 -7
  64. package/miniprogram_dist/MemberIntegralMultiplierBar/index.scss +67 -67
  65. package/miniprogram_dist/MemberIntegralMultiplierBar/index.wxml +8 -8
  66. package/miniprogram_dist/MemberIntegralMultiplierPopup/index.js +54 -54
  67. package/miniprogram_dist/MemberIntegralMultiplierPopup/index.json +7 -7
  68. package/miniprogram_dist/MemberIntegralMultiplierPopup/index.scss +86 -86
  69. package/miniprogram_dist/MemberIntegralMultiplierPopup/index.wxml +48 -48
  70. package/miniprogram_dist/MemberIntegralMultiplierPopup/popup-service.js +18 -18
  71. package/miniprogram_dist/MsgBubble/index.js +312 -0
  72. package/miniprogram_dist/MsgBubble/index.json +7 -0
  73. package/miniprogram_dist/MsgBubble/index.scss +81 -0
  74. package/miniprogram_dist/MsgBubble/index.wxml +19 -0
  75. package/miniprogram_dist/MsgBubble/index.wxss +202 -0
  76. package/miniprogram_dist/ShoppingCartBubble/index.js +336 -156
  77. package/miniprogram_dist/ShoppingCartBubble/index.scss +94 -55
  78. package/miniprogram_dist/ShoppingCartBubble/index.wxml +14 -11
  79. package/miniprogram_dist/ShoppingCartBubble/index.wxss +196 -40
  80. package/miniprogram_dist/Task/TaskBubble/index.json +3 -3
  81. package/miniprogram_dist/Task/TaskBubble/index.scss +125 -125
  82. package/miniprogram_dist/Task/TaskBubble/index.wxml +22 -22
  83. package/miniprogram_dist/Task/TaskIcon/index.js +29 -29
  84. package/miniprogram_dist/Task/TaskIcon/index.json +4 -4
  85. package/miniprogram_dist/Task/TaskIcon/index.scss +70 -70
  86. package/miniprogram_dist/Task/TaskIcon/index.wxml +5 -5
  87. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.js +52 -52
  88. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.json +6 -6
  89. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.scss +39 -39
  90. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.wxml +23 -23
  91. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.js +578 -578
  92. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.json +10 -10
  93. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.scss +245 -245
  94. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxml +145 -145
  95. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxs +7 -7
  96. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.js +298 -298
  97. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.json +7 -7
  98. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.scss +66 -66
  99. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.wxml +41 -41
  100. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.js +129 -129
  101. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.json +13 -13
  102. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.scss +90 -90
  103. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.wxml +69 -69
  104. package/miniprogram_dist/Task/TaskPopup/index.js +174 -174
  105. package/miniprogram_dist/Task/TaskPopup/index.json +7 -7
  106. package/miniprogram_dist/Task/TaskPopup/index.scss +166 -166
  107. package/miniprogram_dist/Task/TaskPopup/index.wxml +87 -87
  108. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.js +131 -131
  109. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.json +5 -5
  110. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.scss +191 -191
  111. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxml +64 -64
  112. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxs +78 -78
  113. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.js +40 -40
  114. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.json +5 -5
  115. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.scss +6 -6
  116. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.wxml +1 -1
  117. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/base.wxml +50 -50
  118. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/html2json.js +623 -623
  119. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/htmlparser.js +183 -183
  120. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/iframeParse.js +216 -216
  121. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/loop.wxml +3563 -3563
  122. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/showdown.js +2364 -2364
  123. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxDiscode.js +209 -209
  124. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.js +269 -269
  125. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.wxml +1276 -1276
  126. package/miniprogram_dist/Task/TaskQuizPopup/index.js +246 -246
  127. package/miniprogram_dist/Task/TaskQuizPopup/index.json +7 -7
  128. package/miniprogram_dist/Task/TaskQuizPopup/index.scss +158 -158
  129. package/miniprogram_dist/Task/TaskQuizPopup/index.wxml +99 -99
  130. package/miniprogram_dist/Task/common/task.js +55 -55
  131. package/miniprogram_dist/Task/taskQuizRemindPopup/index.js +74 -74
  132. package/miniprogram_dist/Task/taskQuizRemindPopup/index.json +5 -5
  133. package/miniprogram_dist/Task/taskQuizRemindPopup/index.scss +107 -107
  134. package/miniprogram_dist/Task/taskQuizRemindPopup/index.wxml +27 -27
  135. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.js +68 -68
  136. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.json +6 -6
  137. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.scss +123 -123
  138. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxml +81 -81
  139. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxs +48 -48
  140. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.js +44 -44
  141. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.json +6 -6
  142. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.scss +106 -106
  143. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.wxml +38 -38
  144. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.wxs +48 -48
  145. package/miniprogram_dist/Task/taskReceivePopup/index.js +47 -47
  146. package/miniprogram_dist/Task/taskReceivePopup/index.json +13 -13
  147. package/miniprogram_dist/Task/taskReceivePopup/index.wxml +32 -32
  148. package/miniprogram_dist/Task/taskReceivePopup/integral/index.js +106 -106
  149. package/miniprogram_dist/Task/taskReceivePopup/integral/index.json +7 -7
  150. package/miniprogram_dist/Task/taskReceivePopup/integral/index.scss +60 -60
  151. package/miniprogram_dist/Task/taskReceivePopup/integral/index.wxml +23 -23
  152. package/miniprogram_dist/TeacherGoodsList/index.js +997 -983
  153. package/miniprogram_dist/TeacherGoodsList/index.json +10 -10
  154. package/miniprogram_dist/TeacherGoodsList/index.scss +178 -178
  155. package/miniprogram_dist/TeacherGoodsList/index.wxml +146 -144
  156. package/miniprogram_dist/common/api/liveGoodsList.js +181 -167
  157. package/miniprogram_dist/common/assets/images/coupon/emptypage.svg +49 -49
  158. package/miniprogram_dist/common/assets/images/coupon/failed.svg +5 -5
  159. package/miniprogram_dist/common/assets/images/coupon/up.svg +21 -21
  160. package/miniprogram_dist/common/assets/images/pay/loading.svg +3 -3
  161. package/miniprogram_dist/common/assets/images/recommend.svg +6 -6
  162. package/miniprogram_dist/common/assets/images/refresh.svg +10 -10
  163. package/miniprogram_dist/common/assets/images/refresh_white.svg +3 -3
  164. package/miniprogram_dist/common/assets/images/wechat.svg +4 -4
  165. package/miniprogram_dist/common/css/index.less +2 -2
  166. package/miniprogram_dist/common/css/theme.less +19 -19
  167. package/miniprogram_dist/common/libs/dataUp/sensorUp.js +91 -91
  168. package/miniprogram_dist/common/libs/playerHttp.js +58 -58
  169. package/miniprogram_dist/common/libs/playerRequestUrl.js +39 -39
  170. package/miniprogram_dist/common/transaction/parameter/channel-info.js +36 -36
  171. package/miniprogram_dist/common/transaction/parameter/delivery-info.js +26 -26
  172. package/miniprogram_dist/common/transaction/parameter/misc-parameter.js +21 -21
  173. package/miniprogram_dist/common/utils/currency.js +52 -52
  174. package/miniprogram_dist/common/utils/getInfoCollectionData.js +59 -59
  175. package/miniprogram_dist/common/utils/image-cdn-slim/constant.js +8 -8
  176. package/miniprogram_dist/common/utils/image-cdn-slim/index.js +7 -7
  177. package/miniprogram_dist/common/utils/image-cdn-slim/utils.js +156 -156
  178. package/miniprogram_dist/common/utils/index.js +86 -86
  179. package/miniprogram_dist/common/utils/liveGoods.js +217 -217
  180. package/miniprogram_dist/common/utils/specialList.js +5 -5
  181. package/miniprogram_dist/common/utils/tool.js +72 -72
  182. package/miniprogram_dist/common/wxs/filter.wxs +29 -29
  183. package/miniprogram_dist/index.js +6 -6
  184. package/miniprogram_dist/index.js.map +1 -1
  185. package/miniprogram_dist/lib.js.map +1 -1
  186. package/package.json +78 -78
  187. package/project.config.json +79 -79
  188. package/src/AliveInvite/LiveRoomVertical/components/friends/friends.js +181 -181
  189. package/src/AliveInvite/LiveRoomVertical/components/friends/friends.wxml +25 -25
  190. package/src/AliveInvite/LiveRoomVertical/components/friends/friends.wxss +97 -97
  191. package/src/AliveInvite/LiveRoomVertical/index.js +253 -253
  192. package/src/AliveInvite/LiveRoomVertical/index.less +255 -255
  193. package/src/AliveInvite/LiveRoomVertical/index.wxml +122 -122
  194. package/src/AliveInvite/LiveRoomVertical/index.wxss +252 -252
  195. package/src/CollectionAddress/index.js +288 -288
  196. package/src/CollectionAddress/index.json +13 -13
  197. package/src/CollectionAddress/index.less +4 -4
  198. package/src/CollectionAddress/index.wxml +93 -93
  199. package/src/CollectionAddress/index.wxss +5 -5
  200. package/src/ConfirmOrder/components/AddressEdit/index.json +10 -10
  201. package/src/ConfirmOrder/components/AddressEdit/index.less +123 -123
  202. package/src/ConfirmOrder/components/AddressEdit/index.wxml +51 -51
  203. package/src/ConfirmOrder/components/AddressEdit/index.wxss +120 -120
  204. package/src/ConfirmOrder/components/AddressManage/index.js +168 -168
  205. package/src/ConfirmOrder/components/AddressManage/index.json +7 -7
  206. package/src/ConfirmOrder/components/AddressManage/index.less +95 -95
  207. package/src/ConfirmOrder/components/AddressManage/index.wxml +36 -36
  208. package/src/ConfirmOrder/components/AddressManage/index.wxss +98 -98
  209. package/src/ConfirmOrder/components/AddressSelect/index.js +160 -160
  210. package/src/ConfirmOrder/components/AddressSelect/index.json +4 -4
  211. package/src/ConfirmOrder/components/AddressSelect/index.less +79 -79
  212. package/src/ConfirmOrder/components/AddressSelect/index.wxml +33 -33
  213. package/src/ConfirmOrder/components/AddressSelect/index.wxss +67 -67
  214. package/src/ConfirmOrder/components/ChoosePicker/index.js +115 -115
  215. package/src/ConfirmOrder/components/ChoosePicker/index.json +5 -5
  216. package/src/ConfirmOrder/components/ChoosePicker/index.less +20 -20
  217. package/src/ConfirmOrder/components/ChoosePicker/index.wxml +9 -9
  218. package/src/ConfirmOrder/components/ChoosePicker/index.wxss +18 -18
  219. package/src/ConfirmOrder/components/ConfirmOrderContent/index.js +1819 -1819
  220. package/src/ConfirmOrder/components/ConfirmOrderContent/index.json +27 -27
  221. package/src/ConfirmOrder/components/ConfirmOrderContent/index.scss +44 -44
  222. package/src/ConfirmOrder/components/ConfirmOrderContent/index.wxml +225 -225
  223. package/src/ConfirmOrder/components/ConfirmOrderContent/index.wxss +37 -37
  224. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.js +129 -129
  225. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.json +8 -8
  226. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.scss +58 -58
  227. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxml +25 -25
  228. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxss +1 -1
  229. package/src/ConfirmOrder/components/GoodsInfo/index.wxss +1 -1
  230. package/src/ConfirmOrder/components/IntegralSelect/index.wxss +218 -218
  231. package/src/ConfirmOrder/components/Invoice/index.wxss +93 -93
  232. package/src/ConfirmOrder/components/LeaveWord/index.wxss +1 -1
  233. package/src/ConfirmOrder/components/OrderBubble/index.wxss +1 -1
  234. package/src/ConfirmOrder/components/PayBar/index.wxss +1 -1
  235. package/src/ConfirmOrder/components/PayDetail/index.wxss +78 -78
  236. package/src/ConfirmOrder/components/SvipSelect/SvipSelect.wxss +266 -266
  237. package/src/CopGoodsCard/index.wxss +1 -1
  238. package/src/CouponList/components/CouponItem/index.wxss +1 -1
  239. package/src/CouponList/components/couponIcon/index.wxss +1 -1
  240. package/src/CouponList/stuCouponPopup/index.wxss +1 -1
  241. package/src/CouponReceivePopup/index.wxss +1 -1
  242. package/src/CustomPopup/index.wxss +37 -37
  243. package/src/GoodsBubble/index.wxss +1 -1
  244. package/src/GoodsItem/index.js +180 -21
  245. package/src/GoodsItem/index.scss +822 -627
  246. package/src/GoodsItem/index.wxml +145 -108
  247. package/src/GoodsItem/index.wxs +40 -40
  248. package/src/GoodsItem/index.wxss +1 -1
  249. package/src/GoodsRecommend/index.wxss +537 -537
  250. package/src/LevelMemberBar/index.wxss +1 -1
  251. package/src/LiveGoodsList/Header/index.js +65 -65
  252. package/src/LiveGoodsList/Header/index.json +6 -6
  253. package/src/LiveGoodsList/Header/index.less +45 -45
  254. package/src/LiveGoodsList/Header/index.scss +157 -137
  255. package/src/LiveGoodsList/Header/index.wxml +39 -36
  256. package/src/LiveGoodsList/Header/index.wxss +1 -1
  257. package/src/LiveGoodsList/README.md +9 -9
  258. package/src/LiveGoodsList/index.js +29 -10
  259. package/src/LiveGoodsList/index.less +53 -53
  260. package/src/LiveGoodsList/index.scss +173 -173
  261. package/src/LiveGoodsList/index.wxml +9 -1
  262. package/src/LiveGoodsList/index.wxss +1 -1
  263. package/src/MatchList/index.js +445 -441
  264. package/src/MatchList/index.json +5 -5
  265. package/src/MatchList/index.scss +175 -175
  266. package/src/MatchList/index.wxml +98 -97
  267. package/src/MatchList/index.wxss +1 -1
  268. package/src/MemberIntegralMultiplierBar/index.js +196 -196
  269. package/src/MemberIntegralMultiplierBar/index.json +7 -7
  270. package/src/MemberIntegralMultiplierBar/index.scss +67 -67
  271. package/src/MemberIntegralMultiplierBar/index.wxml +8 -8
  272. package/src/MemberIntegralMultiplierBar/index.wxss +1 -1
  273. package/src/MemberIntegralMultiplierPopup/index.js +54 -54
  274. package/src/MemberIntegralMultiplierPopup/index.json +7 -7
  275. package/src/MemberIntegralMultiplierPopup/index.scss +86 -86
  276. package/src/MemberIntegralMultiplierPopup/index.wxml +48 -48
  277. package/src/MemberIntegralMultiplierPopup/index.wxss +1 -1
  278. package/src/MemberIntegralMultiplierPopup/popup-service.js +18 -18
  279. package/src/MsgBubble/index.js +312 -0
  280. package/src/MsgBubble/index.json +7 -0
  281. package/src/MsgBubble/index.scss +81 -0
  282. package/src/MsgBubble/index.wxml +19 -0
  283. package/src/MsgBubble/index.wxss +1 -0
  284. package/src/PayModule/button/index.wxss +58 -58
  285. package/src/ShoppingCartBubble/index.js +336 -156
  286. package/src/ShoppingCartBubble/index.scss +94 -55
  287. package/src/ShoppingCartBubble/index.wxml +14 -11
  288. package/src/ShoppingCartBubble/index.wxss +1 -1
  289. package/src/Task/TaskBubble/index.json +3 -3
  290. package/src/Task/TaskBubble/index.scss +125 -125
  291. package/src/Task/TaskBubble/index.wxml +22 -22
  292. package/src/Task/TaskBubble/index.wxss +289 -289
  293. package/src/Task/TaskIcon/index.js +29 -29
  294. package/src/Task/TaskIcon/index.json +4 -4
  295. package/src/Task/TaskIcon/index.scss +70 -70
  296. package/src/Task/TaskIcon/index.wxml +5 -5
  297. package/src/Task/TaskIcon/index.wxss +130 -130
  298. package/src/Task/TaskPopup/component/RewardList/index.js +52 -52
  299. package/src/Task/TaskPopup/component/RewardList/index.json +6 -6
  300. package/src/Task/TaskPopup/component/RewardList/index.scss +39 -39
  301. package/src/Task/TaskPopup/component/RewardList/index.wxml +23 -23
  302. package/src/Task/TaskPopup/component/RewardList/index.wxss +18 -18
  303. package/src/Task/TaskPopup/component/TaskItem/index.js +578 -578
  304. package/src/Task/TaskPopup/component/TaskItem/index.json +10 -10
  305. package/src/Task/TaskPopup/component/TaskItem/index.scss +245 -245
  306. package/src/Task/TaskPopup/component/TaskItem/index.wxml +145 -145
  307. package/src/Task/TaskPopup/component/TaskItem/index.wxs +7 -7
  308. package/src/Task/TaskPopup/component/TaskItem/index.wxss +1 -1
  309. package/src/Task/TaskPopup/component/TaskList/index.js +298 -298
  310. package/src/Task/TaskPopup/component/TaskList/index.json +7 -7
  311. package/src/Task/TaskPopup/component/TaskList/index.scss +66 -66
  312. package/src/Task/TaskPopup/component/TaskList/index.wxml +41 -41
  313. package/src/Task/TaskPopup/component/TaskList/index.wxss +118 -118
  314. package/src/Task/TaskPopup/component/TaskType/index.js +129 -129
  315. package/src/Task/TaskPopup/component/TaskType/index.json +13 -13
  316. package/src/Task/TaskPopup/component/TaskType/index.scss +90 -90
  317. package/src/Task/TaskPopup/component/TaskType/index.wxml +69 -69
  318. package/src/Task/TaskPopup/component/TaskType/index.wxss +1 -1
  319. package/src/Task/TaskPopup/index.js +174 -174
  320. package/src/Task/TaskPopup/index.json +7 -7
  321. package/src/Task/TaskPopup/index.scss +166 -166
  322. package/src/Task/TaskPopup/index.wxml +87 -87
  323. package/src/Task/TaskPopup/index.wxss +490 -490
  324. package/src/Task/TaskQuizPopup/components/quizContent/index.js +131 -131
  325. package/src/Task/TaskQuizPopup/components/quizContent/index.json +5 -5
  326. package/src/Task/TaskQuizPopup/components/quizContent/index.scss +191 -191
  327. package/src/Task/TaskQuizPopup/components/quizContent/index.wxml +64 -64
  328. package/src/Task/TaskQuizPopup/components/quizContent/index.wxs +78 -78
  329. package/src/Task/TaskQuizPopup/components/quizContent/index.wxss +521 -521
  330. package/src/Task/TaskQuizPopup/components/quizRichText/index.js +40 -40
  331. package/src/Task/TaskQuizPopup/components/quizRichText/index.json +5 -5
  332. package/src/Task/TaskQuizPopup/components/quizRichText/index.scss +6 -6
  333. package/src/Task/TaskQuizPopup/components/quizRichText/index.wxml +1 -1
  334. package/src/Task/TaskQuizPopup/components/quizRichText/index.wxss +298 -298
  335. package/src/Task/TaskQuizPopup/components/wxParse/base.wxml +50 -50
  336. package/src/Task/TaskQuizPopup/components/wxParse/html2json.js +623 -623
  337. package/src/Task/TaskQuizPopup/components/wxParse/htmlparser.js +183 -183
  338. package/src/Task/TaskQuizPopup/components/wxParse/iframeParse.js +216 -216
  339. package/src/Task/TaskQuizPopup/components/wxParse/loop.wxml +3563 -3563
  340. package/src/Task/TaskQuizPopup/components/wxParse/showdown.js +2364 -2364
  341. package/src/Task/TaskQuizPopup/components/wxParse/wxDiscode.js +209 -209
  342. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.js +269 -269
  343. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.wxml +1276 -1276
  344. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.wxss +316 -316
  345. package/src/Task/TaskQuizPopup/index.js +246 -246
  346. package/src/Task/TaskQuizPopup/index.json +7 -7
  347. package/src/Task/TaskQuizPopup/index.scss +158 -158
  348. package/src/Task/TaskQuizPopup/index.wxml +99 -99
  349. package/src/Task/TaskQuizPopup/index.wxss +478 -478
  350. package/src/Task/common/task.js +55 -55
  351. package/src/Task/taskQuizRemindPopup/index.js +74 -74
  352. package/src/Task/taskQuizRemindPopup/index.json +5 -5
  353. package/src/Task/taskQuizRemindPopup/index.scss +107 -107
  354. package/src/Task/taskQuizRemindPopup/index.wxml +27 -27
  355. package/src/Task/taskQuizRemindPopup/index.wxss +286 -286
  356. package/src/Task/taskReceivePopup/coupon/index.js +68 -68
  357. package/src/Task/taskReceivePopup/coupon/index.json +6 -6
  358. package/src/Task/taskReceivePopup/coupon/index.scss +123 -123
  359. package/src/Task/taskReceivePopup/coupon/index.wxml +81 -81
  360. package/src/Task/taskReceivePopup/coupon/index.wxs +48 -48
  361. package/src/Task/taskReceivePopup/coupon/index.wxss +274 -274
  362. package/src/Task/taskReceivePopup/customPrizes/index.js +44 -44
  363. package/src/Task/taskReceivePopup/customPrizes/index.json +6 -6
  364. package/src/Task/taskReceivePopup/customPrizes/index.scss +106 -106
  365. package/src/Task/taskReceivePopup/customPrizes/index.wxml +38 -38
  366. package/src/Task/taskReceivePopup/customPrizes/index.wxs +48 -48
  367. package/src/Task/taskReceivePopup/customPrizes/index.wxss +220 -220
  368. package/src/Task/taskReceivePopup/index.js +47 -47
  369. package/src/Task/taskReceivePopup/index.json +13 -13
  370. package/src/Task/taskReceivePopup/index.wxml +32 -32
  371. package/src/Task/taskReceivePopup/index.wxss +1 -1
  372. package/src/Task/taskReceivePopup/integral/index.js +106 -106
  373. package/src/Task/taskReceivePopup/integral/index.json +7 -7
  374. package/src/Task/taskReceivePopup/integral/index.scss +60 -60
  375. package/src/Task/taskReceivePopup/integral/index.wxml +23 -23
  376. package/src/Task/taskReceivePopup/integral/index.wxss +94 -94
  377. package/src/TeacherGoodsList/index.js +997 -983
  378. package/src/TeacherGoodsList/index.json +10 -10
  379. package/src/TeacherGoodsList/index.scss +178 -178
  380. package/src/TeacherGoodsList/index.wxml +146 -144
  381. package/src/TeacherGoodsList/index.wxss +1 -1
  382. package/src/common/api/liveGoodsList.js +181 -167
  383. package/src/common/assets/copy.wxss +3 -3
  384. package/src/common/assets/images/coupon/emptypage.svg +49 -49
  385. package/src/common/assets/images/coupon/failed.svg +5 -5
  386. package/src/common/assets/images/coupon/up.svg +21 -21
  387. package/src/common/assets/images/pay/loading.svg +3 -3
  388. package/src/common/assets/images/recommend.svg +6 -6
  389. package/src/common/assets/images/refresh.svg +10 -10
  390. package/src/common/assets/images/refresh_white.svg +3 -3
  391. package/src/common/assets/images/wechat.svg +4 -4
  392. package/src/common/css/index.less +2 -2
  393. package/src/common/css/theme.less +19 -19
  394. package/src/common/css/theme.wxss +16 -16
  395. package/src/common/libs/dataUp/sensorUp.js +91 -91
  396. package/src/common/libs/playerHttp.js +58 -58
  397. package/src/common/libs/playerRequestUrl.js +39 -39
  398. package/src/common/transaction/parameter/channel-info.js +36 -36
  399. package/src/common/transaction/parameter/delivery-info.js +26 -26
  400. package/src/common/transaction/parameter/misc-parameter.js +21 -21
  401. package/src/common/utils/currency.js +52 -52
  402. package/src/common/utils/getInfoCollectionData.js +59 -59
  403. package/src/common/utils/image-cdn-slim/constant.js +8 -8
  404. package/src/common/utils/image-cdn-slim/index.js +7 -7
  405. package/src/common/utils/image-cdn-slim/utils.js +156 -156
  406. package/src/common/utils/index.js +86 -86
  407. package/src/common/utils/liveGoods.js +217 -217
  408. package/src/common/utils/specialList.js +5 -5
  409. package/src/common/utils/tool.js +72 -72
  410. package/src/common/wxs/filter.wxs +29 -29
  411. package/src/coupon/components/CouponItem/index.wxss +821 -821
  412. package/src/coupon/components/CouponSelect/index.wxss +1132 -1132
  413. package/src/coupon/index.wxss +216 -216
  414. package/src/index.js +23 -23
  415. package/src/lib.ts +5 -5
  416. package/src/project.config.json +68 -68
  417. package/src/utils.js +5 -5
  418. package/tsconfig.json +25 -25
@@ -1,218 +1,218 @@
1
- const priceInt = (val) => {
2
- val = Number(val);
3
- return ((val / 100).toFixed(2) + '').split('.')[0];
4
- }
5
-
6
- const priceFlow = (val) => {
7
- val = Number(val);
8
- return ((val / 100).toFixed(2) + '').split('.')[1] || '00';
9
- }
10
-
11
- const MARKET_ACTIVITY_MAP = {
12
- 3: '限时折扣',
13
- 4: '好友助力',
14
- 5: '裂变海报',
15
- 6: '拼团',
16
- 7: '涨粉神器',
17
- 8: '秒杀'
18
- }
19
-
20
- export const stuFormatItem = (e) => {
21
- e.resourceTypeName = e.resource_type_name; // 商品类型
22
- e.leftStock = e.is_activity && e.now_stock ? e.now_stock : e.stock; // 商品库存,活动中且有活动库存就用活动库存
23
- // 处理未到活动时间的限时折扣
24
- if (e.activity_type === 3) {
25
- let nowTime = new Date().getTime();
26
- let startTime = new Date(e.start_at.replace(/-/g, "/")).getTime();
27
- let isStart = !!(nowTime - startTime > 0);
28
- if (!isStart) {
29
- e.is_activity = 0; // 未到活动时间的限时折扣 不参与比价
30
- }
31
- }
32
- // 预热前和活动结束后的秒杀不参与比价
33
- if (e.activity_type === 8) {
34
- let startTime = new Date(e.start_at.replace(/-/g, "/")).getTime();
35
- let preHeatTime = startTime - e.sec_kill_preheat_time * 1000; // 预热开始时间
36
- let nowTime = new Date().getTime();
37
- let isStartPreHeat = !!(nowTime - preHeatTime > 0); // 预热时间到了
38
- let endTime = new Date(e.end_at.replace(/-/g, "/")).getTime();
39
- let isEndSecKill = !!(nowTime - endTime > 0); // 秒杀活动结束了
40
- if (!isStartPreHeat || isEndSecKill) {
41
- e.is_activity = 0; // 预热前和活动结束后的秒杀 不参与比价
42
- }
43
- }
44
- //展示购买价处理;取原价、营销活动价、超级会员价到一个数组从小到大排序,最低为购买价。防止价格一样,所以加了权重比较
45
- let arr = [];
46
- arr.push({
47
- active: "",
48
- price: e.price,
49
- weight: e.price + 0.0003
50
- });
51
- // 活动管理、实物商品、有价优惠券、线下课和课时包不能设置活动库存,其他可以设置活动库存得需要判断是否还剩余活动库存;拼团也不能设置活动库存。
52
- let notExistNowStock = [9, 21, 41, 29, 42].indexOf(e.resource_type) > -1;
53
- e.is_activity &&
54
- (notExistNowStock || typeof e.now_stock === 'number' || e.activity_type === 6) &&
55
- arr.push({
56
- //参与营销活动且有活动库存的时候加入比较 now_stock -""空字符串的时候代表已经买完 -0代表不限量
57
- active: MARKET_ACTIVITY_MAP[e.activity_type],
58
- price: e.activity_price,
59
- weight: e.activity_price + 0.0001
60
- });
61
- // 是超级会员 && 是等级会员, 比价取出两者的最小值 否者各取各的价格,这里的权重都是 加上 0.0002
62
- if (e.is_membership_goods && e.membership_price && e.svip_price) {
63
- const svip_price = e.svip_price;
64
- const membership_price = e.membership_price;
65
- // 等级会员和超级会员的最低价进入数组
66
- if (svip_price <= membership_price ){
67
- arr.push({
68
- active: '超级会员',
69
- price: svip_price,
70
- weight: svip_price + 0.0002
71
- })
72
- } else {
73
- arr.push({
74
- active: '等级会员',
75
- price: membership_price,
76
- weight: membership_price + 0.0002
77
- });
78
- }
79
- } else if (e.is_membership_goods && e.membership_price) {
80
- // 等级会员的最低价
81
- arr.push({
82
- active: '等级会员',
83
- price: e.membership_price,
84
- weight: e.membership_price + 0.0002
85
- });
86
- } else if (e.svip_price) {
87
- // 兼容原有的超级会员逻辑
88
- arr.push({
89
- //判断超级会员价
90
- active: '超级会员',
91
- price: e.svip_price,
92
- weight: e.svip_price + 0.0002
93
- });
94
- }
95
- // 为了兼容活动价必须优先于原价,所以重新做一下这个gb排序
96
- arr.sort((a, b) => {
97
- if (a.active === "" && b.active !== "") {
98
- return 1; // 有活动的排前面
99
- } else if (b.active === "") {
100
- return -1; // 没活动的排在前面
101
- } else {
102
- return 0; // 保持原顺序
103
- }
104
- });
105
- e.stillShowOriginalPrice = false; // 可能出现划线价小于展示价的情况,这个字段设置为true,前端强制展示原价,保持原始逻辑
106
- e.currentActive = arr[0].active; //当前适用得营销模式;有可能是原价,超级会员,等级会员(有自己的等级名),营销活动
107
- e.isMembershipActive = e.currentActive === "等级会员"; // 是否比价后,会员价更优惠
108
- e.svipAllFree = e.resource_rights_type === 1; // 0-无权益 1-免费权益 2-折扣权益
109
- if (e.isMembershipActive && e.membership_price >= e.price) {
110
- console.log("划线价大于展示的会员价,保持原来的显示逻辑, 会员价是:",e.membership_price, "原价是:", e.price);
111
- e.stillShowOriginalPrice = true;
112
- }
113
- if (e.stillShowOriginalPrice) {
114
- e.priceShow = e.price // 强制显示原来价格逻辑
115
- } else {
116
- e.priceShow = arr[0].price; //展示的购买价格,arr 数组取出排序后的最小值
117
- }
118
- e.priceShowInt = (e.stillShowOriginalPrice || e.svipAllFree) ? priceInt(e.price) : priceInt(e.priceShow); // 展示价格的整数部分
119
- e.priceShowFlow = (e.stillShowOriginalPrice || e.svipAllFree) ? priceFlow(e.price) : priceFlow(e.priceShow); // 展示是价格的小数部分
120
- e.preferentialShowInt = priceInt(e.preferential_price); // 展示券后价的整数部分
121
- e.preferentialShowFlow = priceFlow(e.preferential_price); // 展示券后价的小数部分
122
- //展示划线价处理;有营销活动、超级会员、等级会员会员价,划线价是原价;只有原价和原划线价,划线价是原划线价;
123
- if (e.currentActive !== "" && !e.stillShowOriginalPrice) {
124
- e.priceLine = e.price;
125
- } else {
126
- e.priceLine = e.line_price || 0; //未设置原划线价的时候不展示划线价
127
- }
128
- e.priceLineShowInt = priceInt(e.priceLine); // 展示划线价的整数部分
129
- e.priceLineShowFlow = priceFlow(e.priceLine); // 展示划线的小数部分
130
- e.entityShowStock = (e.resource_type === 21 || e.resource_type === 41 || e.resource_type === 68) && e.show_stock; // 实物商品库存依赖 B端店铺设置(show_stock):详情页展示不展示剩余件数
131
- e.hasStock = [29, 35].indexOf(e.resource_type) > -1 || e.entityShowStock || e.now_stock; // 班课、线下课、实物商品、体验课、有活动库存,满足其一即展示库存
132
- // 等级会员相关字段归一到一个对象中
133
- //! 调试使用,切勿放开注释
134
- // e.currentActive = "等级会员"
135
- // e.rank_name = "白银会员"
136
- //! 调试使用,切勿放开注释
137
- e.membershipInfo = {
138
- is_membership: e.isMembershipActive, // 是否当前激活会员价展示
139
- price: e.priceShow,
140
- priceLine: e.priceLine,
141
- membership_price: e.membership_price,
142
- membership_price_min: e.membership_price,
143
- membership_price_max: e.membership_price,
144
- rank_name: e.rank_name,
145
- rank_id: e.rank_id,
146
- rank_flag: e.rank_flag,
147
- }
148
- }
149
-
150
- export const teaFormatItem = (e) => {
151
- e.resourceTypeName = e.resource_type_name // 商品类型
152
- e.leftStock = e.is_activity && e.now_stock ? e.now_stock : e.stock // 商品库存,活动中且有活动库存就用活动库存
153
- // 处理未到活动时间的限时折扣
154
- if (e.activity_type === 3) {
155
- let nowTime = new Date().getTime()
156
- let startTime = new Date(e.start_at.replace(/-/g, "/")).getTime()
157
- let isStart = !!(nowTime - startTime > 0)
158
- if (!isStart) {
159
- e.is_activity = 0 // 未到活动时间的限时折扣 不参与比价
160
- }
161
- }
162
- // 预热前和活动结束后的秒杀不参与比价
163
- if (e.activity_type === 8) {
164
- let startTime = new Date(e.start_at.replace(/-/g, "/")).getTime()
165
- let preHeatTime = startTime - e.sec_kill_preheat_time * 1000 // 预热开始时间
166
- let nowTime = new Date().getTime()
167
- let isStartPreHeat = !!(nowTime - preHeatTime > 0) // 预热时间到了
168
- let endTime = new Date(e.end_at.replace(/-/g, "/")).getTime()
169
- let isEndSecKill = !!(nowTime - endTime > 0) // 秒杀活动结束了
170
- if (!isStartPreHeat || isEndSecKill) {
171
- e.is_activity = 0 // 预热前和活动结束后的秒杀 不参与比价
172
- }
173
- }
174
- //展示购买价处理;取原价、营销活动价、超级会员价到一个数组从小到大排序,最低为购买价。防止价格一样,所以加了权重比较
175
- let arr = []
176
- arr.push({
177
- active: "",
178
- price: e.price,
179
- weight: e.price + 0.0003,
180
- })
181
- // 活动管理、实物商品、有价优惠券、线下课和课时包不能设置活动库存,其他可以设置活动库存得需要判断是否还剩余活动库存;拼团也不能设置活动库存。
182
- let notExistNowStock = [9, 21, 41, 29, 42].indexOf(e.resource_type) > -1
183
- e.is_activity &&
184
- (notExistNowStock ||
185
- typeof e.now_stock === "number" ||
186
- e.activity_type === 6) &&
187
- arr.push({
188
- //参与营销活动且有活动库存的时候加入比较 now_stock -""空字符串的时候代表已经买完 -0代表不限量
189
- active: MARKET_ACTIVITY_MAP[e.activity_type],
190
- price: e.activity_price,
191
- weight: e.activity_price + 0.0001,
192
- })
193
- e.svip_price &&
194
- arr.push({
195
- //判断超级会员价
196
- active: "超级会员",
197
- price: e.svip_price,
198
- weight: e.svip_price + 0.0002,
199
- })
200
- arr.sort((a, b) => a.weight - b.weight)
201
- let svipAllFree = e.resource_rights_type === 1
202
- e.priceShow = arr[0].price //展示的购买价格
203
- e.priceShowInt = svipAllFree ? priceInt(e.price) : priceInt(e.priceShow) // 展示价格的整数部分
204
- e.priceShowFlow = svipAllFree ? priceFlow(e.price) : priceFlow(e.priceShow) // 展示是价格的小数部分
205
- e.preferentialShowInt = priceInt(e.preferential_price) // 展示券后价的整数部分
206
- e.preferentialShowFlow = priceFlow(e.preferential_price) // 展示券后价的小数部分
207
- e.currentActive = arr[0].active //当前适用得营销模式;有可能是原价,超级会员,营销活动
208
- //展示划线价处理;有营销活动、超级会员,划线价是原价;只有原价和原划线价,划线价是原划线价;
209
- if (e.currentActive !== "") {
210
- e.priceLine = e.price
211
- } else {
212
- e.priceLine = e.line_price || 0 //未设置原划线价的时候不展示划线价
213
- }
214
- e.priceLineShowInt = priceInt(e.priceLine) // 展示划线价的整数部分
215
- e.priceLineShowFlow = priceFlow(e.priceLine) // 展示划线的小数部分
216
- e.entityShowStock = (e.resource_type === 21 || e.resource_type === 41 || e.resource_type === 68) && e.show_stock // 实物商品库存依赖 B端店铺设置(show_stock):详情页展示不展示剩余件数
217
- e.hasStock = [29, 35].indexOf(e.resource_type) > -1 || e.entityShowStock || e.now_stock // 班课、线下课、实物商品、体验课、有活动库存,满足其一即展示库存
1
+ const priceInt = (val) => {
2
+ val = Number(val);
3
+ return ((val / 100).toFixed(2) + '').split('.')[0];
4
+ }
5
+
6
+ const priceFlow = (val) => {
7
+ val = Number(val);
8
+ return ((val / 100).toFixed(2) + '').split('.')[1] || '00';
9
+ }
10
+
11
+ const MARKET_ACTIVITY_MAP = {
12
+ 3: '限时折扣',
13
+ 4: '好友助力',
14
+ 5: '裂变海报',
15
+ 6: '拼团',
16
+ 7: '涨粉神器',
17
+ 8: '秒杀'
18
+ }
19
+
20
+ export const stuFormatItem = (e) => {
21
+ e.resourceTypeName = e.resource_type_name; // 商品类型
22
+ e.leftStock = e.is_activity && e.now_stock ? e.now_stock : e.stock; // 商品库存,活动中且有活动库存就用活动库存
23
+ // 处理未到活动时间的限时折扣
24
+ if (e.activity_type === 3) {
25
+ let nowTime = new Date().getTime();
26
+ let startTime = new Date(e.start_at.replace(/-/g, "/")).getTime();
27
+ let isStart = !!(nowTime - startTime > 0);
28
+ if (!isStart) {
29
+ e.is_activity = 0; // 未到活动时间的限时折扣 不参与比价
30
+ }
31
+ }
32
+ // 预热前和活动结束后的秒杀不参与比价
33
+ if (e.activity_type === 8) {
34
+ let startTime = new Date(e.start_at.replace(/-/g, "/")).getTime();
35
+ let preHeatTime = startTime - e.sec_kill_preheat_time * 1000; // 预热开始时间
36
+ let nowTime = new Date().getTime();
37
+ let isStartPreHeat = !!(nowTime - preHeatTime > 0); // 预热时间到了
38
+ let endTime = new Date(e.end_at.replace(/-/g, "/")).getTime();
39
+ let isEndSecKill = !!(nowTime - endTime > 0); // 秒杀活动结束了
40
+ if (!isStartPreHeat || isEndSecKill) {
41
+ e.is_activity = 0; // 预热前和活动结束后的秒杀 不参与比价
42
+ }
43
+ }
44
+ //展示购买价处理;取原价、营销活动价、超级会员价到一个数组从小到大排序,最低为购买价。防止价格一样,所以加了权重比较
45
+ let arr = [];
46
+ arr.push({
47
+ active: "",
48
+ price: e.price,
49
+ weight: e.price + 0.0003
50
+ });
51
+ // 活动管理、实物商品、有价优惠券、线下课和课时包不能设置活动库存,其他可以设置活动库存得需要判断是否还剩余活动库存;拼团也不能设置活动库存。
52
+ let notExistNowStock = [9, 21, 41, 29, 42].indexOf(e.resource_type) > -1;
53
+ e.is_activity &&
54
+ (notExistNowStock || typeof e.now_stock === 'number' || e.activity_type === 6) &&
55
+ arr.push({
56
+ //参与营销活动且有活动库存的时候加入比较 now_stock -""空字符串的时候代表已经买完 -0代表不限量
57
+ active: MARKET_ACTIVITY_MAP[e.activity_type],
58
+ price: e.activity_price,
59
+ weight: e.activity_price + 0.0001
60
+ });
61
+ // 是超级会员 && 是等级会员, 比价取出两者的最小值 否者各取各的价格,这里的权重都是 加上 0.0002
62
+ if (e.is_membership_goods && e.membership_price && e.svip_price) {
63
+ const svip_price = e.svip_price;
64
+ const membership_price = e.membership_price;
65
+ // 等级会员和超级会员的最低价进入数组
66
+ if (svip_price <= membership_price ){
67
+ arr.push({
68
+ active: '超级会员',
69
+ price: svip_price,
70
+ weight: svip_price + 0.0002
71
+ })
72
+ } else {
73
+ arr.push({
74
+ active: '等级会员',
75
+ price: membership_price,
76
+ weight: membership_price + 0.0002
77
+ });
78
+ }
79
+ } else if (e.is_membership_goods && e.membership_price) {
80
+ // 等级会员的最低价
81
+ arr.push({
82
+ active: '等级会员',
83
+ price: e.membership_price,
84
+ weight: e.membership_price + 0.0002
85
+ });
86
+ } else if (e.svip_price) {
87
+ // 兼容原有的超级会员逻辑
88
+ arr.push({
89
+ //判断超级会员价
90
+ active: '超级会员',
91
+ price: e.svip_price,
92
+ weight: e.svip_price + 0.0002
93
+ });
94
+ }
95
+ // 为了兼容活动价必须优先于原价,所以重新做一下这个gb排序
96
+ arr.sort((a, b) => {
97
+ if (a.active === "" && b.active !== "") {
98
+ return 1; // 有活动的排前面
99
+ } else if (b.active === "") {
100
+ return -1; // 没活动的排在前面
101
+ } else {
102
+ return 0; // 保持原顺序
103
+ }
104
+ });
105
+ e.stillShowOriginalPrice = false; // 可能出现划线价小于展示价的情况,这个字段设置为true,前端强制展示原价,保持原始逻辑
106
+ e.currentActive = arr[0].active; //当前适用得营销模式;有可能是原价,超级会员,等级会员(有自己的等级名),营销活动
107
+ e.isMembershipActive = e.currentActive === "等级会员"; // 是否比价后,会员价更优惠
108
+ e.svipAllFree = e.resource_rights_type === 1; // 0-无权益 1-免费权益 2-折扣权益
109
+ if (e.isMembershipActive && e.membership_price >= e.price) {
110
+ console.log("划线价大于展示的会员价,保持原来的显示逻辑, 会员价是:",e.membership_price, "原价是:", e.price);
111
+ e.stillShowOriginalPrice = true;
112
+ }
113
+ if (e.stillShowOriginalPrice) {
114
+ e.priceShow = e.price // 强制显示原来价格逻辑
115
+ } else {
116
+ e.priceShow = arr[0].price; //展示的购买价格,arr 数组取出排序后的最小值
117
+ }
118
+ e.priceShowInt = (e.stillShowOriginalPrice || e.svipAllFree) ? priceInt(e.price) : priceInt(e.priceShow); // 展示价格的整数部分
119
+ e.priceShowFlow = (e.stillShowOriginalPrice || e.svipAllFree) ? priceFlow(e.price) : priceFlow(e.priceShow); // 展示是价格的小数部分
120
+ e.preferentialShowInt = priceInt(e.preferential_price); // 展示券后价的整数部分
121
+ e.preferentialShowFlow = priceFlow(e.preferential_price); // 展示券后价的小数部分
122
+ //展示划线价处理;有营销活动、超级会员、等级会员会员价,划线价是原价;只有原价和原划线价,划线价是原划线价;
123
+ if (e.currentActive !== "" && !e.stillShowOriginalPrice) {
124
+ e.priceLine = e.price;
125
+ } else {
126
+ e.priceLine = e.line_price || 0; //未设置原划线价的时候不展示划线价
127
+ }
128
+ e.priceLineShowInt = priceInt(e.priceLine); // 展示划线价的整数部分
129
+ e.priceLineShowFlow = priceFlow(e.priceLine); // 展示划线的小数部分
130
+ e.entityShowStock = (e.resource_type === 21 || e.resource_type === 41 || e.resource_type === 68) && e.show_stock; // 实物商品库存依赖 B端店铺设置(show_stock):详情页展示不展示剩余件数
131
+ e.hasStock = [29, 35].indexOf(e.resource_type) > -1 || e.entityShowStock || e.now_stock; // 班课、线下课、实物商品、体验课、有活动库存,满足其一即展示库存
132
+ // 等级会员相关字段归一到一个对象中
133
+ //! 调试使用,切勿放开注释
134
+ // e.currentActive = "等级会员"
135
+ // e.rank_name = "白银会员"
136
+ //! 调试使用,切勿放开注释
137
+ e.membershipInfo = {
138
+ is_membership: e.isMembershipActive, // 是否当前激活会员价展示
139
+ price: e.priceShow,
140
+ priceLine: e.priceLine,
141
+ membership_price: e.membership_price,
142
+ membership_price_min: e.membership_price,
143
+ membership_price_max: e.membership_price,
144
+ rank_name: e.rank_name,
145
+ rank_id: e.rank_id,
146
+ rank_flag: e.rank_flag,
147
+ }
148
+ }
149
+
150
+ export const teaFormatItem = (e) => {
151
+ e.resourceTypeName = e.resource_type_name // 商品类型
152
+ e.leftStock = e.is_activity && e.now_stock ? e.now_stock : e.stock // 商品库存,活动中且有活动库存就用活动库存
153
+ // 处理未到活动时间的限时折扣
154
+ if (e.activity_type === 3) {
155
+ let nowTime = new Date().getTime()
156
+ let startTime = new Date(e.start_at.replace(/-/g, "/")).getTime()
157
+ let isStart = !!(nowTime - startTime > 0)
158
+ if (!isStart) {
159
+ e.is_activity = 0 // 未到活动时间的限时折扣 不参与比价
160
+ }
161
+ }
162
+ // 预热前和活动结束后的秒杀不参与比价
163
+ if (e.activity_type === 8) {
164
+ let startTime = new Date(e.start_at.replace(/-/g, "/")).getTime()
165
+ let preHeatTime = startTime - e.sec_kill_preheat_time * 1000 // 预热开始时间
166
+ let nowTime = new Date().getTime()
167
+ let isStartPreHeat = !!(nowTime - preHeatTime > 0) // 预热时间到了
168
+ let endTime = new Date(e.end_at.replace(/-/g, "/")).getTime()
169
+ let isEndSecKill = !!(nowTime - endTime > 0) // 秒杀活动结束了
170
+ if (!isStartPreHeat || isEndSecKill) {
171
+ e.is_activity = 0 // 预热前和活动结束后的秒杀 不参与比价
172
+ }
173
+ }
174
+ //展示购买价处理;取原价、营销活动价、超级会员价到一个数组从小到大排序,最低为购买价。防止价格一样,所以加了权重比较
175
+ let arr = []
176
+ arr.push({
177
+ active: "",
178
+ price: e.price,
179
+ weight: e.price + 0.0003,
180
+ })
181
+ // 活动管理、实物商品、有价优惠券、线下课和课时包不能设置活动库存,其他可以设置活动库存得需要判断是否还剩余活动库存;拼团也不能设置活动库存。
182
+ let notExistNowStock = [9, 21, 41, 29, 42].indexOf(e.resource_type) > -1
183
+ e.is_activity &&
184
+ (notExistNowStock ||
185
+ typeof e.now_stock === "number" ||
186
+ e.activity_type === 6) &&
187
+ arr.push({
188
+ //参与营销活动且有活动库存的时候加入比较 now_stock -""空字符串的时候代表已经买完 -0代表不限量
189
+ active: MARKET_ACTIVITY_MAP[e.activity_type],
190
+ price: e.activity_price,
191
+ weight: e.activity_price + 0.0001,
192
+ })
193
+ e.svip_price &&
194
+ arr.push({
195
+ //判断超级会员价
196
+ active: "超级会员",
197
+ price: e.svip_price,
198
+ weight: e.svip_price + 0.0002,
199
+ })
200
+ arr.sort((a, b) => a.weight - b.weight)
201
+ let svipAllFree = e.resource_rights_type === 1
202
+ e.priceShow = arr[0].price //展示的购买价格
203
+ e.priceShowInt = svipAllFree ? priceInt(e.price) : priceInt(e.priceShow) // 展示价格的整数部分
204
+ e.priceShowFlow = svipAllFree ? priceFlow(e.price) : priceFlow(e.priceShow) // 展示是价格的小数部分
205
+ e.preferentialShowInt = priceInt(e.preferential_price) // 展示券后价的整数部分
206
+ e.preferentialShowFlow = priceFlow(e.preferential_price) // 展示券后价的小数部分
207
+ e.currentActive = arr[0].active //当前适用得营销模式;有可能是原价,超级会员,营销活动
208
+ //展示划线价处理;有营销活动、超级会员,划线价是原价;只有原价和原划线价,划线价是原划线价;
209
+ if (e.currentActive !== "") {
210
+ e.priceLine = e.price
211
+ } else {
212
+ e.priceLine = e.line_price || 0 //未设置原划线价的时候不展示划线价
213
+ }
214
+ e.priceLineShowInt = priceInt(e.priceLine) // 展示划线价的整数部分
215
+ e.priceLineShowFlow = priceFlow(e.priceLine) // 展示划线的小数部分
216
+ e.entityShowStock = (e.resource_type === 21 || e.resource_type === 41 || e.resource_type === 68) && e.show_stock // 实物商品库存依赖 B端店铺设置(show_stock):详情页展示不展示剩余件数
217
+ e.hasStock = [29, 35].indexOf(e.resource_type) > -1 || e.entityShowStock || e.now_stock // 班课、线下课、实物商品、体验课、有活动库存,满足其一即展示库存
218
218
  }
@@ -1,6 +1,6 @@
1
- // 提货人白名单
2
- export const PICKER_WHITE_LIST = [
3
- 'appnnbg9jva2395',
4
- 'appwooazuii9244',
5
- 'appmctgbviq8129',
1
+ // 提货人白名单
2
+ export const PICKER_WHITE_LIST = [
3
+ 'appnnbg9jva2395',
4
+ 'appwooazuii9244',
5
+ 'appmctgbviq8129',
6
6
  ]
@@ -1,72 +1,72 @@
1
- /*函数节流*/
2
- function throttle(fn, interval) {
3
- var enterTime = 0 //触发的时间
4
- var gapTime = interval || 300 //间隔时间,如果interval不传,则默认300ms
5
- return function () {
6
- var context = this
7
- var backTime = new Date() //第一次函数return即触发的时间
8
- if (backTime - enterTime > gapTime) {
9
- fn.call(context, arguments)
10
- enterTime = backTime //赋值给第一次触发的时间,这样就保存了第二次触发的时间
11
- }
12
- }
13
- }
14
-
15
- /*函数防抖*/
16
- function debounce(func, wait, immediate) {
17
- let timer
18
-
19
- return function () {
20
- //this指向debounce
21
- let context = this
22
- //即参数,func,wait
23
- let args = arguments
24
-
25
- //如果timer不为null, 清除定时器
26
- if (timer) clearTimeout(timer)
27
-
28
- //如果是立即执行
29
- if (immediate) {
30
- //定义callNow = !timer
31
- var callNow = !timer
32
- //定义wait时间后把timer变为null
33
- //即在wait时间之后事件才会有效
34
- timer = setTimeout(() => {
35
- timer = null
36
- }, wait)
37
- //如果callNow为true,即原本timer为null
38
- //那么执行func函数
39
- if (callNow) func.apply(context, args)
40
- } else {
41
- //如果是不立即执行
42
- //那就是每次重新定时
43
- timer = setTimeout(function () {
44
- func.apply(context, args)
45
- }, wait)
46
- }
47
- }
48
- }
49
-
50
- /**
51
- * 高并发请求打散
52
- * @param delayHandler 目标并发量获取器
53
- * @param options 配置项 { defaultDelay: 1000, useScatter: false }
54
- * @param cb 回调函数
55
- * @returns {number} 定时器
56
- */
57
- function scatterRequest(delayHandler, options, cb) {
58
- let timer
59
- const { defaultDelay = 1000, useScatter = false } = options
60
- let delay = useScatter ? delayHandler() : defaultDelay // 默认并发量为1000
61
- console.log(useScatter ? `[scatterRequest] High concurrency delay request: ${delay}` : '[scatterRequest] Disabled')
62
- timer = setTimeout(() => {
63
- cb()
64
- }, delay)
65
- return timer
66
- }
67
-
68
- module.exports = {
69
- throttle,
70
- debounce,
71
- scatterRequest,
72
- }
1
+ /*函数节流*/
2
+ function throttle(fn, interval) {
3
+ var enterTime = 0 //触发的时间
4
+ var gapTime = interval || 300 //间隔时间,如果interval不传,则默认300ms
5
+ return function () {
6
+ var context = this
7
+ var backTime = new Date() //第一次函数return即触发的时间
8
+ if (backTime - enterTime > gapTime) {
9
+ fn.call(context, arguments)
10
+ enterTime = backTime //赋值给第一次触发的时间,这样就保存了第二次触发的时间
11
+ }
12
+ }
13
+ }
14
+
15
+ /*函数防抖*/
16
+ function debounce(func, wait, immediate) {
17
+ let timer
18
+
19
+ return function () {
20
+ //this指向debounce
21
+ let context = this
22
+ //即参数,func,wait
23
+ let args = arguments
24
+
25
+ //如果timer不为null, 清除定时器
26
+ if (timer) clearTimeout(timer)
27
+
28
+ //如果是立即执行
29
+ if (immediate) {
30
+ //定义callNow = !timer
31
+ var callNow = !timer
32
+ //定义wait时间后把timer变为null
33
+ //即在wait时间之后事件才会有效
34
+ timer = setTimeout(() => {
35
+ timer = null
36
+ }, wait)
37
+ //如果callNow为true,即原本timer为null
38
+ //那么执行func函数
39
+ if (callNow) func.apply(context, args)
40
+ } else {
41
+ //如果是不立即执行
42
+ //那就是每次重新定时
43
+ timer = setTimeout(function () {
44
+ func.apply(context, args)
45
+ }, wait)
46
+ }
47
+ }
48
+ }
49
+
50
+ /**
51
+ * 高并发请求打散
52
+ * @param delayHandler 目标并发量获取器
53
+ * @param options 配置项 { defaultDelay: 1000, useScatter: false }
54
+ * @param cb 回调函数
55
+ * @returns {number} 定时器
56
+ */
57
+ function scatterRequest(delayHandler, options, cb) {
58
+ let timer
59
+ const { defaultDelay = 1000, useScatter = false } = options
60
+ let delay = useScatter ? delayHandler() : defaultDelay // 默认并发量为1000
61
+ console.log(useScatter ? `[scatterRequest] High concurrency delay request: ${delay}` : '[scatterRequest] Disabled')
62
+ timer = setTimeout(() => {
63
+ cb()
64
+ }, delay)
65
+ return timer
66
+ }
67
+
68
+ module.exports = {
69
+ throttle,
70
+ debounce,
71
+ scatterRequest,
72
+ }
@@ -1,30 +1,30 @@
1
- /*
2
- * @Descripttion:
3
- * @version:
4
- * @Author: conlinchen
5
- * @Date: 2021-10-29 19:34:24
6
- * @LastEditors: conlinchen
7
- * @LastEditTime: 2021-11-01 18:25:37
8
- */
9
-
10
- //价格过滤器
11
- var filter = {
12
- priceInt: function(val){
13
- val = Number(val)
14
- return ((val / 100 ).toFixed(2) + '').split('.')[0]
15
- },
16
- priceFlow: function(val){
17
- val = Number(val)
18
- return ((val / 100 ).toFixed(2) + '').split('.')[1] || '00'
19
- },
20
- toFixed2: function(val){
21
- val = Number(val)
22
- return (val / 100 ).toFixed(2)
23
- }
24
- }
25
-
26
- module.exports = {
27
- priceInt: filter.priceInt,
28
- priceFlow: filter.priceFlow,
29
- toFixed2: filter.toFixed2
1
+ /*
2
+ * @Descripttion:
3
+ * @version:
4
+ * @Author: conlinchen
5
+ * @Date: 2021-10-29 19:34:24
6
+ * @LastEditors: conlinchen
7
+ * @LastEditTime: 2021-11-01 18:25:37
8
+ */
9
+
10
+ //价格过滤器
11
+ var filter = {
12
+ priceInt: function(val){
13
+ val = Number(val)
14
+ return ((val / 100 ).toFixed(2) + '').split('.')[0]
15
+ },
16
+ priceFlow: function(val){
17
+ val = Number(val)
18
+ return ((val / 100 ).toFixed(2) + '').split('.')[1] || '00'
19
+ },
20
+ toFixed2: function(val){
21
+ val = Number(val)
22
+ return (val / 100 ).toFixed(2)
23
+ }
24
+ }
25
+
26
+ module.exports = {
27
+ priceInt: filter.priceInt,
28
+ priceFlow: filter.priceFlow,
29
+ toFixed2: filter.toFixed2
30
30
  }