@pisell/private-materials 3.4.1 → 3.4.2

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 (105) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +13 -13
  7. package/build/lowcode/render/default/view.js +4 -4
  8. package/build/lowcode/view.js +7 -7
  9. package/es/components/booking/addons/model.d.ts +1 -10
  10. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  11. package/es/components/booking/components/browserSelect/index.js +1 -1
  12. package/es/components/booking/forms/model.d.ts +1 -10
  13. package/es/components/booking/forms/model.js +5 -5
  14. package/es/components/booking/info/model.d.ts +1 -10
  15. package/es/components/booking/info/service/like/index.js +1 -1
  16. package/es/components/booking/info2/index.js +6 -4
  17. package/es/components/booking/materiels/startTime/index.js +1 -1
  18. package/es/components/booking/model.d.ts +1 -9
  19. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  20. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  21. package/es/components/booking/notes/model.d.ts +1 -10
  22. package/es/components/booking/notes/model.js +5 -5
  23. package/es/components/booking/payments/model.d.ts +1 -10
  24. package/es/components/booking/payments/model.js +5 -5
  25. package/es/components/listComponent/index.js +5 -5
  26. package/es/components/pay/toC/PaymentMethods/index.js +70 -21
  27. package/es/components/pay/toC/index.js +46 -14
  28. package/es/components/pay/toC/model.d.ts +1 -9
  29. package/es/components/productExtension/card/index.js +3 -3
  30. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  31. package/es/components/productExtension/fields/Forms/index.js +12 -12
  32. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  33. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  34. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  35. package/es/components/productExtension/server.js +2 -2
  36. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  37. package/es/components/schedules/calendar/index.js +4 -4
  38. package/es/components/schedules/calendar/serve.js +2 -2
  39. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  40. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  41. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  42. package/es/components/schedules/components/ResourceList/index.js +1 -1
  43. package/es/components/schedules/components/Search/index.js +5 -5
  44. package/es/components/schedules/model.d.ts +1 -9
  45. package/es/components/schedules/model.js +5 -5
  46. package/es/components/schedules/openHours/index.js +1 -1
  47. package/es/components/schedules/openHours/serve.js +2 -2
  48. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  49. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  50. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  51. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  52. package/es/components/schedules/products/serve.js +2 -2
  53. package/es/components/schedules/products/utils.js +5 -5
  54. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  55. package/es/components/schedules/resources/detail/index.js +10 -10
  56. package/es/components/schedules/resources/list/index.js +2 -2
  57. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  58. package/es/components/schedules/resources/serve.js +2 -2
  59. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  60. package/es/components/schedules/utils.d.ts +1 -1
  61. package/es/components/schedules/utils.js +4 -4
  62. package/es/components/selectModal/index.js +2 -2
  63. package/es/components/ticketBooking/components/ticketBooking/index.js +121 -2
  64. package/es/components/ticketBooking/locales.d.ts +164 -146
  65. package/es/components/ticketBooking/locales.js +195 -147
  66. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  67. package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
  68. package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
  69. package/es/components/ticketBooking/utils/formatTime.js +144 -0
  70. package/es/components/wallet/Detail/model.d.ts +1 -13
  71. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  72. package/es/components/wallet/PointCard/model.d.ts +1 -13
  73. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  74. package/es/components/wallet/Voucher/model.d.ts +1 -13
  75. package/es/components/wallet/model.d.ts +1 -9
  76. package/es/hooks/useComponents.js +1 -1
  77. package/es/utils/index.d.ts +1 -1
  78. package/lib/components/booking/addons/model.d.ts +1 -10
  79. package/lib/components/booking/forms/model.d.ts +1 -10
  80. package/lib/components/booking/info/model.d.ts +1 -10
  81. package/lib/components/booking/info2/index.js +21 -11
  82. package/lib/components/booking/model.d.ts +1 -9
  83. package/lib/components/booking/notes/model.d.ts +1 -10
  84. package/lib/components/booking/payments/model.d.ts +1 -10
  85. package/lib/components/pay/toC/PaymentMethods/index.js +30 -2
  86. package/lib/components/pay/toC/index.js +29 -9
  87. package/lib/components/pay/toC/model.d.ts +1 -9
  88. package/lib/components/schedules/model.d.ts +1 -9
  89. package/lib/components/schedules/utils.d.ts +1 -1
  90. package/lib/components/schedules/utils.js +1 -1
  91. package/lib/components/ticketBooking/components/ticketBooking/index.js +141 -22
  92. package/lib/components/ticketBooking/locales.d.ts +164 -146
  93. package/lib/components/ticketBooking/locales.js +22 -4
  94. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  95. package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
  96. package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
  97. package/lib/components/ticketBooking/utils/formatTime.js +139 -0
  98. package/lib/components/wallet/Detail/model.d.ts +1 -13
  99. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  100. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  101. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  102. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  103. package/lib/components/wallet/model.d.ts +1 -9
  104. package/lib/utils/index.d.ts +1 -1
  105. package/package.json +2 -2
