@pisell/pisellos 0.0.220 → 0.0.222

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 (199) hide show
  1. package/README.md +180 -180
  2. package/dist/core/index.js +4 -4
  3. package/dist/index.js +3 -3
  4. package/dist/modules/Account/types.js +6 -6
  5. package/dist/modules/AccountList/index.js +14 -14
  6. package/dist/modules/AccountList/types.js +14 -14
  7. package/dist/modules/AccountList/utils.js +5 -5
  8. package/dist/modules/Cart/index.js +35 -35
  9. package/dist/modules/Cart/types.js +14 -14
  10. package/dist/modules/Cart/utils/cartAccount.js +8 -8
  11. package/dist/modules/Cart/utils/cartDate.js +12 -12
  12. package/dist/modules/Cart/utils/cartDiscount.js +8 -8
  13. package/dist/modules/Cart/utils/cartNote.js +8 -8
  14. package/dist/modules/Cart/utils/cartProduct.js +39 -39
  15. package/dist/modules/Cart/utils/cartRelationForms.js +8 -8
  16. package/dist/modules/Cart/utils/cartResource.js +8 -8
  17. package/dist/modules/Cart/utils/index.js +4 -4
  18. package/dist/modules/Customer/index.js +67 -67
  19. package/dist/modules/Customer/types.js +18 -18
  20. package/dist/modules/Date/types.js +6 -6
  21. package/dist/modules/Date/utils.js +25 -25
  22. package/dist/modules/Guests/types.js +8 -8
  23. package/dist/modules/Order/types.js +4 -4
  24. package/dist/modules/Order/utils.js +8 -8
  25. package/dist/modules/Payment/cash.js +2 -2
  26. package/dist/modules/Payment/eftpos.js +2 -2
  27. package/dist/modules/Payment/index.js +135 -135
  28. package/dist/modules/Payment/types.js +50 -50
  29. package/dist/modules/Payment/wallet.js +2 -2
  30. package/dist/modules/Product/index.js +22 -22
  31. package/dist/modules/Product/utils.js +12 -12
  32. package/dist/modules/ProductList/index.js +4 -4
  33. package/dist/modules/Resource/types.js +8 -8
  34. package/dist/modules/Resource/utils.js +14 -14
  35. package/dist/modules/Schedule/index.js +4 -4
  36. package/dist/modules/Schedule/utils.js +73 -73
  37. package/dist/modules/Step/index.js +18 -18
  38. package/dist/modules/Summary/index.js +4 -4
  39. package/dist/modules/Summary/utils.js +15 -15
  40. package/dist/plugins/app-types/app/app.d.ts +83 -83
  41. package/dist/plugins/app-types/app/const.d.ts +4 -4
  42. package/dist/plugins/app-types/app/index.d.ts +14 -14
  43. package/dist/plugins/app-types/applicationManager/application.d.ts +50 -50
  44. package/dist/plugins/app-types/applicationManager/index.d.ts +13 -13
  45. package/dist/plugins/app-types/config.d.ts +3 -3
  46. package/dist/plugins/app-types/cookie/index.d.ts +13 -13
  47. package/dist/plugins/app-types/data/index.d.ts +8 -8
  48. package/dist/plugins/app-types/history/config.d.ts +24 -24
  49. package/dist/plugins/app-types/history/index.d.ts +20 -20
  50. package/dist/plugins/app-types/history/type.d.ts +2 -2
  51. package/dist/plugins/app-types/hooks/index.d.ts +12 -12
  52. package/dist/plugins/app-types/hooks/useDelayedValue/index.d.ts +2 -2
  53. package/dist/plugins/app-types/hooks/useDispatch/index.d.ts +2 -2
  54. package/dist/plugins/app-types/hooks/useLowCode/index.d.ts +13 -13
  55. package/dist/plugins/app-types/hooks/useStore/index.d.ts +6 -6
  56. package/dist/plugins/app-types/index.d.ts +6 -6
  57. package/dist/plugins/app-types/indexDB/index.d.ts +178 -178
  58. package/dist/plugins/app-types/locales/en.d.ts +3 -3
  59. package/dist/plugins/app-types/locales/index.d.ts +37 -37
  60. package/dist/plugins/app-types/locales/original.d.ts +3 -3
  61. package/dist/plugins/app-types/locales/type.d.ts +19 -19
  62. package/dist/plugins/app-types/locales/zh-CN.d.ts +3 -3
  63. package/dist/plugins/app-types/locales/zh-HK.d.ts +3 -3
  64. package/dist/plugins/app-types/logger/feishu.d.ts +11 -11
  65. package/dist/plugins/app-types/logger/index.d.ts +122 -122
  66. package/dist/plugins/app-types/menuManager/hooks.d.ts +17 -17
  67. package/dist/plugins/app-types/menuManager/index.d.ts +28 -28
  68. package/dist/plugins/app-types/models/global.d.ts +32 -32
  69. package/dist/plugins/app-types/models/index.d.ts +45 -45
  70. package/dist/plugins/app-types/models/type.d.ts +2 -2
  71. package/dist/plugins/app-types/package.json +14 -14
  72. package/dist/plugins/app-types/pubsub/example.d.ts +5 -5
  73. package/dist/plugins/app-types/pubsub/index.d.ts +63 -63
  74. package/dist/plugins/app-types/request/cache.d.ts +46 -46
  75. package/dist/plugins/app-types/request/cancelToken.d.ts +38 -38
  76. package/dist/plugins/app-types/request/config.d.ts +3 -3
  77. package/dist/plugins/app-types/request/constants.d.ts +2 -2
  78. package/dist/plugins/app-types/request/index.d.ts +24 -24
  79. package/dist/plugins/app-types/request/pisell2Request.d.ts +6 -6
  80. package/dist/plugins/app-types/request/type.d.ts +41 -41
  81. package/dist/plugins/app-types/request/utils.d.ts +46 -46
  82. package/dist/plugins/app-types/routes/config.d.ts +7 -7
  83. package/dist/plugins/app-types/routes/index.d.ts +28 -28
  84. package/dist/plugins/app-types/socket/components/SocketMonitorPage.d.ts +6 -6
  85. package/dist/plugins/app-types/socket/components/index.d.ts +2 -2
  86. package/dist/plugins/app-types/socket/constants.d.ts +33 -33
  87. package/dist/plugins/app-types/socket/events.d.ts +31 -31
  88. package/dist/plugins/app-types/socket/heartbeat.d.ts +66 -66
  89. package/dist/plugins/app-types/socket/index.d.ts +61 -61
  90. package/dist/plugins/app-types/socket/monitor.d.ts +169 -169
  91. package/dist/plugins/app-types/socket/reconnect.d.ts +61 -61
  92. package/dist/plugins/app-types/socket/socket.d.ts +129 -129
  93. package/dist/plugins/app-types/socket/types.d.ts +85 -85
  94. package/dist/plugins/app-types/storage/index.d.ts +17 -17
  95. package/dist/plugins/app-types/tasks/index.d.ts +77 -77
  96. package/dist/plugins/app-types/tasks/type.d.ts +62 -62
  97. package/dist/plugins/app-types/tasks/useTasks.d.ts +5 -5
  98. package/dist/plugins/app-types/type.d.ts +2 -2
  99. package/dist/plugins/app-types/variables/VariablesProvider.d.ts +7 -7
  100. package/dist/plugins/app-types/variables/config.d.ts +3 -3
  101. package/dist/plugins/app-types/variables/index.d.ts +6 -6
  102. package/dist/plugins/app-types/variables/type.d.ts +2 -2
  103. package/dist/plugins/app-types/website/index.d.ts +6 -6
  104. package/dist/plugins/request.js +33 -33
  105. package/dist/plugins/window.js +16 -16
  106. package/dist/solution/BookingByStep/index.js +126 -126
  107. package/dist/solution/BookingByStep/utils/capacity.js +30 -30
  108. package/dist/solution/BookingByStep/utils/products.js +4 -4
  109. package/dist/solution/BookingByStep/utils/resources.js +146 -146
  110. package/dist/solution/BookingByStep/utils/timeslots.js +20 -20
  111. package/dist/solution/BookingTicket/index.d.ts +13 -1
  112. package/dist/solution/BookingTicket/index.js +109 -86
  113. package/dist/solution/BookingTicket/types.js +8 -8
  114. package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +6 -6
  115. package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +1 -4
  116. package/dist/solution/BookingTicket/utils/scan/handleScan.js +20 -28
  117. package/dist/solution/BookingTicket/utils/scan/index.d.ts +13 -0
  118. package/dist/solution/BookingTicket/utils/scan/index.js +64 -21
  119. package/dist/solution/BookingTicket/utils/scan/scanCache.js +52 -52
  120. package/dist/solution/BuyTickets/types.js +4 -4
  121. package/dist/utils/task.d.ts +5 -1
  122. package/dist/utils/task.js +22 -38
  123. package/dist/utils/watch.d.ts +1 -1
  124. package/dist/utils/watch.js +60 -60
  125. package/lib/plugins/app-types/app/app.d.ts +83 -83
  126. package/lib/plugins/app-types/app/const.d.ts +4 -4
  127. package/lib/plugins/app-types/app/index.d.ts +14 -14
  128. package/lib/plugins/app-types/applicationManager/application.d.ts +50 -50
  129. package/lib/plugins/app-types/applicationManager/index.d.ts +13 -13
  130. package/lib/plugins/app-types/config.d.ts +3 -3
  131. package/lib/plugins/app-types/cookie/index.d.ts +13 -13
  132. package/lib/plugins/app-types/data/index.d.ts +8 -8
  133. package/lib/plugins/app-types/history/config.d.ts +24 -24
  134. package/lib/plugins/app-types/history/index.d.ts +20 -20
  135. package/lib/plugins/app-types/history/type.d.ts +2 -2
  136. package/lib/plugins/app-types/hooks/index.d.ts +12 -12
  137. package/lib/plugins/app-types/hooks/useDelayedValue/index.d.ts +2 -2
  138. package/lib/plugins/app-types/hooks/useDispatch/index.d.ts +2 -2
  139. package/lib/plugins/app-types/hooks/useLowCode/index.d.ts +13 -13
  140. package/lib/plugins/app-types/hooks/useStore/index.d.ts +6 -6
  141. package/lib/plugins/app-types/index.d.ts +6 -6
  142. package/lib/plugins/app-types/indexDB/index.d.ts +178 -178
  143. package/lib/plugins/app-types/locales/en.d.ts +3 -3
  144. package/lib/plugins/app-types/locales/index.d.ts +37 -37
  145. package/lib/plugins/app-types/locales/original.d.ts +3 -3
  146. package/lib/plugins/app-types/locales/type.d.ts +19 -19
  147. package/lib/plugins/app-types/locales/zh-CN.d.ts +3 -3
  148. package/lib/plugins/app-types/locales/zh-HK.d.ts +3 -3
  149. package/lib/plugins/app-types/logger/feishu.d.ts +11 -11
  150. package/lib/plugins/app-types/logger/index.d.ts +122 -122
  151. package/lib/plugins/app-types/menuManager/hooks.d.ts +17 -17
  152. package/lib/plugins/app-types/menuManager/index.d.ts +28 -28
  153. package/lib/plugins/app-types/models/global.d.ts +32 -32
  154. package/lib/plugins/app-types/models/index.d.ts +45 -45
  155. package/lib/plugins/app-types/models/type.d.ts +2 -2
  156. package/lib/plugins/app-types/package.json +14 -14
  157. package/lib/plugins/app-types/pubsub/example.d.ts +5 -5
  158. package/lib/plugins/app-types/pubsub/index.d.ts +63 -63
  159. package/lib/plugins/app-types/request/cache.d.ts +46 -46
  160. package/lib/plugins/app-types/request/cancelToken.d.ts +38 -38
  161. package/lib/plugins/app-types/request/config.d.ts +3 -3
  162. package/lib/plugins/app-types/request/constants.d.ts +2 -2
  163. package/lib/plugins/app-types/request/index.d.ts +24 -24
  164. package/lib/plugins/app-types/request/pisell2Request.d.ts +6 -6
  165. package/lib/plugins/app-types/request/type.d.ts +41 -41
  166. package/lib/plugins/app-types/request/utils.d.ts +46 -46
  167. package/lib/plugins/app-types/routes/config.d.ts +7 -7
  168. package/lib/plugins/app-types/routes/index.d.ts +28 -28
  169. package/lib/plugins/app-types/socket/components/SocketMonitorPage.d.ts +6 -6
  170. package/lib/plugins/app-types/socket/components/index.d.ts +2 -2
  171. package/lib/plugins/app-types/socket/constants.d.ts +33 -33
  172. package/lib/plugins/app-types/socket/events.d.ts +31 -31
  173. package/lib/plugins/app-types/socket/heartbeat.d.ts +66 -66
  174. package/lib/plugins/app-types/socket/index.d.ts +61 -61
  175. package/lib/plugins/app-types/socket/monitor.d.ts +169 -169
  176. package/lib/plugins/app-types/socket/reconnect.d.ts +61 -61
  177. package/lib/plugins/app-types/socket/socket.d.ts +129 -129
  178. package/lib/plugins/app-types/socket/types.d.ts +85 -85
  179. package/lib/plugins/app-types/storage/index.d.ts +17 -17
  180. package/lib/plugins/app-types/tasks/index.d.ts +77 -77
  181. package/lib/plugins/app-types/tasks/type.d.ts +62 -62
  182. package/lib/plugins/app-types/tasks/useTasks.d.ts +5 -5
  183. package/lib/plugins/app-types/type.d.ts +2 -2
  184. package/lib/plugins/app-types/variables/VariablesProvider.d.ts +7 -7
  185. package/lib/plugins/app-types/variables/config.d.ts +3 -3
  186. package/lib/plugins/app-types/variables/index.d.ts +6 -6
  187. package/lib/plugins/app-types/variables/type.d.ts +2 -2
  188. package/lib/plugins/app-types/website/index.d.ts +6 -6
  189. package/lib/solution/BookingTicket/index.d.ts +13 -1
  190. package/lib/solution/BookingTicket/index.js +19 -2
  191. package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +1 -4
  192. package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -14
  193. package/lib/solution/BookingTicket/utils/scan/index.d.ts +13 -0
  194. package/lib/solution/BookingTicket/utils/scan/index.js +32 -0
  195. package/lib/utils/task.d.ts +5 -1
  196. package/lib/utils/task.js +8 -1
  197. package/lib/utils/watch.d.ts +1 -1
  198. package/lib/utils/watch.js +1 -1
  199. package/package.json +1 -1
