@pisell/pisellos 2.3.74 → 2.3.76

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 (283) hide show
  1. package/dist/core/index.js +6 -10
  2. package/dist/model/strategy/adapter/promotion/index.js +9 -0
  3. package/dist/model/strategy/adapter/walletPass/example.js +3 -26
  4. package/dist/model/strategy/strategy-example.js +5 -19
  5. package/dist/modules/Cart/index.js +0 -3
  6. package/dist/modules/Cart/utils/cartProduct.js +0 -1
  7. package/dist/modules/Date/index.js +1 -5
  8. package/dist/modules/Discount/index.js +2 -4
  9. package/dist/modules/OpenData/index.js +0 -2
  10. package/dist/modules/Order/index.d.ts +1 -1
  11. package/dist/modules/Order/index.js +75 -91
  12. package/dist/modules/Order/types.d.ts +3 -1
  13. package/dist/modules/Payment/index.js +97 -162
  14. package/dist/modules/Rules/index.js +1 -4
  15. package/dist/modules/Schedule/index.js +0 -1
  16. package/dist/modules/Schedule/utils.js +0 -1
  17. package/dist/modules/Step/index.js +0 -1
  18. package/dist/plugins/request.js +1 -4
  19. package/dist/plugins/window.js +2 -6
  20. package/dist/server/index.js +97 -129
  21. package/dist/server/modules/menu/index.js +32 -41
  22. package/dist/server/modules/order/index.js +2 -4
  23. package/dist/server/modules/products/index.js +24 -42
  24. package/dist/server/modules/quotation/index.js +29 -38
  25. package/dist/server/modules/resource/index.js +3 -4
  26. package/dist/server/modules/schedule/index.js +27 -35
  27. package/dist/server/utils/product.js +0 -1
  28. package/dist/solution/BaseSales/index.js +100 -72
  29. package/dist/solution/BaseSales/utils/cartPromotion.d.ts +5 -0
  30. package/dist/solution/BaseSales/utils/cartPromotion.js +15 -6
  31. package/dist/solution/BookingByStep/index.js +7 -59
  32. package/dist/solution/BookingByStep/utils/capacity.js +1 -11
  33. package/dist/solution/BookingByStep/utils/resources.js +1 -3
  34. package/dist/solution/BookingByStep/utils/timeslots.js +2 -43
  35. package/dist/solution/BookingTicket/index.js +0 -2
  36. package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +6 -7
  37. package/dist/solution/BookingTicket/utils/scan/handleScan.js +25 -31
  38. package/dist/solution/BookingTicket/utils/scan/index.js +6 -10
  39. package/dist/solution/BuyTickets/index.js +9 -12
  40. package/dist/solution/Checkout/index.js +177 -252
  41. package/dist/solution/Checkout/utils/index.js +4 -16
  42. package/dist/solution/RegisterAndLogin/index.js +30 -76
  43. package/dist/solution/ScanOrder/index.js +50 -60
  44. package/dist/solution/ShopDiscount/index.js +2 -7
  45. package/dist/solution/VenueBooking/index.js +45 -55
  46. package/dist/utils/task.js +15 -18
  47. package/dist/utils/watch.js +0 -1
  48. package/lib/apis/picoding.js +2 -0
  49. package/lib/core/index.js +134 -134
  50. package/lib/effects/index.js +46 -57
  51. package/lib/index.js +82 -49
  52. package/lib/model/index.js +14 -21
  53. package/lib/model/strategy/adapter/dataVariant/adapter.js +38 -50
  54. package/lib/model/strategy/adapter/dataVariant/evaluator.js +162 -236
  55. package/lib/model/strategy/adapter/dataVariant/examples.js +229 -237
  56. package/lib/model/strategy/adapter/dataVariant/index.js +39 -34
  57. package/lib/model/strategy/adapter/dataVariant/type.js +57 -28
  58. package/lib/model/strategy/adapter/index.js +100 -64
  59. package/lib/model/strategy/adapter/itemRule/adapter.js +156 -144
  60. package/lib/model/strategy/adapter/itemRule/evaluator.js +36 -48
  61. package/lib/model/strategy/adapter/itemRule/examples.js +295 -225
  62. package/lib/model/strategy/adapter/itemRule/index.js +83 -57
  63. package/lib/model/strategy/adapter/itemRule/type.js +97 -36
  64. package/lib/model/strategy/adapter/promotion/adapter.js +91 -69
  65. package/lib/model/strategy/adapter/promotion/evaluator.js +444 -310
  66. package/lib/model/strategy/adapter/promotion/examples.js +222 -234
  67. package/lib/model/strategy/adapter/promotion/index.js +1 -0
  68. package/lib/model/strategy/adapter/promotion/type.js +243 -36
  69. package/lib/model/strategy/adapter/type.js +4 -16
  70. package/lib/model/strategy/adapter/walletPass/evaluator.js +180 -150
  71. package/lib/model/strategy/adapter/walletPass/example.js +217 -190
  72. package/lib/model/strategy/adapter/walletPass/index.js +75 -51
  73. package/lib/model/strategy/adapter/walletPass/locales.js +36 -58
  74. package/lib/model/strategy/adapter/walletPass/type.js +4 -16
  75. package/lib/model/strategy/adapter/walletPass/utils.js +588 -378
  76. package/lib/model/strategy/engine.js +270 -168
  77. package/lib/model/strategy/index.js +49 -34
  78. package/lib/model/strategy/strategy-example.js +243 -239
  79. package/lib/model/strategy/type.js +100 -40
  80. package/lib/modules/Account/index.js +39 -53
  81. package/lib/modules/Account/types.js +20 -33
  82. package/lib/modules/AccountList/index.js +116 -154
  83. package/lib/modules/AccountList/types.js +30 -31
  84. package/lib/modules/AccountList/utils.js +18 -30
  85. package/lib/modules/BaseModule.js +23 -42
  86. package/lib/modules/BookingContext/index.js +158 -136
  87. package/lib/modules/BookingContext/types.js +46 -32
  88. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +138 -146
  89. package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +78 -83
  90. package/lib/modules/BookingContext/utils/cacheItemToBookingInput.js +170 -150
  91. package/lib/modules/BookingContext/utils/flexible.js +38 -55
  92. package/lib/modules/BookingContext/utils/formatResourceList.js +19 -34
  93. package/lib/modules/BookingContext/utils/index.js +124 -41
  94. package/lib/modules/BookingContext/utils/noResource.js +58 -70
  95. package/lib/modules/BookingContext/utils/orderLineDisplay.js +14 -41
  96. package/lib/modules/BookingContext/utils/productExtend.js +202 -155
  97. package/lib/modules/BookingContext/utils/resourceErrors.js +53 -53
  98. package/lib/modules/BookingContext/utils/resourceSelection.js +19 -41
  99. package/lib/modules/BookingContext/utils/resources.js +209 -167
  100. package/lib/modules/BookingContext/utils/serviceTimes.js +115 -116
  101. package/lib/modules/BookingContext/utils/timeSlices.js +76 -86
  102. package/lib/modules/Cart/index.js +170 -124
  103. package/lib/modules/Cart/types.js +46 -51
  104. package/lib/modules/Cart/utils/cartAccount.js +40 -39
  105. package/lib/modules/Cart/utils/cartDate.js +56 -61
  106. package/lib/modules/Cart/utils/cartDiscount.js +28 -33
  107. package/lib/modules/Cart/utils/cartNote.js +27 -32
  108. package/lib/modules/Cart/utils/cartProduct.js +321 -251
  109. package/lib/modules/Cart/utils/cartRelationForms.js +29 -35
  110. package/lib/modules/Cart/utils/cartResource.js +70 -78
  111. package/lib/modules/Cart/utils/changePrice.js +22 -50
  112. package/lib/modules/Cart/utils/index.js +106 -48
  113. package/lib/modules/Customer/constants.js +13 -34
  114. package/lib/modules/Customer/index.js +235 -172
  115. package/lib/modules/Customer/types.js +38 -35
  116. package/lib/modules/Date/index.js +116 -115
  117. package/lib/modules/Date/types.js +16 -28
  118. package/lib/modules/Date/utils.js +174 -123
  119. package/lib/modules/Discount/index.js +122 -127
  120. package/lib/modules/Discount/types.js +9 -31
  121. package/lib/modules/Guests/index.js +30 -56
  122. package/lib/modules/Guests/types.js +23 -33
  123. package/lib/modules/Holder/index.js +209 -189
  124. package/lib/modules/Holder/types.js +4 -16
  125. package/lib/modules/Holder/utils.js +20 -49
  126. package/lib/modules/OpenData/index.js +70 -76
  127. package/lib/modules/OpenData/types.js +4 -16
  128. package/lib/modules/OpenData/utils.js +44 -78
  129. package/lib/modules/Order/index.d.ts +1 -1
  130. package/lib/modules/Order/index.js +1733 -2121
  131. package/lib/modules/Order/payment-utils.js +77 -120
  132. package/lib/modules/Order/types.d.ts +3 -1
  133. package/lib/modules/Order/types.js +88 -35
  134. package/lib/modules/Order/utils/bundleDiscountHydration.js +41 -74
  135. package/lib/modules/Order/utils/discountProductLineIdentity.js +142 -100
  136. package/lib/modules/Order/utils/manualProductDiscount.js +124 -123
  137. package/lib/modules/Order/utils/orderCollectionIdentity.js +184 -244
  138. package/lib/modules/Order/utils.js +814 -647
  139. package/lib/modules/Payment/cash.js +20 -33
  140. package/lib/modules/Payment/cashRecommendationAlgorithm.js +145 -76
  141. package/lib/modules/Payment/eftpos.js +16 -30
  142. package/lib/modules/Payment/index.js +532 -399
  143. package/lib/modules/Payment/mx51.js +1 -0
  144. package/lib/modules/Payment/types.js +230 -108
  145. package/lib/modules/Payment/utils.js +52 -51
  146. package/lib/modules/Payment/walletpass.js +485 -660
  147. package/lib/modules/Product/index.js +51 -46
  148. package/lib/modules/Product/types.js +4 -16
  149. package/lib/modules/Product/utils.js +32 -33
  150. package/lib/modules/ProductList/index.js +113 -123
  151. package/lib/modules/ProductList/types.js +9 -31
  152. package/lib/modules/Quotation/index.js +81 -118
  153. package/lib/modules/Quotation/types.js +4 -16
  154. package/lib/modules/Resource/index.js +27 -59
  155. package/lib/modules/Resource/types.js +22 -32
  156. package/lib/modules/Resource/utils.js +30 -38
  157. package/lib/modules/ResourcePlanner/index.js +25 -23
  158. package/lib/modules/ResourcePlanner/localClock.js +54 -119
  159. package/lib/modules/ResourcePlanner/planner.js +589 -770
  160. package/lib/modules/ResourcePlanner/types.js +10 -29
  161. package/lib/modules/Rules/index.js +1218 -959
  162. package/lib/modules/Rules/types.js +17 -40
  163. package/lib/modules/SalesSummary/index.js +85 -90
  164. package/lib/modules/SalesSummary/types.js +4 -16
  165. package/lib/modules/SalesSummary/utils.js +355 -430
  166. package/lib/modules/ScanOrderLogger/index.js +59 -79
  167. package/lib/modules/ScanOrderLogger/providers/feishu.js +54 -78
  168. package/lib/modules/ScanOrderLogger/providers/grafana.js +13 -36
  169. package/lib/modules/ScanOrderLogger/types.js +4 -16
  170. package/lib/modules/Schedule/getDateIsInSchedule.js +334 -163
  171. package/lib/modules/Schedule/index.js +100 -114
  172. package/lib/modules/Schedule/type.js +4 -16
  173. package/lib/modules/Schedule/types.js +4 -16
  174. package/lib/modules/Schedule/utils.js +433 -291
  175. package/lib/modules/Step/index.js +40 -52
  176. package/lib/modules/Step/tyeps.js +4 -16
  177. package/lib/modules/Summary/index.js +66 -71
  178. package/lib/modules/Summary/types.js +4 -16
  179. package/lib/modules/Summary/utils.js +773 -418
  180. package/lib/modules/SurchargeList/index.js +46 -60
  181. package/lib/modules/SurchargeList/types.js +4 -16
  182. package/lib/modules/index.js +245 -63
  183. package/lib/plugins/app.js +4 -16
  184. package/lib/plugins/index.js +36 -25
  185. package/lib/plugins/request.js +137 -126
  186. package/lib/plugins/shopStore.js +4 -16
  187. package/lib/plugins/user.js +4 -16
  188. package/lib/plugins/window.js +171 -179
  189. package/lib/server/index.js +3050 -2665
  190. package/lib/server/modules/floor-plan/index.js +118 -134
  191. package/lib/server/modules/floor-plan/types.js +15 -30
  192. package/lib/server/modules/index.js +106 -68
  193. package/lib/server/modules/menu/index.js +142 -122
  194. package/lib/server/modules/menu/types.js +18 -31
  195. package/lib/server/modules/order/index.js +784 -1002
  196. package/lib/server/modules/order/types.js +122 -33
  197. package/lib/server/modules/order/utils/filterBookings.js +219 -194
  198. package/lib/server/modules/order/utils/filterOrders.js +118 -92
  199. package/lib/server/modules/payment/index.js +59 -83
  200. package/lib/server/modules/payment/types.js +4 -16
  201. package/lib/server/modules/products/index.js +583 -471
  202. package/lib/server/modules/products/types.js +44 -34
  203. package/lib/server/modules/quotation/index.js +137 -172
  204. package/lib/server/modules/quotation/types.js +21 -31
  205. package/lib/server/modules/resource/index.js +220 -186
  206. package/lib/server/modules/resource/types.js +42 -33
  207. package/lib/server/modules/schedule/index.js +135 -123
  208. package/lib/server/modules/schedule/types.js +14 -21
  209. package/lib/server/modules/schedule/utils.js +334 -163
  210. package/lib/server/types.js +4 -16
  211. package/lib/server/utils/index.js +25 -23
  212. package/lib/server/utils/product.js +196 -139
  213. package/lib/server/utils/schedule.js +34 -41
  214. package/lib/server/utils/small-ticket.js +479 -456
  215. package/lib/server/utils/time.js +40 -49
  216. package/lib/solution/BaseSales/index.js +1220 -1412
  217. package/lib/solution/BaseSales/types.js +42 -38
  218. package/lib/solution/BaseSales/utils/cartPromotion.d.ts +5 -0
  219. package/lib/solution/BaseSales/utils/cartPromotion.js +652 -498
  220. package/lib/solution/BaseSales/utils/parseSalesResponse.js +85 -105
  221. package/lib/solution/BaseSales/utils/quotationPrice.js +56 -114
  222. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +108 -145
  223. package/lib/solution/BaseSales/utils.js +158 -143
  224. package/lib/solution/BookingByStep/index.js +1527 -1340
  225. package/lib/solution/BookingByStep/types.js +40 -99
  226. package/lib/solution/BookingByStep/utils/capacity.js +192 -160
  227. package/lib/solution/BookingByStep/utils/products.js +42 -52
  228. package/lib/solution/BookingByStep/utils/resources.js +527 -330
  229. package/lib/solution/BookingByStep/utils/stock.js +65 -44
  230. package/lib/solution/BookingByStep/utils/timeslots.js +129 -131
  231. package/lib/solution/BookingTicket/index.js +607 -522
  232. package/lib/solution/BookingTicket/types.js +99 -77
  233. package/lib/solution/BookingTicket/utils/addProductDecision.js +226 -189
  234. package/lib/solution/BookingTicket/utils/addTimeAvailability.js +58 -89
  235. package/lib/solution/BookingTicket/utils/bookingStatus.js +107 -78
  236. package/lib/solution/BookingTicket/utils/cartView.js +114 -99
  237. package/lib/solution/BookingTicket/utils/exampleData.js +185 -0
  238. package/lib/solution/BookingTicket/utils/orderCustomer.js +18 -41
  239. package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.js +219 -86
  240. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +168 -116
  241. package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +79 -91
  242. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.js +54 -41
  243. package/lib/solution/BookingTicket/utils/scan/handleScan.js +84 -81
  244. package/lib/solution/BookingTicket/utils/scan/index.js +98 -104
  245. package/lib/solution/BookingTicket/utils/scan/scanCache.js +90 -43
  246. package/lib/solution/BookingTicket/utils/scan/scanProductValues.js +52 -64
  247. package/lib/solution/BookingTicket/utils/sessionCatalogStale.js +56 -58
  248. package/lib/solution/BookingTicket/utils/weighingProductSku.js +34 -48
  249. package/lib/solution/BuyTickets/index.js +67 -70
  250. package/lib/solution/BuyTickets/types.js +22 -38
  251. package/lib/solution/Checkout/index.js +1451 -1158
  252. package/lib/solution/Checkout/types.js +91 -61
  253. package/lib/solution/Checkout/utils/index.js +228 -156
  254. package/lib/solution/PlaceOrder/index.js +55 -0
  255. package/lib/solution/RegisterAndLogin/config.js +493 -460
  256. package/lib/solution/RegisterAndLogin/index.js +633 -630
  257. package/lib/solution/RegisterAndLogin/types.js +189 -76
  258. package/lib/solution/RegisterAndLogin/utils.js +183 -125
  259. package/lib/solution/Sales/index.js +328 -324
  260. package/lib/solution/Sales/types.js +27 -33
  261. package/lib/solution/ScanOrder/index.js +832 -864
  262. package/lib/solution/ScanOrder/types.js +33 -34
  263. package/lib/solution/ScanOrder/utils.js +409 -374
  264. package/lib/solution/ShopDiscount/index.js +226 -232
  265. package/lib/solution/ShopDiscount/types.js +15 -37
  266. package/lib/solution/ShopDiscount/utils.js +300 -172
  267. package/lib/solution/UnifiedBookingSales/index.js +1035 -1201
  268. package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.js +99 -159
  269. package/lib/solution/UnifiedBookingSales/types.js +10 -32
  270. package/lib/solution/VenueBooking/index.js +811 -879
  271. package/lib/solution/VenueBooking/types.js +19 -39
  272. package/lib/solution/VenueBooking/utils/dateSummary.js +27 -56
  273. package/lib/solution/VenueBooking/utils/resource.js +31 -54
  274. package/lib/solution/VenueBooking/utils/slotMerge.js +94 -107
  275. package/lib/solution/VenueBooking/utils/timeSlot.js +132 -132
  276. package/lib/solution/VenueBooking/utils.js +130 -67
  277. package/lib/solution/index.js +124 -41
  278. package/lib/store/createStore.js +32 -29
  279. package/lib/types/index.js +4 -16
  280. package/lib/utils/payment-number.js +26 -46
  281. package/lib/utils/task.js +36 -36
  282. package/lib/utils/watch.js +81 -47
  283. package/package.json +2 -1
