xiaoe_mp_npm 1.0.35 → 1.0.36-test01

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 (779) 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/README.md +11 -11
  20. package/miniprogram_dist/ConfirmOrder/components/AddressEdit/index.json +10 -10
  21. package/miniprogram_dist/ConfirmOrder/components/AddressEdit/index.less +123 -123
  22. package/miniprogram_dist/ConfirmOrder/components/AddressEdit/index.wxml +51 -51
  23. package/miniprogram_dist/ConfirmOrder/components/AddressManage/index.js +159 -159
  24. package/miniprogram_dist/ConfirmOrder/components/AddressManage/index.json +7 -7
  25. package/miniprogram_dist/ConfirmOrder/components/AddressManage/index.less +95 -95
  26. package/miniprogram_dist/ConfirmOrder/components/AddressManage/index.wxml +36 -36
  27. package/miniprogram_dist/ConfirmOrder/components/AddressSelect/index.js +160 -160
  28. package/miniprogram_dist/ConfirmOrder/components/AddressSelect/index.json +3 -3
  29. package/miniprogram_dist/ConfirmOrder/components/AddressSelect/index.less +79 -79
  30. package/miniprogram_dist/ConfirmOrder/components/AddressSelect/index.wxml +33 -33
  31. package/miniprogram_dist/ConfirmOrder/components/ChoosePicker/index.js +115 -115
  32. package/miniprogram_dist/ConfirmOrder/components/ChoosePicker/index.json +5 -5
  33. package/miniprogram_dist/ConfirmOrder/components/ChoosePicker/index.less +20 -20
  34. package/miniprogram_dist/ConfirmOrder/components/ChoosePicker/index.wxml +9 -9
  35. package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.js +1753 -1753
  36. package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.json +23 -23
  37. package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.scss +44 -44
  38. package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.wxml +201 -201
  39. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.js +129 -129
  40. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.json +8 -8
  41. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.scss +58 -58
  42. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxml +25 -25
  43. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityGiftList/index.js +82 -82
  44. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityGiftList/index.json +5 -5
  45. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityGiftList/index.less +51 -51
  46. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityGiftList/index.wxml +18 -18
  47. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/filter.wxs +7 -7
  48. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/index.js +94 -94
  49. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/index.json +3 -3
  50. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/index.less +112 -112
  51. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/index.wxml +28 -28
  52. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/index.json +7 -7
  53. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/index.less +62 -62
  54. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/index.wxml +33 -33
  55. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/ImageData/index.js +68 -68
  56. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/ImageData/index.json +3 -3
  57. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/ImageData/index.less +13 -13
  58. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/ImageData/index.wxml +4 -4
  59. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/filter.wxs +6 -6
  60. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.css +673 -673
  61. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.js +455 -455
  62. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.json +9 -9
  63. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.less +188 -188
  64. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.scss +222 -222
  65. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.wxml +83 -83
  66. package/miniprogram_dist/ConfirmOrder/components/Header/index.js +65 -65
  67. package/miniprogram_dist/ConfirmOrder/components/Header/index.json +5 -5
  68. package/miniprogram_dist/ConfirmOrder/components/Header/index.less +29 -29
  69. package/miniprogram_dist/ConfirmOrder/components/Header/index.wxml +9 -9
  70. package/miniprogram_dist/ConfirmOrder/components/IntegralSelect/componenets/integralTips/index.js +112 -112
  71. package/miniprogram_dist/ConfirmOrder/components/IntegralSelect/componenets/integralTips/index.json +5 -5
  72. package/miniprogram_dist/ConfirmOrder/components/IntegralSelect/componenets/integralTips/index.less +78 -78
  73. package/miniprogram_dist/ConfirmOrder/components/IntegralSelect/componenets/integralTips/index.wxml +59 -59
  74. package/miniprogram_dist/ConfirmOrder/components/IntegralSelect/filter.wxs +6 -6
  75. package/miniprogram_dist/ConfirmOrder/components/IntegralSelect/index.json +7 -7
  76. package/miniprogram_dist/ConfirmOrder/components/IntegralSelect/index.less +57 -57
  77. package/miniprogram_dist/ConfirmOrder/components/IntegralSelect/index.scss +90 -90
  78. package/miniprogram_dist/ConfirmOrder/components/IntegralSelect/index.wxml +29 -29
  79. package/miniprogram_dist/ConfirmOrder/components/Invoice/components/InvoiceSelect/index.json +7 -7
  80. package/miniprogram_dist/ConfirmOrder/components/Invoice/components/InvoiceTip/index.js +48 -48
  81. package/miniprogram_dist/ConfirmOrder/components/Invoice/components/InvoiceTip/index.json +5 -5
  82. package/miniprogram_dist/ConfirmOrder/components/Invoice/components/InvoiceTip/index.less +57 -57
  83. package/miniprogram_dist/ConfirmOrder/components/Invoice/components/InvoiceTip/index.wxml +20 -20
  84. package/miniprogram_dist/ConfirmOrder/components/Invoice/index.js +176 -176
  85. package/miniprogram_dist/ConfirmOrder/components/Invoice/index.json +6 -6
  86. package/miniprogram_dist/ConfirmOrder/components/Invoice/index.less +27 -27
  87. package/miniprogram_dist/ConfirmOrder/components/Invoice/index.scss +60 -60
  88. package/miniprogram_dist/ConfirmOrder/components/Invoice/index.wxml +29 -29
  89. package/miniprogram_dist/ConfirmOrder/components/LeaveWord/index.js +52 -52
  90. package/miniprogram_dist/ConfirmOrder/components/LeaveWord/index.json +5 -5
  91. package/miniprogram_dist/ConfirmOrder/components/LeaveWord/index.less +5 -5
  92. package/miniprogram_dist/ConfirmOrder/components/LeaveWord/index.scss +41 -41
  93. package/miniprogram_dist/ConfirmOrder/components/LeaveWord/index.wxml +11 -11
  94. package/miniprogram_dist/ConfirmOrder/components/LimitDiscount/index.js +49 -49
  95. package/miniprogram_dist/ConfirmOrder/components/LimitDiscount/index.json +3 -3
  96. package/miniprogram_dist/ConfirmOrder/components/LimitDiscount/index.wxml +1 -1
  97. package/miniprogram_dist/ConfirmOrder/components/ModeSelect/index.js +79 -79
  98. package/miniprogram_dist/ConfirmOrder/components/ModeSelect/index.json +6 -6
  99. package/miniprogram_dist/ConfirmOrder/components/ModeSelect/index.less +34 -34
  100. package/miniprogram_dist/ConfirmOrder/components/ModeSelect/index.wxml +15 -15
  101. package/miniprogram_dist/ConfirmOrder/components/PayBar/index.css +145 -145
  102. package/miniprogram_dist/ConfirmOrder/components/PayBar/index.js +241 -241
  103. package/miniprogram_dist/ConfirmOrder/components/PayBar/index.json +5 -5
  104. package/miniprogram_dist/ConfirmOrder/components/PayBar/index.less +28 -28
  105. package/miniprogram_dist/ConfirmOrder/components/PayBar/index.scss +71 -71
  106. package/miniprogram_dist/ConfirmOrder/components/PayDetail/filter.wxs +15 -15
  107. package/miniprogram_dist/ConfirmOrder/components/PayDetail/index.js +73 -73
  108. package/miniprogram_dist/ConfirmOrder/components/PayDetail/index.json +6 -6
  109. package/miniprogram_dist/ConfirmOrder/components/PayDetail/index.less +39 -39
  110. package/miniprogram_dist/ConfirmOrder/components/PayDetail/index.scss +40 -40
  111. package/miniprogram_dist/ConfirmOrder/components/PayDetail/index.wxml +50 -50
  112. package/miniprogram_dist/ConfirmOrder/components/PayGifts/index.js +23 -23
  113. package/miniprogram_dist/ConfirmOrder/components/PayGifts/index.json +3 -3
  114. package/miniprogram_dist/ConfirmOrder/components/PayGifts/index.wxml +2 -2
  115. package/miniprogram_dist/ConfirmOrder/components/PickupSelect/index.js +99 -99
  116. package/miniprogram_dist/ConfirmOrder/components/PickupSelect/index.json +7 -7
  117. package/miniprogram_dist/ConfirmOrder/components/PickupSelect/index.less +23 -23
  118. package/miniprogram_dist/ConfirmOrder/components/PickupSelect/index.wxml +13 -13
  119. package/miniprogram_dist/ConfirmOrder/components/SelectSite/index.json +6 -6
  120. package/miniprogram_dist/ConfirmOrder/components/SelectSite/index.less +95 -95
  121. package/miniprogram_dist/ConfirmOrder/components/SelectSite/index.wxml +46 -46
  122. package/miniprogram_dist/ConfirmOrder/components/Shipper/index.js +99 -99
  123. package/miniprogram_dist/ConfirmOrder/components/Shipper/index.json +5 -5
  124. package/miniprogram_dist/ConfirmOrder/components/Shipper/index.less +69 -69
  125. package/miniprogram_dist/ConfirmOrder/components/Shipper/index.wxml +15 -15
  126. package/miniprogram_dist/ConfirmOrder/components/ShipperEdit/index.json +7 -7
  127. package/miniprogram_dist/ConfirmOrder/components/ShipperEdit/index.less +76 -76
  128. package/miniprogram_dist/ConfirmOrder/components/ShipperEdit/index.wxml +19 -19
  129. package/miniprogram_dist/ConfirmOrder/components/SvipSelect/SvipSelect.js +91 -91
  130. package/miniprogram_dist/ConfirmOrder/components/SvipSelect/SvipSelect.json +6 -6
  131. package/miniprogram_dist/ConfirmOrder/components/SvipSelect/SvipSelect.scss +150 -150
  132. package/miniprogram_dist/ConfirmOrder/components/SvipSelect/SvipSelect.wxml +39 -39
  133. package/miniprogram_dist/ConfirmOrder/components/SvipSelect/filter.wxs +6 -6
  134. package/miniprogram_dist/ConfirmOrder/components/WechatAddress/index.js +55 -55
  135. package/miniprogram_dist/ConfirmOrder/components/WechatAddress/index.json +3 -3
  136. package/miniprogram_dist/ConfirmOrder/components/WechatAddress/index.less +24 -24
  137. package/miniprogram_dist/ConfirmOrder/components/WechatAddress/index.wxml +8 -8
  138. package/miniprogram_dist/ConfirmOrder/index.js +111 -111
  139. package/miniprogram_dist/ConfirmOrder/index.json +8 -8
  140. package/miniprogram_dist/ConfirmOrder/index.less +4 -4
  141. package/miniprogram_dist/CopGoodsCard/constans.js +462 -462
  142. package/miniprogram_dist/CopGoodsCard/index.js +147 -147
  143. package/miniprogram_dist/CopGoodsCard/index.json +2 -2
  144. package/miniprogram_dist/CopGoodsCard/index.scss +100 -100
  145. package/miniprogram_dist/CopGoodsCard/index.wxml +20 -20
  146. package/miniprogram_dist/CouponList/README.md +5 -5
  147. package/miniprogram_dist/CouponList/components/CouponItem/index.js +633 -633
  148. package/miniprogram_dist/CouponList/components/CouponItem/index.json +4 -4
  149. package/miniprogram_dist/CouponList/components/CouponItem/index.scss +959 -959
  150. package/miniprogram_dist/CouponList/components/CouponItem/index.wxml +267 -267
  151. package/miniprogram_dist/CouponList/components/couponIcon/index.js +20 -20
  152. package/miniprogram_dist/CouponList/components/couponIcon/index.json +3 -3
  153. package/miniprogram_dist/CouponList/components/couponIcon/index.scss +51 -51
  154. package/miniprogram_dist/CouponList/components/couponIcon/index.wxml +2 -2
  155. package/miniprogram_dist/CouponList/couponColumn/index.js +185 -185
  156. package/miniprogram_dist/CouponList/couponColumn/index.json +5 -5
  157. package/miniprogram_dist/CouponList/couponColumn/index.less +66 -66
  158. package/miniprogram_dist/CouponList/couponColumn/index.scss +117 -117
  159. package/miniprogram_dist/CouponList/couponColumn/index.wxml +39 -39
  160. package/miniprogram_dist/CouponList/couponMsg/index.js +27 -27
  161. package/miniprogram_dist/CouponList/couponMsg/index.json +5 -5
  162. package/miniprogram_dist/CouponList/couponMsg/index.less +2 -2
  163. package/miniprogram_dist/CouponList/couponMsg/index.wxml +9 -9
  164. package/miniprogram_dist/CouponList/stuCouponPopup/index.js +369 -369
  165. package/miniprogram_dist/CouponList/stuCouponPopup/index.json +7 -7
  166. package/miniprogram_dist/CouponList/stuCouponPopup/index.scss +157 -157
  167. package/miniprogram_dist/CouponList/stuCouponPopup/index.wxml +77 -77
  168. package/miniprogram_dist/CouponReceivePopup/index.js +96 -96
  169. package/miniprogram_dist/CouponReceivePopup/index.json +5 -5
  170. package/miniprogram_dist/CouponReceivePopup/index.scss +235 -235
  171. package/miniprogram_dist/CouponReceivePopup/index.wxml +104 -104
  172. package/miniprogram_dist/CustomPopup/index.js +94 -94
  173. package/miniprogram_dist/CustomPopup/index.json +5 -5
  174. package/miniprogram_dist/CustomPopup/index.less +21 -21
  175. package/miniprogram_dist/CustomPopup/index.wxml +33 -33
  176. package/miniprogram_dist/GoodsItem/index.js +1085 -1085
  177. package/miniprogram_dist/GoodsItem/index.scss +558 -558
  178. package/miniprogram_dist/GoodsItem/index.wxml +208 -208
  179. package/miniprogram_dist/GoodsRecommend/fun.wxs +37 -37
  180. package/miniprogram_dist/GoodsRecommend/index.js +91 -91
  181. package/miniprogram_dist/GoodsRecommend/index.json +3 -3
  182. package/miniprogram_dist/GoodsRecommend/index.less +129 -129
  183. package/miniprogram_dist/GoodsRecommend/index.scss +162 -162
  184. package/miniprogram_dist/GoodsRecommend/index.wxml +47 -47
  185. package/miniprogram_dist/LiveGoodsList/index.js +893 -893
  186. package/miniprogram_dist/LiveGoodsList/index.wxml +105 -105
  187. package/miniprogram_dist/PayComplete/Components/CouponItem/index.js +50 -50
  188. package/miniprogram_dist/PayComplete/Components/CouponItem/index.json +3 -3
  189. package/miniprogram_dist/PayComplete/Components/CouponItem/index.less +142 -142
  190. package/miniprogram_dist/PayComplete/Components/CouponItem/index.wxml +46 -46
  191. package/miniprogram_dist/PayComplete/Components/CouponItem/sub.wxs +72 -72
  192. package/miniprogram_dist/PayComplete/Components/Header/index.js +32 -32
  193. package/miniprogram_dist/PayComplete/Components/Header/index.json +5 -5
  194. package/miniprogram_dist/PayComplete/Components/Header/index.less +30 -30
  195. package/miniprogram_dist/PayComplete/Components/Header/index.wxml +9 -9
  196. package/miniprogram_dist/PayComplete/Components/LeadGroup/index.js +95 -95
  197. package/miniprogram_dist/PayComplete/Components/LeadGroup/index.json +6 -6
  198. package/miniprogram_dist/PayComplete/Components/LeadGroup/index.less +37 -37
  199. package/miniprogram_dist/PayComplete/Components/LeadGroup/index.wxml +5 -5
  200. package/miniprogram_dist/PayComplete/Components/PayGifts/index.js +138 -138
  201. package/miniprogram_dist/PayComplete/Components/PayGifts/index.json +5 -5
  202. package/miniprogram_dist/PayComplete/Components/PayGifts/index.less +177 -177
  203. package/miniprogram_dist/PayComplete/Components/PayGifts/index.wxml +71 -71
  204. package/miniprogram_dist/PayComplete/Components/PayState/earnIntegral/index.js +62 -62
  205. package/miniprogram_dist/PayComplete/Components/PayState/earnIntegral/index.json +5 -5
  206. package/miniprogram_dist/PayComplete/Components/PayState/earnIntegral/index.less +25 -25
  207. package/miniprogram_dist/PayComplete/Components/PayState/earnIntegral/index.wxml +4 -4
  208. package/miniprogram_dist/PayComplete/Components/PayState/index.js +38 -38
  209. package/miniprogram_dist/PayComplete/Components/PayState/index.json +6 -6
  210. package/miniprogram_dist/PayComplete/Components/PayState/index.less +22 -22
  211. package/miniprogram_dist/PayComplete/Components/PayState/index.wxml +11 -11
  212. package/miniprogram_dist/PayComplete/index.js +168 -168
  213. package/miniprogram_dist/PayComplete/index.json +11 -11
  214. package/miniprogram_dist/PayComplete/index.less +26 -26
  215. package/miniprogram_dist/PayComplete/index.wxml +13 -13
  216. package/miniprogram_dist/PayModule/button/index.js +44 -44
  217. package/miniprogram_dist/PayModule/button/index.json +6 -6
  218. package/miniprogram_dist/PayModule/button/index.less +14 -14
  219. package/miniprogram_dist/PayModule/button/index.scss +44 -44
  220. package/miniprogram_dist/PayModule/button/index.wxml +7 -7
  221. package/miniprogram_dist/PayModule/index/index.js +264 -264
  222. package/miniprogram_dist/PayModule/index/index.json +7 -7
  223. package/miniprogram_dist/PayModule/index/index.wxml +12 -12
  224. package/miniprogram_dist/PayModule/wechatLoading/index.js +43 -43
  225. package/miniprogram_dist/PayModule/wechatLoading/index.json +4 -4
  226. package/miniprogram_dist/PayModule/wechatLoading/index.less +66 -66
  227. package/miniprogram_dist/PayModule/wechatLoading/index.wxml +11 -11
  228. package/miniprogram_dist/Recommend/index.js +58 -58
  229. package/miniprogram_dist/Recommend/index.json +3 -3
  230. package/miniprogram_dist/Recommend/index.less +115 -115
  231. package/miniprogram_dist/Recommend/index.wxml +29 -29
  232. package/miniprogram_dist/Sku/Header/index.js +32 -32
  233. package/miniprogram_dist/Sku/Header/index.json +5 -5
  234. package/miniprogram_dist/Sku/Header/index.less +30 -30
  235. package/miniprogram_dist/Sku/Header/index.wxml +9 -9
  236. package/miniprogram_dist/Sku/goods-info/index.json +4 -4
  237. package/miniprogram_dist/Sku/goods-info/index.less +54 -54
  238. package/miniprogram_dist/Sku/index/index.json +13 -13
  239. package/miniprogram_dist/Sku/index/index.less +81 -81
  240. package/miniprogram_dist/Sku/row-item/index.js +61 -61
  241. package/miniprogram_dist/Sku/row-item/index.json +4 -4
  242. package/miniprogram_dist/Sku/row-item/index.less +55 -55
  243. package/miniprogram_dist/Sku/row-item/index.wxml +10 -10
  244. package/miniprogram_dist/Sku/step/index.js +95 -95
  245. package/miniprogram_dist/Sku/step/index.json +6 -6
  246. package/miniprogram_dist/Sku/step/index.less +11 -11
  247. package/miniprogram_dist/Sku/step/index.wxml +11 -11
  248. package/miniprogram_dist/Task/TaskBubble/index.js +7 -1
  249. package/miniprogram_dist/Task/TaskBubble/index.json +3 -3
  250. package/miniprogram_dist/Task/TaskBubble/index.scss +125 -125
  251. package/miniprogram_dist/Task/TaskBubble/index.wxml +22 -22
  252. package/miniprogram_dist/Task/TaskIcon/index.js +29 -29
  253. package/miniprogram_dist/Task/TaskIcon/index.json +4 -4
  254. package/miniprogram_dist/Task/TaskIcon/index.scss +70 -70
  255. package/miniprogram_dist/Task/TaskIcon/index.wxml +5 -5
  256. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.js +41 -41
  257. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.json +6 -6
  258. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.scss +39 -39
  259. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.wxml +20 -20
  260. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.js +498 -471
  261. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.json +5 -5
  262. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.scss +222 -222
  263. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxml +99 -94
  264. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxs +7 -7
  265. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.js +296 -290
  266. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.json +7 -7
  267. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.scss +66 -66
  268. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.wxml +41 -41
  269. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.js +125 -125
  270. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.json +9 -9
  271. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.scss +90 -90
  272. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.wxml +62 -62
  273. package/miniprogram_dist/Task/TaskPopup/index.js +139 -138
  274. package/miniprogram_dist/Task/TaskPopup/index.json +7 -7
  275. package/miniprogram_dist/Task/TaskPopup/index.scss +140 -140
  276. package/miniprogram_dist/Task/TaskPopup/index.wxml +79 -79
  277. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.js +131 -131
  278. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.json +5 -5
  279. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.scss +191 -191
  280. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxml +64 -64
  281. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxs +78 -78
  282. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.js +40 -40
  283. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.json +5 -5
  284. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.scss +6 -6
  285. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.wxml +1 -1
  286. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/base.wxml +50 -50
  287. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/html2json.js +623 -623
  288. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/htmlparser.js +183 -183
  289. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/iframeParse.js +216 -216
  290. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/loop.wxml +3563 -3563
  291. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/showdown.js +2364 -2364
  292. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxDiscode.js +209 -209
  293. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.js +269 -269
  294. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.wxml +1276 -1276
  295. package/miniprogram_dist/Task/TaskQuizPopup/index.js +246 -246
  296. package/miniprogram_dist/Task/TaskQuizPopup/index.json +7 -7
  297. package/miniprogram_dist/Task/TaskQuizPopup/index.scss +158 -158
  298. package/miniprogram_dist/Task/TaskQuizPopup/index.wxml +99 -99
  299. package/miniprogram_dist/Task/common/task.js +55 -55
  300. package/miniprogram_dist/Task/taskQuizRemindPopup/index.js +74 -74
  301. package/miniprogram_dist/Task/taskQuizRemindPopup/index.json +5 -5
  302. package/miniprogram_dist/Task/taskQuizRemindPopup/index.scss +107 -107
  303. package/miniprogram_dist/Task/taskQuizRemindPopup/index.wxml +27 -27
  304. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.js +57 -57
  305. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.json +6 -6
  306. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.scss +123 -123
  307. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxml +70 -70
  308. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxs +48 -48
  309. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.js +44 -44
  310. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.json +6 -6
  311. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.scss +106 -106
  312. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.wxml +38 -38
  313. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.wxs +48 -48
  314. package/miniprogram_dist/Task/taskReceivePopup/index.json +13 -13
  315. package/miniprogram_dist/Task/taskReceivePopup/index.wxml +26 -26
  316. package/miniprogram_dist/Task/taskReceivePopup/integral/index.js +71 -71
  317. package/miniprogram_dist/Task/taskReceivePopup/integral/index.json +6 -6
  318. package/miniprogram_dist/Task/taskReceivePopup/integral/index.scss +60 -60
  319. package/miniprogram_dist/Task/taskReceivePopup/integral/index.wxml +12 -12
  320. package/miniprogram_dist/TeacherGoodsList/README.md +9 -9
  321. package/miniprogram_dist/TeacherGoodsList/index.js +859 -859
  322. package/miniprogram_dist/TeacherGoodsList/index.json +9 -9
  323. package/miniprogram_dist/TeacherGoodsList/index.scss +154 -154
  324. package/miniprogram_dist/TeacherGoodsList/index.wxml +116 -116
  325. package/miniprogram_dist/common/api/confirmOrder.js +229 -229
  326. package/miniprogram_dist/common/api/coupon.js +19 -19
  327. package/miniprogram_dist/common/api/couponlist.js +73 -73
  328. package/miniprogram_dist/common/api/getInfoForm.js +14 -14
  329. package/miniprogram_dist/common/api/liveGoodsList.js +103 -103
  330. package/miniprogram_dist/common/api/pay.js +42 -42
  331. package/miniprogram_dist/common/api/payComplete.js +21 -21
  332. package/miniprogram_dist/common/api/sku.js +73 -73
  333. package/miniprogram_dist/common/assets/images/coupon/emptypage.svg +49 -49
  334. package/miniprogram_dist/common/assets/images/coupon/failed.svg +5 -5
  335. package/miniprogram_dist/common/assets/images/coupon/up.svg +21 -21
  336. package/miniprogram_dist/common/assets/images/pay/loading.svg +3 -3
  337. package/miniprogram_dist/common/assets/images/recommend.svg +6 -6
  338. package/miniprogram_dist/common/assets/images/refresh.svg +10 -10
  339. package/miniprogram_dist/common/assets/images/refresh_white.svg +3 -3
  340. package/miniprogram_dist/common/assets/images/wechat.svg +4 -4
  341. package/miniprogram_dist/common/css/index.less +2 -2
  342. package/miniprogram_dist/common/css/theme.less +19 -19
  343. package/miniprogram_dist/common/libs/dataUp/sensorUp.js +91 -91
  344. package/miniprogram_dist/common/libs/playerHttp.js +58 -58
  345. package/miniprogram_dist/common/libs/playerRequestUrl.js +39 -39
  346. package/miniprogram_dist/common/transaction/parameter/channel-info.js +36 -36
  347. package/miniprogram_dist/common/transaction/parameter/delivery-info.js +26 -26
  348. package/miniprogram_dist/common/transaction/parameter/misc-parameter.js +21 -21
  349. package/miniprogram_dist/common/utils/currency.js +52 -52
  350. package/miniprogram_dist/common/utils/getInfoCollectionData.js +59 -59
  351. package/miniprogram_dist/common/utils/image-cdn-slim/constant.js +8 -8
  352. package/miniprogram_dist/common/utils/image-cdn-slim/index.js +7 -7
  353. package/miniprogram_dist/common/utils/image-cdn-slim/utils.js +156 -156
  354. package/miniprogram_dist/common/utils/index.js +69 -69
  355. package/miniprogram_dist/common/utils/specialList.js +5 -5
  356. package/miniprogram_dist/common/utils/tool.js +72 -72
  357. package/miniprogram_dist/common/wxs/filter.wxs +29 -29
  358. package/miniprogram_dist/coupon/README.md +11 -11
  359. package/miniprogram_dist/coupon/components/CouponItem/index.json +5 -5
  360. package/miniprogram_dist/coupon/components/CouponItem/index.less +208 -208
  361. package/miniprogram_dist/coupon/components/CouponItem/index.scss +246 -246
  362. package/miniprogram_dist/coupon/components/CouponSelect/index.json +8 -8
  363. package/miniprogram_dist/coupon/components/CouponSelect/index.less +280 -280
  364. package/miniprogram_dist/coupon/components/CouponSelect/index.scss +330 -330
  365. package/miniprogram_dist/coupon/index.css +50 -50
  366. package/miniprogram_dist/coupon/index.js +271 -271
  367. package/miniprogram_dist/coupon/index.json +7 -7
  368. package/miniprogram_dist/coupon/index.less +51 -51
  369. package/miniprogram_dist/coupon/index.scss +83 -83
  370. package/miniprogram_dist/index.js +6 -6
  371. package/miniprogram_dist/index.js.map +1 -1
  372. package/miniprogram_dist/index.json +4 -4
  373. package/miniprogram_dist/index.wxml +2 -2
  374. package/miniprogram_dist/lib.js.map +1 -1
  375. package/package.json +78 -78
  376. package/project.config.json +79 -79
  377. package/src/AliveInvite/LiveRoomVertical/components/friends/friends.js +181 -181
  378. package/src/AliveInvite/LiveRoomVertical/components/friends/friends.wxml +25 -25
  379. package/src/AliveInvite/LiveRoomVertical/components/friends/friends.wxss +97 -97
  380. package/src/AliveInvite/LiveRoomVertical/index.js +253 -253
  381. package/src/AliveInvite/LiveRoomVertical/index.less +255 -255
  382. package/src/AliveInvite/LiveRoomVertical/index.wxml +122 -122
  383. package/src/CollectionAddress/index.js +288 -288
  384. package/src/CollectionAddress/index.json +13 -13
  385. package/src/CollectionAddress/index.less +4 -4
  386. package/src/CollectionAddress/index.wxml +93 -93
  387. package/src/ConfirmOrder/README.md +11 -11
  388. package/src/ConfirmOrder/components/AddressEdit/index.json +10 -10
  389. package/src/ConfirmOrder/components/AddressEdit/index.less +123 -123
  390. package/src/ConfirmOrder/components/AddressEdit/index.wxml +51 -51
  391. package/src/ConfirmOrder/components/AddressManage/index.js +159 -159
  392. package/src/ConfirmOrder/components/AddressManage/index.json +7 -7
  393. package/src/ConfirmOrder/components/AddressManage/index.less +95 -95
  394. package/src/ConfirmOrder/components/AddressManage/index.wxml +36 -36
  395. package/src/ConfirmOrder/components/AddressSelect/index.js +160 -160
  396. package/src/ConfirmOrder/components/AddressSelect/index.json +3 -3
  397. package/src/ConfirmOrder/components/AddressSelect/index.less +79 -79
  398. package/src/ConfirmOrder/components/AddressSelect/index.wxml +33 -33
  399. package/src/ConfirmOrder/components/ChoosePicker/index.js +115 -115
  400. package/src/ConfirmOrder/components/ChoosePicker/index.json +5 -5
  401. package/src/ConfirmOrder/components/ChoosePicker/index.less +20 -20
  402. package/src/ConfirmOrder/components/ChoosePicker/index.wxml +9 -9
  403. package/src/ConfirmOrder/components/ConfirmOrderContent/index.js +1753 -1753
  404. package/src/ConfirmOrder/components/ConfirmOrderContent/index.json +23 -23
  405. package/src/ConfirmOrder/components/ConfirmOrderContent/index.scss +44 -44
  406. package/src/ConfirmOrder/components/ConfirmOrderContent/index.wxml +201 -201
  407. package/src/ConfirmOrder/components/ConfirmOrderContent/index.wxss +15 -15
  408. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.js +129 -129
  409. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.json +8 -8
  410. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.scss +58 -58
  411. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxml +25 -25
  412. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxss +1 -1
  413. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityGiftList/index.js +82 -82
  414. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityGiftList/index.json +5 -5
  415. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityGiftList/index.less +51 -51
  416. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityGiftList/index.wxml +18 -18
  417. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/filter.wxs +7 -7
  418. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/index.js +94 -94
  419. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/index.json +3 -3
  420. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/index.less +112 -112
  421. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/index.wxml +28 -28
  422. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/index.json +7 -7
  423. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/index.less +62 -62
  424. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/index.wxml +33 -33
  425. package/src/ConfirmOrder/components/GoodsInfo/components/ImageData/index.js +68 -68
  426. package/src/ConfirmOrder/components/GoodsInfo/components/ImageData/index.json +3 -3
  427. package/src/ConfirmOrder/components/GoodsInfo/components/ImageData/index.less +13 -13
  428. package/src/ConfirmOrder/components/GoodsInfo/components/ImageData/index.wxml +4 -4
  429. package/src/ConfirmOrder/components/GoodsInfo/filter.wxs +6 -6
  430. package/src/ConfirmOrder/components/GoodsInfo/index.css +673 -673
  431. package/src/ConfirmOrder/components/GoodsInfo/index.js +455 -455
  432. package/src/ConfirmOrder/components/GoodsInfo/index.json +9 -9
  433. package/src/ConfirmOrder/components/GoodsInfo/index.less +188 -188
  434. package/src/ConfirmOrder/components/GoodsInfo/index.scss +222 -222
  435. package/src/ConfirmOrder/components/GoodsInfo/index.wxml +83 -83
  436. package/src/ConfirmOrder/components/GoodsInfo/index.wxss +1 -1
  437. package/src/ConfirmOrder/components/Header/index.js +65 -65
  438. package/src/ConfirmOrder/components/Header/index.json +5 -5
  439. package/src/ConfirmOrder/components/Header/index.less +29 -29
  440. package/src/ConfirmOrder/components/Header/index.wxml +9 -9
  441. package/src/ConfirmOrder/components/IntegralSelect/componenets/integralTips/index.js +112 -112
  442. package/src/ConfirmOrder/components/IntegralSelect/componenets/integralTips/index.json +5 -5
  443. package/src/ConfirmOrder/components/IntegralSelect/componenets/integralTips/index.less +78 -78
  444. package/src/ConfirmOrder/components/IntegralSelect/componenets/integralTips/index.wxml +59 -59
  445. package/src/ConfirmOrder/components/IntegralSelect/filter.wxs +6 -6
  446. package/src/ConfirmOrder/components/IntegralSelect/index.json +7 -7
  447. package/src/ConfirmOrder/components/IntegralSelect/index.less +57 -57
  448. package/src/ConfirmOrder/components/IntegralSelect/index.scss +90 -90
  449. package/src/ConfirmOrder/components/IntegralSelect/index.wxml +29 -29
  450. package/src/ConfirmOrder/components/IntegralSelect/index.wxss +218 -218
  451. package/src/ConfirmOrder/components/Invoice/components/InvoiceSelect/index.json +7 -7
  452. package/src/ConfirmOrder/components/Invoice/components/InvoiceSelect/index.wxss +191 -191
  453. package/src/ConfirmOrder/components/Invoice/components/InvoiceTip/index.js +48 -48
  454. package/src/ConfirmOrder/components/Invoice/components/InvoiceTip/index.json +5 -5
  455. package/src/ConfirmOrder/components/Invoice/components/InvoiceTip/index.less +57 -57
  456. package/src/ConfirmOrder/components/Invoice/components/InvoiceTip/index.wxml +20 -20
  457. package/src/ConfirmOrder/components/Invoice/index.js +176 -176
  458. package/src/ConfirmOrder/components/Invoice/index.json +6 -6
  459. package/src/ConfirmOrder/components/Invoice/index.less +27 -27
  460. package/src/ConfirmOrder/components/Invoice/index.scss +60 -60
  461. package/src/ConfirmOrder/components/Invoice/index.wxml +29 -29
  462. package/src/ConfirmOrder/components/Invoice/index.wxss +93 -93
  463. package/src/ConfirmOrder/components/LeaveWord/index.js +52 -52
  464. package/src/ConfirmOrder/components/LeaveWord/index.json +5 -5
  465. package/src/ConfirmOrder/components/LeaveWord/index.less +5 -5
  466. package/src/ConfirmOrder/components/LeaveWord/index.scss +41 -41
  467. package/src/ConfirmOrder/components/LeaveWord/index.wxml +11 -11
  468. package/src/ConfirmOrder/components/LeaveWord/index.wxss +1 -1
  469. package/src/ConfirmOrder/components/LimitDiscount/index.js +49 -49
  470. package/src/ConfirmOrder/components/LimitDiscount/index.json +3 -3
  471. package/src/ConfirmOrder/components/LimitDiscount/index.wxml +1 -1
  472. package/src/ConfirmOrder/components/ModeSelect/index.js +79 -79
  473. package/src/ConfirmOrder/components/ModeSelect/index.json +6 -6
  474. package/src/ConfirmOrder/components/ModeSelect/index.less +34 -34
  475. package/src/ConfirmOrder/components/ModeSelect/index.wxml +15 -15
  476. package/src/ConfirmOrder/components/PayBar/index.css +145 -145
  477. package/src/ConfirmOrder/components/PayBar/index.js +241 -241
  478. package/src/ConfirmOrder/components/PayBar/index.json +5 -5
  479. package/src/ConfirmOrder/components/PayBar/index.less +28 -28
  480. package/src/ConfirmOrder/components/PayBar/index.scss +71 -71
  481. package/src/ConfirmOrder/components/PayBar/index.wxss +1 -1
  482. package/src/ConfirmOrder/components/PayDetail/filter.wxs +15 -15
  483. package/src/ConfirmOrder/components/PayDetail/index.js +73 -73
  484. package/src/ConfirmOrder/components/PayDetail/index.json +6 -6
  485. package/src/ConfirmOrder/components/PayDetail/index.less +39 -39
  486. package/src/ConfirmOrder/components/PayDetail/index.scss +40 -40
  487. package/src/ConfirmOrder/components/PayDetail/index.wxml +50 -50
  488. package/src/ConfirmOrder/components/PayDetail/index.wxss +78 -78
  489. package/src/ConfirmOrder/components/PayGifts/index.js +23 -23
  490. package/src/ConfirmOrder/components/PayGifts/index.json +3 -3
  491. package/src/ConfirmOrder/components/PayGifts/index.wxml +2 -2
  492. package/src/ConfirmOrder/components/PickupSelect/index.js +99 -99
  493. package/src/ConfirmOrder/components/PickupSelect/index.json +7 -7
  494. package/src/ConfirmOrder/components/PickupSelect/index.less +23 -23
  495. package/src/ConfirmOrder/components/PickupSelect/index.wxml +13 -13
  496. package/src/ConfirmOrder/components/SelectSite/index.json +6 -6
  497. package/src/ConfirmOrder/components/SelectSite/index.less +95 -95
  498. package/src/ConfirmOrder/components/SelectSite/index.wxml +46 -46
  499. package/src/ConfirmOrder/components/Shipper/index.js +99 -99
  500. package/src/ConfirmOrder/components/Shipper/index.json +5 -5
  501. package/src/ConfirmOrder/components/Shipper/index.less +69 -69
  502. package/src/ConfirmOrder/components/Shipper/index.wxml +15 -15
  503. package/src/ConfirmOrder/components/ShipperEdit/index.json +7 -7
  504. package/src/ConfirmOrder/components/ShipperEdit/index.less +76 -76
  505. package/src/ConfirmOrder/components/ShipperEdit/index.wxml +19 -19
  506. package/src/ConfirmOrder/components/SvipSelect/SvipSelect.js +91 -91
  507. package/src/ConfirmOrder/components/SvipSelect/SvipSelect.json +6 -6
  508. package/src/ConfirmOrder/components/SvipSelect/SvipSelect.scss +150 -150
  509. package/src/ConfirmOrder/components/SvipSelect/SvipSelect.wxml +39 -39
  510. package/src/ConfirmOrder/components/SvipSelect/SvipSelect.wxss +266 -266
  511. package/src/ConfirmOrder/components/SvipSelect/filter.wxs +6 -6
  512. package/src/ConfirmOrder/components/WechatAddress/index.js +55 -55
  513. package/src/ConfirmOrder/components/WechatAddress/index.json +3 -3
  514. package/src/ConfirmOrder/components/WechatAddress/index.less +24 -24
  515. package/src/ConfirmOrder/components/WechatAddress/index.wxml +8 -8
  516. package/src/ConfirmOrder/index.js +111 -111
  517. package/src/ConfirmOrder/index.json +8 -8
  518. package/src/ConfirmOrder/index.less +4 -4
  519. package/src/CopGoodsCard/constans.js +462 -462
  520. package/src/CopGoodsCard/index.js +147 -147
  521. package/src/CopGoodsCard/index.json +2 -2
  522. package/src/CopGoodsCard/index.scss +100 -100
  523. package/src/CopGoodsCard/index.wxml +20 -20
  524. package/src/CopGoodsCard/index.wxss +1 -1
  525. package/src/CouponList/README.md +5 -5
  526. package/src/CouponList/components/CouponItem/index.js +633 -633
  527. package/src/CouponList/components/CouponItem/index.json +4 -4
  528. package/src/CouponList/components/CouponItem/index.scss +959 -959
  529. package/src/CouponList/components/CouponItem/index.wxml +267 -267
  530. package/src/CouponList/components/CouponItem/index.wxss +1 -1
  531. package/src/CouponList/components/couponIcon/index.js +20 -20
  532. package/src/CouponList/components/couponIcon/index.json +3 -3
  533. package/src/CouponList/components/couponIcon/index.scss +51 -51
  534. package/src/CouponList/components/couponIcon/index.wxml +2 -2
  535. package/src/CouponList/components/couponIcon/index.wxss +1 -1
  536. package/src/CouponList/couponColumn/index.js +185 -185
  537. package/src/CouponList/couponColumn/index.json +5 -5
  538. package/src/CouponList/couponColumn/index.less +66 -66
  539. package/src/CouponList/couponColumn/index.scss +117 -117
  540. package/src/CouponList/couponColumn/index.wxml +39 -39
  541. package/src/CouponList/couponColumn/index.wxss +265 -265
  542. package/src/CouponList/couponMsg/index.js +27 -27
  543. package/src/CouponList/couponMsg/index.json +5 -5
  544. package/src/CouponList/couponMsg/index.less +2 -2
  545. package/src/CouponList/couponMsg/index.wxml +9 -9
  546. package/src/CouponList/stuCouponPopup/index.js +369 -369
  547. package/src/CouponList/stuCouponPopup/index.json +7 -7
  548. package/src/CouponList/stuCouponPopup/index.scss +157 -157
  549. package/src/CouponList/stuCouponPopup/index.wxml +77 -77
  550. package/src/CouponList/stuCouponPopup/index.wxss +1 -1
  551. package/src/CouponReceivePopup/index.js +96 -96
  552. package/src/CouponReceivePopup/index.json +5 -5
  553. package/src/CouponReceivePopup/index.scss +235 -235
  554. package/src/CouponReceivePopup/index.wxml +104 -104
  555. package/src/CouponReceivePopup/index.wxss +1 -1
  556. package/src/CustomPopup/index.js +94 -94
  557. package/src/CustomPopup/index.json +5 -5
  558. package/src/CustomPopup/index.less +21 -21
  559. package/src/CustomPopup/index.wxml +33 -33
  560. package/src/GoodsItem/index.js +1085 -1085
  561. package/src/GoodsItem/index.scss +558 -558
  562. package/src/GoodsItem/index.wxml +208 -208
  563. package/src/GoodsItem/index.wxss +1 -1
  564. package/src/GoodsRecommend/fun.wxs +37 -37
  565. package/src/GoodsRecommend/index.js +91 -91
  566. package/src/GoodsRecommend/index.json +3 -3
  567. package/src/GoodsRecommend/index.less +129 -129
  568. package/src/GoodsRecommend/index.scss +162 -162
  569. package/src/GoodsRecommend/index.wxml +47 -47
  570. package/src/GoodsRecommend/index.wxss +537 -537
  571. package/src/LiveGoodsList/Header/index.wxss +1 -1
  572. package/src/LiveGoodsList/index.js +893 -893
  573. package/src/LiveGoodsList/index.wxml +105 -105
  574. package/src/PayComplete/Components/CouponItem/index.js +50 -50
  575. package/src/PayComplete/Components/CouponItem/index.json +3 -3
  576. package/src/PayComplete/Components/CouponItem/index.less +142 -142
  577. package/src/PayComplete/Components/CouponItem/index.wxml +46 -46
  578. package/src/PayComplete/Components/CouponItem/sub.wxs +72 -72
  579. package/src/PayComplete/Components/Header/index.js +32 -32
  580. package/src/PayComplete/Components/Header/index.json +5 -5
  581. package/src/PayComplete/Components/Header/index.less +30 -30
  582. package/src/PayComplete/Components/Header/index.wxml +9 -9
  583. package/src/PayComplete/Components/LeadGroup/index.js +95 -95
  584. package/src/PayComplete/Components/LeadGroup/index.json +6 -6
  585. package/src/PayComplete/Components/LeadGroup/index.less +37 -37
  586. package/src/PayComplete/Components/LeadGroup/index.wxml +5 -5
  587. package/src/PayComplete/Components/PayGifts/index.js +138 -138
  588. package/src/PayComplete/Components/PayGifts/index.json +5 -5
  589. package/src/PayComplete/Components/PayGifts/index.less +177 -177
  590. package/src/PayComplete/Components/PayGifts/index.wxml +71 -71
  591. package/src/PayComplete/Components/PayState/earnIntegral/index.js +62 -62
  592. package/src/PayComplete/Components/PayState/earnIntegral/index.json +5 -5
  593. package/src/PayComplete/Components/PayState/earnIntegral/index.less +25 -25
  594. package/src/PayComplete/Components/PayState/earnIntegral/index.wxml +4 -4
  595. package/src/PayComplete/Components/PayState/index.js +38 -38
  596. package/src/PayComplete/Components/PayState/index.json +6 -6
  597. package/src/PayComplete/Components/PayState/index.less +22 -22
  598. package/src/PayComplete/Components/PayState/index.wxml +11 -11
  599. package/src/PayComplete/index.js +168 -168
  600. package/src/PayComplete/index.json +11 -11
  601. package/src/PayComplete/index.less +26 -26
  602. package/src/PayComplete/index.wxml +13 -13
  603. package/src/PayModule/button/index.js +44 -44
  604. package/src/PayModule/button/index.json +6 -6
  605. package/src/PayModule/button/index.less +14 -14
  606. package/src/PayModule/button/index.scss +44 -44
  607. package/src/PayModule/button/index.wxml +7 -7
  608. package/src/PayModule/button/index.wxss +58 -58
  609. package/src/PayModule/index/index.js +264 -264
  610. package/src/PayModule/index/index.json +7 -7
  611. package/src/PayModule/index/index.wxml +12 -12
  612. package/src/PayModule/wechatLoading/index.js +43 -43
  613. package/src/PayModule/wechatLoading/index.json +4 -4
  614. package/src/PayModule/wechatLoading/index.less +66 -66
  615. package/src/PayModule/wechatLoading/index.wxml +11 -11
  616. package/src/Recommend/index.js +58 -58
  617. package/src/Recommend/index.json +3 -3
  618. package/src/Recommend/index.less +115 -115
  619. package/src/Recommend/index.wxml +29 -29
  620. package/src/Sku/Header/index.js +32 -32
  621. package/src/Sku/Header/index.json +5 -5
  622. package/src/Sku/Header/index.less +30 -30
  623. package/src/Sku/Header/index.wxml +9 -9
  624. package/src/Sku/commSelect/index.wxss +54 -54
  625. package/src/Sku/goods-info/index.json +4 -4
  626. package/src/Sku/goods-info/index.less +54 -54
  627. package/src/Sku/index/index.json +13 -13
  628. package/src/Sku/index/index.less +81 -81
  629. package/src/Sku/row-item/index.js +61 -61
  630. package/src/Sku/row-item/index.json +4 -4
  631. package/src/Sku/row-item/index.less +55 -55
  632. package/src/Sku/row-item/index.wxml +10 -10
  633. package/src/Sku/step/index.js +95 -95
  634. package/src/Sku/step/index.json +6 -6
  635. package/src/Sku/step/index.less +11 -11
  636. package/src/Sku/step/index.wxml +11 -11
  637. package/src/Task/TaskBubble/index.js +7 -1
  638. package/src/Task/TaskBubble/index.json +3 -3
  639. package/src/Task/TaskBubble/index.scss +125 -125
  640. package/src/Task/TaskBubble/index.wxml +22 -22
  641. package/src/Task/TaskIcon/index.js +29 -29
  642. package/src/Task/TaskIcon/index.json +4 -4
  643. package/src/Task/TaskIcon/index.scss +70 -70
  644. package/src/Task/TaskIcon/index.wxml +5 -5
  645. package/src/Task/TaskPopup/component/RewardList/index.js +41 -41
  646. package/src/Task/TaskPopup/component/RewardList/index.json +6 -6
  647. package/src/Task/TaskPopup/component/RewardList/index.scss +39 -39
  648. package/src/Task/TaskPopup/component/RewardList/index.wxml +20 -20
  649. package/src/Task/TaskPopup/component/TaskItem/index.js +498 -471
  650. package/src/Task/TaskPopup/component/TaskItem/index.json +5 -5
  651. package/src/Task/TaskPopup/component/TaskItem/index.scss +222 -222
  652. package/src/Task/TaskPopup/component/TaskItem/index.wxml +99 -94
  653. package/src/Task/TaskPopup/component/TaskItem/index.wxs +7 -7
  654. package/src/Task/TaskPopup/component/TaskItem/index.wxss +678 -678
  655. package/src/Task/TaskPopup/component/TaskList/index.js +296 -290
  656. package/src/Task/TaskPopup/component/TaskList/index.json +7 -7
  657. package/src/Task/TaskPopup/component/TaskList/index.scss +66 -66
  658. package/src/Task/TaskPopup/component/TaskList/index.wxml +41 -41
  659. package/src/Task/TaskPopup/component/TaskType/index.js +125 -125
  660. package/src/Task/TaskPopup/component/TaskType/index.json +9 -9
  661. package/src/Task/TaskPopup/component/TaskType/index.scss +90 -90
  662. package/src/Task/TaskPopup/component/TaskType/index.wxml +62 -62
  663. package/src/Task/TaskPopup/component/TaskType/index.wxss +218 -218
  664. package/src/Task/TaskPopup/index.js +139 -138
  665. package/src/Task/TaskPopup/index.json +7 -7
  666. package/src/Task/TaskPopup/index.scss +140 -140
  667. package/src/Task/TaskPopup/index.wxml +79 -79
  668. package/src/Task/TaskQuizPopup/components/quizContent/index.js +131 -131
  669. package/src/Task/TaskQuizPopup/components/quizContent/index.json +5 -5
  670. package/src/Task/TaskQuizPopup/components/quizContent/index.scss +191 -191
  671. package/src/Task/TaskQuizPopup/components/quizContent/index.wxml +64 -64
  672. package/src/Task/TaskQuizPopup/components/quizContent/index.wxs +78 -78
  673. package/src/Task/TaskQuizPopup/components/quizContent/index.wxss +521 -521
  674. package/src/Task/TaskQuizPopup/components/quizRichText/index.js +40 -40
  675. package/src/Task/TaskQuizPopup/components/quizRichText/index.json +5 -5
  676. package/src/Task/TaskQuizPopup/components/quizRichText/index.scss +6 -6
  677. package/src/Task/TaskQuizPopup/components/quizRichText/index.wxml +1 -1
  678. package/src/Task/TaskQuizPopup/components/quizRichText/index.wxss +298 -298
  679. package/src/Task/TaskQuizPopup/components/wxParse/base.wxml +50 -50
  680. package/src/Task/TaskQuizPopup/components/wxParse/html2json.js +623 -623
  681. package/src/Task/TaskQuizPopup/components/wxParse/htmlparser.js +183 -183
  682. package/src/Task/TaskQuizPopup/components/wxParse/iframeParse.js +216 -216
  683. package/src/Task/TaskQuizPopup/components/wxParse/loop.wxml +3563 -3563
  684. package/src/Task/TaskQuizPopup/components/wxParse/showdown.js +2364 -2364
  685. package/src/Task/TaskQuizPopup/components/wxParse/wxDiscode.js +209 -209
  686. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.js +269 -269
  687. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.wxml +1276 -1276
  688. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.wxss +316 -316
  689. package/src/Task/TaskQuizPopup/index.js +246 -246
  690. package/src/Task/TaskQuizPopup/index.json +7 -7
  691. package/src/Task/TaskQuizPopup/index.scss +158 -158
  692. package/src/Task/TaskQuizPopup/index.wxml +99 -99
  693. package/src/Task/TaskQuizPopup/index.wxss +478 -478
  694. package/src/Task/common/task.js +55 -55
  695. package/src/Task/taskQuizRemindPopup/index.js +74 -74
  696. package/src/Task/taskQuizRemindPopup/index.json +5 -5
  697. package/src/Task/taskQuizRemindPopup/index.scss +107 -107
  698. package/src/Task/taskQuizRemindPopup/index.wxml +27 -27
  699. package/src/Task/taskQuizRemindPopup/index.wxss +286 -286
  700. package/src/Task/taskReceivePopup/coupon/index.js +57 -57
  701. package/src/Task/taskReceivePopup/coupon/index.json +6 -6
  702. package/src/Task/taskReceivePopup/coupon/index.scss +123 -123
  703. package/src/Task/taskReceivePopup/coupon/index.wxml +70 -70
  704. package/src/Task/taskReceivePopup/coupon/index.wxs +48 -48
  705. package/src/Task/taskReceivePopup/coupon/index.wxss +274 -274
  706. package/src/Task/taskReceivePopup/customPrizes/index.js +44 -44
  707. package/src/Task/taskReceivePopup/customPrizes/index.json +6 -6
  708. package/src/Task/taskReceivePopup/customPrizes/index.scss +106 -106
  709. package/src/Task/taskReceivePopup/customPrizes/index.wxml +38 -38
  710. package/src/Task/taskReceivePopup/customPrizes/index.wxs +48 -48
  711. package/src/Task/taskReceivePopup/index.json +13 -13
  712. package/src/Task/taskReceivePopup/index.wxml +26 -26
  713. package/src/Task/taskReceivePopup/integral/index.js +71 -71
  714. package/src/Task/taskReceivePopup/integral/index.json +6 -6
  715. package/src/Task/taskReceivePopup/integral/index.scss +60 -60
  716. package/src/Task/taskReceivePopup/integral/index.wxml +12 -12
  717. package/src/TeacherGoodsList/README.md +9 -9
  718. package/src/TeacherGoodsList/index.js +859 -859
  719. package/src/TeacherGoodsList/index.json +9 -9
  720. package/src/TeacherGoodsList/index.scss +154 -154
  721. package/src/TeacherGoodsList/index.wxml +116 -116
  722. package/src/TeacherGoodsList/index.wxss +207 -207
  723. package/src/common/api/confirmOrder.js +229 -229
  724. package/src/common/api/coupon.js +19 -19
  725. package/src/common/api/couponlist.js +73 -73
  726. package/src/common/api/getInfoForm.js +14 -14
  727. package/src/common/api/liveGoodsList.js +103 -103
  728. package/src/common/api/pay.js +42 -42
  729. package/src/common/api/payComplete.js +21 -21
  730. package/src/common/api/sku.js +73 -73
  731. package/src/common/assets/copy.wxss +3 -3
  732. package/src/common/assets/images/coupon/emptypage.svg +49 -49
  733. package/src/common/assets/images/coupon/failed.svg +5 -5
  734. package/src/common/assets/images/coupon/up.svg +21 -21
  735. package/src/common/assets/images/pay/loading.svg +3 -3
  736. package/src/common/assets/images/recommend.svg +6 -6
  737. package/src/common/assets/images/refresh.svg +10 -10
  738. package/src/common/assets/images/refresh_white.svg +3 -3
  739. package/src/common/assets/images/wechat.svg +4 -4
  740. package/src/common/css/index.less +2 -2
  741. package/src/common/css/theme.less +19 -19
  742. package/src/common/libs/dataUp/sensorUp.js +91 -91
  743. package/src/common/libs/playerHttp.js +58 -58
  744. package/src/common/libs/playerRequestUrl.js +39 -39
  745. package/src/common/transaction/parameter/channel-info.js +36 -36
  746. package/src/common/transaction/parameter/delivery-info.js +26 -26
  747. package/src/common/transaction/parameter/misc-parameter.js +21 -21
  748. package/src/common/utils/currency.js +52 -52
  749. package/src/common/utils/getInfoCollectionData.js +59 -59
  750. package/src/common/utils/image-cdn-slim/constant.js +8 -8
  751. package/src/common/utils/image-cdn-slim/index.js +7 -7
  752. package/src/common/utils/image-cdn-slim/utils.js +156 -156
  753. package/src/common/utils/index.js +69 -69
  754. package/src/common/utils/specialList.js +5 -5
  755. package/src/common/utils/tool.js +72 -72
  756. package/src/common/wxs/filter.wxs +29 -29
  757. package/src/coupon/README.md +11 -11
  758. package/src/coupon/components/CouponItem/index.json +5 -5
  759. package/src/coupon/components/CouponItem/index.less +208 -208
  760. package/src/coupon/components/CouponItem/index.scss +246 -246
  761. package/src/coupon/components/CouponItem/index.wxss +821 -821
  762. package/src/coupon/components/CouponSelect/index.json +8 -8
  763. package/src/coupon/components/CouponSelect/index.less +280 -280
  764. package/src/coupon/components/CouponSelect/index.scss +330 -330
  765. package/src/coupon/components/CouponSelect/index.wxss +1132 -1132
  766. package/src/coupon/index.css +50 -50
  767. package/src/coupon/index.js +271 -271
  768. package/src/coupon/index.json +7 -7
  769. package/src/coupon/index.less +51 -51
  770. package/src/coupon/index.scss +83 -83
  771. package/src/coupon/index.wxss +216 -216
  772. package/src/index.js +23 -23
  773. package/src/index.json +4 -4
  774. package/src/index.wxml +2 -2
  775. package/src/lib.ts +5 -5
  776. package/src/miniprogram_npm/miniprogram-computed/index.js +1 -0
  777. package/src/project.config.json +68 -68
  778. package/src/utils.js +5 -5
  779. package/tsconfig.json +25 -25
