@pisell/pisellos 0.0.102 → 0.0.104
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/Cart/utils.js +6 -0
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingByStep/index.js +1 -1
- package/lib/modules/Cart/utils.js +5 -0
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingByStep/index.js +2 -1
- package/package.json +1 -1
|
@@ -180,6 +180,12 @@ export var formatDiscountToCartItemOrigin = function formatDiscountToCartItemOri
|
|
|
180
180
|
origin.product = {};
|
|
181
181
|
}
|
|
182
182
|
origin.product.discount_list = discounts;
|
|
183
|
+
} else {
|
|
184
|
+
// 如果折扣为空,则清空折扣列表
|
|
185
|
+
if (!origin.product) {
|
|
186
|
+
origin.product = {};
|
|
187
|
+
}
|
|
188
|
+
origin.product.discount_list = [];
|
|
183
189
|
}
|
|
184
190
|
return origin;
|
|
185
191
|
};
|
|
@@ -208,7 +208,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
208
208
|
}): void;
|
|
209
209
|
setOtherData(key: string, value: any): void;
|
|
210
210
|
getOtherData(key: string): any;
|
|
211
|
-
getProductTypeById(id: number): Promise<"
|
|
211
|
+
getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
|
|
212
212
|
/**
|
|
213
213
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
214
214
|
*
|
|
@@ -233,7 +233,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
233
233
|
return this.request.post("/product/query", {
|
|
234
234
|
open_quotation: 1,
|
|
235
235
|
open_bundle: 0,
|
|
236
|
-
extension_type: ['product_appointment', 'appointment_ticket', 'session_product', 'session_ticket'],
|
|
236
|
+
extension_type: ['product_appointment', 'appointment_ticket', 'session_product', 'session_ticket', 'normal'],
|
|
237
237
|
with: ['category', 'collection', 'resourceRelation'],
|
|
238
238
|
status: 'published',
|
|
239
239
|
num: 500,
|
|
@@ -187,6 +187,11 @@ var formatDiscountToCartItemOrigin = (params) => {
|
|
|
187
187
|
origin.product = {};
|
|
188
188
|
}
|
|
189
189
|
origin.product.discount_list = discounts;
|
|
190
|
+
} else {
|
|
191
|
+
if (!origin.product) {
|
|
192
|
+
origin.product = {};
|
|
193
|
+
}
|
|
194
|
+
origin.product.discount_list = [];
|
|
190
195
|
}
|
|
191
196
|
return origin;
|
|
192
197
|
};
|
|
@@ -208,7 +208,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
208
208
|
}): void;
|
|
209
209
|
setOtherData(key: string, value: any): void;
|
|
210
210
|
getOtherData(key: string): any;
|
|
211
|
-
getProductTypeById(id: number): Promise<"
|
|
211
|
+
getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
|
|
212
212
|
/**
|
|
213
213
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
214
214
|
*
|
|
@@ -186,7 +186,8 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
186
186
|
"product_appointment",
|
|
187
187
|
"appointment_ticket",
|
|
188
188
|
"session_product",
|
|
189
|
-
"session_ticket"
|
|
189
|
+
"session_ticket",
|
|
190
|
+
"normal"
|
|
190
191
|
],
|
|
191
192
|
with: ["category", "collection", "resourceRelation"],
|
|
192
193
|
status: "published",
|