@@ -284,33 +284,29 @@ export function isProduction() {
284
284
  */
285
285
  export var logger = {
286
286
  info: function info(message) {
287
- var _console;
288
287
  for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
289
288
  args[_key3 - 1] = arguments[_key3];
290
289
  }
291
- (_console = console).log.apply(_console, ["[Checkout] ".concat(message)].concat(args));
292
290
  },
293
291
  warn: function warn(message) {
294
- var _console2;
292
+ var _console;
295
293
  for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
296
294
  args[_key4 - 1] = arguments[_key4];
297
295
  }
298
- (_console2 = console).warn.apply(_console2, ["[Checkout] ".concat(message)].concat(args));
296
+ (_console = console).warn.apply(_console, ["[Checkout] ".concat(message)].concat(args));
299
297
  },
300
298
  error: function error(message) {
301
- var _console3;
299
+ var _console2;
302
300
  for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
303
301
  args[_key5 - 1] = arguments[_key5];
304
302
  }
305
- (_console3 = console).error.apply(_console3, ["[Checkout] ".concat(message)].concat(args));
303
+ (_console2 = console).error.apply(_console2, ["[Checkout] ".concat(message)].concat(args));
306
304
  },
307
305
  debug: function debug(message) {
308
306
  if (!isProduction()) {
309
- var _console4;
310
307
  for (var _len6 = arguments.length, args = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
311
308
  args[_key6 - 1] = arguments[_key6];
312
309
  }
313
- (_console4 = console).debug.apply(_console4, ["[Checkout] ".concat(message)].concat(args));
314
310
  }
315
311
  }