@@ -1,623 +1,623 @@
1
- /**
2
- * author: Di (微信小程序开发工程师)
3
- * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
4
- * 垂直微信小程序开发交流社区
5
- *
6
- * github地址: https://github.com/icindy/wxParse
7
- *
8
- * for: 微信小程序富文本解析
9
- * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
10
- */
11
-
12
- var __placeImgeUrlHttps = 'https'
13
- var __emojisReg = ''
14
- var __emojisBaseSrc = ''
15
- var __emojis = {}
16
- var wxDiscode = require('wxDiscode.js')
17
- var HTMLParser = require('htmlparser.js')
18
- // Empty Elements - HTML 5
19
- var empty = makeMap(
20
- 'area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr',
21
- )
22
- // Block Elements - HTML 5
23
- var block = makeMap(
24
- 'br,a,code,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video',
25
- )
26
-
27
- // Inline Elements - HTML 5
28
- var inline = makeMap(
29
- 'abbr,acronym,applet,b,basefont,bdo,big,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var',
30
- )
31
-
32
- // Elements that you can, intentionally, leave open
33
- // (and which close themselves)
34
- var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr')
35
-
36
- // Attributes that have their values filled in disabled="disabled"
37
- var fillAttrs = makeMap(
38
- 'checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected',
39
- )
40
-
41
- // Special Elements (can contain anything)
42
- var special = makeMap('wxxxcode-style,script,style,view,scroll-view,block')
43
-
44
- // 定义列表类型
45
- var listTypeObj = {
46
- 'lower-alpha': [
47
- 'a',
48
- 'b',
49
- 'c',
50
- 'd',
51
- 'e',
52
- 'f',
53
- 'g',
54
- 'h',
55
- 'i',
56
- 'j',
57
- 'k',
58
- 'l',
59
- 'm',
60
- 'n',
61
- 'o',
62
- 'p',
63
- 'q',
64
- 'r',
65
- 's',
66
- 't',
67
- 'u',
68
- 'v',
69
- 'w',
70
- 'x',
71
- 'y',
72
- 'z',
73
- ],
74
- 'lower-roman': ['i', 'ii', 'iii', 'iv', 'v', 'vi', 'vii', 'viii', 'ix', 'x'],
75
- 'upper-alpha': [
76
- 'A',
77
- 'B',
78
- 'C',
79
- 'D',
80
- 'E',
81
- 'F',
82
- 'G',
83
- 'H',
84
- 'I',
85
- 'J',
86
- 'K',
87
- 'L',
88
- 'M',
89
- 'N',
90
- 'O',
91
- 'P',
92
- 'Q',
93
- 'R',
94
- 'S',
95
- 'T',
96
- 'U',
97
- 'V',
98
- 'W',
99
- 'X',
100
- 'Y',
101
- 'Z',
102
- ],
103
- 'upper-roman': ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X'],
104
- 'cjk-ideographic': ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十'],
105
- 'lower-greek': [
106
- 'α',
107
- 'β',
108
- 'γ',
109
- 'δ',
110
- 'ε',
111
- 'ζ',
112
- 'η',
113
- 'θ',
114
- 'ι',
115
- 'κ',
116
- 'λ',
117
- 'μ',
118
- 'ν',
119
- 'ξ',
120
- 'ο',
121
- 'π',
122
- 'ρ',
123
- 'σ',
124
- 'τ',
125
- 'υ',
126
- 'φ',
127
- 'χ',
128
- 'ψ',
129
- 'ω',
130
- ],
131
- }
132
-
133
- //字母转化为数字
134
- function toNum(listTextLen) {
135
- //至多36位
136
- switch (listTextLen) {
137
- case 0:
138
- listTextLen = 0
139
- break
140
- case 1:
141
- listTextLen = 1
142
- break
143
- case 2:
144
- listTextLen = 2
145
- break
146
- case 3:
147
- listTextLen = 3
148
- break
149
- case 4:
150
- listTextLen = 4
151
- break
152
- case 5:
153
- listTextLen = 5
154
- break
155
- case 6:
156
- listTextLen = 6
157
- break
158
- case 7:
159
- listTextLen = 7
160
- break
161
- case 8:
162
- listTextLen = 8
163
- break
164
- case 9:
165
- listTextLen = 9
166
- break
167
- case 'a':
168
- listTextLen = 10
169
- break
170
- case 'b':
171
- listTextLen = 11
172
- break
173
- case 'c':
174
- listTextLen = 12
175
- break
176
- case 'd':
177
- listTextLen = 13
178
- break
179
- case 'e':
180
- listTextLen = 14
181
- break
182
- case 'f':
183
- listTextLen = 16
184
- break
185
- case 'g':
186
- listTextLen = 17
187
- break
188
- case 'h':
189
- listTextLen = 18
190
- break
191
- case 'i':
192
- listTextLen = 19
193
- break
194
- case 'j':
195
- listTextLen = 20
196
- break
197
- case 'k':
198
- listTextLen = 21
199
- break
200
- case 'l':
201
- listTextLen = 22
202
- break
203
- case 'm':
204
- listTextLen = 23
205
- break
206
- case 'n':
207
- listTextLen = 24
208
- break
209
- case 'o':
210
- listTextLen = 25
211
- break
212
- case 'p':
213
- listTextLen = 26
214
- break
215
- case 'q':
216
- listTextLen = 27
217
- break
218
- case 'r':
219
- listTextLen = 28
220
- break
221
- case 's':
222
- listTextLen = 29
223
- break
224
- case 't':
225
- listTextLen = 30
226
- break
227
- case 'u':
228
- listTextLen = 31
229
- break
230
- case 'v':
231
- listTextLen = 32
232
- break
233
- case 'w':
234
- listTextLen = 33
235
- break
236
- case 'x':
237
- listTextLen = 34
238
- break
239
- case 'y':
240
- listTextLen = 35
241
- break
242
- case 'z':
243
- listTextLen = 36
244
- break
245
- }
246
-
247
- return listTextLen
248
- }
249
-
250
- function getListText(listType, listIdx) {
251
- var listTypeArr = listTypeObj[listType]
252
- var listTypeLen = listTypeArr.length
253
- var listText = ''
254
- var listTextLen = listIdx.toString(listTypeLen)
255
-
256
- var listTextArr = listTextLen.split('').reverse()
257
- if (listType == 'cjk-ideographic') {
258
- if (listIdx <= listTypeLen) {
259
- var j = listIdx - 1
260
- listText += listTypeArr[j]
261
- } else {
262
- for (var z = listTextArr.length - 1; z >= 0; z--) {
263
- if (z == 0) {
264
- j = toNum(listTextArr[z])
265
- if (j == 0) {
266
- break
267
- } else {
268
- listText += listTypeArr[j - 1]
269
- break
270
- }
271
- }
272
- if (z == 1 && listTextArr[z] == 1) {
273
- listText += listTypeArr[listTypeLen - 1]
274
- } else {
275
- j = toNum(listTextArr[z]) - 1
276
- listText = listTypeArr[j] + listTypeArr[listTypeLen - 1]
277
- }
278
- }
279
- }
280
- } else if (listType == 'upper-roman' || listType == 'lower-roman') {
281
- if (listIdx <= listTypeLen) {
282
- let j = listIdx - 1
283
- listText += listTypeArr[j]
284
- } else {
285
- for (let z = listTextArr.length - 1; z >= 0; z--) {
286
- if (z == 0) {
287
- j = toNum(listTextArr[z])
288
- if (j == 0) {
289
- break
290
- } else {
291
- listText += listTypeArr[j - 1]
292
- break
293
- }
294
- }
295
- if (z == 1 && listTextArr[z] == 1) {
296
- listText += listTypeArr[listTypeLen - 1]
297
- } else {
298
- j = toNum(listTextArr[z])
299
- for (var k = 0; k <= j - 1; j--) {
300
- listText += listTypeArr[listTypeLen - 1]
301
- }
302
- }
303
- }
304
- }
305
- } else {
306
- if (listIdx <= listTypeLen) {
307
- let j = listIdx - 1
308
- listText += listTypeArr[j]
309
- } else {
310
- for (let z = listTextArr.length - 1; z >= 0; z--) {
311
- if (z == 0) {
312
- j = toNum(listTextArr[z])
313
- if (j == 0) {
314
- break
315
- } else {
316
- listText += listTypeArr[j - 1]
317
- break
318
- }
319
- } else {
320
- j = toNum(listTextArr[z])
321
- listText += listTypeArr[j - 1]
322
- }
323
- }
324
- }
325
- }
326
-
327
- return listText
328
- }
329
-
330
- function makeMap(str) {
331
- var obj = {},
332
- items = str.split(',')
333
- for (var i = 0; i < items.length; i++) obj[items[i]] = true
334
- return obj
335
- }
336
-
337
- function q(v) {
338
- return '"' + v + '"'
339
- }
340
-
341
- function removeDOCTYPE(html) {
342
- return html
343
- .replace(/<\?xml.*\?>\n/, '')
344
- .replace(/<!doctype.*\>\n/, '')
345
- .replace(/<!DOCTYPE.*\>\n/, '')
346
- }
347
-
348
- function html2json(html, bindName) {
349
- //处理字符串
350
- html = removeDOCTYPE(html)
351
- html = wxDiscode.strDiscode(html)
352
- //生成node节点
353
- var bufArray = []
354
- var results = {
355
- node: bindName,
356
- nodes: [],
357
- images: [],
358
- imageUrls: [],
359
- }
360
- HTMLParser(html, {
361
- start: function (tag, attrs, unary) {
362
- //debug(tag, attrs, unary);
363
- // node for this element
364
- var node = {
365
- node: 'element',
366
- tag: tag,
367
- }
368
-
369
- if (block[tag]) {
370
- node.tagType = 'block'
371
- } else if (inline[tag]) {
372
- node.tagType = 'inline'
373
- } else if (closeSelf[tag]) {
374
- node.tagType = 'closeSelf'
375
- }
376
-
377
- if (attrs.length !== 0) {
378
- node.attr = attrs.reduce(function (pre, attr) {
379
- var name = attr.name
380
- var value = attr.value
381
- if (name == 'class') {
382
- // console.dir(value);
383
- // value = value.join("")
384
- node.classStr = value
385
- }
386
- // has multi attibutes
387
- // make it array of attribute
388
- if (name == 'style') {
389
- // console.dir(value);
390
- // value = value.join("")
391
- node.styleStr = value
392
- }
393
- if (value.match(/ /)) {
394
- value = value.split(' ')
395
- }
396
-
397
- // if attr already exists
398
- // merge it
399
- if (pre[name]) {
400
- if (Array.isArray(pre[name])) {
401
- // already array, push to last
402
- pre[name].push(value)
403
- } else {
404
- // single value, make it array
405
- pre[name] = [pre[name], value]
406
- }
407
- } else {
408
- // not exist, put it
409
- pre[name] = value
410
- }
411
-
412
- return pre
413
- }, {})
414
- }
415
-
416
- if (node.tag === 'a') {
417
- // a的图文子节点预览事件屏蔽
418
- node.no_img_preview = true
419
- }
420
- //对img添加额外数据
421
- if (node.tag === 'img') {
422
- node.imgIndex = results.images.length
423
- var imgUrl = node.attr.src
424
- imgUrl = wxDiscode.urlToHttpUrl(imgUrl, __placeImgeUrlHttps)
425
- node.attr.src = imgUrl
426
- node.from = bindName
427
- results.images.push(node)
428
- results.imageUrls.push(imgUrl)
429
- }
430
-
431
- if (unary) {
432
- // if this tag dosen't have end tag
433
- // like <img src="hoge.png"/>
434
- // add to parents
435
- var parent = bufArray[0] || results
436
- if (parent.nodes === undefined) {
437
- parent.nodes = []
438
- }
439
- // 传递父节点的no_img_preview
440
- if (parent['no_img_preview']) {
441
- node.no_img_preview = true
442
- }
443
- parent.nodes.push(node)
444
- } else {
445
- // 传递父节点的no_img_preview
446
- if (bufArray[0] && bufArray[0]['no_img_preview']) {
447
- node.no_img_preview = true
448
- }
449
- bufArray.unshift(node)
450
- }
451
- },
452
- end: function (tag) {
453
- //debug(tag);
454
- // merge into parent tag
455
- var node = bufArray.shift()
456
- if (node.tag !== tag) console.error('invalid state: mismatch end tag')
457
-
458
- if (bufArray.length === 0) {
459
- results.nodes.push(node)
460
- } else {
461
- var parent = bufArray[0]
462
- if (parent.nodes === undefined) {
463
- parent.nodes = []
464
- }
465
- parent.nodes.push(node)
466
- }
467
- //富文本list加序列号
468
- if (node.tag === 'ul' || node.tag === 'ol') {
469
- //去除自身富文本携带过来的padding-left
470
- if (node.styleStr && node.styleStr.indexOf('padding-left:30px;') > -1) {
471
- node.styleStr = node.styleStr.replace('padding-left:30px;', '')
472
- }
473
- if (!node?.nodes?.length) return
474
- //递归给列表添加索引标准
475
- if (node.styleStr && node.styleStr.indexOf('list-style-type') > -1) {
476
- var listType = node.styleStr.split('list-style-type:')[1].split(';')[0].replace(' ', '')
477
- //普通阿拉伯数字
478
- switch (listType) {
479
- case 'decimal':
480
- for (let i = 0; i <= node.nodes.length - 1; i++) {
481
- node.nodes[i].listText = i + 1 + '.'
482
- node.nodes[i].listType = listType
483
- }
484
- break
485
- case 'disc':
486
- for (let i = 0; i <= node.nodes.length - 1; i++) {
487
- node.nodes[i].listType = listType
488
- }
489
- break
490
- case 'square':
491
- for (let i = 0; i <= node.nodes.length - 1; i++) {
492
- node.nodes[i].listType = listType
493
- }
494
- break
495
- case 'circle':
496
- for (let i = 0; i <= node.nodes.length - 1; i++) {
497
- node.nodes[i].listType = listType
498
- }
499
- break
500
- case 'lower-alpha':
501
- for (let i = 0; i <= node.nodes.length - 1; i++) {
502
- node.nodes[i].listText = getListText(listType, i + 1) + '.'
503
- node.nodes[i].listType = listType
504
- }
505
- break
506
- case 'lower-roman':
507
- for (let i = 0; i <= node.nodes.length - 1; i++) {
508
- node.nodes[i].listText = getListText(listType, i + 1) + '.'
509
- node.nodes[i].listType = listType
510
- }
511
- break
512
- case 'upper-alpha':
513
- for (let i = 0; i <= node.nodes.length - 1; i++) {
514
- node.nodes[i].listText = getListText(listType, i + 1) + '.'
515
- node.nodes[i].listType = listType
516
- }
517
- break
518
- case 'upper-roman':
519
- for (let i = 0; i <= node.nodes.length - 1; i++) {
520
- node.nodes[i].listText = getListText(listType, i + 1) + '.'
521
- node.nodes[i].listType = listType
522
- }
523
- break
524
- case 'cjk-ideographic':
525
- for (let i = 0; i <= node.nodes.length - 1; i++) {
526
- node.nodes[i].listText = getListText(listType, i + 1) + '.'
527
- node.nodes[i].listType = listType
528
- }
529
- break
530
- case 'lower-greek':
531
- for (let i = 0; i <= node.nodes.length - 1; i++) {
532
- node.nodes[i].listText = getListText(listType, i + 1) + '.'
533
- node.nodes[i].listType = listType
534
- }
535
- break
536
- default:
537
- for (let i = 0; i <= node.nodes.length - 1; i++) {
538
- node.nodes[i].listText = ''
539
- node.nodes[i].listType = listType
540
- }
541
- }
542
- }
543
- }
544
- },
545
- chars: function (text) {
546
- //debug(text);
547
- var node = {
548
- node: 'text',
549
- text: text,
550
- textArray: transEmojiStr(text),
551
- }
552
-
553
- if (bufArray.length === 0) {
554
- results.nodes.push(node)
555
- } else {
556
- var parent = bufArray[0]
557
- if (parent.nodes === undefined) {
558
- parent.nodes = []
559
- }
560
- parent.nodes.push(node)
561
- }
562
- },
563
- comment: function (text) {
564
- //debug(text);
565
- var node = {
566
- node: 'comment',
567
- text: text,
568
- }
569
- var parent = bufArray[0]
570
- if (parent.nodes === undefined) {
571
- parent.nodes = []
572
- }
573
- parent.nodes.push(node)
574
- },
575
- })
576
- return results
577
- }
578
-
579
- function transEmojiStr(str) {
580
- // var eReg = new RegExp("["+__reg+' '+"]");
581
- // str = str.replace(/\[([^\[\]]+)\]/g,':$1:')
582
-
583
- var emojiObjs = []
584
- //如果正则表达式为空
585
- if (__emojisReg.length == 0 || !__emojis) {
586
- var emojiObj = {}
587
- emojiObj.node = 'text'
588
- emojiObj.text = str
589
- array = [emojiObj]
590
- return array
591
- }
592
- //这个地方需要调整
593
- str = str.replace(/\[([^\[\]]+)\]/g, ':$1:')
594
- var eReg = new RegExp('[:]')
595
- var array = str.split(eReg)
596
- for (var i = 0; i < array.length; i++) {
597
- var ele = array[i]
598
- const emojiObj = {}
599
- if (__emojis[ele]) {
600
- emojiObj.node = 'element'
601
- emojiObj.tag = 'emoji'
602
- emojiObj.text = __emojis[ele]
603
- emojiObj.baseSrc = __emojisBaseSrc
604
- } else {
605
- emojiObj.node = 'text'
606
- emojiObj.text = ele
607
- }
608
- emojiObjs.push(emojiObj)
609
- }
610
-
611
- return emojiObjs
612
- }
613
-
614
- function emojisInit(reg = '', baseSrc = '/wxParse/emojis/', emojis) {
615
- __emojisReg = reg
616
- __emojisBaseSrc = baseSrc
617
- __emojis = emojis
618
- }
619
-
620
- module.exports = {
621
- html2json: html2json,
622
- emojisInit: emojisInit,
623
- }
1
+ /**
2
+ * author: Di (微信小程序开发工程师)
3
+ * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
4
+ * 垂直微信小程序开发交流社区
5
+ *
6
+ * github地址: https://github.com/icindy/wxParse
7
+ *
8
+ * for: 微信小程序富文本解析
9
+ * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
10
+ */
11
+
12
+ var __placeImgeUrlHttps = 'https'
13
+ var __emojisReg = ''
14
+ var __emojisBaseSrc = ''
15
+ var __emojis = {}
16
+ var wxDiscode = require('wxDiscode.js')
17
+ var HTMLParser = require('htmlparser.js')
18
+ // Empty Elements - HTML 5
19
+ var empty = makeMap(
20
+ 'area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr',
21
+ )
22
+ // Block Elements - HTML 5
23
+ var block = makeMap(
24
+ 'br,a,code,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video',
25
+ )
26
+
27
+ // Inline Elements - HTML 5
28
+ var inline = makeMap(
29
+ 'abbr,acronym,applet,b,basefont,bdo,big,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var',
30
+ )
31
+
32
+ // Elements that you can, intentionally, leave open
33
+ // (and which close themselves)
34
+ var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr')
35
+
36
+ // Attributes that have their values filled in disabled="disabled"
37
+ var fillAttrs = makeMap(
38
+ 'checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected',
39
+ )
40
+
41
+ // Special Elements (can contain anything)
42
+ var special = makeMap('wxxxcode-style,script,style,view,scroll-view,block')
43
+
44
+ // 定义列表类型
45
+ var listTypeObj = {
46
+ 'lower-alpha': [
47
+ 'a',
48
+ 'b',
49
+ 'c',
50
+ 'd',
51
+ 'e',
52
+ 'f',
53
+ 'g',
54
+ 'h',
55
+ 'i',
56
+ 'j',
57
+ 'k',
58
+ 'l',
59
+ 'm',
60
+ 'n',
61
+ 'o',
62
+ 'p',
63
+ 'q',
64
+ 'r',
65
+ 's',
66
+ 't',
67
+ 'u',
68
+ 'v',
69
+ 'w',
70
+ 'x',
71
+ 'y',
72
+ 'z',
73
+ ],
74
+ 'lower-roman': ['i', 'ii', 'iii', 'iv', 'v', 'vi', 'vii', 'viii', 'ix', 'x'],
75
+ 'upper-alpha': [
76
+ 'A',
77
+ 'B',
78
+ 'C',
79
+ 'D',
80
+ 'E',
81
+ 'F',
82
+ 'G',
83
+ 'H',
84
+ 'I',
85
+ 'J',
86
+ 'K',
87
+ 'L',
88
+ 'M',
89
+ 'N',
90
+ 'O',
91
+ 'P',
92
+ 'Q',
93
+ 'R',
94
+ 'S',
95
+ 'T',
96
+ 'U',
97
+ 'V',
98
+ 'W',
99
+ 'X',
100
+ 'Y',
101
+ 'Z',
102
+ ],
103
+ 'upper-roman': ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X'],
104
+ 'cjk-ideographic': ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十'],
105
+ 'lower-greek': [
106
+ 'α',
107
+ 'β',
108
+ 'γ',
109
+ 'δ',
110
+ 'ε',
111
+ 'ζ',
112
+ 'η',
113
+ 'θ',
114
+ 'ι',
115
+ 'κ',
116
+ 'λ',
117
+ 'μ',
118
+ 'ν',
119
+ 'ξ',
120
+ 'ο',
121
+ 'π',
122
+ 'ρ',
123
+ 'σ',
124
+ 'τ',
125
+ 'υ',
126
+ 'φ',
127
+ 'χ',
128
+ 'ψ',
129
+ 'ω',
130
+ ],
131
+ }
132
+
133
+ //字母转化为数字
134
+ function toNum(listTextLen) {
135
+ //至多36位
136
+ switch (listTextLen) {
137
+ case 0:
138
+ listTextLen = 0
139
+ break
140
+ case 1:
141
+ listTextLen = 1
142
+ break
143
+ case 2:
144
+ listTextLen = 2
145
+ break
146
+ case 3:
147
+ listTextLen = 3
148
+ break
149
+ case 4:
150
+ listTextLen = 4
151
+ break
152
+ case 5:
153
+ listTextLen = 5
154
+ break
155
+ case 6:
156
+ listTextLen = 6
157
+ break
158
+ case 7:
159
+ listTextLen = 7
160
+ break
161
+ case 8:
162
+ listTextLen = 8
163
+ break
164
+ case 9:
165
+ listTextLen = 9
166
+ break
167
+ case 'a':
168
+ listTextLen = 10
169
+ break
170
+ case 'b':
171
+ listTextLen = 11
172
+ break
173
+ case 'c':
174
+ listTextLen = 12
175
+ break
176
+ case 'd':
177
+ listTextLen = 13
178
+ break
179
+ case 'e':
180
+ listTextLen = 14
181
+ break
182
+ case 'f':
183
+ listTextLen = 16
184
+ break
185
+ case 'g':
186
+ listTextLen = 17
187
+ break
188
+ case 'h':
189
+ listTextLen = 18
190
+ break
191
+ case 'i':
192
+ listTextLen = 19
193
+ break
194
+ case 'j':
195
+ listTextLen = 20
196
+ break
197
+ case 'k':
198
+ listTextLen = 21
199
+ break
200
+ case 'l':
201
+ listTextLen = 22
202
+ break
203
+ case 'm':
204
+ listTextLen = 23
205
+ break
206
+ case 'n':
207
+ listTextLen = 24
208
+ break
209
+ case 'o':
210
+ listTextLen = 25
211
+ break
212
+ case 'p':
213
+ listTextLen = 26
214
+ break
215
+ case 'q':
216
+ listTextLen = 27
217
+ break
218
+ case 'r':
219
+ listTextLen = 28
220
+ break
221
+ case 's':
222
+ listTextLen = 29
223
+ break
224
+ case 't':
225
+ listTextLen = 30
226
+ break
227
+ case 'u':
228
+ listTextLen = 31
229
+ break
230
+ case 'v':
231
+ listTextLen = 32
232
+ break
233
+ case 'w':
234
+ listTextLen = 33
235
+ break
236
+ case 'x':
237
+ listTextLen = 34
238
+ break
239
+ case 'y':
240
+ listTextLen = 35
241
+ break
242
+ case 'z':
243
+ listTextLen = 36
244
+ break
245
+ }
246
+
247
+ return listTextLen
248
+ }
249
+
250
+ function getListText(listType, listIdx) {
251
+ var listTypeArr = listTypeObj[listType]
252
+ var listTypeLen = listTypeArr.length
253
+ var listText = ''
254
+ var listTextLen = listIdx.toString(listTypeLen)
255
+
256
+ var listTextArr = listTextLen.split('').reverse()
257
+ if (listType == 'cjk-ideographic') {
258
+ if (listIdx <= listTypeLen) {
259
+ var j = listIdx - 1
260
+ listText += listTypeArr[j]
261
+ } else {
262
+ for (var z = listTextArr.length - 1; z >= 0; z--) {
263
+ if (z == 0) {
264
+ j = toNum(listTextArr[z])
265
+ if (j == 0) {
266
+ break
267
+ } else {
268
+ listText += listTypeArr[j - 1]
269
+ break
270
+ }
271
+ }
272
+ if (z == 1 && listTextArr[z] == 1) {
273
+ listText += listTypeArr[listTypeLen - 1]
274
+ } else {
275
+ j = toNum(listTextArr[z]) - 1
276
+ listText = listTypeArr[j] + listTypeArr[listTypeLen - 1]
277
+ }
278
+ }
279
+ }
280
+ } else if (listType == 'upper-roman' || listType == 'lower-roman') {
281
+ if (listIdx <= listTypeLen) {
282
+ let j = listIdx - 1
283
+ listText += listTypeArr[j]
284
+ } else {
285
+ for (let z = listTextArr.length - 1; z >= 0; z--) {
286
+ if (z == 0) {
287
+ j = toNum(listTextArr[z])
288
+ if (j == 0) {
289
+ break
290
+ } else {
291
+ listText += listTypeArr[j - 1]
292
+ break
293
+ }
294
+ }
295
+ if (z == 1 && listTextArr[z] == 1) {
296
+ listText += listTypeArr[listTypeLen - 1]
297
+ } else {
298
+ j = toNum(listTextArr[z])
299
+ for (var k = 0; k <= j - 1; j--) {
300
+ listText += listTypeArr[listTypeLen - 1]
301
+ }
302
+ }
303
+ }
304
+ }
305
+ } else {
306
+ if (listIdx <= listTypeLen) {
307
+ let j = listIdx - 1
308
+ listText += listTypeArr[j]
309
+ } else {
310
+ for (let z = listTextArr.length - 1; z >= 0; z--) {
311
+ if (z == 0) {
312
+ j = toNum(listTextArr[z])
313
+ if (j == 0) {
314
+ break
315
+ } else {
316
+ listText += listTypeArr[j - 1]
317
+ break
318
+ }
319
+ } else {
320
+ j = toNum(listTextArr[z])
321
+ listText += listTypeArr[j - 1]
322
+ }
323
+ }
324
+ }
325
+ }
326
+
327
+ return listText
328
+ }
329
+
330
+ function makeMap(str) {
331
+ var obj = {},
332
+ items = str.split(',')
333
+ for (var i = 0; i < items.length; i++) obj[items[i]] = true
334
+ return obj
335
+ }
336
+
337
+ function q(v) {
338
+ return '"' + v + '"'
339
+ }
340
+
341
+ function removeDOCTYPE(html) {
342
+ return html
343
+ .replace(/<\?xml.*\?>\n/, '')
344
+ .replace(/<!doctype.*\>\n/, '')
345
+ .replace(/<!DOCTYPE.*\>\n/, '')
346
+ }
347
+
348
+ function html2json(html, bindName) {
349
+ //处理字符串
350
+ html = removeDOCTYPE(html)
351
+ html = wxDiscode.strDiscode(html)
352
+ //生成node节点
353
+ var bufArray = []
354
+ var results = {
355
+ node: bindName,
356
+ nodes: [],
357
+ images: [],
358
+ imageUrls: [],
359
+ }
360
+ HTMLParser(html, {
361
+ start: function (tag, attrs, unary) {
362
+ //debug(tag, attrs, unary);
363
+ // node for this element
364
+ var node = {
365
+ node: 'element',
366
+ tag: tag,
367
+ }
368
+
369
+ if (block[tag]) {
370
+ node.tagType = 'block'
371
+ } else if (inline[tag]) {
372
+ node.tagType = 'inline'
373
+ } else if (closeSelf[tag]) {
374
+ node.tagType = 'closeSelf'
375
+ }
376
+
377
+ if (attrs.length !== 0) {
378
+ node.attr = attrs.reduce(function (pre, attr) {
379
+ var name = attr.name
380
+ var value = attr.value
381
+ if (name == 'class') {
382
+ // console.dir(value);
383
+ // value = value.join("")
384
+ node.classStr = value
385
+ }
386
+ // has multi attibutes
387
+ // make it array of attribute
388
+ if (name == 'style') {
389
+ // console.dir(value);
390
+ // value = value.join("")
391
+ node.styleStr = value
392
+ }
393
+ if (value.match(/ /)) {
394
+ value = value.split(' ')
395
+ }
396
+
397
+ // if attr already exists
398
+ // merge it
399
+ if (pre[name]) {
400
+ if (Array.isArray(pre[name])) {
401
+ // already array, push to last
402
+ pre[name].push(value)
403
+ } else {
404
+ // single value, make it array
405
+ pre[name] = [pre[name], value]
406
+ }
407
+ } else {
408
+ // not exist, put it
409
+ pre[name] = value
410
+ }
411
+
412
+ return pre
413
+ }, {})
414
+ }
415
+
416
+ if (node.tag === 'a') {
417
+ // a的图文子节点预览事件屏蔽
418
+ node.no_img_preview = true
419
+ }
420
+ //对img添加额外数据
421
+ if (node.tag === 'img') {
422
+ node.imgIndex = results.images.length
423
+ var imgUrl = node.attr.src
424
+ imgUrl = wxDiscode.urlToHttpUrl(imgUrl, __placeImgeUrlHttps)
425
+ node.attr.src = imgUrl
426
+ node.from = bindName
427
+ results.images.push(node)
428
+ results.imageUrls.push(imgUrl)
429
+ }
430
+
431
+ if (unary) {
432
+ // if this tag dosen't have end tag
433
+ // like <img src="hoge.png"/>
434
+ // add to parents
435
+ var parent = bufArray[0] || results
436
+ if (parent.nodes === undefined) {
437
+ parent.nodes = []
438
+ }
439
+ // 传递父节点的no_img_preview
440
+ if (parent['no_img_preview']) {
441
+ node.no_img_preview = true
442
+ }
443
+ parent.nodes.push(node)
444
+ } else {
445
+ // 传递父节点的no_img_preview
446
+ if (bufArray[0] && bufArray[0]['no_img_preview']) {
447
+ node.no_img_preview = true
448
+ }
449
+ bufArray.unshift(node)
450
+ }
451
+ },
452
+ end: function (tag) {
453
+ //debug(tag);
454
+ // merge into parent tag
455
+ var node = bufArray.shift()
456
+ if (node.tag !== tag) console.error('invalid state: mismatch end tag')
457
+
458
+ if (bufArray.length === 0) {
459
+ results.nodes.push(node)
460
+ } else {
461
+ var parent = bufArray[0]
462
+ if (parent.nodes === undefined) {
463
+ parent.nodes = []
464
+ }
465
+ parent.nodes.push(node)
466
+ }
467
+ //富文本list加序列号
468
+ if (node.tag === 'ul' || node.tag === 'ol') {
469
+ //去除自身富文本携带过来的padding-left
470
+ if (node.styleStr && node.styleStr.indexOf('padding-left:30px;') > -1) {
471
+ node.styleStr = node.styleStr.replace('padding-left:30px;', '')
472
+ }
473
+ if (!node?.nodes?.length) return
474
+ //递归给列表添加索引标准
475
+ if (node.styleStr && node.styleStr.indexOf('list-style-type') > -1) {
476
+ var listType = node.styleStr.split('list-style-type:')[1].split(';')[0].replace(' ', '')
477
+ //普通阿拉伯数字
478
+ switch (listType) {
479
+ case 'decimal':
480
+ for (let i = 0; i <= node.nodes.length - 1; i++) {
481
+ node.nodes[i].listText = i + 1 + '.'
482
+ node.nodes[i].listType = listType
483
+ }
484
+ break
485
+ case 'disc':
486
+ for (let i = 0; i <= node.nodes.length - 1; i++) {
487
+ node.nodes[i].listType = listType
488
+ }
489
+ break
490
+ case 'square':
491
+ for (let i = 0; i <= node.nodes.length - 1; i++) {
492
+ node.nodes[i].listType = listType
493
+ }
494
+ break
495
+ case 'circle':
496
+ for (let i = 0; i <= node.nodes.length - 1; i++) {
497
+ node.nodes[i].listType = listType
498
+ }
499
+ break
500
+ case 'lower-alpha':
501
+ for (let i = 0; i <= node.nodes.length - 1; i++) {
502
+ node.nodes[i].listText = getListText(listType, i + 1) + '.'
503
+ node.nodes[i].listType = listType
504
+ }
505
+ break
506
+ case 'lower-roman':
507
+ for (let i = 0; i <= node.nodes.length - 1; i++) {
508
+ node.nodes[i].listText = getListText(listType, i + 1) + '.'
509
+ node.nodes[i].listType = listType
510
+ }
511
+ break
512
+ case 'upper-alpha':
513
+ for (let i = 0; i <= node.nodes.length - 1; i++) {
514
+ node.nodes[i].listText = getListText(listType, i + 1) + '.'
515
+ node.nodes[i].listType = listType
516
+ }
517
+ break
518
+ case 'upper-roman':
519
+ for (let i = 0; i <= node.nodes.length - 1; i++) {
520
+ node.nodes[i].listText = getListText(listType, i + 1) + '.'
521
+ node.nodes[i].listType = listType
522
+ }
523
+ break
524
+ case 'cjk-ideographic':
525
+ for (let i = 0; i <= node.nodes.length - 1; i++) {
526
+ node.nodes[i].listText = getListText(listType, i + 1) + '.'
527
+ node.nodes[i].listType = listType
528
+ }
529
+ break
530
+ case 'lower-greek':
531
+ for (let i = 0; i <= node.nodes.length - 1; i++) {
532
+ node.nodes[i].listText = getListText(listType, i + 1) + '.'
533
+ node.nodes[i].listType = listType
534
+ }
535
+ break
536
+ default:
537
+ for (let i = 0; i <= node.nodes.length - 1; i++) {
538
+ node.nodes[i].listText = ''
539
+ node.nodes[i].listType = listType
540
+ }
541
+ }
542
+ }
543
+ }
544
+ },
545
+ chars: function (text) {
546
+ //debug(text);
547
+ var node = {
548
+ node: 'text',
549
+ text: text,
550
+ textArray: transEmojiStr(text),
551
+ }
552
+
553
+ if (bufArray.length === 0) {
554
+ results.nodes.push(node)
555
+ } else {
556
+ var parent = bufArray[0]
557
+ if (parent.nodes === undefined) {
558
+ parent.nodes = []
559
+ }
560
+ parent.nodes.push(node)
561
+ }
562
+ },
563
+ comment: function (text) {
564
+ //debug(text);
565
+ var node = {
566
+ node: 'comment',
567
+ text: text,
568
+ }
569
+ var parent = bufArray[0]
570
+ if (parent.nodes === undefined) {
571
+ parent.nodes = []
572
+ }
573
+ parent.nodes.push(node)
574
+ },
575
+ })
576
+ return results
577
+ }
578
+
579
+ function transEmojiStr(str) {
580
+ // var eReg = new RegExp("["+__reg+' '+"]");
581
+ // str = str.replace(/\[([^\[\]]+)\]/g,':$1:')
582
+
583
+ var emojiObjs = []
584
+ //如果正则表达式为空
585
+ if (__emojisReg.length == 0 || !__emojis) {
586
+ var emojiObj = {}
587
+ emojiObj.node = 'text'
588
+ emojiObj.text = str
589
+ array = [emojiObj]
590
+ return array
591
+ }
592
+ //这个地方需要调整
593
+ str = str.replace(/\[([^\[\]]+)\]/g, ':$1:')
594
+ var eReg = new RegExp('[:]')
595
+ var array = str.split(eReg)
596
+ for (var i = 0; i < array.length; i++) {
597
+ var ele = array[i]
598
+ const emojiObj = {}
599
+ if (__emojis[ele]) {
600
+ emojiObj.node = 'element'
601
+ emojiObj.tag = 'emoji'
602
+ emojiObj.text = __emojis[ele]
603
+ emojiObj.baseSrc = __emojisBaseSrc
604
+ } else {
605
+ emojiObj.node = 'text'
606
+ emojiObj.text = ele
607
+ }
608
+ emojiObjs.push(emojiObj)
609
+ }
610
+
611
+ return emojiObjs
612
+ }
613
+
614
+ function emojisInit(reg = '', baseSrc = '/wxParse/emojis/', emojis) {
615
+ __emojisReg = reg
616
+ __emojisBaseSrc = baseSrc
617
+ __emojis = emojis
618
+ }
619
+
620
+ module.exports = {
621
+ html2json: html2json,
622
+ emojisInit: emojisInit,
623
+ }