@pisell/pisellos 0.0.330 → 0.0.331
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.
|
@@ -335,7 +335,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
335
335
|
};
|
|
336
336
|
setOtherData(key: string, value: any): void;
|
|
337
337
|
getOtherData(key: string): any;
|
|
338
|
-
getProductTypeById(id: number): Promise<"
|
|
338
|
+
getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
|
|
339
339
|
/**
|
|
340
340
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
341
341
|
*
|
|
@@ -1195,7 +1195,16 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1195
1195
|
this.addProductCheck({
|
|
1196
1196
|
date: date
|
|
1197
1197
|
});
|
|
1198
|
-
|
|
1198
|
+
// 如果 quantity 大于 1,则进入购物车拆散成多条数据
|
|
1199
|
+
if (addItemParams.quantity > 1) {
|
|
1200
|
+
for (var i = 0; i < addItemParams.quantity; i++) {
|
|
1201
|
+
var newAddItemParams = cloneDeep(addItemParams);
|
|
1202
|
+
newAddItemParams.quantity = 1;
|
|
1203
|
+
this.store.cart.addItem(newAddItemParams);
|
|
1204
|
+
}
|
|
1205
|
+
} else {
|
|
1206
|
+
this.store.cart.addItem(addItemParams);
|
|
1207
|
+
}
|
|
1199
1208
|
return {
|
|
1200
1209
|
success: true
|
|
1201
1210
|
};
|
|
@@ -335,7 +335,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
335
335
|
};
|
|
336
336
|
setOtherData(key: string, value: any): void;
|
|
337
337
|
getOtherData(key: string): any;
|
|
338
|
-
getProductTypeById(id: number): Promise<"
|
|
338
|
+
getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
|
|
339
339
|
/**
|
|
340
340
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
341
341
|
*
|
|
@@ -636,7 +636,15 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
636
636
|
addItemParams.account = account;
|
|
637
637
|
}
|
|
638
638
|
this.addProductCheck({ date });
|
|
639
|
-
|
|
639
|
+
if (addItemParams.quantity > 1) {
|
|
640
|
+
for (let i = 0; i < addItemParams.quantity; i++) {
|
|
641
|
+
const newAddItemParams = (0, import_lodash_es.cloneDeep)(addItemParams);
|
|
642
|
+
newAddItemParams.quantity = 1;
|
|
643
|
+
this.store.cart.addItem(newAddItemParams);
|
|
644
|
+
}
|
|
645
|
+
} else {
|
|
646
|
+
this.store.cart.addItem(addItemParams);
|
|
647
|
+
}
|
|
640
648
|
return { success: true };
|
|
641
649
|
}
|
|
642
650
|
/**
|