316
312
  };
@@ -424,14 +420,6 @@ export function extractAmountFromCartSummary(cartSummary) {
424
420
  break;
425
421
  }
426
422
  });
427
- console.log('[Checkout] 从购物车小计提取金额信息:', {
428
- totalAmount: result.totalAmount,
429
- subTotal: result.subTotal,
430
- taxAmount: result.taxAmount,
431
- discountAmount: result.discountAmount,
432
- shopDiscountAmount: result.shopDiscountAmount,
433
- roundingAmount: result.roundingAmount
434
- });
435
423
  return result;
436
424
  }
437
425
 
@@ -331,10 +331,9 @@ export var RegisterAndLoginImpl = /*#__PURE__*/function (_BaseModule) {
331
331
  case 13:
332
332
  // 预先调用获取区号的方法,初始内存缓存
333
333
  this.getCountries();
334
- console.log('[RegisterAndLogin] 初始化完成');
335
- _context4.next = 17;
334
+ _context4.next = 16;
336
335
  return this.core.effects.emit(RegisterAndLoginHooks.onInited, {});
337
- case 17:
336
+ case 16:
338
337
  case "end":
339
338
  return _context4.stop();
340
339
  }
@@ -2250,63 +2249,46 @@ export var RegisterAndLoginImpl = /*#__PURE__*/function (_BaseModule) {
2250
2249
  return _regeneratorRuntime().wrap(function _callee35$(_context35) {
2251
2250
  while (1) switch (_context35.prev = _context35.next) {
2252
2251
  case 0:
2253
- console.log('[RegisterAndLogin] Facebook 登录开始', {
2254
- tokenLength: (token === null || token === void 0 ? void 0 : token.length) || 0,
2255
- timestamp: Date.now()
2256
- });
2257
- _context35.next = 3;
2252
+ _context35.next = 2;
2258
2253
  return this.initFacebookSDK(token);
2259
- case 3:
2260
- console.log('[RegisterAndLogin] Facebook SDK 初始化完成,准备调用 FB.login');
2254
+ case 2:
2261
2255
  return _context35.abrupt("return", new Promise(function (resolve, reject) {
2262
- console.log('[RegisterAndLogin] 调用 FB.login', {
2263
- scope: 'email,public_profile'
2264
- });
2265
2256
  window.FB.login( /*#__PURE__*/function () {
2266
2257
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(response) {
2267
2258
  var result;
2268
2259
  return _regeneratorRuntime().wrap(function _callee34$(_context34) {
2269
2260
  while (1) switch (_context34.prev = _context34.next) {
2270
2261
  case 0:
2271
- console.log('[RegisterAndLogin] FB.login 回调触发', {
2272
- hasAuthResponse: Boolean(response === null || response === void 0 ? void 0 : response.authResponse),
2273
- status: response === null || response === void 0 ? void 0 : response.status
2274
- });
2275
2262
  if (!response.authResponse) {
2276
- _context34.next = 17;
2263
+ _context34.next = 14;
2277
2264
  break;
2278
2265
  }
2279
- _context34.prev = 2;
2280
- // 直接调用 /auth/facebook/login 接口
2281
- console.log('[RegisterAndLogin] 调用后端 facebookLogin 接口');
2282
- _context34.next = 6;
2266
+ _context34.prev = 1;
2267
+ _context34.next = 4;
2283
2268
  return _this2.apiCaller.call('facebookLogin', {
2284
2269
  token: response.authResponse.accessToken
2285
2270
  });
2286
- case 6:
2271
+ case 4:
2287
2272
  result = _context34.sent;
2288
- console.log('[RegisterAndLogin] facebookLogin 接口返回成功', {
2289
- hasResult: Boolean(result)
2290
- });
2291
2273
  resolve(result);
2292
- _context34.next = 15;
2274
+ _context34.next = 12;
2293
2275
  break;
2294
- case 11:
2295
- _context34.prev = 11;
2296
- _context34.t0 = _context34["catch"](2);
2276
+ case 8:
2277
+ _context34.prev = 8;
2278
+ _context34.t0 = _context34["catch"](1);
2297
2279
  console.error('[RegisterAndLogin] facebookLogin 接口调用失败', _context34.t0);
2298
2280
  reject(_context34.t0);
2299
- case 15:
2300
- _context34.next = 19;
2281
+ case 12:
2282
+ _context34.next = 16;
2301
2283
  break;
2302
- case 17:
2284
+ case 14:
2303
2285
  console.warn('[RegisterAndLogin] FB.login 用户取消授权或无 authResponse', response);
2304
2286
  reject(new Error('facebook_login_cancel'));
2305
- case 19:
2287
+ case 16:
2306
2288
  case "end":
2307
2289
  return _context34.stop();
2308
2290
  }
2309
- }, _callee34, null, [[2, 11]]);
2291
+ }, _callee34, null, [[1, 8]]);
2310
2292
  }));
2311
2293
  return function (_x31) {
2312
2294
  return _ref.apply(this, arguments);
@@ -2315,7 +2297,7 @@ export var RegisterAndLoginImpl = /*#__PURE__*/function (_BaseModule) {
2315
2297
  scope: 'email,public_profile'
2316
2298
  });
2317
2299
  }));
2318
- case 5:
2300
+ case 3:
2319
2301
  case "end":
2320
2302
  return _context35.stop();
2321
2303
  }
@@ -2338,20 +2320,14 @@ export var RegisterAndLoginImpl = /*#__PURE__*/function (_BaseModule) {
2338
2320
  return _regeneratorRuntime().wrap(function _callee37$(_context37) {
2339
2321
  while (1) switch (_context37.prev = _context37.next) {
2340
2322
  case 0:
2341
- // 先加载 Apple SDK
2342
- console.log('[RegisterAndLogin] Apple 登录开始', {
2343
- tokenLength: (token === null || token === void 0 ? void 0 : token.length) || 0,
2344
- timestamp: Date.now()
2345
- });
2346
- _context37.next = 3;
2323
+ _context37.next = 2;
2347
2324
  return this.initAppleSDK();
2348
- case 3:
2349
- console.log('[RegisterAndLogin] Apple SDK 初始化完成');
2325
+ case 2:
2350
2326
  return _context37.abrupt("return", new Promise(function (resolve, reject) {
2351
2327
  try {
2352
2328
  var _AppleID, _AppleID2;
2353
2329
  // 动态创建 Apple 登录按钮元素
2354
- console.log('[RegisterAndLogin] 创建临时 Apple SignIn 按钮节点');
2330
+
2355
2331
  var appleSignInDiv = document.createElement('div');
2356
2332
  appleSignInDiv.id = 'appleid-signin-temp';
2357
2333
  appleSignInDiv.setAttribute('data-color', 'black');
@@ -2368,11 +2344,8 @@ export var RegisterAndLoginImpl = /*#__PURE__*/function (_BaseModule) {
2368
2344
 
2369
2345
  // 将元素添加到 body 中
2370
2346
  document.body.appendChild(appleSignInDiv);
2371
- console.log('[RegisterAndLogin] Apple SignIn 按钮已添加到文档');
2372
-
2373
2347
  // 初始化 Apple ID 按钮
2374
2348
  if ((_AppleID = window.AppleID) !== null && _AppleID !== void 0 && (_AppleID = _AppleID.auth) !== null && _AppleID !== void 0 && _AppleID.init) {
2375
- console.log('[RegisterAndLogin] 调用 AppleID.auth.init');
2376
2349
  window.AppleID.auth.init({
2377
2350
  clientId: token,
2378
2351
  // 使用传入的 token 作为 clientId
@@ -2387,7 +2360,6 @@ export var RegisterAndLoginImpl = /*#__PURE__*/function (_BaseModule) {
2387
2360
 
2388
2361
  // 直接调用 Apple ID 登录,并处理 Promise
2389
2362
  if ((_AppleID2 = window.AppleID) !== null && _AppleID2 !== void 0 && (_AppleID2 = _AppleID2.auth) !== null && _AppleID2 !== void 0 && _AppleID2.signIn) {
2390
- console.log('[RegisterAndLogin] 调用 AppleID.auth.signIn');
2391
2363
  window.AppleID.auth.signIn().then( /*#__PURE__*/function () {
2392
2364
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(authResult) {
2393
2365
  var _authResult$authoriza, _authResult$authoriza2, authorizationCode, identityToken, result;
@@ -2399,44 +2371,29 @@ export var RegisterAndLoginImpl = /*#__PURE__*/function (_BaseModule) {
2399
2371
  if (document.body.contains(appleSignInDiv)) {
2400
2372
  document.body.removeChild(appleSignInDiv);
2401
2373
  }
2402
- console.log('[RegisterAndLogin] Apple SignIn 成功,临时节点已移除', {
2403
- hasAuthorization: Boolean(authResult === null || authResult === void 0 ? void 0 : authResult.authorization),
2404
- hasUser: Boolean(authResult === null || authResult === void 0 ? void 0 : authResult.user)
2405
- });
2406
-
2407
2374
  // 获取授权码或令牌
2408
2375
  authorizationCode = (_authResult$authoriza = authResult.authorization) === null || _authResult$authoriza === void 0 ? void 0 : _authResult$authoriza.code;
2409
- identityToken = (_authResult$authoriza2 = authResult.authorization) === null || _authResult$authoriza2 === void 0 ? void 0 : _authResult$authoriza2.id_token;
2410
- console.log('[RegisterAndLogin] Apple 授权结果解析', {
2411
- hasAuthorizationCode: Boolean(authorizationCode),
2412
- hasIdentityToken: Boolean(identityToken)
2413
- });
2414
-
2415
- // 使用授权码或身份令牌调用后端接口
2416
- console.log('[RegisterAndLogin] 调用后端 appleLogin 接口');
2417
- _context36.next = 9;
2376
+ identityToken = (_authResult$authoriza2 = authResult.authorization) === null || _authResult$authoriza2 === void 0 ? void 0 : _authResult$authoriza2.id_token; // 使用授权码或身份令牌调用后端接口
2377
+ _context36.next = 6;
2418
2378
  return _this3.apiCaller.call('appleLogin', {
2419
2379
  code: identityToken || authorizationCode,
2420
2380
  login_channel: _this3.channel
2421
2381
  });
2422
- case 9:
2382
+ case 6:
2423
2383
  result = _context36.sent;
2424
- console.log('[RegisterAndLogin] appleLogin 接口返回成功', {
2425
- hasResult: Boolean(result)
2426
- });
2427
2384
  resolve(result);
2428
- _context36.next = 18;
2385
+ _context36.next = 14;
2429
2386
  break;
2430
- case 14:
2431
- _context36.prev = 14;
2387
+ case 10:
2388
+ _context36.prev = 10;
2432
2389
  _context36.t0 = _context36["catch"](0);
2433
2390
  console.error('[RegisterAndLogin] 处理 Apple 登录结果失败', _context36.t0);
2434
2391
  reject(_context36.t0);
2435
- case 18:
2392
+ case 14:
2436
2393
  case "end":
2437
2394
  return _context36.stop();
2438
2395
  }
2439
- }, _callee36, null, [[0, 14]]);
2396
+ }, _callee36, null, [[0, 10]]);
2440
2397
  }));
2441
2398
  return function (_x33) {
2442
2399
  return _ref2.apply(this, arguments);
@@ -2458,7 +2415,7 @@ export var RegisterAndLoginImpl = /*#__PURE__*/function (_BaseModule) {
2458
2415
  reject(error);
2459
2416
  }
2460
2417
  }));
2461
- case 5:
2418
+ case 3:
2462
2419
  case "end":
2463
2420
  return _context37.stop();
2464
2421
  }
@@ -2620,7 +2577,6 @@ export var RegisterAndLoginImpl = /*#__PURE__*/function (_BaseModule) {
2620
2577
  } catch (error) {
2621
2578
  console.warn('[RegisterAndLogin] localStorage 更新失败:', error);
2622
2579
  }
2623
- console.log('[RegisterAndLogin] 国家数据已更新');
2624
2580
  }
2625
2581
  }
2626
2582
  _context39.next = 10;
@@ -2650,8 +2606,6 @@ export var RegisterAndLoginImpl = /*#__PURE__*/function (_BaseModule) {
2650
2606
  _context40.next = 2;
2651
2607
  return this.core.effects.emit(RegisterAndLoginHooks.onDestroy, {});
2652
2608
  case 2:
2653
- console.log('[RegisterAndLogin] 已销毁');
2654
- case 3:
2655
2609
  case "end":
2656
2610
  return _context40.stop();
2657
2611
  }
@@ -166,12 +166,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
166
166
  payload: payload,
167
167
  extra: extra
168
168
  });
169
- } else {
170
- console.log('[ScanOrder][log-fallback]', params.title, {
171
- payload: payload,
172
- extra: extra
173
- });
174
- }
169
+ } else {}
175
170
  return _context.abrupt("return");
176
171
  case 6:
177
172
  _context.next = 8;
@@ -501,50 +496,48 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
501
496
  this.store.scanOrderLogger.setContext(this.getScanOrderLoggerContext());
502
497
  }
503
498
  this.registerCustomerLoginListeners();
504
- console.log('[ScanOrder] 初始化开始');
505
- _context6.prev = 19;
506
- _context6.next = 22;
499
+ _context6.prev = 18;
500
+ _context6.next = 21;
507
501
  return (_this$store$order = this.store.order) === null || _this$store$order === void 0 ? void 0 : _this$store$order.recalculateSummary({
508
502
  createIfMissing: false
509
503
  });
510
- case 22:
504
+ case 21:
511
505
  (_this$store$order2 = this.store.order) === null || _this$store$order2 === void 0 || _this$store$order2.persistTempOrder();
512
- _context6.next = 25;
506
+ _context6.next = 24;
513
507
  return this.loadRuntimeConfigs();
514
- case 25:
508
+ case 24:
515
509
  if (!this.store.schedule) {
516
- _context6.next = 34;
510
+ _context6.next = 33;
517
511
  break;
518
512
  }
519
- _context6.prev = 26;
520
- _context6.next = 29;
513
+ _context6.prev = 25;
514
+ _context6.next = 28;
521
515
  return this.store.schedule.loadAllSchedule();
522
- case 29:
523
- _context6.next = 34;
516
+ case 28:
517
+ _context6.next = 33;
524
518
  break;
525
- case 31:
526
- _context6.prev = 31;
527
- _context6.t0 = _context6["catch"](26);
519
+ case 30:
520
+ _context6.prev = 30;
521
+ _context6.t0 = _context6["catch"](25);
528
522
  console.warn('[ScanOrder] loadAllSchedule 失败,operating_hours 判定将跳过', _context6.t0);
529
- case 34:
530
- _context6.next = 36;
523
+ case 33:
524
+ _context6.next = 35;
531
525
  return this.refreshItemRuleQuantityLimits();
532
- case 36:
526
+ case 35:
533
527
  this.store.status = 'ready';
534
- console.log('[ScanOrder] 初始化完成');
535
- _context6.next = 40;
528
+ _context6.next = 38;
536
529
  return this.core.effects.emit(ScanOrderHooks.onInited, {
537
530
  status: this.store.status
538
531
  });
539
- case 40:
532
+ case 38:
540
533
  this.logMethodSuccess('initialize', {
541
534
  status: this.store.status
542
535
  });
543
- _context6.next = 50;
536
+ _context6.next = 48;
544
537
  break;
545
- case 43:
546
- _context6.prev = 43;
547
- _context6.t1 = _context6["catch"](19);
538
+ case 41:
539
+ _context6.prev = 41;
540
+ _context6.t1 = _context6["catch"](18);
548
541
  this.store.status = 'error';
549
542
  this.store.error = _context6.t1 instanceof Error ? _context6.t1.message : '初始化失败';
550
543
  console.error('[ScanOrder] 初始化失败', _context6.t1);
@@ -552,11 +545,11 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
552
545
  status: this.store.status
553
546
  });