@@ -184,8 +184,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
184
184
  return this.store.step.getStepList();
185
185
  }
186
186
 
187
- /**
188
- * 添加step
187
+ /**
188
+ * 添加step
189
189
  */
190
190
  }, {
191
191
  key: "addStep",
@@ -193,8 +193,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
193
193
  this.store.step.addStep(step, key);
194
194
  }
195
195
 
196
- /**
197
- * 删除step
196
+ /**
197
+ * 删除step
198
198
  */
199
199
  }, {
200
200
  key: "removeStep",
@@ -202,8 +202,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
202
202
  this.store.step.removeStep(key);
203
203
  }
204
204
 
205
- /**
206
- * 更新step
205
+ /**
206
+ * 更新step
207
207
  */
208
208
  }, {
209
209
  key: "updateStep",
@@ -211,22 +211,22 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
211
211
  this.store.step.updateStep(key, step);
212
212
  }
213
213
 
214
- /**
215
- *
216
- * 加载商品,然后导到商品列表里去
217
- * @param {({
218
- * category_ids?: number[];
219
- * product_ids?: number[];
220
- * collection?: number | string[];
221
- * schedule_date?: string;
222
- * })} {
223
- * category_ids = [],
224
- * product_ids = [],
225
- * collection = [],
226
- * schedule_date,
227
- * }
228
- * @return {*}
229
- * @memberof BookingByStepImpl
214
+ /**
215
+ *
216
+ * 加载商品,然后导到商品列表里去
217
+ * @param {({
218
+ * category_ids?: number[];
219
+ * product_ids?: number[];
220
+ * collection?: number | string[];
221
+ * schedule_date?: string;
222
+ * })} {
223
+ * category_ids = [],
224
+ * product_ids = [],
225
+ * collection = [],
226
+ * schedule_date,
227
+ * }
228
+ * @return {*}
229
+ * @memberof BookingByStepImpl
230
230
  */
