create-weapp-vite 2.0.32 → 2.0.33

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 (177) hide show
  1. package/README.md +0 -1
  2. package/dist/{chunk-IT75MAH3.js → chunk-MXKCD6NA.js} +2 -3
  3. package/dist/cli.js +1 -5
  4. package/dist/index.d.ts +0 -1
  5. package/dist/index.js +1 -1
  6. package/package.json +2 -2
  7. package/templates/wevu/package.json +1 -1
  8. package/templates/wevu-tdesign/package.json +1 -1
  9. package/templates/wevu-retail/.editorconfig +0 -9
  10. package/templates/wevu-retail/.vscode/settings.json +0 -10
  11. package/templates/wevu-retail/AGENTS.md +0 -35
  12. package/templates/wevu-retail/README.md +0 -26
  13. package/templates/wevu-retail/auto-import-components.json +0 -1
  14. package/templates/wevu-retail/gitignore +0 -35
  15. package/templates/wevu-retail/package.json +0 -42
  16. package/templates/wevu-retail/postcss.config.js +0 -6
  17. package/templates/wevu-retail/project.config.json +0 -44
  18. package/templates/wevu-retail/project.private.config.json +0 -8
  19. package/templates/wevu-retail/src/app.vue +0 -104
  20. package/templates/wevu-retail/src/common/updateManager.ts +0 -29
  21. package/templates/wevu-retail/src/components/filter/index.vue +0 -134
  22. package/templates/wevu-retail/src/components/filter-popup/index.vue +0 -67
  23. package/templates/wevu-retail/src/components/goods-card/index.vue +0 -219
  24. package/templates/wevu-retail/src/components/goods-list/index.vue +0 -91
  25. package/templates/wevu-retail/src/components/load-more/index.vue +0 -99
  26. package/templates/wevu-retail/src/components/loading-content/index.vue +0 -48
  27. package/templates/wevu-retail/src/components/price/index.vue +0 -104
  28. package/templates/wevu-retail/src/components/promotion/ui-coupon-card/index.vue +0 -143
  29. package/templates/wevu-retail/src/components/promotion/ui-coupon-card/tools.wxs +0 -18
  30. package/templates/wevu-retail/src/components/swipeout/index.vue +0 -118
  31. package/templates/wevu-retail/src/components/swipeout/swipe.wxs +0 -151
  32. package/templates/wevu-retail/src/components/webp-image/index.vue +0 -105
  33. package/templates/wevu-retail/src/components/webp-image/utils.wxs +0 -140
  34. package/templates/wevu-retail/src/config/index.ts +0 -20437
  35. package/templates/wevu-retail/src/custom-tab-bar/data.ts +0 -22
  36. package/templates/wevu-retail/src/custom-tab-bar/index.vue +0 -62
  37. package/templates/wevu-retail/src/model/activities.ts +0 -7
  38. package/templates/wevu-retail/src/model/activity.ts +0 -18
  39. package/templates/wevu-retail/src/model/address.ts +0 -31
  40. package/templates/wevu-retail/src/model/cart.ts +0 -306
  41. package/templates/wevu-retail/src/model/category.ts +0 -175
  42. package/templates/wevu-retail/src/model/comments/queryDetail.ts +0 -50
  43. package/templates/wevu-retail/src/model/comments.ts +0 -298
  44. package/templates/wevu-retail/src/model/coupon.ts +0 -39
  45. package/templates/wevu-retail/src/model/detailsComments.ts +0 -30
  46. package/templates/wevu-retail/src/model/good.ts +0 -1904
  47. package/templates/wevu-retail/src/model/goods.ts +0 -7
  48. package/templates/wevu-retail/src/model/order/applyService.ts +0 -329
  49. package/templates/wevu-retail/src/model/order/orderConfirm.ts +0 -147
  50. package/templates/wevu-retail/src/model/order/orderDetail.ts +0 -1191
  51. package/templates/wevu-retail/src/model/order/orderList.ts +0 -1033
  52. package/templates/wevu-retail/src/model/promotion.ts +0 -20
  53. package/templates/wevu-retail/src/model/search.ts +0 -60
  54. package/templates/wevu-retail/src/model/submitComment.ts +0 -58
  55. package/templates/wevu-retail/src/model/swiper.ts +0 -39
  56. package/templates/wevu-retail/src/model/usercenter.ts +0 -52
  57. package/templates/wevu-retail/src/pages/cart/components/cart-bar/index.vue +0 -104
  58. package/templates/wevu-retail/src/pages/cart/components/cart-empty/index.vue +0 -41
  59. package/templates/wevu-retail/src/pages/cart/components/cart-group/index.vue +0 -333
  60. package/templates/wevu-retail/src/pages/cart/components/cart-group/index.wxs +0 -5
  61. package/templates/wevu-retail/src/pages/cart/components/cart-group/utils.wxs +0 -20
  62. package/templates/wevu-retail/src/pages/cart/components/goods-card/index.vue +0 -334
  63. package/templates/wevu-retail/src/pages/cart/components/specs-popup/index.vue +0 -100
  64. package/templates/wevu-retail/src/pages/cart/index.vue +0 -342
  65. package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-sidebar/README.md +0 -95
  66. package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.vue +0 -73
  67. package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-sidebar/index.vue +0 -121
  68. package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.vue +0 -74
  69. package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-tabbar/index.vue +0 -102
  70. package/templates/wevu-retail/src/pages/category/components/goods-category/index.vue +0 -137
  71. package/templates/wevu-retail/src/pages/category/index.vue +0 -50
  72. package/templates/wevu-retail/src/pages/coupon/components/coupon-card/index.vue +0 -95
  73. package/templates/wevu-retail/src/pages/coupon/components/floating-button/index.vue +0 -44
  74. package/templates/wevu-retail/src/pages/coupon/coupon-activity-goods/index.vue +0 -135
  75. package/templates/wevu-retail/src/pages/coupon/coupon-detail/index.vue +0 -94
  76. package/templates/wevu-retail/src/pages/coupon/coupon-list/index.vue +0 -136
  77. package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/components/images-videos/assets/play.png +0 -0
  78. package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/components/images-videos/index.vue +0 -65
  79. package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/components/my-video/index.vue +0 -92
  80. package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/index.vue +0 -93
  81. package/templates/wevu-retail/src/pages/goods/comments/create/index.vue +0 -196
  82. package/templates/wevu-retail/src/pages/goods/comments/index.vue +0 -293
  83. package/templates/wevu-retail/src/pages/goods/details/components/buy-bar/index.vue +0 -117
  84. package/templates/wevu-retail/src/pages/goods/details/components/goods-specs-popup/index.vue +0 -440
  85. package/templates/wevu-retail/src/pages/goods/details/components/promotion-popup/index.vue +0 -83
  86. package/templates/wevu-retail/src/pages/goods/details/index.vue +0 -598
  87. package/templates/wevu-retail/src/pages/goods/list/index.vue +0 -299
  88. package/templates/wevu-retail/src/pages/goods/result/index.vue +0 -350
  89. package/templates/wevu-retail/src/pages/goods/search/index.vue +0 -196
  90. package/templates/wevu-retail/src/pages/home/home.vue +0 -215
  91. package/templates/wevu-retail/src/pages/home/readme +0 -8
  92. package/templates/wevu-retail/src/pages/order/after-service-detail/api.ts +0 -34
  93. package/templates/wevu-retail/src/pages/order/after-service-detail/index.vue +0 -430
  94. package/templates/wevu-retail/src/pages/order/after-service-list/api.ts +0 -1262
  95. package/templates/wevu-retail/src/pages/order/after-service-list/index.vue +0 -299
  96. package/templates/wevu-retail/src/pages/order/apply-service/index.vue +0 -665
  97. package/templates/wevu-retail/src/pages/order/components/after-service-button-bar/index.vue +0 -142
  98. package/templates/wevu-retail/src/pages/order/components/customer-service/index.vue +0 -75
  99. package/templates/wevu-retail/src/pages/order/components/goods-card/index.vue +0 -356
  100. package/templates/wevu-retail/src/pages/order/components/noGoods/noGood.wxs +0 -17
  101. package/templates/wevu-retail/src/pages/order/components/noGoods/noGoods.vue +0 -125
  102. package/templates/wevu-retail/src/pages/order/components/order-button-bar/index.vue +0 -262
  103. package/templates/wevu-retail/src/pages/order/components/order-card/index.vue +0 -126
  104. package/templates/wevu-retail/src/pages/order/components/order-goods-card/index.vue +0 -86
  105. package/templates/wevu-retail/src/pages/order/components/reason-sheet/index.vue +0 -161
  106. package/templates/wevu-retail/src/pages/order/components/reason-sheet/reasonSheet.ts +0 -25
  107. package/templates/wevu-retail/src/pages/order/components/selectCoupons/mock.ts +0 -22
  108. package/templates/wevu-retail/src/pages/order/components/selectCoupons/selectCoupon.wxs +0 -16
  109. package/templates/wevu-retail/src/pages/order/components/selectCoupons/selectCoupons.vue +0 -207
  110. package/templates/wevu-retail/src/pages/order/components/specs-goods-card/index.vue +0 -185
  111. package/templates/wevu-retail/src/pages/order/config.ts +0 -94
  112. package/templates/wevu-retail/src/pages/order/delivery-detail/index.vue +0 -145
  113. package/templates/wevu-retail/src/pages/order/delivery-detail/isUrl.wxs +0 -7
  114. package/templates/wevu-retail/src/pages/order/fill-tracking-no/api.ts +0 -71
  115. package/templates/wevu-retail/src/pages/order/fill-tracking-no/index.vue +0 -267
  116. package/templates/wevu-retail/src/pages/order/invoice/index.vue +0 -94
  117. package/templates/wevu-retail/src/pages/order/order-confirm/components/address-card/index.vue +0 -78
  118. package/templates/wevu-retail/src/pages/order/order-confirm/getNotes.wxs +0 -11
  119. package/templates/wevu-retail/src/pages/order/order-confirm/handleInvoice.wxs +0 -11
  120. package/templates/wevu-retail/src/pages/order/order-confirm/index.vue +0 -707
  121. package/templates/wevu-retail/src/pages/order/order-confirm/order.wxs +0 -8
  122. package/templates/wevu-retail/src/pages/order/order-confirm/pay.ts +0 -115
  123. package/templates/wevu-retail/src/pages/order/order-detail/index.vue +0 -456
  124. package/templates/wevu-retail/src/pages/order/order-list/index.vue +0 -288
  125. package/templates/wevu-retail/src/pages/order/pay-result/index.vue +0 -77
  126. package/templates/wevu-retail/src/pages/order/receipt/index.vue +0 -336
  127. package/templates/wevu-retail/src/pages/promotion/promotion-detail/index.vue +0 -145
  128. package/templates/wevu-retail/src/pages/user/address/edit/index.vue +0 -514
  129. package/templates/wevu-retail/src/pages/user/address/list/index.vue +0 -249
  130. package/templates/wevu-retail/src/pages/user/components/t-location/index.vue +0 -156
  131. package/templates/wevu-retail/src/pages/user/components/ui-address-item/index.vue +0 -92
  132. package/templates/wevu-retail/src/pages/user/name-edit/index.vue +0 -49
  133. package/templates/wevu-retail/src/pages/user/person-info/index.vue +0 -198
  134. package/templates/wevu-retail/src/pages/usercenter/address/edit/util.ts +0 -33
  135. package/templates/wevu-retail/src/pages/usercenter/components/order-group/index.vue +0 -90
  136. package/templates/wevu-retail/src/pages/usercenter/components/ui-select-picker/index.vue +0 -108
  137. package/templates/wevu-retail/src/pages/usercenter/components/user-center-card/index.vue +0 -82
  138. package/templates/wevu-retail/src/pages/usercenter/index.vue +0 -301
  139. package/templates/wevu-retail/src/services/_utils/delay.ts +0 -3
  140. package/templates/wevu-retail/src/services/_utils/timeout.ts +0 -3
  141. package/templates/wevu-retail/src/services/activity/fetchActivity.ts +0 -20
  142. package/templates/wevu-retail/src/services/activity/fetchActivityList.ts +0 -20
  143. package/templates/wevu-retail/src/services/address/edit.ts +0 -33
  144. package/templates/wevu-retail/src/services/address/fetchAddress.ts +0 -48
  145. package/templates/wevu-retail/src/services/address/list.ts +0 -31
  146. package/templates/wevu-retail/src/services/cart/cart.ts +0 -20
  147. package/templates/wevu-retail/src/services/comments/fetchComments.ts +0 -18
  148. package/templates/wevu-retail/src/services/comments/fetchCommentsCount.ts +0 -18
  149. package/templates/wevu-retail/src/services/coupon/index.ts +0 -65
  150. package/templates/wevu-retail/src/services/good/comments/fetchCommentDetail.ts +0 -20
  151. package/templates/wevu-retail/src/services/good/fetchCategoryList.ts +0 -18
  152. package/templates/wevu-retail/src/services/good/fetchGood.ts +0 -18
  153. package/templates/wevu-retail/src/services/good/fetchGoods.ts +0 -29
  154. package/templates/wevu-retail/src/services/good/fetchGoodsDetailsComments.ts +0 -37
  155. package/templates/wevu-retail/src/services/good/fetchGoodsList.ts +0 -39
  156. package/templates/wevu-retail/src/services/good/fetchSearchHistory.ts +0 -35
  157. package/templates/wevu-retail/src/services/good/fetchSearchResult.ts +0 -38
  158. package/templates/wevu-retail/src/services/home/home.ts +0 -53
  159. package/templates/wevu-retail/src/services/order/applyService.ts +0 -70
  160. package/templates/wevu-retail/src/services/order/orderConfirm.ts +0 -69
  161. package/templates/wevu-retail/src/services/order/orderDetail.ts +0 -39
  162. package/templates/wevu-retail/src/services/order/orderList.ts +0 -39
  163. package/templates/wevu-retail/src/services/order/orderSubmitComment.ts +0 -22
  164. package/templates/wevu-retail/src/services/promotion/detail.ts +0 -18
  165. package/templates/wevu-retail/src/services/usercenter/fetchPerson.ts +0 -28
  166. package/templates/wevu-retail/src/services/usercenter/fetchUsercenter.ts +0 -18
  167. package/templates/wevu-retail/src/sitemap.json +0 -7
  168. package/templates/wevu-retail/src/utils/addressParse.ts +0 -25
  169. package/templates/wevu-retail/src/utils/getPermission.ts +0 -45
  170. package/templates/wevu-retail/src/utils/mock.ts +0 -51
  171. package/templates/wevu-retail/src/utils/util.ts +0 -134
  172. package/templates/wevu-retail/src/vite-env.d.ts +0 -1
  173. package/templates/wevu-retail/tailwind.config.ts +0 -15
  174. package/templates/wevu-retail/tsconfig.app.json +0 -58
  175. package/templates/wevu-retail/tsconfig.json +0 -11
  176. package/templates/wevu-retail/tsconfig.node.json +0 -33
  177. package/templates/wevu-retail/vite.config.ts +0 -14
