@pisell/pisellos 2.0.20 → 2.0.22

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.
@@ -22,4 +22,5 @@ export declare class AccountModule extends BaseModule implements Module {
22
22
  setAccountInfo(account: Account): void;
23
23
  setActive(active: boolean): void;
24
24
  isActive(): boolean;
25
+ isLogin(): boolean;
25
26
  }
@@ -162,6 +162,12 @@ export var AccountModule = /*#__PURE__*/function (_BaseModule) {
162
162
  value: function isActive() {
163
163
  return this.store.active;
164
164
  }
165
+ }, {
166
+ key: "isLogin",
167
+ value: function isLogin() {
168
+ var _this$store$accountIn2;
169
+ return ((_this$store$accountIn2 = this.store.accountInfo) === null || _this$store$accountIn2 === void 0 ? void 0 : _this$store$accountIn2.isLogin) || false;
170
+ }
165
171
  }]);
166
172
  return AccountModule;
167
173
  }(BaseModule);
@@ -27,6 +27,8 @@ export interface Account {
27
27
  type?: 'account' | 'holder';
28
28
  /** 账户信息原始数据 */
29
29
  _origin?: Record<string, any>;
30
+ /** 是否是登录账号 */
31
+ isLogin?: boolean;
30
32
  }
31
33
  /**
32
34
  * 账户模块状态
@@ -42,4 +42,5 @@ export declare class AccountListModule extends BaseModule implements Module {
42
42
  * @param params
43
43
  */
44
44
  fetchHolderAccounts(params: IFetchHolderAccountsParams): Promise<void>;
45
+ getLoginAccount(): AccountModule | undefined;
45
46
  }
@@ -554,6 +554,13 @@ export var AccountListModule = /*#__PURE__*/function (_BaseModule) {
554
554
  }
555
555
  return fetchHolderAccounts;
556
556
  }())
557
+ }, {
558
+ key: "getLoginAccount",
559
+ value: function getLoginAccount() {
560
+ return this.store.accounts.find(function (n) {
561
+ return n.isLogin();
562
+ });
563
+ }
557
564
  }]);
558
565
  return AccountListModule;
559
566
  }(BaseModule);
@@ -18,6 +18,7 @@ export declare class Product extends BaseModule implements Module {
18
18
  protected otherParams: any;
19
19
  constructor(name?: string, version?: string);
20
20
  initialize(core: PisellCore, options: any): Promise<void>;
21
+ updateData(data: ProductData): void;
21
22
  /**
22
23
  * 获取商品数据
23
24
  */
@@ -62,6 +62,12 @@ export var Product = /*#__PURE__*/function (_BaseModule) {
62
62
  }
63
63
  return initialize;
64
64
  }()
65
+ }, {
66
+ key: "updateData",
67
+ value: function updateData(data) {
68
+ Object.assign(this.store, data);
69
+ }
70
+
65
71
  /**
66
72
  * 获取商品数据
67
73
  */
@@ -7,9 +7,16 @@ export declare class ProductList extends BaseModule implements Module {
7
7
  protected defaultName: string;
8
8
  protected defaultVersion: string;
9
9
  private store;
10
+ private request;
10
11
  constructor(name?: string, version?: string);
11
12
  initialize(core: PisellCore, options: any): Promise<void>;
12
13
  storeChange(path?: string, value?: any): Promise<void>;
14
+ loadProductsPrice({ ids, customer_id, schedule_date, channel, }: {
15
+ ids?: number[];
16
+ customer_id?: number;
17
+ schedule_date?: string;
18
+ channel?: string;
19
+ }): Promise<any>;
13
20
  getProducts(): Promise<ProductData[]>;
14
21
  getProduct(id: number): Promise<Product | undefined>;
15
22
  addProduct(products: ProductData[]): Promise<void>;
@@ -1,10 +1,4 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
- 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); }
5
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
7
- 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; }
8
2
  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; }
9
3
  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); } }
10
4
  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); }); }; }
@@ -36,6 +30,7 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
36
30
  _defineProperty(_assertThisInitialized(_this), "defaultName", 'productList');
37
31
  _defineProperty(_assertThisInitialized(_this), "defaultVersion", '1.0.0');
38
32
  _defineProperty(_assertThisInitialized(_this), "store", void 0);
