@pisell/pisellos 0.0.225 → 0.0.226
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/ProductList/index.d.ts +1 -0
- package/dist/modules/ProductList/index.js +10 -5
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/lib/modules/ProductList/index.d.ts +1 -0
- package/lib/modules/ProductList/index.js +6 -2
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ export declare class ProductList extends BaseModule implements Module {
|
|
|
8
8
|
protected defaultVersion: string;
|
|
9
9
|
private store;
|
|
10
10
|
private request;
|
|
11
|
+
private otherParams;
|
|
11
12
|
constructor(name?: string, version?: string);
|
|
12
13
|
initialize(core: PisellCore, options: any): Promise<void>;
|
|
13
14
|
storeChange(path?: string, value?: any): Promise<void>;
|
|
@@ -31,6 +31,7 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
31
31
|
_defineProperty(_assertThisInitialized(_this), "defaultVersion", '1.0.0');
|
|
32
32
|
_defineProperty(_assertThisInitialized(_this), "store", void 0);
|
|
33
33
|
_defineProperty(_assertThisInitialized(_this), "request", void 0);
|
|
34
|
+
_defineProperty(_assertThisInitialized(_this), "otherParams", {});
|
|
34
35
|
return _this;
|
|
35
36
|
}
|
|
36
37
|
_createClass(ProductList, [{
|
|
@@ -43,6 +44,7 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
43
44
|
case 0:
|
|
44
45
|
this.core = core;
|
|
45
46
|
this.store = options.store;
|
|
47
|
+
this.otherParams = options.otherParams || {};
|
|
46
48
|
if (Array.isArray((_options$initialState = options.initialState) === null || _options$initialState === void 0 ? void 0 : _options$initialState.list)) {
|
|
47
49
|
this.store.list = options.initialState.list;
|
|
48
50
|
this.core.effects.emit("".concat(this.name, ":changed"), this.store.list);
|
|
@@ -53,7 +55,7 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
53
55
|
this.store.selectProducts = [];
|
|
54
56
|
}
|
|
55
57
|
this.request = core.getPlugin('request');
|
|
56
|
-
case
|
|
58
|
+
case 5:
|
|
57
59
|
case "end":
|
|
58
60
|
return _context.stop();
|
|
59
61
|
}
|
|
@@ -100,6 +102,7 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
100
102
|
key: "loadProducts",
|
|
101
103
|
value: function () {
|
|
102
104
|
var _loadProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref) {
|
|
105
|
+
var _this$otherParams;
|
|
103
106
|
var _ref$category_ids, category_ids, _ref$product_ids, product_ids, _ref$collection, collection, _ref$menu_list_ids, menu_list_ids, paramsCustomerId, _ref$with_count, with_count, schedule_datetime, schedule_date, cacheId, with_schedule, userPlugin, customer_id, _userPlugin$get, productsData;
|
|
104
107
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
105
108
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -124,8 +127,9 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
124
127
|
} catch (error) {
|
|
125
128
|
console.error(error);
|
|
126
129
|
}
|
|
130
|
+
debugger;
|
|
127
131
|
// 如果没传schedule_date,则从
|
|
128
|
-
_context3.next =
|
|
132
|
+
_context3.next = 7;
|
|
129
133
|
return this.request.post("/product/query", {
|
|
130
134
|
open_quotation: 1,
|
|
131
135
|
open_bundle: 0,
|
|
@@ -144,15 +148,16 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
144
148
|
// client_schedule_ids: schedule_ids,
|
|
145
149
|
schedule_date: schedule_date,
|
|
146
150
|
with_schedule: with_schedule,
|
|
147
|
-
schedule_datetime: schedule_datetime
|
|
151
|
+
schedule_datetime: schedule_datetime,
|
|
152
|
+
application_code: (_this$otherParams = this.otherParams) === null || _this$otherParams === void 0 ? void 0 : _this$otherParams.channel
|
|
148
153
|
}, {
|
|
149
154
|
useCache: true
|
|
150
155
|
});
|
|
151
|
-
case
|
|
156
|
+
case 7:
|
|
152
157
|
productsData = _context3.sent;
|
|
153
158
|
this.addProduct(productsData.data.list);
|
|
154
159
|
return _context3.abrupt("return", productsData.data.list);
|
|
155
|
-
case
|
|
160
|
+
case 10:
|
|
156
161
|
case "end":
|
|
157
162
|
return _context3.stop();
|
|
158
163
|
}
|
|
@@ -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, "skip" | "num">;
|
|
115
115
|
/**
|
|
116
116
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
117
117
|
* @returns 客户状态
|
|
@@ -8,6 +8,7 @@ export declare class ProductList extends BaseModule implements Module {
|
|
|
8
8
|
protected defaultVersion: string;
|
|
9
9
|
private store;
|
|
10
10
|
private request;
|
|
11
|
+
private otherParams;
|
|
11
12
|
constructor(name?: string, version?: string);
|
|
12
13
|
initialize(core: PisellCore, options: any): Promise<void>;
|
|
13
14
|
storeChange(path?: string, value?: any): Promise<void>;
|
|
@@ -33,11 +33,13 @@ var ProductList = class extends import_BaseModule.BaseModule {
|
|
|
33
33
|
super(name, version);
|
|
34
34
|
this.defaultName = "productList";
|
|
35
35
|
this.defaultVersion = "1.0.0";
|
|
36
|
+
this.otherParams = {};
|
|
36
37
|
}
|
|
37
38
|
async initialize(core, options) {
|
|
38
39
|
var _a;
|
|
39
40
|
this.core = core;
|
|
40
41
|
this.store = options.store;
|
|
42
|
+
this.otherParams = options.otherParams || {};
|
|
41
43
|
if (Array.isArray((_a = options.initialState) == null ? void 0 : _a.list)) {
|
|
42
44
|
this.store.list = options.initialState.list;
|
|
43
45
|
this.core.effects.emit(`${this.name}:changed`, this.store.list);
|
|
@@ -76,7 +78,7 @@ var ProductList = class extends import_BaseModule.BaseModule {
|
|
|
76
78
|
cacheId,
|
|
77
79
|
with_schedule
|
|
78
80
|
}) {
|
|
79
|
-
var _a;
|
|
81
|
+
var _a, _b;
|
|
80
82
|
let userPlugin = this.core.getPlugin("user");
|
|
81
83
|
let customer_id = void 0;
|
|
82
84
|
try {
|
|
@@ -84,6 +86,7 @@ var ProductList = class extends import_BaseModule.BaseModule {
|
|
|
84
86
|
} catch (error) {
|
|
85
87
|
console.error(error);
|
|
86
88
|
}
|
|
89
|
+
debugger;
|
|
87
90
|
const productsData = await this.request.post(
|
|
88
91
|
`/product/query`,
|
|
89
92
|
{
|
|
@@ -111,7 +114,8 @@ var ProductList = class extends import_BaseModule.BaseModule {
|
|
|
111
114
|
// client_schedule_ids: schedule_ids,
|
|
112
115
|
schedule_date,
|
|
113
116
|
with_schedule,
|
|
114
|
-
schedule_datetime
|
|
117
|
+
schedule_datetime,
|
|
118
|
+
application_code: (_b = this.otherParams) == null ? void 0 : _b.channel
|
|
115
119
|
},
|
|
116
120
|
{ useCache: true }
|
|
117
121
|
);
|
|
@@ -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, "skip" | "num">;
|
|
115
115
|
/**
|
|
116
116
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
117
117
|
* @returns 客户状态
|