231
231
  }, {
232
232
  key: "loadProducts",
@@ -255,20 +255,20 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
255
255
  }
256
256
  return loadProducts;
257
257
  }()
258
- /**
259
- * 通过 schedule 来读取商品,适用于 session 类商品
260
- *
261
- * @param {{
262
- * date: string;
263
- * product_ids?: number[];
264
- * category_ids?: number[];
265
- * }} {
266
- * date,
267
- * product_ids = [],
268
- * category_ids = [],
269
- * }
270
- * @return {*}
271
- * @memberof BookingByStepImpl
258
+ /**
259
+ * 通过 schedule 来读取商品,适用于 session 类商品
260
+ *
261
+ * @param {{
262
+ * date: string;
263
+ * product_ids?: number[];
264
+ * category_ids?: number[];
265
+ * }} {
266
+ * date,
267
+ * product_ids = [],
268
+ * category_ids = [],
269
+ * }
270
+ * @return {*}
271
+ * @memberof BookingByStepImpl
272
272
  */
273
273
  )
274
274
  }, {
@@ -335,11 +335,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
335
335
  }
336
336
  return loadProductByScheduleDate;
337
337
  }()
338
- /**
339
- * 更新完商品数据、切换日期、或者在较后的流程里登录了,检测当前购物车里是否有商品,如果有,则需要更新购物车里的商品价格
340
- *
341
- * @param {string} date
342
- * @memberof BookingByStepImpl
338
+ /**
339
+ * 更新完商品数据、切换日期、或者在较后的流程里登录了,检测当前购物车里是否有商品,如果有,则需要更新购物车里的商品价格
340
+ *
341
+ * @param {string} date
342
+ * @memberof BookingByStepImpl
343
343
  */