@@ -4,6 +4,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4
4
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
5
5
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
6
6
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
7
+ 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; } } }; }
7
8
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
9
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
10
  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); }
@@ -30,6 +31,9 @@ import { formatDateToStr, getNextTimeSlice, getDisabledEdit, restoreProductOther
30
31
  import AddServiceVariant from "../addServiceVariant";
31
32
  import TimeBar from "../timeBar";
32
33
  import "./index.less";
34
+ import { formatProducts } from "../../../booking/info/service2/utils";
35
+ import { getSumTotal } from "../../../booking/components/footer/amount";
36
+ import formatProductMessage from "../../utils/formatProductMessage";
33
37
  export var _formatBookingDetail = function _formatBookingDetail(data, modalState) {
34
38
  var _bookings$list, _bookings$list2;
35
39
  var customer_id = data.customer_id,
@@ -160,7 +164,7 @@ export var _formatBookingDetail = function _formatBookingDetail(data, modalState
160
164
  });
161
165
  };
162
166
  var TicketBooking = function TicketBooking() {
163
- var _engineContext$appHel2;
167
+ var _engineContext$appHel2, _state$modalState2;
164
168
  var _useStore = useStore(),
165
169
  _useStore2 = _slicedToArray(_useStore, 2),
166
170
  state = _useStore2[0],
@@ -174,7 +178,9 @@ var TicketBooking = function TicketBooking() {
174
178
  interaction = _engineContext$appHel.interaction,
175
179
  store = _engineContext$appHel.store,
176
180
  storage = _engineContext$appHel.storage,
177
- Toast = _engineContext$appHel.Toast;
181
+ Toast = _engineContext$appHel.Toast,
182
+ getSymbolic = _engineContext$appHel.getSymbolic,
183
+ translation = _engineContext$appHel.translation;
178
184
  var _persistentRef = useRef(false);
179
185
  var _initStateRef = useRef({});
180
186
  var _listTimerRef = useRef();
@@ -254,6 +260,119 @@ var TicketBooking = function TicketBooking() {
254
260
  });
255
261
  };
256
262
 