554
547
  throw _context6.t1;
555
- case 50:
548
+ case 48:
556
549
  case "end":
557
550
  return _context6.stop();
558
551
  }
559
- }, _callee6, this, [[19, 43], [26, 31]]);
552
+ }, _callee6, this, [[18, 41], [25, 30]]);
560
553
  }));
561
554
  function initialize(_x5) {
562
555
  return _initialize.apply(this, arguments);
@@ -576,9 +569,8 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
576
569
  return this.core.effects.emit(ScanOrderHooks.onDestroy, {});
577
570
  case 4:
578
571
  _get(_getPrototypeOf(ScanOrderImpl.prototype), "destroy", this).call(this);
579
- console.log('[ScanOrder] 已销毁');
580
572
  this.logMethodSuccess('destroy');
581
- case 7:
573
+ case 6:
582
574
  case "end":
583
575
  return _context7.stop();
584
576
  }
@@ -598,27 +590,26 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
598
590
  case 0:
599
591
  this.logMethodStart('retryInit');
600
592
  // TODO: 细化重试策略(指数退避、最大重试次数)后替换当前实现
601
- console.log('[ScanOrder] retryInit 调用');
602
- _context8.next = 4;
593
+ _context8.next = 3;
603
594
  return this.core.effects.emit(ScanOrderHooks.onRetryInit, {});