344
344
  )
345
345
  }, {
@@ -394,18 +394,18 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
394
394
  }
395
395
  return updateQuotationPriceAndCart;
396
396
  }()
397
- /**
398
- * ui 层提供日期的起始范围,返回一个起始范围内日期的可用情况
399
- * 适用于先选日期的流程,确定日期是否可用
400
- * 已知问题:如果挂接的商品的资源不可用,后端是不会计算的
401
- *
402
- * @param {LoadScheduleAvailableDateParams} {
403
- * startDate,
404
- * endDate,
405
- * custom_page_id,
406
- * channel,
407
- * }
408
- * @memberof BookingByStepImpl
397
+ /**
398
+ * ui 层提供日期的起始范围,返回一个起始范围内日期的可用情况
399
+ * 适用于先选日期的流程,确定日期是否可用
400
+ * 已知问题:如果挂接的商品的资源不可用,后端是不会计算的
401
+ *
402
+ * @param {LoadScheduleAvailableDateParams} {
403
+ * startDate,
404
+ * endDate,
405
+ * custom_page_id,
406
+ * channel,
407
+ * }
408
+ * @memberof BookingByStepImpl
409
409
  */
410
410
  )
411
411
  }, {
@@ -591,9 +591,9 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
591
591
  this.clearCartByAccount(id);
592
592
  }
