@pisell/pisellos 0.0.227 → 0.0.228
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.
- package/dist/modules/BaseModule.js +10 -8
- package/dist/modules/ProductList/index.js +3 -4
- package/dist/solution/BookingByStep/index.js +4 -1
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/lib/modules/BaseModule.js +3 -1
- package/lib/modules/ProductList/index.js +0 -1
- package/lib/solution/BookingByStep/index.js +4 -1
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
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 ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
5
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
@@ -39,7 +41,7 @@ export var BaseModule = /*#__PURE__*/function () {
|
|
|
39
41
|
var currentCacheData = window.sessionStorage.getItem(fatherModule);
|
|
40
42
|
var currentCacheDataObj = JSON.parse(currentCacheData || '{}');
|
|
41
43
|
if (!currentCacheData || !currentCacheDataObj[cacheId]) {
|
|
42
|
-
currentCacheDataObj = _defineProperty({}, cacheId, _defineProperty({}, this.name, {}));
|
|
44
|
+
currentCacheDataObj = _objectSpread(_defineProperty({}, cacheId, _defineProperty({}, this.name, {})), currentCacheDataObj);
|
|
43
45
|
}
|
|
44
46
|
if (!currentCacheDataObj[cacheId][this.name]) {
|
|
45
47
|
currentCacheDataObj[cacheId][this.name] = {};
|
|
@@ -50,17 +52,17 @@ export var BaseModule = /*#__PURE__*/function () {
|
|
|
50
52
|
window.sessionStorage.setItem(fatherModule, JSON.stringify(currentCacheDataObj));
|
|
51
53
|
} else {
|
|
52
54
|
var _currentCacheData = window.sessionStorage.getItem(cacheId);
|
|
53
|
-
var
|
|
54
|
-
if (!
|
|
55
|
-
|
|
55
|
+
var _currentCacheDataObj = JSON.parse(_currentCacheData || '{}');
|
|
56
|
+
if (!_currentCacheDataObj) {
|
|
57
|
+
_currentCacheDataObj = {};
|
|
56
58
|
}
|
|
57
|
-
if (!
|
|
58
|
-
|
|
59
|
+
if (!_currentCacheDataObj[this.name]) {
|
|
60
|
+
_currentCacheDataObj[this.name] = {};
|
|
59
61
|
}
|
|
60
62
|
cacheKey.forEach(function (key) {
|
|
61
|
-
|
|
63
|
+
_currentCacheDataObj[_this.name][key] = store[key];
|
|
62
64
|
});
|
|
63
|
-
window.sessionStorage.setItem(cacheId, JSON.stringify(
|
|
65
|
+
window.sessionStorage.setItem(cacheId, JSON.stringify(_currentCacheDataObj));
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
}
|
|
@@ -111,9 +111,8 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
111
111
|
} catch (error) {
|
|
112
112
|
console.error(error);
|
|
113
113
|
}
|
|
114
|
-
debugger;
|
|
115
114
|
// 如果没传schedule_date,则从
|
|
116
|
-
_context3.next =
|
|
115
|
+
_context3.next = 6;
|
|
117
116
|
return this.request.post("/product/query", {
|
|
118
117
|
open_quotation: 1,
|
|
119
118
|
open_bundle: 0,
|
|
@@ -137,14 +136,14 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
137
136
|
}, {
|
|
138
137
|
useCache: true
|
|
139
138
|
});
|
|
140
|
-
case
|
|
139
|
+
case 6:
|
|
141
140
|
productsData = _context3.sent;
|
|
142
141
|
sortedList = (productsData.data.list || []).slice().sort(function (a, b) {
|
|
143
142
|
return Number(b.sort) - Number(a.sort);
|
|
144
143
|
});
|
|
145
144
|
this.addProduct(sortedList);
|
|
146
145
|
return _context3.abrupt("return", sortedList);
|
|
147
|
-
case
|
|
146
|
+
case 10:
|
|
148
147
|
case "end":
|
|
149
148
|
return _context3.stop();
|
|
150
149
|
}
|
|
@@ -1417,13 +1417,16 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1417
1417
|
}, {
|
|
1418
1418
|
key: "destroy",
|
|
1419
1419
|
value: function destroy() {
|
|
1420
|
-
var _this$store$cart, _this$store$step, _this$store$products, _this$store$guests, _this$store$date, _this$store$accountLi;
|
|
1420
|
+
var _this$store$cart, _this$store$step, _this$store$products, _this$store$guests, _this$store$date, _this$store$accountLi, _this$store$schedule, _this$store$summary, _this$store$order;
|
|
1421
1421
|
(_this$store$cart = this.store.cart) === null || _this$store$cart === void 0 || _this$store$cart.destroy();
|
|
1422
1422
|
(_this$store$step = this.store.step) === null || _this$store$step === void 0 || _this$store$step.destroy();
|
|
1423
1423
|
(_this$store$products = this.store.products) === null || _this$store$products === void 0 || _this$store$products.destroy();
|
|
1424
1424
|
(_this$store$guests = this.store.guests) === null || _this$store$guests === void 0 || _this$store$guests.destroy();
|
|
1425
1425
|
(_this$store$date = this.store.date) === null || _this$store$date === void 0 || _this$store$date.destroy();
|
|
1426
1426
|
(_this$store$accountLi = this.store.accountList) === null || _this$store$accountLi === void 0 || _this$store$accountLi.destroy();
|
|
1427
|
+
(_this$store$schedule = this.store.schedule) === null || _this$store$schedule === void 0 || _this$store$schedule.destroy();
|
|
1428
|
+
(_this$store$summary = this.store.summary) === null || _this$store$summary === void 0 || _this$store$summary.destroy();
|
|
1429
|
+
(_this$store$order = this.store.order) === null || _this$store$order === void 0 || _this$store$order.destroy();
|
|
1427
1430
|
this.core.effects.offByModuleDestroy(this.name);
|
|
1428
1431
|
this.core.unregisterModule(this);
|
|
1429
1432
|
}
|
|
@@ -111,7 +111,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
|
|
|
111
111
|
* 获取当前的客户搜索条件
|
|
112
112
|
* @returns 当前搜索条件
|
|
113
113
|
*/
|
|
114
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
114
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
|
|
115
115
|
/**
|
|
116
116
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
117
117
|
* @returns 客户状态
|
|
@@ -808,13 +808,16 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
808
808
|
return errorCartItemIds;
|
|
809
809
|
}
|
|
810
810
|
destroy() {
|
|
811
|
-
var _a, _b, _c, _d, _e, _f;
|
|
811
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
812
812
|
(_a = this.store.cart) == null ? void 0 : _a.destroy();
|
|
813
813
|
(_b = this.store.step) == null ? void 0 : _b.destroy();
|
|
814
814
|
(_c = this.store.products) == null ? void 0 : _c.destroy();
|
|
815
815
|
(_d = this.store.guests) == null ? void 0 : _d.destroy();
|
|
816
816
|
(_e = this.store.date) == null ? void 0 : _e.destroy();
|
|
817
817
|
(_f = this.store.accountList) == null ? void 0 : _f.destroy();
|
|
818
|
+
(_g = this.store.schedule) == null ? void 0 : _g.destroy();
|
|
819
|
+
(_h = this.store.summary) == null ? void 0 : _h.destroy();
|
|
820
|
+
(_i = this.store.order) == null ? void 0 : _i.destroy();
|
|
818
821
|
this.core.effects.offByModuleDestroy(this.name);
|
|
819
822
|
this.core.unregisterModule(this);
|
|
820
823
|
}
|
|
@@ -111,7 +111,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
|
|
|
111
111
|
* 获取当前的客户搜索条件
|
|
112
112
|
* @returns 当前搜索条件
|
|
113
113
|
*/
|
|
114
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
114
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
|
|
115
115
|
/**
|
|
116
116
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
117
117
|
* @returns 客户状态
|