604
- case 4:
605
- _context8.prev = 4;
606
- _context8.next = 7;
595
+ case 3:
596
+ _context8.prev = 3;
597
+ _context8.next = 6;
607
598
  return this.initialize(this.core, this.initializeOptions);
608
- case 7:
599
+ case 6:
609
600
  this.logMethodSuccess('retryInit');
610
- _context8.next = 14;
601
+ _context8.next = 13;
611
602
  break;
612
- case 10:
613
- _context8.prev = 10;
614
- _context8.t0 = _context8["catch"](4);
603
+ case 9:
604
+ _context8.prev = 9;
605
+ _context8.t0 = _context8["catch"](3);
615
606
  this.logMethodError('retryInit', _context8.t0);
616
607
  throw _context8.t0;
617
- case 14:
608
+ case 13:
618
609
  case "end":
619
610
  return _context8.stop();
620
611
  }
621
- }, _callee8, this, [[4, 10]]);
612
+ }, _callee8, this, [[3, 9]]);
622
613
  }));
623
614
  function retryInit() {
624
615
  return _retryInit.apply(this, arguments);
@@ -634,36 +625,35 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
634
625
  case 0:
635
626
  this.logMethodStart('refresh');
636
627
  // TODO: 接入真实刷新逻辑(资源重拉取、流程重建)后替换当前实现
637
- console.log('[ScanOrder] refresh 调用');
638
- _context9.prev = 2;
628
+ _context9.prev = 1;
639
629
  this.store.status = 'initializing';
640
- _context9.next = 6;
630
+ _context9.next = 5;
641
631
  return this.loadRuntimeConfigs();
642
- case 6:
643
- _context9.next = 8;
632
+ case 5:
633
+ _context9.next = 7;
644
634
  return this.refreshItemRuleQuantityLimits();
645
- case 8:
635
+ case 7:
646
636
  this.store.status = 'ready';
647
- _context9.next = 11;
637
+ _context9.next = 10;
648
638
  return this.core.effects.emit(ScanOrderHooks.onRefresh, {
649
639
  status: this.store.status
650
640
  });
651
- case 11:
641
+ case 10:
652
642
  this.logMethodSuccess('refresh', {
653
643
  status: this.store.status
654
644
  });
655
- _context9.next = 18;
645
+ _context9.next = 17;
656
646
  break;
657
- case 14:
658
- _context9.prev = 14;
659
- _context9.t0 = _context9["catch"](2);
647
+ case 13:
648
+ _context9.prev = 13;
649
+ _context9.t0 = _context9["catch"](1);
660
650
  this.logMethodError('refresh', _context9.t0);
661
651
  throw _context9.t0;
662
- case 18:
652
+ case 17:
663
653
  case "end":
664
654
  return _context9.stop();
665
655
  }