33
+ _defineProperty(_assertThisInitialized(_this), "request", void 0);
39
34
  return _this;
40
35
  }
41
36
  _createClass(ProductList, [{
@@ -57,7 +52,8 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
57
52
  this.store.productMap = new Map();
58
53
  this.store.selectProducts = [];
59
54
  }
60
- case 3:
55
+ this.request = core.getPlugin('request');
56
+ case 4:
61
57
  case "end":
62
58
  return _context.stop();
63
59
  }
@@ -78,12 +74,15 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
78
74
  while (1) switch (_context2.prev = _context2.next) {
79
75
  case 0:
80
76
  (_this$store$list = this.store.list) === null || _this$store$list === void 0 || _this$store$list.forEach(function (product) {
81
- if (!_this2.store.productMap.has("product-".concat(product.id))) {
77
+ var productModule = _this2.store.productMap.get("product-".concat(product.id));
78
+ if (!productModule) {
82
79
  var newProductModule = new Product("product_".concat(product.id.toString()));
83
80
  _this2.core.registerModule(newProductModule, {
84
81
  initialState: product
85
82
  });
86
83
  _this2.store.productMap.set(product.id.toString(), newProductModule);
84
+ } else {
85
+ productModule.updateData(product);
87
86
  }
88
87
  });
89
88
  case 1:
@@ -98,22 +97,54 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
98
97
  return storeChange;
99
98
  }()
100
99
  }, {
101
- key: "getProducts",
100
+ key: "loadProductsPrice",
102
101
  value: function () {
103
- var _getProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
102
+ var _loadProductsPrice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref) {
103
+ var _ref$ids, ids, customer_id, schedule_date, channel, productsData;
104
104
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
105
105
  while (1) switch (_context3.prev = _context3.next) {
106
106
  case 0:
107
- _context3.next = 2;
108
- return this.core.effects.emit(ProductListHooks.onGetProducts, this.store.list);
109
- case 2:
110
- return _context3.abrupt("return", cloneDeep(this.store.list));
107
+ _ref$ids = _ref.ids, ids = _ref$ids === void 0 ? [] : _ref$ids, customer_id = _ref.customer_id, schedule_date = _ref.schedule_date, channel = _ref.channel;
108
+ _context3.next = 3;
109
+ return this.request.post("/product/query/price", {
110
+ ids: ids,
111
+ customer_id: customer_id,
112
+ schedule_date: schedule_date,
113
+ channel: channel
114
+ }, {
115
+ useCache: true
116
+ });
111
117
  case 3:
118
+ productsData = _context3.sent;
119
+ return _context3.abrupt("return", productsData.data);
120
+ case 5:
112
121
  case "end":
113
122
  return _context3.stop();
114
123
  }
115
124
  }, _callee3, this);
116
125
  }));
126
+ function loadProductsPrice(_x5) {
127
+ return _loadProductsPrice.apply(this, arguments);
128
+ }
129
+ return loadProductsPrice;
130
+ }()
131
+ }, {
132
+ key: "getProducts",
133
+ value: function () {
134
+ var _getProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
135
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
136
+ while (1) switch (_context4.prev = _context4.next) {
137
+ case 0:
138
+ _context4.next = 2;
139
+ return this.core.effects.emit(ProductListHooks.onGetProducts, this.store.list);
140
+ case 2:
141
+ return _context4.abrupt("return", cloneDeep(this.store.list));
142
+ case 3:
143
+ case "end":
144
+ return _context4.stop();
145
+ }
146
+ }, _callee4, this);
147
+ }));
117
148
  function getProducts() {
118
149
  return _getProducts.apply(this, arguments);
119
150
  }
@@ -122,29 +153,29 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
122
153
  }, {
123
154
  key: "getProduct",
124
155
  value: function () {
125
- var _getProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(id) {
156
+ var _getProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(id) {
126
157
  var product;
127
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
128
- while (1) switch (_context4.prev = _context4.next) {
158
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
159
+ while (1) switch (_context5.prev = _context5.next) {
129
160
  case 0:
130
- _context4.next = 2;
161
+ _context5.next = 2;
131
162
  return this.core.effects.emit(ProductListHooks.onGetProduct, this.store.list);
132
163
  case 2:
133
164
  product = this.store.productMap.get("".concat(id));
134
165
  if (!product) {
135
- _context4.next = 5;
166
+ _context5.next = 5;
136
167
  break;
137
168
  }
138
- return _context4.abrupt("return", product);
169
+ return _context5.abrupt("return", product);
139
170
  case 5:
140
- return _context4.abrupt("return", undefined);
171
+ return _context5.abrupt("return", undefined);
141
172
  case 6:
142
173
  case "end":
143
- return _context4.stop();
174
+ return _context5.stop();
144
175
  }
145
- }, _callee4, this);
176
+ }, _callee5, this);
146
177
  }));