263
+ // 商品加购信息发生变化时,需要发送至native端
264
+ useEffect(function () {
265
+ var _state$modalState, _locales$getText, _interaction$utils5, _interaction$utils5$p;
266
+ var cartItems = state === null || state === void 0 || (_state$modalState = state.modalState) === null || _state$modalState === void 0 || (_state$modalState = _state$modalState.service) === null || _state$modalState === void 0 ? void 0 : _state$modalState.value;
267
+ if (!Array.isArray(cartItems) || cartItems.length === 0) {
268
+ var _interaction$utils4, _interaction$utils4$p;
269
+ interaction === null || interaction === void 0 || (_interaction$utils4 = interaction.utils) === null || _interaction$utils4 === void 0 || (_interaction$utils4$p = _interaction$utils4.postMessageToApp) === null || _interaction$utils4$p === void 0 || _interaction$utils4$p.call(_interaction$utils4, {
270
+ module: 'cds',
271
+ key: 'cartUpdate',
272
+ data: {
273
+ currency_symbol: getSymbolic(),
274
+ total: '0',
275
+ // 小计
276
+ products: [],
277
+ fees: []
278
+ }
279
+ });
280
+ }
281
+ var total = getSumTotal(state.modalState, true);
282
+ var formatedProducts = [];
283
+ try {
284
+ formatedProducts = formatProducts(cartItems, state.modalState, false, true, true);
285
+ } catch (error) {
286
+ console.error(error);
287
+ }
288
+ console.log('formatedProducts', total, formatedProducts);
289
+ var fees = [];
290
+ var products = [];
291
+ var _iterator = _createForOfIteratorHelper(formatedProducts),
292
+ _step;
293
+ try {
294
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
295
+ var _origin$discount_list;
296
+ var item = _step.value;
297
+ var id = item.id,
298
+ name = item.name,
299
+ image = item.image,
300
+ origin_total = item.origin_total,
301
+ _total = item.total,
302
+ num = item.num,
303
+ note = item.note,
304
+ _origin = item._origin;
305
+ _origin === null || _origin === void 0 || (_origin$discount_list = _origin.discount_list) === null || _origin$discount_list === void 0 || _origin$discount_list.forEach(function (dl) {
306
+ fees.push({
307
+ isReduce: dl.type === 'good_pass',
308
+ title: translation(dl === null || dl === void 0 ? void 0 : dl.discount.title),
309
+ price: dl.amount,
310
+ type: dl.type
311
+ });
312
+ });
313
+ var msg = '';
314
+ try {
315
+ var _engineContext$appHel3;
316
+ msg = formatProductMessage(_objectSpread(_objectSpread({}, item), {}, {
317
+ currency_symbol: getSymbolic()
318
+ }), (_engineContext$appHel3 = engineContext.appHelper) === null || _engineContext$appHel3 === void 0 ? void 0 : _engineContext$appHel3.utils);
319
+ } catch (error) {
320
+ console.error(error);
321
+ }
322
+ var _item = {
323
+ productID: id,
324
+ title: name,
325
+ cover: image,
326
+ // 封面图
327
+ price: _total,
328
+ // 售价
329
+ buyCount: num,
330
+ // 购买数量
331
+ productFormatMessage: msg,
332
+ note: note
333
+ };
334
+ if (origin_total !== _total) _item.modifyPrice = origin_total; //原价, 注意字段名反了
335
+ products.push(_item);
336
+ }
337
+ } catch (err) {
338
+ _iterator.e(err);
339
+ } finally {
340
+ _iterator.f();
341
+ }
342
+ console.log('formatedProducts', (_locales$getText = locales.getText('pisell2.product.card.cart-items')) === null || _locales$getText === void 0 ? void 0 : _locales$getText(products.length));
343
+ if (products.length > 0) {
344
+ var _locales$getText2;
345
+ fees.unshift({
346
+ title: locales.getText('pisell2.product.card.subtotal'),
347
+ price: total.productAmount,
348
+ type: 'subtotal',
349
+ message: (_locales$getText2 = locales.getText('pisell2.product.card.cart-items')) === null || _locales$getText2 === void 0 ? void 0 : _locales$getText2(products.length)
350
+ });
351
+ }
352
+ console.log('start post message, config:', {
353
+ module: 'cds',
354
+ key: 'cartUpdate',
355
+ data: {
356
+ currency_symbol: getSymbolic(),
357
+ total: total.productAmount,
358
+ // 小计
359
+ products: products,
360
+ fees: fees
361
+ }
362
+ });
363
+ interaction === null || interaction === void 0 || (_interaction$utils5 = interaction.utils) === null || _interaction$utils5 === void 0 || (_interaction$utils5$p = _interaction$utils5.postMessageToApp) === null || _interaction$utils5$p === void 0 || _interaction$utils5$p.call(_interaction$utils5, {
364
+ module: 'cds',
365
+ key: 'cartUpdate',
366
+ data: {
367
+ currency_symbol: getSymbolic(),
368
+ total: total.expectAmount,
369
+ // 小计
370
+ products: products,
371
+ fees: fees
372
+ }
373
+ });
374
+ }, [state === null || state === void 0 || (_state$modalState2 = state.modalState) === null || _state$modalState2 === void 0 || (_state$modalState2 = _state$modalState2.service) === null || _state$modalState2 === void 0 ? void 0 : _state$modalState2.value]);
375
+
257
376
  /**
258
377
  * 设置弹窗内的状态
259
378
  */