593
593
 
594
- /**
595
- * 获取holder类型账户列表
596
- * @param params
594
+ /**
595
+ * 获取holder类型账户列表
596
+ * @param params
597
597
  */
598
598
  }, {
599
599
  key: "fetchHolderAccountsAsync",
@@ -774,8 +774,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
774
774
  }
775
775
  return getAvailableDate;
776
776
  }()
777
- /**
778
- * 获取购物车汇总信息
777
+ /**
778
+ * 获取购物车汇总信息
779
779
  */
780
780
  }, {
781
781
  key: "getSummary",
@@ -802,8 +802,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
802
802
  }
803
803
  return getSummary;
804
804
  }()
805
- /**
806
- * 获取协议
805
+ /**
806
+ * 获取协议
807
807
  */
808
808
  )
809
809
  }, {
@@ -941,10 +941,10 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
941
941
  }
942
942
  return getFreeProduct;
943
943
  }()
944
- /**
945
- * 检查购物车提交订单前是否符合条件
946
- * @param type 类型 "holder" | "account"
947
- * @returns boolean
944
+ /**
945
+ * 检查购物车提交订单前是否符合条件
946
+ * @param type 类型 "holder" | "account"
947
+ * @returns boolean
948
948
  */
949
949
  }, {
950
950
  key: "checkBeforeSubmitOrder",
@@ -1091,12 +1091,12 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1091
1091
  }
