xiaoe_mp_npm 1.0.0 → 1.0.2-alpha.6

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 (253) hide show
  1. package/.gitlab-ci.yml +44 -44
  2. package/miniprogram_dist/ConfirmOrder/components/AddressSelect/index.js +160 -160
  3. package/miniprogram_dist/ConfirmOrder/components/ChoosePicker/index.js +115 -109
  4. package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.js +890 -881
  5. package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.scss +44 -44
  6. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.js +129 -129
  7. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.json +8 -8
  8. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.scss +58 -58
  9. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxml +25 -25
  10. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.js +436 -436
  11. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.json +9 -9
  12. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.scss +222 -222
  13. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.wxml +81 -81
  14. package/miniprogram_dist/ConfirmOrder/components/IntegralSelect/index.scss +90 -90
  15. package/miniprogram_dist/ConfirmOrder/components/Invoice/index.scss +60 -60
  16. package/miniprogram_dist/ConfirmOrder/components/LeaveWord/index.scss +39 -39
  17. package/miniprogram_dist/ConfirmOrder/components/PayBar/index.js +249 -249
  18. package/miniprogram_dist/ConfirmOrder/components/PayBar/index.scss +61 -61
  19. package/miniprogram_dist/ConfirmOrder/components/PayDetail/index.scss +40 -40
  20. package/miniprogram_dist/ConfirmOrder/components/PickupSelect/index.js +89 -85
  21. package/miniprogram_dist/ConfirmOrder/components/PickupSelect/index.wxml +13 -13
  22. package/miniprogram_dist/ConfirmOrder/index.js +110 -110
  23. package/miniprogram_dist/CopGoodsCard/constans.js +462 -462
  24. package/miniprogram_dist/CopGoodsCard/index.js +147 -147
  25. package/miniprogram_dist/CopGoodsCard/index.json +2 -2
  26. package/miniprogram_dist/CopGoodsCard/index.scss +100 -100
  27. package/miniprogram_dist/CopGoodsCard/index.wxml +20 -20
  28. package/miniprogram_dist/CouponList/components/CouponItem/index.css +1715 -1715
  29. package/miniprogram_dist/CouponList/components/CouponItem/index.js +319 -319
  30. package/miniprogram_dist/CouponList/components/CouponItem/index.min.css +1 -1
  31. package/miniprogram_dist/CouponList/components/CouponItem/index.scss +591 -591
  32. package/miniprogram_dist/CouponList/components/CouponItem/index.wxml +199 -199
  33. package/miniprogram_dist/CouponList/couponColumn/index.js +176 -176
  34. package/miniprogram_dist/CouponList/couponColumn/index.scss +117 -117
  35. package/miniprogram_dist/CouponList/couponColumn/index.wxml +39 -39
  36. package/miniprogram_dist/CouponReceivePopup/index.js +72 -72
  37. package/miniprogram_dist/CouponReceivePopup/index.json +5 -5
  38. package/miniprogram_dist/CouponReceivePopup/index.scss +99 -99
  39. package/miniprogram_dist/CouponReceivePopup/index.wxml +85 -85
  40. package/miniprogram_dist/CustomPopup/index.js +82 -82
  41. package/miniprogram_dist/CustomPopup/index.wxml +25 -25
  42. package/miniprogram_dist/GoodsItem/index.js +745 -745
  43. package/miniprogram_dist/GoodsItem/index.scss +524 -524
  44. package/miniprogram_dist/GoodsItem/index.wxml +173 -173
  45. package/miniprogram_dist/GoodsItem/index.wxs +18 -18
  46. package/miniprogram_dist/GoodsRecommend/fun.wxs +37 -37
  47. package/miniprogram_dist/GoodsRecommend/index.js +91 -91
  48. package/miniprogram_dist/GoodsRecommend/index.json +3 -3
  49. package/miniprogram_dist/GoodsRecommend/index.less +129 -129
  50. package/miniprogram_dist/GoodsRecommend/index.scss +162 -162
  51. package/miniprogram_dist/GoodsRecommend/index.wxml +47 -47
  52. package/miniprogram_dist/LiveGoodsList/Header/index.scss +78 -78
  53. package/miniprogram_dist/LiveGoodsList/index.js +821 -821
  54. package/miniprogram_dist/LiveGoodsList/index.scss +92 -92
  55. package/miniprogram_dist/LiveGoodsList/index.wxml +106 -106
  56. package/miniprogram_dist/PayModule/button/index.scss +44 -44
  57. package/miniprogram_dist/PayModule/index/index.js +264 -260
  58. package/miniprogram_dist/Task/TaskBubble/index.js +117 -117
  59. package/miniprogram_dist/Task/TaskBubble/index.json +3 -3
  60. package/miniprogram_dist/Task/TaskBubble/index.scss +125 -125
  61. package/miniprogram_dist/Task/TaskBubble/index.wxml +22 -22
  62. package/miniprogram_dist/Task/TaskIcon/index.js +29 -29
  63. package/miniprogram_dist/Task/TaskIcon/index.json +4 -4
  64. package/miniprogram_dist/Task/TaskIcon/index.scss +70 -70
  65. package/miniprogram_dist/Task/TaskIcon/index.wxml +5 -5
  66. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.js +39 -39
  67. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.json +6 -6
  68. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.scss +39 -39
  69. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.wxml +19 -19
  70. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.js +207 -207
  71. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.json +5 -5
  72. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.scss +139 -139
  73. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxml +43 -43
  74. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxs +7 -7
  75. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.js +146 -146
  76. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.json +7 -7
  77. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.scss +66 -66
  78. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.wxml +39 -39
  79. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.js +75 -75
  80. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.json +9 -9
  81. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.scss +59 -59
  82. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.wxml +42 -42
  83. package/miniprogram_dist/Task/TaskPopup/index.js +113 -113
  84. package/miniprogram_dist/Task/TaskPopup/index.json +8 -8
  85. package/miniprogram_dist/Task/TaskPopup/index.scss +113 -113
  86. package/miniprogram_dist/Task/TaskPopup/index.wxml +67 -67
  87. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.js +52 -52
  88. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.json +6 -6
  89. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.scss +91 -91
  90. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxml +53 -53
  91. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxs +48 -48
  92. package/miniprogram_dist/Task/taskReceivePopup/index.js +30 -30
  93. package/miniprogram_dist/Task/taskReceivePopup/index.json +11 -11
  94. package/miniprogram_dist/Task/taskReceivePopup/index.wxml +18 -18
  95. package/miniprogram_dist/Task/taskReceivePopup/integral/index.js +37 -37
  96. package/miniprogram_dist/Task/taskReceivePopup/integral/index.json +6 -6
  97. package/miniprogram_dist/Task/taskReceivePopup/integral/index.scss +60 -60
  98. package/miniprogram_dist/Task/taskReceivePopup/integral/index.wxml +17 -17
  99. package/miniprogram_dist/TeacherGoodsList/index.js +825 -825
  100. package/miniprogram_dist/TeacherGoodsList/index.json +9 -9
  101. package/miniprogram_dist/TeacherGoodsList/index.scss +145 -145
  102. package/miniprogram_dist/TeacherGoodsList/index.wxml +110 -110
  103. package/miniprogram_dist/common/api/confirmOrder.js +223 -223
  104. package/miniprogram_dist/common/api/liveGoodsList.js +89 -89
  105. package/miniprogram_dist/common/api/sku.js +73 -73
  106. package/miniprogram_dist/common/utils/index.js +69 -69
  107. package/miniprogram_dist/coupon/components/CouponItem/index.less +208 -208
  108. package/miniprogram_dist/coupon/components/CouponItem/index.scss +246 -246
  109. package/miniprogram_dist/coupon/components/CouponSelect/index.scss +330 -330
  110. package/miniprogram_dist/coupon/index.js +248 -248
  111. package/miniprogram_dist/coupon/index.scss +83 -83
  112. package/package.json +78 -78
  113. package/src/ConfirmOrder/components/AddressSelect/index.js +160 -160
  114. package/src/ConfirmOrder/components/ChoosePicker/index.js +115 -109
  115. package/src/ConfirmOrder/components/ConfirmOrderContent/index.js +890 -881
  116. package/src/ConfirmOrder/components/ConfirmOrderContent/index.scss +44 -44
  117. package/src/ConfirmOrder/components/ConfirmOrderContent/index.wxss +51 -51
  118. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.js +129 -129
  119. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.json +8 -8
  120. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.scss +58 -58
  121. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxml +25 -25
  122. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxss +1 -1
  123. package/src/ConfirmOrder/components/GoodsInfo/index.js +436 -436
  124. package/src/ConfirmOrder/components/GoodsInfo/index.json +9 -9
  125. package/src/ConfirmOrder/components/GoodsInfo/index.scss +222 -222
  126. package/src/ConfirmOrder/components/GoodsInfo/index.wxml +81 -81
  127. package/src/ConfirmOrder/components/GoodsInfo/index.wxss +673 -673
  128. package/src/ConfirmOrder/components/IntegralSelect/index.scss +90 -90
  129. package/src/ConfirmOrder/components/IntegralSelect/index.wxss +218 -218
  130. package/src/ConfirmOrder/components/Invoice/index.scss +60 -60
  131. package/src/ConfirmOrder/components/Invoice/index.wxss +93 -93
  132. package/src/ConfirmOrder/components/LeaveWord/index.scss +39 -39
  133. package/src/ConfirmOrder/components/LeaveWord/index.wxss +34 -34
  134. package/src/ConfirmOrder/components/PayBar/index.js +249 -249
  135. package/src/ConfirmOrder/components/PayBar/index.scss +61 -61
  136. package/src/ConfirmOrder/components/PayBar/index.wxss +108 -108
  137. package/src/ConfirmOrder/components/PayDetail/index.scss +40 -40
  138. package/src/ConfirmOrder/components/PayDetail/index.wxss +50 -50
  139. package/src/ConfirmOrder/components/PickupSelect/index.js +89 -85
  140. package/src/ConfirmOrder/components/PickupSelect/index.wxml +13 -13
  141. package/src/ConfirmOrder/index.js +110 -110
  142. package/src/CopGoodsCard/constans.js +462 -462
  143. package/src/CopGoodsCard/index.js +147 -147
  144. package/src/CopGoodsCard/index.json +2 -2
  145. package/src/CopGoodsCard/index.scss +100 -100
  146. package/src/CopGoodsCard/index.wxml +20 -20
  147. package/src/CopGoodsCard/index.wxss +1 -1
  148. package/src/CouponList/components/CouponItem/index.css +1715 -1715
  149. package/src/CouponList/components/CouponItem/index.js +319 -319
  150. package/src/CouponList/components/CouponItem/index.min.css +1 -1
  151. package/src/CouponList/components/CouponItem/index.scss +591 -591
  152. package/src/CouponList/components/CouponItem/index.wxml +199 -199
  153. package/src/CouponList/components/CouponItem/index.wxss +1715 -1715
  154. package/src/CouponList/couponColumn/index.js +176 -176
  155. package/src/CouponList/couponColumn/index.scss +117 -117
  156. package/src/CouponList/couponColumn/index.wxml +39 -39
  157. package/src/CouponList/couponColumn/index.wxss +265 -265
  158. package/src/CouponReceivePopup/index.js +72 -72
  159. package/src/CouponReceivePopup/index.json +5 -5
  160. package/src/CouponReceivePopup/index.scss +99 -99
  161. package/src/CouponReceivePopup/index.wxml +85 -85
  162. package/src/CouponReceivePopup/index.wxss +1 -1
  163. package/src/CustomPopup/index.js +82 -82
  164. package/src/CustomPopup/index.wxml +25 -25
  165. package/src/GoodsItem/index.js +745 -745
  166. package/src/GoodsItem/index.scss +524 -524
  167. package/src/GoodsItem/index.wxml +173 -173
  168. package/src/GoodsItem/index.wxs +18 -18
  169. package/src/GoodsItem/index.wxss +1935 -1935
  170. package/src/GoodsRecommend/fun.wxs +37 -37
  171. package/src/GoodsRecommend/index.js +91 -91
  172. package/src/GoodsRecommend/index.json +3 -3
  173. package/src/GoodsRecommend/index.less +129 -129
  174. package/src/GoodsRecommend/index.scss +162 -162
  175. package/src/GoodsRecommend/index.wxml +47 -47
  176. package/src/GoodsRecommend/index.wxss +537 -537
  177. package/src/LiveGoodsList/Header/index.scss +78 -78
  178. package/src/LiveGoodsList/Header/index.wxss +190 -190
  179. package/src/LiveGoodsList/index.js +821 -821
  180. package/src/LiveGoodsList/index.scss +92 -92
  181. package/src/LiveGoodsList/index.wxml +106 -106
  182. package/src/PayModule/button/index.scss +44 -44
  183. package/src/PayModule/button/index.wxss +58 -58
  184. package/src/PayModule/index/index.js +264 -260
  185. package/src/Sku/commSelect/index.wxss +54 -54
  186. package/src/Task/TaskBubble/index.js +117 -117
  187. package/src/Task/TaskBubble/index.json +3 -3
  188. package/src/Task/TaskBubble/index.scss +125 -125
  189. package/src/Task/TaskBubble/index.wxml +22 -22
  190. package/src/Task/TaskBubble/index.wxss +289 -289
  191. package/src/Task/TaskIcon/index.js +29 -29
  192. package/src/Task/TaskIcon/index.json +4 -4
  193. package/src/Task/TaskIcon/index.scss +70 -70
  194. package/src/Task/TaskIcon/index.wxml +5 -5
  195. package/src/Task/TaskIcon/index.wxss +130 -130
  196. package/src/Task/TaskPopup/component/RewardList/index.js +39 -39
  197. package/src/Task/TaskPopup/component/RewardList/index.json +6 -6
  198. package/src/Task/TaskPopup/component/RewardList/index.scss +39 -39
  199. package/src/Task/TaskPopup/component/RewardList/index.wxml +19 -19
  200. package/src/Task/TaskPopup/component/RewardList/index.wxss +18 -18
  201. package/src/Task/TaskPopup/component/TaskItem/index.js +207 -207
  202. package/src/Task/TaskPopup/component/TaskItem/index.json +5 -5
  203. package/src/Task/TaskPopup/component/TaskItem/index.scss +139 -139
  204. package/src/Task/TaskPopup/component/TaskItem/index.wxml +43 -43
  205. package/src/Task/TaskPopup/component/TaskItem/index.wxs +7 -7
  206. package/src/Task/TaskPopup/component/TaskItem/index.wxss +394 -394
  207. package/src/Task/TaskPopup/component/TaskList/index.js +146 -146
  208. package/src/Task/TaskPopup/component/TaskList/index.json +7 -7
  209. package/src/Task/TaskPopup/component/TaskList/index.scss +66 -66
  210. package/src/Task/TaskPopup/component/TaskList/index.wxml +39 -39
  211. package/src/Task/TaskPopup/component/TaskList/index.wxss +118 -118
  212. package/src/Task/TaskPopup/component/TaskType/index.js +75 -75
  213. package/src/Task/TaskPopup/component/TaskType/index.json +9 -9
  214. package/src/Task/TaskPopup/component/TaskType/index.scss +59 -59
  215. package/src/Task/TaskPopup/component/TaskType/index.wxml +42 -42
  216. package/src/Task/TaskPopup/component/TaskType/index.wxss +98 -98
  217. package/src/Task/TaskPopup/index.js +113 -113
  218. package/src/Task/TaskPopup/index.json +8 -8
  219. package/src/Task/TaskPopup/index.scss +113 -113
  220. package/src/Task/TaskPopup/index.wxml +67 -67
  221. package/src/Task/TaskPopup/index.wxss +306 -306
  222. package/src/Task/taskReceivePopup/coupon/index.js +52 -52
  223. package/src/Task/taskReceivePopup/coupon/index.json +6 -6
  224. package/src/Task/taskReceivePopup/coupon/index.scss +91 -91
  225. package/src/Task/taskReceivePopup/coupon/index.wxml +53 -53
  226. package/src/Task/taskReceivePopup/coupon/index.wxs +48 -48
  227. package/src/Task/taskReceivePopup/coupon/index.wxss +187 -187
  228. package/src/Task/taskReceivePopup/index.js +30 -30
  229. package/src/Task/taskReceivePopup/index.json +11 -11
  230. package/src/Task/taskReceivePopup/index.wxml +18 -18
  231. package/src/Task/taskReceivePopup/index.wxss +1 -1
  232. package/src/Task/taskReceivePopup/integral/index.js +37 -37
  233. package/src/Task/taskReceivePopup/integral/index.json +6 -6
  234. package/src/Task/taskReceivePopup/integral/index.scss +60 -60
  235. package/src/Task/taskReceivePopup/integral/index.wxml +17 -17
  236. package/src/Task/taskReceivePopup/integral/index.wxss +94 -94
  237. package/src/TeacherGoodsList/index.js +825 -825
  238. package/src/TeacherGoodsList/index.json +9 -9
  239. package/src/TeacherGoodsList/index.scss +145 -145
  240. package/src/TeacherGoodsList/index.wxml +110 -110
  241. package/src/TeacherGoodsList/index.wxss +196 -196
  242. package/src/common/api/confirmOrder.js +223 -223
  243. package/src/common/api/liveGoodsList.js +89 -89
  244. package/src/common/api/sku.js +73 -73
  245. package/src/common/utils/index.js +69 -69
  246. package/src/coupon/components/CouponItem/index.less +208 -208
  247. package/src/coupon/components/CouponItem/index.scss +246 -246
  248. package/src/coupon/components/CouponItem/index.wxss +821 -821
  249. package/src/coupon/components/CouponSelect/index.scss +330 -330
  250. package/src/coupon/components/CouponSelect/index.wxss +1132 -1132
  251. package/src/coupon/index.js +248 -248
  252. package/src/coupon/index.scss +83 -83
  253. package/src/coupon/index.wxss +216 -216
