@pisell/pisellos 2.3.135 → 2.3.137
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 +0 -9
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/RegisterAndLogin/config.js +21 -0
- package/lib/model/strategy/adapter/promotion/index.js +1 -46
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/RegisterAndLogin/config.js +25 -0
- package/package.json +1 -1
|
@@ -1,9 +0,0 @@
|
|
|
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";
|
|
@@ -326,7 +326,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
326
326
|
date: string;
|
|
327
327
|
status: string;
|
|
328
328
|
week: string;
|
|
329
|
-
weekNum: 0 | 2 | 1 |
|
|
329
|
+
weekNum: 0 | 2 | 1 | 6 | 4 | 5 | 3;
|
|
330
330
|
}[]>;
|
|
331
331
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
332
332
|
private getScheduleDataByIds;
|
|
@@ -386,6 +386,26 @@ function withH5AuthPrefix(config) {
|
|
|
386
386
|
return nextConfig;
|
|
387
387
|
}
|
|
388
388
|
var h5OnlineStoreConfig = withH5AuthPrefix(onlineStoreConfig);
|
|
389
|
+
function withKioskSalesChannel(config) {
|
|
390
|
+
return _objectSpread(_objectSpread({}, config), {}, {
|
|
391
|
+
options: function options(params) {
|
|
392
|
+
var options = (typeof config.options === 'function' ? config.options(params) : config.options) || {};
|
|
393
|
+
var headers = typeof options.headers === 'function' ? options.headers(params) : options.headers;
|
|
394
|
+
return _objectSpread(_objectSpread({}, options), {}, {
|
|
395
|
+
headers: _objectSpread(_objectSpread({}, headers), {}, {
|
|
396
|
+
'Sales-Channel': 'kiosk'
|
|
397
|
+
})
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
// Kiosk 复用网店顾客认证接口,通过注册(含验证码登录自动注册)请求头标识会员归属渠道。
|
|
404
|
+
var kioskConfig = _objectSpread(_objectSpread({}, h5OnlineStoreConfig), {}, {
|
|
405
|
+
emailCodeRegister: withKioskSalesChannel(h5OnlineStoreConfig.emailCodeRegister),
|
|
406
|
+
phoneCodeRegister: withKioskSalesChannel(h5OnlineStoreConfig.phoneCodeRegister),
|
|
407
|
+
phoneCodeLogin: withKioskSalesChannel(h5OnlineStoreConfig.phoneCodeLogin)
|
|
408
|
+
});
|
|
389
409
|
|
|
390
410
|
/**
|
|
391
411
|
* 默认配置(通用配置)
|
|
@@ -1383,6 +1403,7 @@ var shopWebposConfig = {
|
|
|
1383
1403
|
export var channelConfigMap = {
|
|
1384
1404
|
'online-store': onlineStoreConfig,
|
|
1385
1405
|
'online-store-h5': h5OnlineStoreConfig,
|
|
1406
|
+
'kiosk': kioskConfig,
|
|
1386
1407
|
'default': defaultConfig,
|
|
1387
1408
|
'webpos': webposConfig,
|
|
1388
1409
|
'shop.webpos': shopWebposConfig
|
|
@@ -1,46 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "BUY_X_GET_Y_FREE_STRATEGY", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _examples.BUY_X_GET_Y_FREE_STRATEGY;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "ITEM_REWARD_STRATEGY", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _examples.ITEM_REWARD_STRATEGY;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "PromotionAdapter", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _adapter.PromotionAdapter;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "PromotionEvaluator", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _evaluator.PromotionEvaluator;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "X_ITEMS_FOR_Y_PRICE_STRATEGY", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _examples.X_ITEMS_FOR_Y_PRICE_STRATEGY;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "default", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _adapter.default;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
var _evaluator = require("./evaluator");
|
|
43
|
-
var _adapter = _interopRequireWildcard(require("./adapter"));
|
|
44
|
-
var _examples = require("./examples");
|
|
45
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
46
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
1
|
+
"use strict";
|
|
@@ -326,7 +326,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
326
326
|
date: string;
|
|
327
327
|
status: string;
|
|
328
328
|
week: string;
|
|
329
|
-
weekNum: 0 | 2 | 1 |
|
|
329
|
+
weekNum: 0 | 2 | 1 | 6 | 4 | 5 | 3;
|
|
330
330
|
}[]>;
|
|
331
331
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
332
332
|
private getScheduleDataByIds;
|
|
@@ -305,6 +305,30 @@ function withH5AuthPrefix(config) {
|
|
|
305
305
|
return nextConfig;
|
|
306
306
|
}
|
|
307
307
|
const h5OnlineStoreConfig = withH5AuthPrefix(onlineStoreConfig);
|
|
308
|
+
function withKioskSalesChannel(config) {
|
|
309
|
+
return {
|
|
310
|
+
...config,
|
|
311
|
+
options: params => {
|
|
312
|
+
const options = (typeof config.options === 'function' ? config.options(params) : config.options) || {};
|
|
313
|
+
const headers = typeof options.headers === 'function' ? options.headers(params) : options.headers;
|
|
314
|
+
return {
|
|
315
|
+
...options,
|
|
316
|
+
headers: {
|
|
317
|
+
...headers,
|
|
318
|
+
'Sales-Channel': 'kiosk'
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// Kiosk 复用网店顾客认证接口,通过注册(含验证码登录自动注册)请求头标识会员归属渠道。
|
|
326
|
+
const kioskConfig = {
|
|
327
|
+
...h5OnlineStoreConfig,
|
|
328
|
+
emailCodeRegister: withKioskSalesChannel(h5OnlineStoreConfig.emailCodeRegister),
|
|
329
|
+
phoneCodeRegister: withKioskSalesChannel(h5OnlineStoreConfig.phoneCodeRegister),
|
|
330
|
+
phoneCodeLogin: withKioskSalesChannel(h5OnlineStoreConfig.phoneCodeLogin)
|
|
331
|
+
};
|
|
308
332
|
|
|
309
333
|
/**
|
|
310
334
|
* 默认配置(通用配置)
|
|
@@ -1094,6 +1118,7 @@ const shopWebposConfig = {
|
|
|
1094
1118
|
const channelConfigMap = exports.channelConfigMap = {
|
|
1095
1119
|
'online-store': onlineStoreConfig,
|
|
1096
1120
|
'online-store-h5': h5OnlineStoreConfig,
|
|
1121
|
+
'kiosk': kioskConfig,
|
|
1097
1122
|
'default': defaultConfig,
|
|
1098
1123
|
'webpos': webposConfig,
|
|
1099
1124
|
'shop.webpos': shopWebposConfig
|