1092
1092
  return getOtherParams;
1093
1093
  }()
1094
- /**
1095
- * 往购物车加商品数据(duration 类、普通商品)
1096
- * 老接口,先不删,怕 UI 有问题,直接桥接到新接口addProductToCart上
1097
- *
1098
- * @param {ProductData} productData
1099
- * @memberof BookingByStepImpl
1094
+ /**
1095
+ * 往购物车加商品数据(duration 类、普通商品)
1096
+ * 老接口,先不删,怕 UI 有问题,直接桥接到新接口addProductToCart上
1097
+ *
1098
+ * @param {ProductData} productData
1099
+ * @memberof BookingByStepImpl
1100
1100
  */
1101
1101
  }, {
1102
1102
  key: "storeProduct",
@@ -1123,20 +1123,20 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1123
1123
  }
1124
1124
  return storeProduct;
1125
1125
  }()
1126
- /**
1127
- * 往购物车加商品数据
1128
- *
1129
- * @param {({
1130
- * product: ProductData;
1131
- * date?: { startTime: string; endTime: string } | null;
1132
- * account?: Account | null;
1133
- * })} {
1134
- * product,
1135
- * date,
1136
- * account,
1137
- * }
1138
- * @return {*}
1139
- * @memberof BookingByStepImpl
1126
+ /**
1127
+ * 往购物车加商品数据
1128
+ *
1129
+ * @param {({
1130
+ * product: ProductData;
1131
+ * date?: { startTime: string; endTime: string } | null;
1132
+ * account?: Account | null;
1133
+ * })} {
1134
+ * product,
1135
+ * date,
1136
+ * account,
1137
+ * }
1138
+ * @return {*}
1139
+ * @memberof BookingByStepImpl
1140
1140
  */
1141
1141
  )
1142
1142
  }, {
@@ -1188,11 +1188,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1188
1188
  this.store.cart.addItem(addItemParams);
1189
1189
  }
1190
1190
 
1191
- /**
1192
- * 添加完购物车以后做的一些检测,比如日期是否在同一天
1193
- *
1194
- * @param {({ date?: { startTime: string; endTime: string } | null })} { date }
1195
- * @memberof BookingByStepImpl
1191
+ /**
1192
+ * 添加完购物车以后做的一些检测,比如日期是否在同一天
1193
+ *
1194
+ * @param {({ date?: { startTime: string; endTime: string } | null })} { date }
1195
+ * @memberof BookingByStepImpl
1196
1196
  */
1197
1197
  }, {
1198
1198
  key: "addProductCheck",
@@ -1249,13 +1249,13 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1249
1249
  this.updateCartCheck(params, targetCartItem);
1250
1250
  }
1251
1251
 
1252
- /**
1253
- * 更新购物车以后的一些操作,比如检测资源是否重复,检测资源容量是否足够
1254
- *
1255
- * @param {IUpdateItemParams} params
1256
- * @param {CartItem} targetCartItem
1257
- * @return {*}
1258
- * @memberof BookingByStepImpl
1252
+ /**
1253
+ * 更新购物车以后的一些操作,比如检测资源是否重复,检测资源容量是否足够
1254
+ *
1255
+ * @param {IUpdateItemParams} params
1256
+ * @param {CartItem} targetCartItem
1257
+ * @return {*}
1258
+ * @memberof BookingByStepImpl
1259
1259
  */
1260
1260
  }, {
1261
1261
  key: "updateCartCheck",
@@ -1362,8 +1362,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1362
1362
  this.store.cart.clearCartByAccount(account_id);
1363
1363
  }
1364
1364
 
