@pisell/pisellos 0.0.340 → 0.0.341
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/Product/index.d.ts +1 -1
- package/dist/modules/ProductList/index.js +8 -1
- package/dist/solution/BookingByStep/index.js +1 -1
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/modules/ProductList/index.js +7 -0
- package/lib/solution/BookingByStep/index.js +1 -1
- package/lib/solution/BookingTicket/index.js +6 -0
- package/package.json +1 -1
|
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
|
|
|
49
49
|
getCategories(): ProductCategory[];
|
|
50
50
|
setOtherParams(key: string, value: any): void;
|
|
51
51
|
getOtherParams(): any;
|
|
52
|
-
getProductType(): "
|
|
52
|
+
getProductType(): "duration" | "session" | "normal";
|
|
53
53
|
}
|
|
@@ -141,9 +141,16 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
141
141
|
sortedList = (productsData.data.list || []).slice().sort(function (a, b) {
|
|
142
142
|
return Number(b.sort) - Number(a.sort);
|
|
143
143
|
});
|
|
144
|
+
if (sortedList.length) {
|
|
145
|
+
sortedList.forEach(function (n) {
|
|
146
|
+
if (n.is_eject !== 1 && n['schedule.ids'] && n['schedule.ids'].length) {
|
|
147
|
+
n.is_eject = 1;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
144
151
|
this.addProduct(sortedList);
|
|
145
152
|
return _context3.abrupt("return", sortedList);
|
|
146
|
-
case
|
|
153
|
+
case 11:
|
|
147
154
|
case "end":
|
|
148
155
|
return _context3.stop();
|
|
149
156
|
}
|
|
@@ -1197,7 +1197,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1197
1197
|
date: date
|
|
1198
1198
|
});
|
|
1199
1199
|
// 如果 quantity 大于 1,且是预约商品,则进入购物车拆散成多条数据
|
|
1200
|
-
if (addItemParams.quantity > 1 && !isNormalProduct(productData
|
|
1200
|
+
if (addItemParams.quantity > 1 && !isNormalProduct(productData)) {
|
|
1201
1201
|
for (var i = 0; i < addItemParams.quantity; i++) {
|
|
1202
1202
|
var newAddItemParams = cloneDeep(addItemParams);
|
|
1203
1203
|
newAddItemParams.quantity = 1;
|
|
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
|
|
|
49
49
|
getCategories(): ProductCategory[];
|
|
50
50
|
setOtherParams(key: string, value: any): void;
|
|
51
51
|
getOtherParams(): any;
|
|
52
|
-
getProductType(): "
|
|
52
|
+
getProductType(): "duration" | "session" | "normal";
|
|
53
53
|
}
|
|
@@ -103,6 +103,13 @@ var ProductList = class extends import_BaseModule.BaseModule {
|
|
|
103
103
|
{ useCache: true }
|
|
104
104
|
);
|
|
105
105
|
const sortedList = (productsData.data.list || []).slice().sort((a, b) => Number(b.sort) - Number(a.sort));
|
|
106
|
+
if (sortedList.length) {
|
|
107
|
+
sortedList.forEach((n) => {
|
|
108
|
+
if (n.is_eject !== 1 && n["schedule.ids"] && n["schedule.ids"].length) {
|
|
109
|
+
n.is_eject = 1;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
106
113
|
this.addProduct(sortedList);
|
|
107
114
|
return sortedList;
|
|
108
115
|
}
|
|
@@ -637,7 +637,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
637
637
|
addItemParams.account = account;
|
|
638
638
|
}
|
|
639
639
|
this.addProductCheck({ date });
|
|
640
|
-
if (addItemParams.quantity > 1 && !(0, import_utils5.isNormalProduct)(productData
|
|
640
|
+
if (addItemParams.quantity > 1 && !(0, import_utils5.isNormalProduct)(productData)) {
|
|
641
641
|
for (let i = 0; i < addItemParams.quantity; i++) {
|
|
642
642
|
const newAddItemParams = (0, import_lodash_es.cloneDeep)(addItemParams);
|
|
643
643
|
newAddItemParams.quantity = 1;
|
|
@@ -122,6 +122,12 @@ var BookingTicketImpl = class extends import_BaseModule.BaseModule {
|
|
|
122
122
|
throw error;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* 初始化外设扫码结果监听
|
|
127
|
+
*/
|
|
128
|
+
initPeripheralsListener() {
|
|
129
|
+
this.scan.initPeripheralsListener();
|
|
130
|
+
}
|
|
125
131
|
/**
|
|
126
132
|
* 获取商品列表(不加载到模块中)
|
|
127
133
|
* @returns 商品列表
|