@@ -1,7 +0,0 @@
1
- import { genGood } from './good';
2
-
3
- export function getGoodsList(baseID = 0, length = 10) {
4
- return new Array(length).fill(0).map((_, idx) => genGood(idx + baseID));
5
- }
6
-
7
- export const goodsList = getGoodsList();
@@ -1,329 +0,0 @@
1
- import { mockIp, mockReqId } from '../../utils/mock';
2
-
3
- const orderResps = [
4
- {
5
- data: {
6
- saasId: '88888888',
7
- uid: '88888888205468',
8
- storeId: '1000',
9
- skuId: '135691625',
10
- numOfSku: 1,
11
- numOfSkuAvailable: 1,
12
- refundableAmount: '26900',
13
- refundableDiscountAmount: '0',
14
- shippingFeeIncluded: '0',
15
- paidAmountEach: '26900',
16
- boughtQuantity: 1,
17
- orderNo: '132222623132329291',
18
- goodsInfo: {
19
- goodsName: '迷你便携高颜值蓝牙无线耳机立体声只能触控式操作简约立体声耳机',
20
- skuImage: 'https://tdesign.gtimg.com/miniprogram/template/retail/goods/dz-2a.png',
21
- specInfo: [
22
- {
23
- specId: '50456',
24
- specTitle: '颜色',
25
- specValue: '黑色',
26
- },
27
- {
28
- specId: '50459',
29
- specTitle: '尺码',
30
- specValue: '简约款',
31
- },
32
- ],
33
- },
34
- },
35
- code: 'Success',
36
- msg: null,
37
- requestId: mockReqId(),
38
- clientIp: mockIp(),
39
- rt: 36,
40
- success: true,
41
- },
42
- {
43
- data: {
44
- saasId: '88888888',
45
- uid: '88888888205468',
46
- storeId: '1000',
47
- skuId: '135676631',
48
- numOfSku: 1,
49
- numOfSkuAvailable: 1,
50
- refundableAmount: '26900',
51
- refundableDiscountAmount: '0',
52
- shippingFeeIncluded: '0',
53
- paidAmountEach: '26900',
54
- boughtQuantity: 1,
55
- orderNo: '132222623132329291',
56
- goodsInfo: {
57
- goodsName: '白色短袖连衣裙荷叶边裙摆宽松韩版休闲纯白清爽优雅连衣裙',
58
- skuImage: 'https://tdesign.gtimg.com/miniprogram/template/retail/goods/nz-09a.png',
59
- specInfo: [
60
- {
61
- specId: '50456',
62
- specTitle: '颜色',
63
- specValue: '米色荷叶边',
64
- },
65
- {
66
- specId: '50459',
67
- specTitle: '尺码',
68
- specValue: 'S',
69
- },
70
- ],
71
- },
72
- },
73
- code: 'Success',
74
- msg: null,
75
- requestId: mockReqId(),
76
- clientIp: mockIp(),
77
- rt: 36,
78
- success: true,
79
- },
80
- {
81
- data: {
82
- saasId: '88888888',
83
- uid: '88888888205468',
84
- storeId: '1000',
85
- skuId: '135691622',
86
- numOfSku: 1,
87
- numOfSkuAvailable: 1,
88
- refundableAmount: '26900',
89
- refundableDiscountAmount: '0',
90
- shippingFeeIncluded: '0',
91
- paidAmountEach: '26900',
92
- boughtQuantity: 1,
93
- orderNo: '132222623132329291',
94
- goodsInfo: {
95
- goodsName: '腾讯极光盒子4智能网络电视机顶盒6K千兆网络机顶盒4K高分辨率',
96
- skuImage: 'https://tdesign.gtimg.com/miniprogram/template/retail/goods/dz-3a.png',
97
- specInfo: [
98
- {
99
- specId: '50456',
100
- specTitle: '颜色',
101
- specValue: '经典白',
102
- },
103
- {
104
- specId: '50459',
105
- specTitle: '类型',
106
- specValue: '经典套装',
107
- },
108
- ],
109
- },
110
- },
111
- code: 'Success',
112
- msg: null,
113
- requestId: mockReqId(),
114
- clientIp: mockIp(),
115
- rt: 36,
116
- success: true,
117
- },
118
- {
119
- data: {
120
- saasId: '88888888',
121
- uid: '88888888205468',
122
- storeId: '1000',
123
- skuId: '135676629',
124
- numOfSku: 1,
125
- numOfSkuAvailable: 1,
126
- refundableAmount: '26900',
127
- refundableDiscountAmount: '0',
128
- shippingFeeIncluded: '0',
129
- paidAmountEach: '26900',
130
- boughtQuantity: 1,
131
- orderNo: '132222623132329291',
132
- goodsInfo: {
133
- goodsName: '带帽午休毯虎年款多功能加厚加大加绒简约多功能午休毯连帽披肩',
134
- skuImage: 'https://tdesign.gtimg.com/miniprogram/template/retail/goods/muy-3a.png',
135
- specInfo: [
136
- {
137
- specId: '50456',
138
- specTitle: '颜色',
139
- specValue: '浅灰色',
140
- },
141
- {
142
- specId: '50459',
143
- specTitle: '尺码',
144
- specValue: 'S',
145
- },
146
- ],
147
- },
148
- },
149
- code: 'Success',
150
- msg: null,
151
- requestId: mockReqId(),
152
- clientIp: mockIp(),
153
- rt: 36,
154
- success: true,
155
- },
156
- {
157
- data: {
158
- saasId: '88888888',
159
- uid: '88888888205468',
160
- storeId: '1000',
161
- skuId: '135686631',
162
- numOfSku: 1,
163
- numOfSkuAvailable: 1,
164
- refundableAmount: '26900',
165
- refundableDiscountAmount: '0',
166
- shippingFeeIncluded: '0',
167
- paidAmountEach: '26900',
168
- boughtQuantity: 1,
169
- orderNo: '132222623132329291',
170
- goodsInfo: {
171
- goodsName: '运动连帽拉链卫衣休闲开衫长袖多色运动细绒面料运动上衣',
172
- skuImage: 'https://tdesign.gtimg.com/miniprogram/template/retail/goods/nz-17a.png',
173
- specInfo: [
174
- {
175
- specId: '50456',
176
- specTitle: '颜色',
177
- specValue: '军绿色',
178
- },
179
- {
180
- specId: '50459',
181
- specTitle: '尺码',
182
- specValue: 'XS',
183
- },
184
- ],
185
- },
186
- },
187
- code: 'Success',
188
- msg: null,
189
- requestId: mockReqId(),
190
- clientIp: mockIp(),
191
- rt: 36,
192
- success: true,
193
- },
194
- {
195
- data: {
196
- saasId: '88888888',
197
- uid: '88888888205468',
198
- storeId: '1000',
199
- skuId: '19384938948343',
200
- numOfSku: 1,
201
- numOfSkuAvailable: 1,
202
- refundableAmount: '26900',
203
- refundableDiscountAmount: '0',
204
- shippingFeeIncluded: '0',
205
- paidAmountEach: '26900',
206
- boughtQuantity: 1,
207
- orderNo: '130169571554503755',
208
- goodsInfo: {
209
- goodsName: '纯色纯棉休闲圆领短袖T恤纯白亲肤厚柔软细腻面料纯白短袖套头T恤',
210
- skuImage: 'https://tdesign.gtimg.com/miniprogram/template/retail/goods/nz-08b.png',
211
- specInfo: [
212
- {
213
- specId: '50456',
214
- specTitle: '颜色',
215
- specValue: '军绿色',
216
- },
217
- {
218
- specId: '50459',
219
- specTitle: '尺码',
220
- specValue: 'XS',
221
- },
222
- ],
223
- },
224
- },
225
- code: 'Success',
226
- msg: null,
227
- requestId: mockReqId(),
228
- clientIp: mockIp(),
229
- rt: 36,
230
- success: true,
231
- },
232
- {
233
- data: {
234
- saasId: '88888888',
235
- uid: '88888888205468',
236
- storeId: '1000',
237
- skuId: '19384938948343',
238
- numOfSku: 1,
239
- numOfSkuAvailable: 1,
240
- refundableAmount: '26900',
241
- refundableDiscountAmount: '0',
242
- shippingFeeIncluded: '0',
243
- paidAmountEach: '26900',
244
- boughtQuantity: 1,
245
- orderNo: '130169571554503755',
246
- goodsInfo: {
247
- goodsName: '纯色纯棉休闲圆领短袖T恤纯白亲肤厚柔软细腻面料纯白短袖套头T恤',
248
- skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png',
249
- specInfo: [
250
- {
251
- specId: '50456',
252
- specTitle: '颜色',
253
- specValue: '军绿色',
254
- },
255
- {
256
- specId: '50459',
257
- specTitle: '尺码',
258
- specValue: 'XS',
259
- },
260
- ],
261
- },
262
- },
263
- code: 'Success',
264
- msg: null,
265
- requestId: mockReqId(),
266
- clientIp: mockIp(),
267
- rt: 36,
268
- success: true,
269
- },
270
- ];
271
-
272
- export function genRightsPreview(params) {
273
- const { orderNo, skuId } = params;
274
- const resp = orderResps.find((r) => r.data.orderNo === orderNo && r.data.skuId === skuId);
275
- return resp;
276
- }
277
-
278
- export function genApplyReasonList(params) {
279
- const resp = {
280
- data: {
281
- saasId: '70000001',
282
- rightsReasonList: [
283
- { id: '1', desc: '实际商品与描述不符' },
284
- { id: '2', desc: '质量问题' },
285
- { id: '3', desc: '少件/漏发' },
286
- { id: '4', desc: '包装/商品/污迹/裂痕/变形' },
287
- { id: '5', desc: '发货太慢' },
288
- { id: '6', desc: '物流配送太慢' },
289
- { id: '7', desc: '商家发错货' },
290
- { id: '8', desc: '不喜欢' },
291
- ],
292
- },
293
- code: 'Success',
294
- msg: null,
295
- requestId: mockReqId(),
296
- clientIp: mockIp(),
297
- rt: 6,
298
- success: true,
299
- };
300
- // 未收货对应的原因列表
301
- if (params.rightsReasonType === 'REFUND_MONEY') {
302
- resp.data.rightsReasonList = [
303
- { id: '9', desc: '空包裹' },
304
- { id: '10', desc: '快递/物流一直未送到' },
305
- { id: '11', desc: '货物破损已拒签' },
306
- { id: '12', desc: '不喜欢' },
307
- ];
308
- }
309
- return resp;
310
- }
311
-
312
- export function applyService() {
313
- const resp = {
314
- data: {
315
- rightsNo: '123123423',
316
- saasId: '70000001',
317
- uid: '700000011070005',
318
- storeId: '542',
319
- result: null,
320
- },
321
- code: 'Success',
322
- msg: null,
323
- requestId: mockReqId(),
324
- clientIp: mockIp(),
325
- rt: 269,
326
- success: true,
327
- };
328
- return resp;
329
- }
@@ -1,147 +0,0 @@
1
- import { mockIp, mockReqId } from '../../utils/mock';
2
-
3
- export const transformGoodsDataToConfirmData = (goodsDataList) => {
4
- const list = [];
5
-
6
- goodsDataList.forEach((goodsData) => {
7
- list.push({
8
- storeId: goodsData.storeId,
9
- spuId: goodsData.spuId,
10
- skuId: goodsData.skuId,
11
- goodsName: goodsData.title,
12
- image: goodsData.primaryImage,
13
- reminderStock: 119,
14
- quantity: goodsData.quantity,
15
- payPrice: goodsData.price,
16
- totalSkuPrice: goodsData.price,
17
- discountSettlePrice: goodsData.price,
18
- realSettlePrice: goodsData.price,
19
- settlePrice: goodsData.price,
20
- oriPrice: goodsData.originPrice,
21
- tagPrice: null,
22
- tagText: null,
23
- skuSpecLst: goodsData.specInfo,
24
- promotionIds: null,
25
- weight: 0.0,
26
- unit: 'KG',
27
- volume: null,
28
- masterGoodsType: 0,
29
- viceGoodsType: 0,
30
- roomId: goodsData.roomId,
31
- egoodsName: null,
32
- });
33
- });
34
-
35
- return list;
36
- };
37
-
38
- /** 生成结算数据 */
39
- export function genSettleDetail(params) {
40
- const { userAddressReq, couponList, goodsRequestList } = params;
41
-
42
- const resp = {
43
- data: {
44
- settleType: 0,
45
- userAddress: null,
46
- totalGoodsCount: 3,
47
- packageCount: 1,
48
- totalAmount: '289997',
49
- totalPayAmount: '',
50
- totalDiscountAmount: '110000',
51
- totalPromotionAmount: '1100',
52
- totalCouponAmount: '0',
53
- totalSalePrice: '289997',
54
- totalGoodsAmount: '289997',
55
- totalDeliveryFee: '0',
56
- invoiceRequest: null,
57
- skuImages: null,
58
- deliveryFeeList: null,
59
- storeGoodsList: [
60
- {
61
- storeId: '1000',
62
- storeName: '云Mall深圳旗舰店',
63
- remark: null,
64
- goodsCount: 1,
65
- deliveryFee: '0',
66
- deliveryWords: null,
67
- storeTotalAmount: '0',
68
- storeTotalPayAmount: '179997',
69
- storeTotalDiscountAmount: '110000',
70
- storeTotalCouponAmount: '0',
71
- skuDetailVos: [],
72
- couponList: [
73
- {
74
- couponId: 11,
75
- storeId: '1000',
76
- },
77
- ],
78
- },
79
- ],
80
- inValidGoodsList: null,
81
- outOfStockGoodsList: null,
82
- limitGoodsList: null,
83
- abnormalDeliveryGoodsList: null,
84
- invoiceSupport: 1,
85
- },
86
- code: 'Success',
87
- msg: null,
88
- requestId: mockReqId(),
89
- clientIp: mockIp(),
90
- rt: 244,
91
- success: true,
92
- };
93
-
94
- const list = transformGoodsDataToConfirmData(goodsRequestList);
95
-
96
- // 获取购物车传递的商品数据
97
- resp.data.storeGoodsList[0].skuDetailVos = list;
98
-
99
- // 判断是否携带优惠券数据
100
- const discountPrice = [];
101
-
102
- if (couponList && couponList.length > 0) {
103
- couponList.forEach((coupon) => {
104
- if (coupon.status === 'default') {
105
- discountPrice.push({
106
- type: coupon.type,
107
- value: coupon.value,
108
- });
109
- }
110
- });
111
- }
112
-
113
- // 模拟计算场景
114
-
115
- // 计算总价
116
- const totalPrice = list.reduce((pre, cur) => {
117
- return pre + cur.quantity * Number(cur.settlePrice);
118
- }, 0);
119
-
120
- // 计算折扣
121
- const totalDiscountPrice =
122
- discountPrice.length > 0
123
- ? discountPrice.reduce((pre, cur) => {
124
- if (cur.type === 1) {
125
- return pre + cur.value;
126
- }
127
- if (cur.type === 2) {
128
- return pre + (Number(totalPrice) * cur.value) / 10;
129
- }
130
-
131
- return pre + cur;
132
- }, 0)
133
- : 0;
134
-
135
- resp.data.totalSalePrice = totalPrice;
136
-
137
- resp.data.totalCouponAmount = totalDiscountPrice;
138
-
139
- resp.data.totalPayAmount =
140
- totalPrice - totalDiscountPrice - Number(resp.data.totalPromotionAmount);
141
-
142
- if (userAddressReq) {
143
- resp.data.settleType = 1;
144
- resp.data.userAddress = userAddressReq;
145
- }
146
- return resp;
147
- }