1365
- /**
1366
- * 批量更新购物车
1365
+ /**
1366
+ * 批量更新购物车
1367
1367
  */
1368
1368
  }, {
1369
1369
  key: "batchUpdateCart",
@@ -1377,8 +1377,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1377
1377
  this.store.cart.batchSetItems(cartItems);
1378
1378
  }
1379
1379
 
1380
- /**
1381
- * 从购物车中按类别删除信息
1380
+ /**
1381
+ * 从购物车中按类别删除信息
1382
1382
  */
1383
1383
  }, {
1384
1384
  key: "deleteCartItemInfo",
@@ -1391,10 +1391,10 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1391
1391
  return this.store.cart.checkCartItemByType(cartItem, type);
1392
1392
  }
1393
1393
 
1394
- /**
1395
- * 检查购物车商品是否符合条件
1396
- * @param type 类型
1397
- * @returns 不符合条件的购物车商品ID列表
1394
+ /**
1395
+ * 检查购物车商品是否符合条件
1396
+ * @param type 类型
1397
+ * @returns 不符合条件的购物车商品ID列表
1398
1398
  */
1399
1399
  }, {
1400
1400
  key: "checkCartItems",
@@ -1561,11 +1561,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1561
1561
  return arr;
1562
1562
  }
1563
1563
 
1564
- /**
1565
- * 在日期那边点击下一步的时候,检查这一天购物车里的商品是不是都有资源可以用
1566
- *
1567
- * @return {*}
1568
- * @memberof BookingByStepImpl
1564
+ /**
1565
+ * 在日期那边点击下一步的时候,检查这一天购物车里的商品是不是都有资源可以用
1566
+ *
1567
+ * @return {*}
1568
+ * @memberof BookingByStepImpl
1569
1569
  */
1570
1570
  }, {
1571
1571
  key: "checkResourceListForDate",
@@ -1581,12 +1581,12 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1581
1581
  return hasResource;
1582
1582
  }
1583
1583
 
1584
- /**
1585
- * 给单个购物车里的商品获取资源列表,给 UI 用的
1586
- *
1587
- * @param {(string | number)} id
1588
- * @return {*}
1589
- * @memberof BookingByStepImpl
1584
+ /**
1585
+ * 给单个购物车里的商品获取资源列表,给 UI 用的
1586
+ *
1587
+ * @param {(string | number)} id
1588
+ * @return {*}
1589
+ * @memberof BookingByStepImpl
1590
1590
  */
1591
1591
  }, {
1592
1592
  key: "getResourcesListByCartItem",
@@ -2522,13 +2522,13 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2522
2522
  }
2523
2523
  return getProductTypeById;
2524
2524
  }()
2525
- /**
2526
- * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
2527
- *
2528
- * @param {string} cartItemId
2529
- * @param {string} resourceCode
2530
- * @return {*}
2531
- * @memberof BookingByStepImpl
2525
+ /**
2526
+ * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
2527
+ *
2528
+ * @param {string} cartItemId
2529
+ * @param {string} resourceCode
2530
+ * @return {*}
2531
+ * @memberof BookingByStepImpl
2532
2532
  */
2533
2533
  }, {
2534
2534
  key: "getResourcesByCartItemAndCode",
@@ -2629,10 +2629,10 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2629
2629
  return targetResource.renderList;
2630
2630
  }
2631
2631
 
2632
- /**
2633
- * 根据日期范围批量获取时间槽
2634
- * @param params 参数对象
2635
- * @returns Promise<Record<string, TimeSliceItem[]>> 返回日期到时间槽的映射
2632
+ /**
2633
+ * 根据日期范围批量获取时间槽
2634
+ * @param params 参数对象
2635
+ * @returns Promise<Record<string, TimeSliceItem[]>> 返回日期到时间槽的映射
2636
2636
  */
