@pisell/pisellos 2.3.197 → 2.3.198
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/model/strategy/adapter/promotion/index.js +9 -0
- package/dist/shared/receipt/small-ticket.d.ts +1 -0
- package/dist/shared/receipt/small-ticket.js +4 -1
- package/dist/solution/BookingByStep/index.d.ts +2 -2
- package/dist/solution/BookingTicket/index.d.ts +13 -1
- package/dist/solution/OrderInvoicePreview/index.js +4 -3
- package/lib/shared/receipt/small-ticket.d.ts +1 -0
- package/lib/shared/receipt/small-ticket.js +4 -1
- package/lib/solution/BookingByStep/index.d.ts +2 -2
- package/lib/solution/BookingTicket/index.d.ts +13 -1
- package/lib/solution/OrderInvoicePreview/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// 导出评估器
|
|
2
|
+
export { PromotionEvaluator } from "./evaluator";
|
|
3
|
+
|
|
4
|
+
// 导出适配器
|
|
5
|
+
export { PromotionAdapter } from "./adapter";
|
|
6
|
+
export { default } from "./adapter";
|
|
7
|
+
|
|
8
|
+
// 导出策略配置示例常量
|
|
9
|
+
export { X_ITEMS_FOR_Y_PRICE_STRATEGY, BUY_X_GET_Y_FREE_STRATEGY, ITEM_REWARD_STRATEGY } from "./examples";
|
|
@@ -437,7 +437,10 @@ function buildBaseData(params) {
|
|
|
437
437
|
} : {});
|
|
438
438
|
}
|
|
439
439
|
function buildRewardClaimUrl(shopInfo, shopOrderNumber) {
|
|
440
|
-
var
|
|
440
|
+
var default_domain = typeof shopInfo.default_domain === 'string' ? shopInfo.default_domain.trim() : '';
|
|
441
|
+
var private_domain = typeof shopInfo.private_domain === 'string' ? shopInfo.private_domain.trim() : '';
|
|
442
|
+
// 私有域名优先于默认域名
|
|
443
|
+
var domain = private_domain || default_domain;
|
|
441
444
|
var orderNumber = typeof shopOrderNumber === 'string' ? shopOrderNumber.trim() : typeof shopOrderNumber === 'number' && Number.isFinite(shopOrderNumber) ? String(shopOrderNumber) : '';
|
|
442
445
|
if (!domain || !orderNumber) return undefined;
|
|
443
446
|
try {
|
|
@@ -328,7 +328,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
328
328
|
date: string;
|
|
329
329
|
status: string;
|
|
330
330
|
week: string;
|
|
331
|
-
weekNum: 0 |
|
|
331
|
+
weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
332
332
|
}[]>;
|
|
333
333
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
334
334
|
private getScheduleDataByIds;
|
|
@@ -375,7 +375,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
375
375
|
};
|
|
376
376
|
setOtherData(key: string, value: any): void;
|
|
377
377
|
getOtherData(key: string): any;
|
|
378
|
-
getProductTypeById(id: number): Promise<"
|
|
378
|
+
getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
|
|
379
379
|
/**
|
|
380
380
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
381
381
|
*
|
|
@@ -485,7 +485,19 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
485
485
|
* 加车两阶段主决策(规格弹窗 / 资源编辑 / 直接加车)。
|
|
486
486
|
* 与 ticketBooking `handleSelectProduct` + `handleBooking4Service` 等价。
|
|
487
487
|
*/
|
|
488
|
-
decideAddProduct(item: any, options?: Partial<AddProductDecideContext>):
|
|
488
|
+
decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): {
|
|
489
|
+
action: "reloadCatalog";
|
|
490
|
+
} | {
|
|
491
|
+
action: "add";
|
|
492
|
+
cacheItem: any;
|
|
493
|
+
} | {
|
|
494
|
+
action: "requiresDetail";
|
|
495
|
+
payload: AddProductRequiresDetailPayload;
|
|
496
|
+
} | {
|
|
497
|
+
action: "requiresBookingEdit";
|
|
498
|
+
cacheItem: any;
|
|
499
|
+
payload: import("./utils/addProductDecision").AddProductRequiresBookingEditPayload;
|
|
500
|
+
};
|
|
489
501
|
/** 规格弹窗 callback 后的第二段决策。 */
|
|
490
502
|
decideAfterDetail(cacheItem: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
|
|
491
503
|
/**
|
|
@@ -216,13 +216,14 @@ export var OrderInvoicePreviewImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
216
216
|
tax_country_code: getData('tax_country_code')
|
|
217
217
|
} : {});
|
|
218
218
|
shop.default_domain || (shop.default_domain = shopCore.default_domain);
|
|
219
|
+
shop.private_domain || (shop.private_domain = shopCore.private_domain);
|
|
219
220
|
shop.private_domain_protocol || (shop.private_domain_protocol = shopCore.private_domain_protocol);
|
|
220
221
|
if (!(generation !== _this3.generation || _this3.disposed)) {
|
|
221
|
-
_context.next =
|
|
222
|
+
_context.next = 21;
|
|
222
223
|
break;
|
|
223
224
|
}
|
|
224
225
|
throw new Error('Invoice request superseded');
|
|
225
|
-
case
|
|
226
|
+
case 21:
|
|
226
227
|
languageOptions = resolveCustomerInvoiceLanguages(template.language, input.locale);
|
|
227
228
|
remembered = (_this3$languageSelect = _this3.languageSelection) === null || _this3$languageSelect === void 0 ? void 0 : _this3$languageSelect.code;
|
|
228
229
|
selected = languageOptions.find(function (option) {
|
|
@@ -259,7 +260,7 @@ export var OrderInvoicePreviewImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
259
260
|
error: null
|
|
260
261
|
});
|
|
261
262
|
return _context.abrupt("return", result);
|
|
262
|
-
case
|
|
263
|
+
case 28:
|
|
263
264
|
case "end":
|
|
264
265
|
return _context.stop();
|
|
265
266
|
}
|
|
@@ -422,7 +422,10 @@ function buildBaseData(params) {
|
|
|
422
422
|
};
|
|
423
423
|
}
|
|
424
424
|
function buildRewardClaimUrl(shopInfo, shopOrderNumber) {
|
|
425
|
-
const
|
|
425
|
+
const default_domain = typeof shopInfo.default_domain === 'string' ? shopInfo.default_domain.trim() : '';
|
|
426
|
+
const private_domain = typeof shopInfo.private_domain === 'string' ? shopInfo.private_domain.trim() : '';
|
|
427
|
+
// 私有域名优先于默认域名
|
|
428
|
+
const domain = private_domain || default_domain;
|
|
426
429
|
const orderNumber = typeof shopOrderNumber === 'string' ? shopOrderNumber.trim() : typeof shopOrderNumber === 'number' && Number.isFinite(shopOrderNumber) ? String(shopOrderNumber) : '';
|
|
427
430
|
if (!domain || !orderNumber) return undefined;
|
|
428
431
|
try {
|
|
@@ -328,7 +328,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
328
328
|
date: string;
|
|
329
329
|
status: string;
|
|
330
330
|
week: string;
|
|
331
|
-
weekNum: 0 |
|
|
331
|
+
weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
332
332
|
}[]>;
|
|
333
333
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
334
334
|
private getScheduleDataByIds;
|
|
@@ -375,7 +375,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
375
375
|
};
|
|
376
376
|
setOtherData(key: string, value: any): void;
|
|
377
377
|
getOtherData(key: string): any;
|
|
378
|
-
getProductTypeById(id: number): Promise<"
|
|
378
|
+
getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
|
|
379
379
|
/**
|
|
380
380
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
381
381
|
*
|
|
@@ -485,7 +485,19 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
485
485
|
* 加车两阶段主决策(规格弹窗 / 资源编辑 / 直接加车)。
|
|
486
486
|
* 与 ticketBooking `handleSelectProduct` + `handleBooking4Service` 等价。
|
|
487
487
|
*/
|
|
488
|
-
decideAddProduct(item: any, options?: Partial<AddProductDecideContext>):
|
|
488
|
+
decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): {
|
|
489
|
+
action: "reloadCatalog";
|
|
490
|
+
} | {
|
|
491
|
+
action: "add";
|
|
492
|
+
cacheItem: any;
|
|
493
|
+
} | {
|
|
494
|
+
action: "requiresDetail";
|
|
495
|
+
payload: AddProductRequiresDetailPayload;
|
|
496
|
+
} | {
|
|
497
|
+
action: "requiresBookingEdit";
|
|
498
|
+
cacheItem: any;
|
|
499
|
+
payload: import("./utils/addProductDecision").AddProductRequiresBookingEditPayload;
|
|
500
|
+
};
|
|
489
501
|
/** 规格弹窗 callback 后的第二段决策。 */
|
|
490
502
|
decideAfterDetail(cacheItem: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
|
|
491
503
|
/**
|
|
@@ -146,6 +146,7 @@ class OrderInvoicePreviewImpl extends _BaseModule.BaseModule {
|
|
|
146
146
|
} : {})
|
|
147
147
|
};
|
|
148
148
|
shop.default_domain || (shop.default_domain = shopCore.default_domain);
|
|
149
|
+
shop.private_domain || (shop.private_domain = shopCore.private_domain);
|
|
149
150
|
shop.private_domain_protocol || (shop.private_domain_protocol = shopCore.private_domain_protocol);
|
|
150
151
|
if (generation !== this.generation || this.disposed) throw new Error('Invoice request superseded');
|
|
151
152
|
const languageOptions = (0, _customerInvoiceLanguages.resolveCustomerInvoiceLanguages)(template.language, input.locale);
|