147
- function getProduct(_x5) {
178
+ function getProduct(_x6) {
148
179
  return _getProduct.apply(this, arguments);
149
180
  }
150
181
  return getProduct;
@@ -152,19 +183,34 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
152
183
  }, {
153
184
  key: "addProduct",
154
185
  value: function () {
155
- var _addProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(products) {
156
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
157
- while (1) switch (_context5.prev = _context5.next) {
186
+ var _addProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(products) {
187
+ var _this3 = this;
188
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
189
+ while (1) switch (_context6.prev = _context6.next) {
158
190
  case 0:
159
191
  // 加到 list 以后上面的storeChange 会自动初始化商品详情的 module 实例
160
- this.store.list = [].concat(_toConsumableArray(this.store.list), _toConsumableArray(products));
161
- case 1:
192
+ // list 需要根据 id 去重
193
+ if (!this.store.list) {
194
+ this.store.list = [];
195
+ }
196
+ products.forEach(function (n) {
197
+ var index = _this3.store.list.findIndex(function (m) {
198
+ return m.id === n.id;
199
+ });
200
+ if (index === -1) {
201
+ _this3.store.list.push(n);
202
+ } else {
203
+ _this3.store.list[index] = n;
204
+ }
205
+ });
206
+ this.storeChange();
207
+ case 3:
162
208
  case "end":
163
- return _context5.stop();
209
+ return _context6.stop();
164
210
  }
165
- }, _callee5, this);
211
+ }, _callee6, this);
166
212
  }));
167
- function addProduct(_x6) {
213
+ function addProduct(_x7) {
168
214
  return _addProduct.apply(this, arguments);
169
215
  }
170
216
  return addProduct;
@@ -172,18 +218,18 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
172
218
  }, {
173
219
  key: "selectProducts",
174
220
  value: function () {
175
- var _selectProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(products) {
176
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
177
- while (1) switch (_context6.prev = _context6.next) {
221
+ var _selectProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(products) {
222
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
223
+ while (1) switch (_context7.prev = _context7.next) {
178
224
  case 0:
179
225
  this.store.selectProducts = products;
180
226
  case 1:
181
227
  case "end":
182
- return _context6.stop();
228
+ return _context7.stop();
183
229
  }
184
- }, _callee6, this);
230
+ }, _callee7, this);
185
231
  }));
186
- function selectProducts(_x7) {
232
+ function selectProducts(_x8) {
187
233
  return _selectProducts.apply(this, arguments);
188
234
  }
189
235
  return selectProducts;
@@ -0,0 +1,7 @@
1
+ import { Plugin } from '../types';
2
+ /**
3
+ * UserPlugin 接口定义
4
+ */
5
+ export interface UserPlugin extends Plugin {
6
+ get(): Record<string, any>;
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -54,6 +54,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
54
54
  product_ids?: number[];
55
55
  category_ids?: number[];
56
56
  }): Promise<any>;
57
+ updateQuotationPriceAndCart(date: string): Promise<void>;
57
58
  loadAllSchedule(): Promise<void>;
58
59
  loadScheduleAvailableDate({ startDate, endDate, custom_page_id, channel, }: {
59
60
  startDate: string;
@@ -185,10 +186,11 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
185
186
  private getScheduleDataByIds;
186
187
  openProductDetail(productId: number): Promise<void>;
187
188
  closeProductDetail(): void;
188
- getTimeslotBySchedule({ date, scheduleIds, resources, }: {
189
+ getTimeslotBySchedule({ date, scheduleIds, resources, product }: {
189
190
  date: string;
190
191
  scheduleIds?: number[];
191
192
  resources?: ProductResourceItem[];
193
+ product?: ProductData;
192
194
  }): {
193
195
  start_time: string;
194
196
  end_time: string;