package/.gitlab-ci.yml CHANGED
@@ -1,44 +1,44 @@
1
- # 发布测试包
2
- build_test:
3
- stage: build
4
- only:
5
- - dev
6
- - bug-hotfix/replace-url
7
- - feature/live_marketing_iteration
8
- - feature/remove-error-report
9
- - fix/record-lottery
10
- tags:
11
- - fe-group-prod-runner-2
12
- script:
13
- - export project_name=$(cat package.json|awk -F "[:]" '/"name"/{print$2}')
14
- - export project_name=${project_name:2:$[${#project_name}-4]}
15
- - export version=`cat package.json|awk -F "[:]" '/"version"/{print$2}'`
16
- - export version=${version:2:$[${#version}-4]}
17
- - export message=$(git log --pretty=format:%s -1)
18
- - export author=$(git log --pretty=format:%an -1)
19
- - cnpm i
20
- - npm run build
21
- - cnpm publish
22
-
23
- # 发布正式包
24
- build_master:
25
- stage: build
26
- only:
27
- - master
28
- - /^release\/.*$/
29
- tags:
30
- - fe-group-prod-runner-2
31
- script:
32
- - export project_name=$(cat package.json|awk -F "[:]" '/"name"/{print$2}')
33
- - export project_name=${project_name:2:$[${#project_name}-4]}
34
- - export version=`cat package.json|awk -F "[:]" '/"version"/{print$2}'`
35
- - export version=${version:2:$[${#version}-4]}
36
- - export message=$(git log --no-merges --pretty=format:%s -1)
37
- - export author=$(git log --no-merges --pretty=format:%an -1)
38
- - cnpm i
39
- - npm run build
40
- - cnpm publish
41
- - curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=0ae9c0e9-3e15-49cf-9493-8f880943c6f0' -H 'Content-Type:application/json' -d '{"msgtype":"text","text":{"content":"'${project_name}'发包成功,版本号:'${version}',提交人:'${author}',提交信息:'${message}'"}}'
42
-
43
-
44
-
1
+ # 发布测试包
2
+ build_test:
3
+ stage: build
4
+ only:
5
+ - dev
6
+ - bug-hotfix/replace-url
7
+ - feature/live_marketing_iteration
8
+ - feature/remove-error-report
9
+ - fix/record-lottery
10
+ tags:
11
+ - fe-group-prod-runner-2
12
+ script:
13
+ - export project_name=$(cat package.json|awk -F "[:]" '/"name"/{print$2}')
14
+ - export project_name=${project_name:2:$[${#project_name}-4]}
15
+ - export version=`cat package.json|awk -F "[:]" '/"version"/{print$2}'`
16
+ - export version=${version:2:$[${#version}-4]}
17
+ - export message=$(git log --pretty=format:%s -1)
18
+ - export author=$(git log --pretty=format:%an -1)
19
+ - cnpm i
20
+ - npm run build
21
+ - cnpm publish
22
+
23
+ # 发布正式包
24
+ build_master:
25
+ stage: build
26
+ only:
27
+ - master
28
+ - /^release\/.*$/
29
+ tags:
30
+ - fe-group-prod-runner-2
31
+ script:
32
+ - export project_name=$(cat package.json|awk -F "[:]" '/"name"/{print$2}')
33
+ - export project_name=${project_name:2:$[${#project_name}-4]}
34
+ - export version=`cat package.json|awk -F "[:]" '/"version"/{print$2}'`
35
+ - export version=${version:2:$[${#version}-4]}
36
+ - export message=$(git log --no-merges --pretty=format:%s -1)
37
+ - export author=$(git log --no-merges --pretty=format:%an -1)
38
+ - cnpm i
39
+ - npm run build
40
+ - cnpm publish
41
+ - curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=0ae9c0e9-3e15-49cf-9493-8f880943c6f0' -H 'Content-Type:application/json' -d '{"msgtype":"text","text":{"content":"'${project_name}'发包成功,版本号:'${version}',提交人:'${author}',提交信息:'${message}'"}}'
42
+
43
+
44
+
@@ -1,161 +1,161 @@
1
- // src/ConfirmOrder/components/AddressSelect/index.js
2
- const computedBehavior = require('miniprogram-computed').behavior
3
- import {
4
- ENTITY_GOODS,COP_GOODS
5
- } from '../../../common/utils/constants';
6
- import {
7
- isEmptyObject
8
- } from "../../../common/utils/index"
9
-
10
- Component({
11
- behaviors: [computedBehavior],
12
- /**
13
- * 组件的属性列表
14
- */
15
- properties: {
16
- addressInfo: {
17
- type: Object,
18
- value: () => {},
19
- observer(address) {
20
- this.triggerEvent("dataChange", {
21
- name: 'address',
22
- prePayParams: {
23
- address_id: address && address.id,
24
- },
25
- errMsg: this.data.showAddressSelect && !this.data.haveAddress && '请添加收货地址',
26
- triggerPrePay: !!(!this.data.isCart && address && address.id),
27
- })
28
- if (this.data.isCart) {
29
- this.triggerEvent("updataData", {
30
- cartInfoLoaded: false
31
- })
32
- }
33
- if (!this.data.addressInfoLoaded) {
34
- this.triggerEvent("updataData", {
35
- addressInfoLoaded: true
36
- })
37
- }
38
- }
39
- },
40
- isCart: {
41
- type: Number,
42
- value: 0,
43
- },
44
- activeMode: {
45
- type: Number,
46
- value: 0,
47
- },
48
- baseInfoQuery: {
49
- type: Object,
50
- value: () => {},
51
- },
52
- hasEntityGoods: {
53
- type: Boolean,
54
- value: false,
55
- },
56
- cartGoodsList: {
57
- type: Array,
58
- value: () => [],
59
- },
60
- goodsInfo: {
61
- type: Object,
62
- value: () => {},
63
- },
64
- isShowAddressManage: {
65
- type: Boolean,
66
- value: false,
67
- },
68
- addressQuery: {
69
- type: Object,
70
- value: () => {},
71
- },
72
- cartInfoLoaded: {
73
- type: Boolean,
74
- value: false,
75
- },
76
- addressInfoLoaded: {
77
- type: Boolean,
78
- value: false,
79
- }
80
- },
81
-
82
- /**
83
- * 组件的初始数据
84
- */
85
- data: {
86
-
87
- },
88
-
89
- lifetimes: {
90
- attached: async function () {
91
- this.triggerEvent("dataChange", {
92
- name: 'address',
93
- errMsg: this.data.showAddressSelect &&
94
- !this.data.haveAddress &&
95
- this.data.activeMode === 0 &&
96
- '请添加收货地址',
97
- })
98
- },
99
- },
100
- computed: {
101
- showAddressSelect(data) {
102
- return (
103
- data.baseInfoQuery.spu_type === ENTITY_GOODS ||
104
- data.baseInfoQuery.spu_type === COP_GOODS ||
105
- (data.goodsInfo.is_goods_package && data.hasEntityGoods) ||
106
- (data.isCart &&
107
- data.cartGoodsList.some((goodsInfo) => {
108
- return (
109
- goodsInfo.spu_type === ENTITY_GOODS ||
110
- goodsInfo.entity_goods_num > 0
111
- );
112
- }))
113
- );
114
- },
115
- haveAddress(data) {
116
- return data.addressInfo && !isEmptyObject(data.addressInfo);
117
- },
118
- invalidAddress(data) {
119
- return data.addressInfo && !data.addressInfo.calculate_freight;
120
- },
121
- needAddress(data) {
122
- return !data.haveAddress && data.showAddressSelect;
123
- },
124
- },
125
- observers: {
126
- needAddress(val) {
127
- if (val) {
128
- this.triggerEvent("dataChange", {
129
- name: 'address',
130
- errMsg: '请添加收货地址'
131
- })
132
- }
133
- }
134
- },
135
- /**
136
- * 组件的方法列表
137
- */
138
- methods: {
139
- // 修改地址
140
- changeAddress() {
141
- let obj = {}
142
- if (this.data.haveAddress) {
143
- obj = {
144
- isShowAddressManage: true,
145
- addressQuery: {
146
- selectable: true,
147
- id: this.data.addressInfo.id,
148
- orderdata: this.data.baseInfoQuery,
149
- }
150
- }
151
- } else {
152
- obj = {
153
- isShowEditAddress: true,
154
- addressQuery: {}
155
- }
156
- }
157
- this.triggerEvent("updataData", obj)
158
- this.setData(obj)
159
- }
160
- }
1
+ // src/ConfirmOrder/components/AddressSelect/index.js
2
+ const computedBehavior = require('miniprogram-computed').behavior
3
+ import {
4
+ ENTITY_GOODS,COP_GOODS
5
+ } from '../../../common/utils/constants';
6
+ import {
7
+ isEmptyObject
8
+ } from "../../../common/utils/index"
9
+
10
+ Component({
11
+ behaviors: [computedBehavior],
12
+ /**
13
+ * 组件的属性列表
14
+ */
15
+ properties: {
16
+ addressInfo: {
17
+ type: Object,
18
+ value: () => {},
19
+ observer(address) {
20
+ this.triggerEvent("dataChange", {
21
+ name: 'address',
22
+ prePayParams: {
23
+ address_id: address && address.id,
24
+ },
25
+ errMsg: this.data.showAddressSelect && !this.data.haveAddress && '请添加收货地址',
26
+ triggerPrePay: !!(!this.data.isCart && address && address.id),
27
+ })
28
+ if (this.data.isCart) {
29
+ this.triggerEvent("updataData", {
30
+ cartInfoLoaded: false
31
+ })
32
+ }
33
+ if (!this.data.addressInfoLoaded) {
34
+ this.triggerEvent("updataData", {
35
+ addressInfoLoaded: true
36
+ })
37
+ }
38
+ }
39
+ },
40
+ isCart: {
41
+ type: Number,
42
+ value: 0,
43
+ },
44
+ activeMode: {
45
+ type: Number,
46
+ value: 0,
47
+ },
48
+ baseInfoQuery: {
49
+ type: Object,
50
+ value: () => {},
51
+ },
52
+ hasEntityGoods: {
53
+ type: Boolean,
54
+ value: false,
55
+ },
56
+ cartGoodsList: {
57
+ type: Array,
58
+ value: () => [],
59
+ },
60
+ goodsInfo: {
61
+ type: Object,
62
+ value: () => {},
63
+ },
64
+ isShowAddressManage: {
65
+ type: Boolean,
66
+ value: false,
67
+ },
68
+ addressQuery: {
69
+ type: Object,
70
+ value: () => {},
71
+ },
72
+ cartInfoLoaded: {
73
+ type: Boolean,
74
+ value: false,
75
+ },
76
+ addressInfoLoaded: {
77
+ type: Boolean,
78
+ value: false,
79
+ }
80
+ },
81
+
82
+ /**
83
+ * 组件的初始数据
84
+ */
85
+ data: {
86
+
87
+ },
88
+
89
+ lifetimes: {
90
+ attached: async function () {
91
+ this.triggerEvent("dataChange", {
92
+ name: 'address',
93
+ errMsg: this.data.showAddressSelect &&
94
+ !this.data.haveAddress &&
95
+ this.data.activeMode === 0 &&
96
+ '请添加收货地址',
97
+ })
98
+ },
99
+ },
100
+ computed: {
101
+ showAddressSelect(data) {
102
+ return (
103
+ data.baseInfoQuery.spu_type === ENTITY_GOODS ||
104
+ data.baseInfoQuery.spu_type === COP_GOODS ||
105
+ (data.goodsInfo.is_goods_package && data.hasEntityGoods) ||
106
+ (data.isCart &&
107
+ data.cartGoodsList.some((goodsInfo) => {
108
+ return (
109
+ goodsInfo.spu_type === ENTITY_GOODS ||
110
+ goodsInfo.entity_goods_num > 0
111
+ );
112
+ }))
113
+ );
114
+ },
115
+ haveAddress(data) {
116
+ return data.addressInfo && !isEmptyObject(data.addressInfo);
117
+ },
118
+ invalidAddress(data) {
119
+ return data.addressInfo && !data.addressInfo.calculate_freight;
120
+ },
121
+ needAddress(data) {
122
+ return !data.haveAddress && data.showAddressSelect;
123
+ },
124
+ },
125
+ observers: {
126
+ needAddress(val) {
127
+ if (val) {
128
+ this.triggerEvent("dataChange", {
129
+ name: 'address',
130
+ errMsg: '请添加收货地址'
131
+ })
132
+ }
133
+ }
134
+ },
135
+ /**
136
+ * 组件的方法列表
137
+ */
138
+ methods: {
139
+ // 修改地址
140
+ changeAddress() {
141
+ let obj = {}
142
+ if (this.data.haveAddress) {
143
+ obj = {
144
+ isShowAddressManage: true,
145
+ addressQuery: {
146
+ selectable: true,
147
+ id: this.data.addressInfo.id,
148
+ orderdata: this.data.baseInfoQuery,
149
+ }
150
+ }
151
+ } else {
152
+ obj = {
153
+ isShowEditAddress: true,
154
+ addressQuery: {}
155
+ }
156
+ }
157
+ this.triggerEvent("updataData", obj)
158
+ this.setData(obj)
159
+ }
160
+ }
161
161
  })
@@ -1,110 +1,116 @@
1
- // src/ConfirmOrder/components/ChoosePicker/index.js
2
- const computedBehavior = require('miniprogram-computed').behavior
3
-
4
- Component({
5
- behaviors: [computedBehavior],
6
- options: {
7
- styleIsolation: 'shared',
8
- },
9
- /**
10
- * 组件的属性列表
11
- */
12
- properties: {
13
- pickerUserInfo: {
14
- type: Object || String,
15
- value: () => {},
16
- observer(newVal, oldVal) {
17
- if (Object.keys(newVal).length > 0) {
18
- this.setData({
19
- hasData: true
20
- })
21
- } else {
22
- this.setData({
23
- hasData: false
24
- })
25
- }
26
- if (this.data.express_type === 2 && !newVal?.picker) {
27
- this.triggerEvent('dataChange', {
28
- name: 'pickerUserInfo',
29
- errMsg: '请填写提货人',
30
- });
31
- } else {
32
- this.triggerEvent('dataChange', {
33
- name: 'pickerUserInfo',
34
- errMsg: '',
35
- });
36
- }
37
- }
38
- },
39
- express_type: {
40
- type: Number,
41
- value: 1,
42
- },
43
- pickerList: {
44
- type: Array,
45
- value: () => [],
46
- },
47
- isShowSelectShipper: {
48
- type: Boolean,
49
- value: false,
50
- },
51
- isShowCreateShipper: {
52
- type: Boolean,
53
- value: false,
54
- },
55
- backPage: {
56
- type: Number,
57
- value: 1,
58
- },
59
- shipperType: {
60
- type: Number,
61
- value: 1,
62
- },
63
- express_type: {
64
- type: Number,
65
- value: 1,
66
- },
67
- },
68
-
69
- /**
70
- * 组件的初始数据
71
- */
72
- data: {
73
- hasData: false,
74
- },
75
- lifetimes: {
76
- attached: function () {
77
- if (this.data.express_type === 2 && !this.data.pickerUserInfo?.picker) {
78
- console.log(111);
79
- this.triggerEvent('dataChange', {
80
- name: 'pickerUserInfo',
81
- errMsg: '请填写提货人',
82
- });
83
- }
84
- },
85
- },
86
- /**
87
- * 组件的方法列表
88
- */
89
- methods: {
90
- // 选择提货人
91
- selectShipper() {
92
- this.triggerEvent('dataChange', {
93
- name: 'pickerUserInfo',
94
- errMsg: '',
95
- });
96
- this.triggerEvent("updataData", {
97
- isShowSelectShipper: true
98
- })
99
- },
100
- // 新建提货人
101
- createShipper() {
102
- this.triggerEvent("updataData", {
103
- isShowCreateShipper: true,
104
- shipperType: 1,
105
- backPage: 1,
106
- backType: 1
107
- })
108
- }
109
- }
1
+ // src/ConfirmOrder/components/ChoosePicker/index.js
2
+ const computedBehavior = require('miniprogram-computed').behavior
3
+
4
+ Component({
5
+ behaviors: [computedBehavior],
6
+ options: {
7
+ styleIsolation: 'shared',
8
+ },
9
+ /**
10
+ * 组件的属性列表
11
+ */
12
+ properties: {
13
+ pickerUserInfo: {
14
+ type: Object || String,
15
+ value: () => {},
16
+ observer(newVal, oldVal) {
17
+ if (Object.keys(newVal).length > 0) {
18
+ if (newVal.picker && newVal.picker_contact){
19
+ this.setData({
20
+ hasData: true
21
+ })
22
+ } else {
23
+ this.setData({
24
+ hasData: false
25
+ })
26
+ }
27
+ } else {
28
+ this.setData({
29
+ hasData: false
30
+ })
31
+ }
32
+ if (this.data.express_type === 2 && !newVal?.picker) {
33
+ this.triggerEvent('dataChange', {
34
+ name: 'pickerUserInfo',
35
+ errMsg: '请填写提货人',
36
+ });
37
+ } else {
38
+ this.triggerEvent('dataChange', {
39
+ name: 'pickerUserInfo',
40
+ errMsg: '',
41
+ });
42
+ }
43
+ }
44
+ },
45
+ express_type: {
46
+ type: Number,
47
+ value: 1,
48
+ },
49
+ pickerList: {
50
+ type: Array,
51
+ value: () => [],
52
+ },
53
+ isShowSelectShipper: {
54
+ type: Boolean,
55
+ value: false,
56
+ },
57
+ isShowCreateShipper: {
58
+ type: Boolean,
59
+ value: false,
60
+ },
61
+ backPage: {
62
+ type: Number,
63
+ value: 1,
64
+ },
65
+ shipperType: {
66
+ type: Number,
67
+ value: 1,
68
+ },
69
+ express_type: {
70
+ type: Number,
71
+ value: 1,
72
+ },
73
+ },
74
+
75
+ /**
76
+ * 组件的初始数据
77
+ */
78
+ data: {
79
+ hasData: false,
80
+ },
81
+ lifetimes: {
82
+ attached: function () {
83
+ if (this.data.express_type === 2 && !this.data.pickerUserInfo?.picker) {
84
+ console.log(111);
85
+ this.triggerEvent('dataChange', {
86
+ name: 'pickerUserInfo',
87
+ errMsg: '请填写提货人',
88
+ });
89
+ }
90
+ },
91
+ },
92
+ /**
93
+ * 组件的方法列表
94
+ */
95
+ methods: {
96
+ // 选择提货人
97
+ selectShipper() {
98
+ this.triggerEvent('dataChange', {
99
+ name: 'pickerUserInfo',
100
+ errMsg: '',
101
+ });
102
+ this.triggerEvent("updataData", {
103
+ isShowSelectShipper: true
104
+ })
105
+ },
106
+ // 新建提货人
107
+ createShipper() {
108
+ this.triggerEvent("updataData", {
109
+ isShowCreateShipper: true,
110
+ shipperType: 1,
111
+ backPage: 1,
112
+ backType: 1
113
+ })
114
+ }
115
+ }
110
116
  })