xiaoe_mp_npm 1.0.8 → 1.0.9

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 (233) 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 -115
  4. package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.js +890 -890
  5. package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.json +23 -23
  6. package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.scss +44 -44
  7. package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.wxml +188 -188
  8. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.js +129 -129
  9. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.json +8 -8
  10. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.scss +58 -58
  11. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxml +25 -25
  12. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.js +448 -448
  13. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.json +9 -9
  14. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.scss +222 -222
  15. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.wxml +81 -81
  16. package/miniprogram_dist/ConfirmOrder/components/IntegralSelect/index.scss +90 -90
  17. package/miniprogram_dist/ConfirmOrder/components/Invoice/index.scss +60 -60
  18. package/miniprogram_dist/ConfirmOrder/components/LeaveWord/index.scss +39 -39
  19. package/miniprogram_dist/ConfirmOrder/components/PayBar/index.js +249 -249
  20. package/miniprogram_dist/ConfirmOrder/components/PayBar/index.scss +61 -61
  21. package/miniprogram_dist/ConfirmOrder/components/PayDetail/index.scss +40 -40
  22. package/miniprogram_dist/ConfirmOrder/components/PickupSelect/index.js +99 -99
  23. package/miniprogram_dist/ConfirmOrder/components/PickupSelect/index.wxml +13 -13
  24. package/miniprogram_dist/ConfirmOrder/components/SvipSelect/SvipSelect.js +99 -99
  25. package/miniprogram_dist/ConfirmOrder/components/SvipSelect/SvipSelect.json +6 -6
  26. package/miniprogram_dist/ConfirmOrder/components/SvipSelect/SvipSelect.scss +150 -150
  27. package/miniprogram_dist/ConfirmOrder/components/SvipSelect/SvipSelect.wxml +39 -39
  28. package/miniprogram_dist/ConfirmOrder/components/SvipSelect/filter.wxs +6 -6
  29. package/miniprogram_dist/ConfirmOrder/index.js +110 -110
  30. package/miniprogram_dist/CopGoodsCard/constans.js +462 -462
  31. package/miniprogram_dist/CopGoodsCard/index.js +147 -147
  32. package/miniprogram_dist/CopGoodsCard/index.json +2 -2
  33. package/miniprogram_dist/CopGoodsCard/index.scss +100 -100
  34. package/miniprogram_dist/CopGoodsCard/index.wxml +20 -20
  35. package/miniprogram_dist/CouponList/components/CouponItem/index.css +1715 -1715
  36. package/miniprogram_dist/CouponList/components/CouponItem/index.js +319 -319
  37. package/miniprogram_dist/CouponList/components/CouponItem/index.min.css +1 -1
  38. package/miniprogram_dist/CouponList/components/CouponItem/index.scss +591 -591
  39. package/miniprogram_dist/CouponList/components/CouponItem/index.wxml +199 -199
  40. package/miniprogram_dist/CouponList/couponColumn/index.js +176 -176
  41. package/miniprogram_dist/CouponList/couponColumn/index.scss +117 -117
  42. package/miniprogram_dist/CouponList/couponColumn/index.wxml +39 -39
  43. package/miniprogram_dist/CouponReceivePopup/index.js +72 -72
  44. package/miniprogram_dist/CouponReceivePopup/index.json +5 -5
  45. package/miniprogram_dist/CouponReceivePopup/index.scss +99 -99
  46. package/miniprogram_dist/CouponReceivePopup/index.wxml +85 -85
  47. package/miniprogram_dist/CustomPopup/index.js +82 -82
  48. package/miniprogram_dist/CustomPopup/index.wxml +25 -25
  49. package/miniprogram_dist/GoodsItem/index.js +745 -745
  50. package/miniprogram_dist/GoodsItem/index.scss +524 -524
  51. package/miniprogram_dist/GoodsItem/index.wxml +173 -173
  52. package/miniprogram_dist/GoodsItem/index.wxs +18 -18
  53. package/miniprogram_dist/GoodsRecommend/fun.wxs +37 -37
  54. package/miniprogram_dist/GoodsRecommend/index.js +91 -91
  55. package/miniprogram_dist/GoodsRecommend/index.json +3 -3
  56. package/miniprogram_dist/GoodsRecommend/index.less +129 -129
  57. package/miniprogram_dist/GoodsRecommend/index.scss +162 -162
  58. package/miniprogram_dist/GoodsRecommend/index.wxml +47 -47
  59. package/miniprogram_dist/LiveGoodsList/Header/index.scss +78 -78
  60. package/miniprogram_dist/LiveGoodsList/index.js +821 -821
  61. package/miniprogram_dist/LiveGoodsList/index.scss +92 -92
  62. package/miniprogram_dist/LiveGoodsList/index.wxml +106 -106
  63. package/miniprogram_dist/PayModule/button/index.scss +44 -44
  64. package/miniprogram_dist/PayModule/index/index.js +264 -264
  65. package/miniprogram_dist/Task/TaskBubble/index.js +145 -117
  66. package/miniprogram_dist/Task/TaskBubble/index.scss +125 -125
  67. package/miniprogram_dist/Task/TaskBubble/index.wxss +3 -3
  68. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.js +297 -207
  69. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.scss +139 -139
  70. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxml +47 -43
  71. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxss +16 -16
  72. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.js +184 -146
  73. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.js +78 -75
  74. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.scss +62 -59
  75. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.wxml +42 -42
  76. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.wxss +12 -0
  77. package/miniprogram_dist/Task/TaskPopup/index.js +126 -113
  78. package/miniprogram_dist/Task/TaskPopup/index.scss +140 -113
  79. package/miniprogram_dist/Task/TaskPopup/index.wxml +75 -67
  80. package/miniprogram_dist/Task/TaskPopup/index.wxss +208 -108
  81. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxml +58 -53
  82. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.js +44 -0
  83. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.json +6 -0
  84. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.scss +103 -0
  85. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.wxml +37 -0
  86. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.wxs +48 -0
  87. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.wxss +223 -0
  88. package/miniprogram_dist/Task/taskReceivePopup/index.js +34 -30
  89. package/miniprogram_dist/Task/taskReceivePopup/index.json +13 -11
  90. package/miniprogram_dist/Task/taskReceivePopup/index.wxml +25 -18
  91. package/miniprogram_dist/Task/taskReceivePopup/integral/index.js +61 -37
  92. package/miniprogram_dist/Task/taskReceivePopup/integral/index.wxml +12 -17
  93. package/miniprogram_dist/TeacherGoodsList/index.js +825 -825
  94. package/miniprogram_dist/TeacherGoodsList/index.json +9 -9
  95. package/miniprogram_dist/TeacherGoodsList/index.scss +145 -145
  96. package/miniprogram_dist/TeacherGoodsList/index.wxml +110 -110
  97. package/miniprogram_dist/common/api/confirmOrder.js +223 -223
  98. package/miniprogram_dist/common/api/liveGoodsList.js +89 -89
  99. package/miniprogram_dist/common/api/sku.js +73 -73
  100. package/miniprogram_dist/common/utils/index.js +69 -69
  101. package/miniprogram_dist/coupon/components/CouponItem/index.less +208 -208
  102. package/miniprogram_dist/coupon/components/CouponItem/index.scss +246 -246
  103. package/miniprogram_dist/coupon/components/CouponSelect/index.scss +330 -330
  104. package/miniprogram_dist/coupon/index.js +248 -248
  105. package/miniprogram_dist/coupon/index.scss +83 -83
  106. package/package.json +78 -78
  107. package/src/ConfirmOrder/components/AddressSelect/index.js +160 -160
  108. package/src/ConfirmOrder/components/ChoosePicker/index.js +115 -115
  109. package/src/ConfirmOrder/components/ConfirmOrderContent/index.js +890 -890
  110. package/src/ConfirmOrder/components/ConfirmOrderContent/index.json +23 -23
  111. package/src/ConfirmOrder/components/ConfirmOrderContent/index.scss +44 -44
  112. package/src/ConfirmOrder/components/ConfirmOrderContent/index.wxml +188 -188
  113. package/src/ConfirmOrder/components/ConfirmOrderContent/index.wxss +51 -51
  114. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.js +129 -129
  115. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.json +8 -8
  116. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.scss +58 -58
  117. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxml +25 -25
  118. package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxss +1 -1
  119. package/src/ConfirmOrder/components/GoodsInfo/index.js +448 -448
  120. package/src/ConfirmOrder/components/GoodsInfo/index.json +9 -9
  121. package/src/ConfirmOrder/components/GoodsInfo/index.scss +222 -222
  122. package/src/ConfirmOrder/components/GoodsInfo/index.wxml +81 -81
  123. package/src/ConfirmOrder/components/GoodsInfo/index.wxss +673 -673
  124. package/src/ConfirmOrder/components/IntegralSelect/index.scss +90 -90
  125. package/src/ConfirmOrder/components/IntegralSelect/index.wxss +218 -218
  126. package/src/ConfirmOrder/components/Invoice/index.scss +60 -60
  127. package/src/ConfirmOrder/components/Invoice/index.wxss +93 -93
  128. package/src/ConfirmOrder/components/LeaveWord/index.scss +39 -39
  129. package/src/ConfirmOrder/components/LeaveWord/index.wxss +34 -34
  130. package/src/ConfirmOrder/components/PayBar/index.js +249 -249
  131. package/src/ConfirmOrder/components/PayBar/index.scss +61 -61
  132. package/src/ConfirmOrder/components/PayBar/index.wxss +108 -108
  133. package/src/ConfirmOrder/components/PayDetail/index.scss +40 -40
  134. package/src/ConfirmOrder/components/PayDetail/index.wxss +50 -50
  135. package/src/ConfirmOrder/components/PickupSelect/index.js +99 -99
  136. package/src/ConfirmOrder/components/PickupSelect/index.wxml +13 -13
  137. package/src/ConfirmOrder/components/SvipSelect/SvipSelect.js +99 -99
  138. package/src/ConfirmOrder/components/SvipSelect/SvipSelect.json +6 -6
  139. package/src/ConfirmOrder/components/SvipSelect/SvipSelect.scss +150 -150
  140. package/src/ConfirmOrder/components/SvipSelect/SvipSelect.wxml +39 -39
  141. package/src/ConfirmOrder/components/SvipSelect/SvipSelect.wxss +266 -266
  142. package/src/ConfirmOrder/components/SvipSelect/filter.wxs +6 -6
  143. package/src/ConfirmOrder/index.js +110 -110
  144. package/src/CopGoodsCard/constans.js +462 -462
  145. package/src/CopGoodsCard/index.js +147 -147
  146. package/src/CopGoodsCard/index.json +2 -2
  147. package/src/CopGoodsCard/index.scss +100 -100
  148. package/src/CopGoodsCard/index.wxml +20 -20
  149. package/src/CopGoodsCard/index.wxss +1 -1
  150. package/src/CouponList/components/CouponItem/index.css +1715 -1715
  151. package/src/CouponList/components/CouponItem/index.js +319 -319
  152. package/src/CouponList/components/CouponItem/index.min.css +1 -1
  153. package/src/CouponList/components/CouponItem/index.scss +591 -591
  154. package/src/CouponList/components/CouponItem/index.wxml +199 -199
  155. package/src/CouponList/components/CouponItem/index.wxss +1715 -1715
  156. package/src/CouponList/couponColumn/index.js +176 -176
  157. package/src/CouponList/couponColumn/index.scss +117 -117
  158. package/src/CouponList/couponColumn/index.wxml +39 -39
  159. package/src/CouponList/couponColumn/index.wxss +265 -265
  160. package/src/CouponReceivePopup/index.js +72 -72
  161. package/src/CouponReceivePopup/index.json +5 -5
  162. package/src/CouponReceivePopup/index.scss +99 -99
  163. package/src/CouponReceivePopup/index.wxml +85 -85
  164. package/src/CouponReceivePopup/index.wxss +1 -1
  165. package/src/CustomPopup/index.js +82 -82
  166. package/src/CustomPopup/index.wxml +25 -25
  167. package/src/GoodsItem/index.js +745 -745
  168. package/src/GoodsItem/index.scss +524 -524
  169. package/src/GoodsItem/index.wxml +173 -173
  170. package/src/GoodsItem/index.wxs +18 -18
  171. package/src/GoodsItem/index.wxss +1935 -1935
  172. package/src/GoodsRecommend/fun.wxs +37 -37
  173. package/src/GoodsRecommend/index.js +91 -91
  174. package/src/GoodsRecommend/index.json +3 -3
  175. package/src/GoodsRecommend/index.less +129 -129
  176. package/src/GoodsRecommend/index.scss +162 -162
  177. package/src/GoodsRecommend/index.wxml +47 -47
  178. package/src/GoodsRecommend/index.wxss +537 -537
  179. package/src/LiveGoodsList/Header/index.scss +78 -78
  180. package/src/LiveGoodsList/Header/index.wxss +190 -190
  181. package/src/LiveGoodsList/index.js +821 -821
  182. package/src/LiveGoodsList/index.scss +92 -92
  183. package/src/LiveGoodsList/index.wxml +106 -106
  184. package/src/LiveGoodsList/index.wxss +230 -230
  185. package/src/PayModule/button/index.scss +44 -44
  186. package/src/PayModule/button/index.wxss +58 -58
  187. package/src/PayModule/index/index.js +264 -264
  188. package/src/Sku/commSelect/index.wxss +54 -54
  189. package/src/Task/TaskBubble/index.js +145 -117
  190. package/src/Task/TaskBubble/index.scss +125 -125
  191. package/src/Task/TaskBubble/index.wxss +1 -289
  192. package/src/Task/TaskPopup/component/TaskItem/index.js +297 -207
  193. package/src/Task/TaskPopup/component/TaskItem/index.scss +139 -139
  194. package/src/Task/TaskPopup/component/TaskItem/index.wxml +47 -43
  195. package/src/Task/TaskPopup/component/TaskItem/index.wxss +1 -394
  196. package/src/Task/TaskPopup/component/TaskList/index.js +184 -146
  197. package/src/Task/TaskPopup/component/TaskType/index.js +78 -75
  198. package/src/Task/TaskPopup/component/TaskType/index.scss +62 -59
  199. package/src/Task/TaskPopup/component/TaskType/index.wxml +42 -42
  200. package/src/Task/TaskPopup/component/TaskType/index.wxss +1 -98
  201. package/src/Task/TaskPopup/index.js +126 -113
  202. package/src/Task/TaskPopup/index.scss +140 -113
  203. package/src/Task/TaskPopup/index.wxml +75 -67
  204. package/src/Task/TaskPopup/index.wxss +1 -306
  205. package/src/Task/taskReceivePopup/coupon/index.wxml +58 -53
  206. package/src/Task/taskReceivePopup/customPrizes/index.js +44 -0
  207. package/src/Task/taskReceivePopup/customPrizes/index.json +6 -0
  208. package/src/Task/taskReceivePopup/customPrizes/index.scss +103 -0
  209. package/src/Task/taskReceivePopup/customPrizes/index.wxml +37 -0
  210. package/src/Task/taskReceivePopup/customPrizes/index.wxs +48 -0
  211. package/src/Task/taskReceivePopup/customPrizes/index.wxss +1 -0
  212. package/src/Task/taskReceivePopup/index.js +34 -30
  213. package/src/Task/taskReceivePopup/index.json +13 -11
  214. package/src/Task/taskReceivePopup/index.wxml +25 -18
  215. package/src/Task/taskReceivePopup/integral/index.js +61 -37
  216. package/src/Task/taskReceivePopup/integral/index.wxml +12 -17
  217. package/src/TeacherGoodsList/index.js +825 -825
  218. package/src/TeacherGoodsList/index.json +9 -9
  219. package/src/TeacherGoodsList/index.scss +145 -145
  220. package/src/TeacherGoodsList/index.wxml +110 -110
  221. package/src/TeacherGoodsList/index.wxss +196 -196
  222. package/src/common/api/confirmOrder.js +223 -223
  223. package/src/common/api/liveGoodsList.js +89 -89
  224. package/src/common/api/sku.js +73 -73
  225. package/src/common/utils/index.js +69 -69
  226. package/src/coupon/components/CouponItem/index.less +208 -208
  227. package/src/coupon/components/CouponItem/index.scss +246 -246
  228. package/src/coupon/components/CouponItem/index.wxss +821 -821
  229. package/src/coupon/components/CouponSelect/index.scss +330 -330
  230. package/src/coupon/components/CouponSelect/index.wxss +1132 -1132
  231. package/src/coupon/index.js +248 -248
  232. package/src/coupon/index.scss +83 -83
  233. 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,116 +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
- 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
- }
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
+ }
116
116
  })