666
- }, _callee9, this, [[2, 14]]);
656
+ }, _callee9, this, [[1, 13]]);
667
657
  }));
668
658
  function refresh() {
669
659
  return _refresh.apply(this, arguments);
@@ -76,8 +76,6 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
76
76
  this.options = options;
77
77
  this.store = _objectSpread(_objectSpread({}, this.store), options.store || {});
78
78
  this.hooks = (_options$otherParams = options.otherParams) === null || _options$otherParams === void 0 || (_options$otherParams = _options$otherParams.rules) === null || _options$otherParams === void 0 ? void 0 : _options$otherParams.hooks;
79
- console.log('[ShopDiscount] 初始化完成');
80
-
81
79
  // 获取依赖的插件
82
80
  this.initializePlugins();
83
81
 
@@ -86,7 +84,7 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
86
84
 
87
85
  // 注册事件监听
88
86
  this.registerEventListeners();
89
- case 8:
87
+ case 7:
90
88
  case "end":
91
89
  return _context.stop();
92
90
  }
@@ -113,8 +111,6 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
113
111
  _context2.next = 7;
114
112
  return this.core.effects.emit("".concat(this.name, ":onDestroy"), {});
115
113
  case 7:
116
- console.log('[ShopDiscount] 已销毁');
117
- case 8:
118
114
  case "end":
119
115
  return _context2.stop();
120
116
  }
@@ -137,8 +133,7 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
137
133
  this.store.customer = null;
138
134
  (_this$store$discount2 = this.store.discount) === null || _this$store$discount2 === void 0 || _this$store$discount2.clear();
139
135
  (_this$store$rules2 = this.store.rules) === null || _this$store$rules2 === void 0 || _this$store$rules2.clear();
140
- console.log('[ShopDiscount] clear');
141
- case 5:
136
+ case 4:
142
137
  case "end":
143
138
  return _context3.stop();
144
139
  }