@pisell/pisellos 2.3.111 → 2.3.112
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.
|
@@ -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";
|
|
@@ -132,7 +132,8 @@ export var OpenDataModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
132
132
|
key: "shouldSkipInvoiceTemplateDocument",
|
|
133
133
|
value: function shouldSkipInvoiceTemplateDocument() {
|
|
134
134
|
var _this$otherParams;
|
|
135
|
-
|
|
135
|
+
var platform = String(((_this$otherParams = this.otherParams) === null || _this$otherParams === void 0 ? void 0 : _this$otherParams.platform) || '').trim().toLowerCase();
|
|
136
|
+
return platform === 'pc' || platform === 'h5';
|
|
136
137
|
}
|
|
137
138
|
}, {
|
|
138
139
|
key: "fetchOpenData",
|
|
@@ -1606,8 +1606,9 @@ function buildVoucherAssets(params) {
|
|
|
1606
1606
|
}].concat(_toConsumableArray(timeRow ? [timeRow] : []))];
|
|
1607
1607
|
});
|
|
1608
1608
|
}
|
|
1609
|
+
var TICKET_VOUCHER_TAGS = new Set(['ticket', 'product_package_ticket', 'appointment_ticket', 'session_ticket']);
|
|
1609
1610
|
function isTicketVoucher(voucher) {
|
|
1610
|
-
return stringify(voucher.tag).trim().toLowerCase()
|
|
1611
|
+
return TICKET_VOUCHER_TAGS.has(stringify(voucher.tag).trim().toLowerCase());
|
|
1611
1612
|
}
|
|
1612
1613
|
function getVoucherValidity(voucher, locale) {
|
|
1613
1614
|
var _voucher$metadata, _voucher$metadata2, _voucher$metadata3, _voucher$metadata4, _voucher$metadata5, _voucher$metadata6, _voucher$metadata7, _voucher$metadata8, _voucher$metadata9, _voucher$metadata10, _voucher$start_time, _voucher$metadata11, _voucher$end_time, _voucher$metadata12;
|
|
@@ -153,7 +153,8 @@ class OpenDataModule extends _BaseModule.BaseModule {
|
|
|
153
153
|
this.fatherModule = this.otherParams.fatherModule;
|
|
154
154
|
}
|
|
155
155
|
shouldSkipInvoiceTemplateDocument() {
|
|
156
|
-
|
|
156
|
+
const platform = String(this.otherParams?.platform || '').trim().toLowerCase();
|
|
157
|
+
return platform === 'pc' || platform === 'h5';
|
|
157
158
|
}
|
|
158
159
|
async fetchOpenData(params) {
|
|
159
160
|
const fetchRevision = ++this.fetchRevision;
|
|
@@ -1490,8 +1490,9 @@ function buildVoucherAssets(params) {
|
|
|
1490
1490
|
}, ...(timeRow ? [timeRow] : [])]];
|
|
1491
1491
|
});
|
|
1492
1492
|
}
|
|
1493
|
+
const TICKET_VOUCHER_TAGS = new Set(['ticket', 'product_package_ticket', 'appointment_ticket', 'session_ticket']);
|
|
1493
1494
|
function isTicketVoucher(voucher) {
|
|
1494
|
-
return stringify(voucher.tag).trim().toLowerCase()
|
|
1495
|
+
return TICKET_VOUCHER_TAGS.has(stringify(voucher.tag).trim().toLowerCase());
|
|
1495
1496
|
}
|
|
1496
1497
|
function getVoucherValidity(voucher, locale) {
|
|
1497
1498
|
const availableTime = firstPresentValue(voucher.available_time, voucher.avaliable_time, voucher.metadata?.available_time, voucher.metadata?.avaliable_time);
|