@@ -1,153 +1,171 @@
1
1
  declare const _default: {
2
2
  en: {
3
- "pisell2.ticket-booking.info": string;
4
- "pisell2.ticket-booking.notes": string;
5
- "pisell2.ticket-booking.forms": string;
6
- "pisell2.ticket-booking.sales": string;
7
- "pisell2.ticket-booking.payment": string;
8
- "pisell2.ticket-booking.unsaved-changes": string;
9
- "pisell2.ticket-booking.exit-confirm": string;
10
- "pisell2.ticket-booking.go-back": string;
11
- "pisell2.ticket-booking.exit": string;
12
- "pisell2.ticket-booking.deposit": string;
13
- "pisell2.ticket-booking.copy-success": string;
14
- "pisell2.ticket-booking.no-data": string;
15
- "pisell2.ticket-booking.authorized": string;
16
- "pisell2.ticket-booking.paid": string;
17
- "pisell2.ticket-booking.partially-paid": string;
18
- "pisell2.ticket-booking.partially-refunded": string;
19
- "pisell2.ticket-booking.payment-pending": string;
20
- "pisell2.ticket-booking.refunded": string;
21
- "pisell2.ticket-booking.unpaid": string;
22
- "pisell2.ticket-booking.voided": string;
23
- "pisell2.ticket-booking.pending": string;
24
- "pisell2.ticket-booking.all": string;
25
- "pisell2.ticket-booking.not-started": string;
26
- "pisell2.ticket-booking.started": string;
27
- "pisell2.ticket-booking.finished": string;
28
- "pisell2.ticket-booking.canceled": string;
29
- "pisell2.ticket-booking.inform": string;
30
- "pisell2.ticket-booking.check-management": string;
31
- "pisell2.ticket-booking.confirm": string;
32
- "pisell2.ticket-booking.dashboard": string;
33
- "pisell2.ticket-booking.booking-list": string;
34
- "pisell2.ticket-booking.full-data": string;
35
- "pisell2.ticket-booking.today": string;
36
- "pisell2.ticket-booking.now": string;
37
- "pisell2.ticket-booking.start-time": string;
38
- "pisell2.ticket-booking.create-time": string;
39
- "pisell2.ticket-booking.customer": string;
40
- "pisell2.ticket-booking.total": string;
41
- "pisell2.ticket-booking.search": string;
42
- "pisell2.ticket-booking.refresh-success": string;
43
- "pisell2.ticket-booking.loading": string;
44
- "pisell2.ticket-booking.appointment-not-found": string;
45
- "pisell2.ticket-booking.scan": string;
46
- "pisell2.ticket-booking.create-new": string;
47
- "pisell2.ticket-booking.add-to-cart": string;
48
- "pisell2.ticket-booking.not-available-title": string;
49
- "pisell2.ticket-booking.not-available-ok": string;
50
- "pisell2.ticket-booking.in-cart": (number: number) => string;
3
+ 'pisell2.ticket-booking.info': string;
4
+ 'pisell2.ticket-booking.notes': string;
5
+ 'pisell2.ticket-booking.forms': string;
6
+ 'pisell2.ticket-booking.sales': string;
7
+ 'pisell2.ticket-booking.payment': string;
8
+ 'pisell2.ticket-booking.unsaved-changes': string;
9
+ 'pisell2.ticket-booking.exit-confirm': string;
10
+ 'pisell2.ticket-booking.go-back': string;
11
+ 'pisell2.ticket-booking.exit': string;
12
+ 'pisell2.ticket-booking.deposit': string;
13
+ 'pisell2.ticket-booking.copy-success': string;
14
+ 'pisell2.ticket-booking.no-data': string;
15
+ 'pisell2.ticket-booking.authorized': string;
16
+ 'pisell2.ticket-booking.paid': string;
17
+ 'pisell2.ticket-booking.partially-paid': string;
18
+ 'pisell2.ticket-booking.partially-refunded': string;
19
+ 'pisell2.ticket-booking.payment-pending': string;
20
+ 'pisell2.ticket-booking.refunded': string;
21
+ 'pisell2.ticket-booking.unpaid': string;
22
+ 'pisell2.ticket-booking.voided': string;
23
+ 'pisell2.ticket-booking.pending': string;
24
+ 'pisell2.ticket-booking.all': string;
25
+ 'pisell2.ticket-booking.not-started': string;
26
+ 'pisell2.ticket-booking.started': string;
27
+ 'pisell2.ticket-booking.finished': string;
28
+ 'pisell2.ticket-booking.canceled': string;
29
+ 'pisell2.ticket-booking.inform': string;
30
+ 'pisell2.ticket-booking.check-management': string;
31
+ 'pisell2.ticket-booking.confirm': string;
32
+ 'pisell2.ticket-booking.dashboard': string;
33
+ 'pisell2.ticket-booking.booking-list': string;
34
+ 'pisell2.ticket-booking.full-data': string;
35
+ 'pisell2.ticket-booking.today': string;
36
+ 'pisell2.ticket-booking.now': string;
37
+ 'pisell2.ticket-booking.start-time': string;
38
+ 'pisell2.ticket-booking.create-time': string;
39
+ 'pisell2.ticket-booking.customer': string;
40
+ 'pisell2.ticket-booking.total': string;
41
+ 'pisell2.ticket-booking.search': string;
42
+ 'pisell2.ticket-booking.refresh-success': string;
43
+ 'pisell2.ticket-booking.loading': string;
44
+ 'pisell2.ticket-booking.appointment-not-found': string;
45
+ 'pisell2.ticket-booking.scan': string;
46
+ 'pisell2.ticket-booking.create-new': string;
47
+ 'pisell2.ticket-booking.add-to-cart': string;
48
+ 'pisell2.ticket-booking.not-available-title': string;
49
+ 'pisell2.ticket-booking.not-available-ok': string;
50
+ 'pisell2.ticket-booking.in-cart': (number: number) => string;
51
+ 'pisell2.product.card.cart-items': (number: number) => string;
52
+ 'pisell2.product.card.subtotal': string;
53
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
54
+ 'pisell2.product.card.day': (val: number) => string;
55
+ 'pisell2.product.card.day.event': (val: number) => string;
56
+ 'pisell2.product.card.minute': (val: number) => string;
51
57
  };
52
- "zh-CN": {
53
- "pisell2.ticket-booking.info": string;
54
- "pisell2.ticket-booking.notes": string;
55
- "pisell2.ticket-booking.forms": string;
56
- "pisell2.ticket-booking.sales": string;
57
- "pisell2.ticket-booking.payment": string;
58
- "pisell2.ticket-booking.unsaved-changes": string;
59
- "pisell2.ticket-booking.exit-confirm": string;
60
- "pisell2.ticket-booking.go-back": string;
61
- "pisell2.ticket-booking.exit": string;
62
- "pisell2.ticket-booking.deposit": string;
63
- "pisell2.ticket-booking.copy-success": string;
64
- "pisell2.ticket-booking.no-data": string;
65
- "pisell2.ticket-booking.authorized": string;
66
- "pisell2.ticket-booking.paid": string;
67
- "pisell2.ticket-booking.partially-paid": string;
68
- "pisell2.ticket-booking.partially-refunded": string;
69
- "pisell2.ticket-booking.payment-pending": string;
70
- "pisell2.ticket-booking.refunded": string;
71
- "pisell2.ticket-booking.unpaid": string;
72
- "pisell2.ticket-booking.voided": string;
73
- "pisell2.ticket-booking.pending": string;
74
- "pisell2.ticket-booking.all": string;
75
- "pisell2.ticket-booking.not-started": string;
76
- "pisell2.ticket-booking.started": string;
77
- "pisell2.ticket-booking.finished": string;
78
- "pisell2.ticket-booking.canceled": string;
79
- "pisell2.ticket-booking.inform": string;
80
- "pisell2.ticket-booking.check-management": string;
81
- "pisell2.ticket-booking.confirm": string;
82
- "pisell2.ticket-booking.dashboard": string;
83
- "pisell2.ticket-booking.booking-list": string;
84
- "pisell2.ticket-booking.full-data": string;
85
- "pisell2.ticket-booking.today": string;
86
- "pisell2.ticket-booking.now": string;
87
- "pisell2.ticket-booking.start-time": string;
88
- "pisell2.ticket-booking.create-time": string;
89
- "pisell2.ticket-booking.customer": string;
90
- "pisell2.ticket-booking.total": string;
91
- "pisell2.ticket-booking.search": string;
92
- "pisell2.ticket-booking.refresh-success": string;
93
- "pisell2.ticket-booking.loading": string;
94
- "pisell2.ticket-booking.appointment-not-found": string;
95
- "pisell2.ticket-booking.scan": string;
96
- "pisell2.ticket-booking.create-new": string;
97
- "pisell2.ticket-booking.add-to-cart": string;
98
- "pisell2.ticket-booking.not-available-title": string;
99
- "pisell2.ticket-booking.not-available-ok": string;
100
- "pisell2.ticket-booking.in-cart": (number: number) => string;
58
+ 'zh-CN': {
59
+ 'pisell2.ticket-booking.info': string;
60
+ 'pisell2.ticket-booking.notes': string;
61
+ 'pisell2.ticket-booking.forms': string;
62
+ 'pisell2.ticket-booking.sales': string;
63
+ 'pisell2.ticket-booking.payment': string;
64
+ 'pisell2.ticket-booking.unsaved-changes': string;
65
+ 'pisell2.ticket-booking.exit-confirm': string;
66
+ 'pisell2.ticket-booking.go-back': string;
67
+ 'pisell2.ticket-booking.exit': string;
68
+ 'pisell2.ticket-booking.deposit': string;
69
+ 'pisell2.ticket-booking.copy-success': string;
70
+ 'pisell2.ticket-booking.no-data': string;
71
+ 'pisell2.ticket-booking.authorized': string;
72
+ 'pisell2.ticket-booking.paid': string;
73
+ 'pisell2.ticket-booking.partially-paid': string;
74
+ 'pisell2.ticket-booking.partially-refunded': string;
75
+ 'pisell2.ticket-booking.payment-pending': string;
76
+ 'pisell2.ticket-booking.refunded': string;
77
+ 'pisell2.ticket-booking.unpaid': string;
78
+ 'pisell2.ticket-booking.voided': string;
79
+ 'pisell2.ticket-booking.pending': string;
80
+ 'pisell2.ticket-booking.all': string;
81
+ 'pisell2.ticket-booking.not-started': string;
82
+ 'pisell2.ticket-booking.started': string;
83
+ 'pisell2.ticket-booking.finished': string;
84
+ 'pisell2.ticket-booking.canceled': string;
85
+ 'pisell2.ticket-booking.inform': string;
86
+ 'pisell2.ticket-booking.check-management': string;
87
+ 'pisell2.ticket-booking.confirm': string;
88
+ 'pisell2.ticket-booking.dashboard': string;
89
+ 'pisell2.ticket-booking.booking-list': string;
90
+ 'pisell2.ticket-booking.full-data': string;
91
+ 'pisell2.ticket-booking.today': string;
92
+ 'pisell2.ticket-booking.now': string;
93
+ 'pisell2.ticket-booking.start-time': string;
94
+ 'pisell2.ticket-booking.create-time': string;
95
+ 'pisell2.ticket-booking.customer': string;
96
+ 'pisell2.ticket-booking.total': string;
97
+ 'pisell2.ticket-booking.search': string;
98
+ 'pisell2.ticket-booking.refresh-success': string;
99
+ 'pisell2.ticket-booking.loading': string;
100
+ 'pisell2.ticket-booking.appointment-not-found': string;
101
+ 'pisell2.ticket-booking.scan': string;
102
+ 'pisell2.ticket-booking.create-new': string;
103
+ 'pisell2.ticket-booking.add-to-cart': string;
104
+ 'pisell2.ticket-booking.not-available-title': string;
105
+ 'pisell2.ticket-booking.not-available-ok': string;
106
+ 'pisell2.product.card.cart-items': (number: number) => string;
107
+ 'pisell2.product.card.subtotal': string;
108
+ 'pisell2.ticket-booking.in-cart': (number: number) => string;
109
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
110
+ 'pisell2.product.card.day': (val: number) => string;
111
+ 'pisell2.product.card.day.event': (val: number) => string;
112
+ 'pisell2.product.card.minute': (val: number) => string;
101
113
  };
102
- "zh-HK": {
103
- "pisell2.ticket-booking.info": string;
104
- "pisell2.ticket-booking.notes": string;
105
- "pisell2.ticket-booking.forms": string;
106
- "pisell2.ticket-booking.sales": string;
107
- "pisell2.ticket-booking.payment": string;
108
- "pisell2.ticket-booking.unsaved-changes": string;
109
- "pisell2.ticket-booking.exit-confirm": string;
110
- "pisell2.ticket-booking.go-back": string;
111
- "pisell2.ticket-booking.exit": string;
112
- "pisell2.ticket-booking.deposit": string;
113
- "pisell2.ticket-booking.copy-success": string;
114
- "pisell2.ticket-booking.no-data": string;
115
- "pisell2.ticket-booking.authorized": string;
116
- "pisell2.ticket-booking.paid": string;
117
- "pisell2.ticket-booking.partially-paid": string;
118
- "pisell2.ticket-booking.partially-refunded": string;
119
- "pisell2.ticket-booking.payment-pending": string;
120
- "pisell2.ticket-booking.refunded": string;
121
- "pisell2.ticket-booking.unpaid": string;
122
- "pisell2.ticket-booking.voided": string;
123
- "pisell2.ticket-booking.pending": string;
124
- "pisell2.ticket-booking.all": string;
125
- "pisell2.ticket-booking.not-started": string;
126
- "pisell2.ticket-booking.started": string;
127
- "pisell2.ticket-booking.finished": string;
128
- "pisell2.ticket-booking.canceled": string;
129
- "pisell2.ticket-booking.inform": string;
130
- "pisell2.ticket-booking.check-management": string;
131
- "pisell2.ticket-booking.confirm": string;
132
- "pisell2.ticket-booking.dashboard": string;
133
- "pisell2.ticket-booking.booking-list": string;
134
- "pisell2.ticket-booking.full-data": string;
135
- "pisell2.ticket-booking.today": string;
136
- "pisell2.ticket-booking.now": string;
137
- "pisell2.ticket-booking.start-time": string;
138
- "pisell2.ticket-booking.create-time": string;
139
- "pisell2.ticket-booking.customer": string;
140
- "pisell2.ticket-booking.total": string;
141
- "pisell2.ticket-booking.search": string;
142
- "pisell2.ticket-booking.refresh-success": string;
143
- "pisell2.ticket-booking.loading": string;
144
- "pisell2.ticket-booking.appointment-not-found": string;
145
- "pisell2.ticket-booking.scan": string;
146
- "pisell2.ticket-booking.create-new": string;
147
- "pisell2.ticket-booking.add-to-cart": string;
148
- "pisell2.ticket-booking.not-available-title": string;
149
- "pisell2.ticket-booking.not-available-ok": string;
150
- "pisell2.ticket-booking.in-cart": (number: number) => string;
114
+ 'zh-HK': {
115
+ 'pisell2.ticket-booking.info': string;
116
+ 'pisell2.ticket-booking.notes': string;
117
+ 'pisell2.ticket-booking.forms': string;
118
+ 'pisell2.ticket-booking.sales': string;
119
+ 'pisell2.ticket-booking.payment': string;
120
+ 'pisell2.ticket-booking.unsaved-changes': string;
121
+ 'pisell2.ticket-booking.exit-confirm': string;
122
+ 'pisell2.ticket-booking.go-back': string;
123
+ 'pisell2.ticket-booking.exit': string;
124
+ 'pisell2.ticket-booking.deposit': string;
125
+ 'pisell2.ticket-booking.copy-success': string;
126
+ 'pisell2.ticket-booking.no-data': string;
127
+ 'pisell2.ticket-booking.authorized': string;
128
+ 'pisell2.ticket-booking.paid': string;
129
+ 'pisell2.ticket-booking.partially-paid': string;
130
+ 'pisell2.ticket-booking.partially-refunded': string;
131
+ 'pisell2.ticket-booking.payment-pending': string;
132
+ 'pisell2.ticket-booking.refunded': string;
133
+ 'pisell2.ticket-booking.unpaid': string;
134
+ 'pisell2.ticket-booking.voided': string;
135
+ 'pisell2.ticket-booking.pending': string;
136
+ 'pisell2.ticket-booking.all': string;
137
+ 'pisell2.ticket-booking.not-started': string;
138
+ 'pisell2.ticket-booking.started': string;
139
+ 'pisell2.ticket-booking.finished': string;
140
+ 'pisell2.ticket-booking.canceled': string;
141
+ 'pisell2.ticket-booking.inform': string;
142
+ 'pisell2.ticket-booking.check-management': string;
143
+ 'pisell2.ticket-booking.confirm': string;
144
+ 'pisell2.ticket-booking.dashboard': string;
145
+ 'pisell2.ticket-booking.booking-list': string;
146
+ 'pisell2.ticket-booking.full-data': string;
147
+ 'pisell2.ticket-booking.today': string;
148
+ 'pisell2.ticket-booking.now': string;
149
+ 'pisell2.ticket-booking.start-time': string;
150
+ 'pisell2.ticket-booking.create-time': string;
151
+ 'pisell2.ticket-booking.customer': string;
152
+ 'pisell2.ticket-booking.total': string;
153
+ 'pisell2.ticket-booking.search': string;
154
+ 'pisell2.ticket-booking.refresh-success': string;
155
+ 'pisell2.ticket-booking.loading': string;
156
+ 'pisell2.ticket-booking.appointment-not-found': string;
157
+ 'pisell2.ticket-booking.scan': string;
158
+ 'pisell2.ticket-booking.create-new': string;
159
+ 'pisell2.ticket-booking.add-to-cart': string;
160
+ 'pisell2.ticket-booking.not-available-title': string;
161
+ 'pisell2.ticket-booking.not-available-ok': string;
162
+ 'pisell2.ticket-booking.in-cart': (number: number) => string;
163
+ 'pisell2.product.card.cart-items': (number: number) => string;
164
+ 'pisell2.product.card.subtotal': string;
165
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
166
+ 'pisell2.product.card.day': (val: number) => string;
167
+ 'pisell2.product.card.day.event': (val: number) => string;
168
+ 'pisell2.product.card.minute': (val: number) => string;
151
169
  };
152
170
  };
153
171
  export default _default;