2637
2637
  }, {
2638
2638
  key: "getTimeslotsScheduleByDateRange",
@@ -1,12 +1,12 @@
1
1
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
2
2
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
3
3
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
4
- /**
5
- * @title: 基于选择的商品格式化容量
6
- * @description:
7
- * @param {any} param1
8
- * @return {*}
9
- * @Author: zhiwei.Wang
4
+ /**
5
+ * @title: 基于选择的商品格式化容量
6
+ * @description:
7
+ * @param {any} param1
8
+ * @return {*}
9
+ * @Author: zhiwei.Wang
10
10
  */
11
11
  export var formatDefaultCapacitys = function formatDefaultCapacitys(_ref) {
12
12
  var capacity = _ref.capacity,
@@ -42,12 +42,12 @@ export var formatDefaultCapacitys = function formatDefaultCapacitys(_ref) {
42
42
  }];
43
43
  };
44
44
 
45
- /**
46
- * @title: 获取总容量
47
- * @description:
48
- * @param {object} capacity 为 formatDefaultCapacitys()的结果
49
- * @return {*}
50
- * @Author: zhiwei.Wang
45
+ /**
46
+ * @title: 获取总容量
47
+ * @description:
48
+ * @param {object} capacity 为 formatDefaultCapacitys()的结果
49
+ * @return {*}
50
+ * @Author: zhiwei.Wang
51
51
  */
52
52
  export var getSumCapacity = function getSumCapacity(_ref2) {
53
53
  var capacity = _ref2.capacity;
@@ -67,12 +67,12 @@ export var getSumCapacity = function getSumCapacity(_ref2) {
67
67
  return sum;
68
68
  };
69
69
 
70
- /**
71
- * 给定购物车数据,返回对应的 capacity 信息和套餐 capacity
72
- *
73
- * @export
74
- * @param {CartItem} targetCartItem
75
- * @return {*}
70
+ /**
71
+ * 给定购物车数据,返回对应的 capacity 信息和套餐 capacity
72
+ *
73
+ * @export
74
+ * @param {CartItem} targetCartItem
75
+ * @return {*}
76
76
  */
77
77
  export function getCapacityInfoByCartItem(targetCartItem) {
78
78
  var _targetCartItem$_prod;
@@ -89,12 +89,12 @@ export function getCapacityInfoByCartItem(targetCartItem) {
89
89
  };
90
90
  }
91
91
 
92
- /**
93
- * @title: 传入资源,如果有子资源,会根据组合资源的 capacity 计算修改子资源的 capacity
94
- * @description:
95
- * @param {object} resource
96
- * @return {*}
97
- * @Author: jinglin.tan
92
+ /**
93
+ * @title: 传入资源,如果有子资源,会根据组合资源的 capacity 计算修改子资源的 capacity
94
+ * @description:
95
+ * @param {object} resource
96
+ * @return {*}
97
+ * @Author: jinglin.tan
98
98
  */
99
99
  export var checkSubResourcesCapacity = function checkSubResourcesCapacity(resource) {
100
100
  if (resource.children && resource.children.length) {
@@ -116,12 +116,12 @@ export var checkSubResourcesCapacity = function checkSubResourcesCapacity(resour
116
116
  }
117
117
  };
118
118
 
119
- /**
120
- * 检查资源是否有足够的容量供额外使用
121
- * @param currentCapacity - 当前已使用的容量
122
- * @param requiredCapacity - 需要的额外容量
123
- * @param maxCapacity - 最大允许容量
124
- * @returns 如果资源可以容纳额外的容量则返回 true
119
+ /**
120
+ * 检查资源是否有足够的容量供额外使用
121
+ * @param currentCapacity - 当前已使用的容量
122
+ * @param requiredCapacity - 需要的额外容量
123
+ * @param maxCapacity - 最大允许容量
124
+ * @returns 如果资源可以容纳额外的容量则返回 true
125
125
  */
126
126
  export var checkResourceCanUseByCapacity = function checkResourceCanUseByCapacity(currentCapacity, requiredCapacity, maxCapacity) {
127
127
  // Handle edge cases early
@@ -4,10 +4,10 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
4
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
5
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
6
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
- /**
8
- * 获取商品的可用资源
9
- * @param product 商品数据
10
- * @returns 可用资源
7
+ /**
8
+ * 获取商品的可用资源
9
+ * @param product 商品数据
10
+ * @returns 可用资源
11
11
  */
12
12
  export var getAvailableProductResources = function getAvailableProductResources(products) {
13
13
  var rules = []; // 每个商品对应的预约规则