@pisell/pisellos 3.0.76 → 3.0.78
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/core/index.js +1 -2
- package/dist/effects/index.d.ts +3 -5
- package/dist/effects/index.js +8 -40
- package/dist/modules/Account/index.js +3 -2
- package/dist/modules/AccountList/index.d.ts +1 -7
- package/dist/modules/AccountList/index.js +14 -81
- package/dist/modules/AccountList/types.d.ts +0 -28
- package/dist/modules/AccountList/types.js +0 -8
- package/dist/modules/BaseModule.d.ts +0 -3
- package/dist/modules/BaseModule.js +0 -15
- package/dist/modules/Cart/index.d.ts +0 -1
- package/dist/modules/Cart/index.js +1 -2
- package/dist/modules/Date/types.d.ts +3 -1
- package/dist/modules/Discount/index.d.ts +0 -1
- package/dist/modules/Discount/index.js +1 -1
- package/dist/modules/Guests/index.js +9 -9
- package/dist/modules/Order/index.d.ts +1 -25
- package/dist/modules/Order/index.js +3 -224
- package/dist/modules/Order/types.d.ts +0 -45
- package/dist/modules/Order/types.js +0 -8
- package/dist/modules/Order/utils.js +1 -1
- package/dist/modules/Payment/index.d.ts +9 -184
- package/dist/modules/Payment/index.js +109 -2084
- package/dist/modules/Payment/types.d.ts +30 -772
- package/dist/modules/Payment/types.js +12 -236
- package/dist/modules/ProductList/index.d.ts +1 -12
- package/dist/modules/ProductList/index.js +6 -29
- package/dist/modules/Resource/index.js +1 -1
- package/dist/modules/Rules/index.d.ts +4 -3
- package/dist/modules/Rules/index.js +121 -78
- package/dist/modules/Rules/types.d.ts +6 -1
- package/dist/modules/Rules/types.js +8 -0
- package/dist/modules/Schedule/index.d.ts +0 -9
- package/dist/modules/Schedule/index.js +0 -77
- package/dist/modules/index.d.ts +0 -1
- package/dist/modules/index.js +0 -1
- package/dist/plugins/window.d.ts +0 -1
- package/dist/solution/BookingByStep/index.d.ts +17 -0
- package/dist/solution/BookingByStep/index.js +525 -190
- package/dist/solution/BookingByStep/utils/products.d.ts +0 -6
- package/dist/solution/BookingByStep/utils/products.js +0 -10
- package/dist/solution/BookingByStep/utils/resources.js +4 -0
- package/dist/solution/BuyTickets/index.js +8 -7
- package/dist/solution/ShopDiscount/index.d.ts +12 -10
- package/dist/solution/ShopDiscount/index.js +64 -110
- package/dist/solution/ShopDiscount/types.d.ts +0 -8
- package/dist/solution/ShopDiscount/utils.js +1 -0
- package/dist/solution/index.d.ts +0 -2
- package/dist/solution/index.js +1 -3
- package/dist/types/index.d.ts +1 -4
- package/lib/core/index.js +1 -1
- package/lib/effects/index.d.ts +3 -5
- package/lib/effects/index.js +1 -17
- package/lib/modules/Account/index.js +3 -2
- package/lib/modules/AccountList/index.d.ts +1 -7
- package/lib/modules/AccountList/index.js +0 -27
- package/lib/modules/AccountList/types.d.ts +0 -28
- package/lib/modules/BaseModule.d.ts +0 -3
- package/lib/modules/BaseModule.js +0 -9
- package/lib/modules/Cart/index.d.ts +0 -1
- package/lib/modules/Cart/index.js +2 -5
- package/lib/modules/Date/types.d.ts +3 -1
- package/lib/modules/Discount/index.d.ts +0 -1
- package/lib/modules/Discount/index.js +1 -1
- package/lib/modules/Guests/index.js +9 -9
- package/lib/modules/Order/index.d.ts +1 -25
- package/lib/modules/Order/index.js +1 -186
- package/lib/modules/Order/types.d.ts +0 -45
- package/lib/modules/Order/utils.js +1 -1
- package/lib/modules/Payment/index.d.ts +9 -184
- package/lib/modules/Payment/index.js +51 -1084
- package/lib/modules/Payment/types.d.ts +30 -772
- package/lib/modules/Payment/types.js +6 -79
- package/lib/modules/ProductList/index.d.ts +1 -12
- package/lib/modules/ProductList/index.js +5 -31
- package/lib/modules/Resource/index.js +1 -1
- package/lib/modules/Rules/index.d.ts +4 -3
- package/lib/modules/Rules/index.js +64 -43
- package/lib/modules/Rules/types.d.ts +6 -1
- package/lib/modules/Rules/types.js +11 -2
- package/lib/modules/Schedule/index.d.ts +0 -9
- package/lib/modules/Schedule/index.js +0 -60
- package/lib/modules/index.d.ts +0 -1
- package/lib/modules/index.js +0 -2
- package/lib/plugins/window.d.ts +0 -1
- package/lib/solution/BookingByStep/index.d.ts +17 -0
- package/lib/solution/BookingByStep/index.js +325 -60
- package/lib/solution/BookingByStep/utils/products.d.ts +0 -6
- package/lib/solution/BookingByStep/utils/products.js +2 -8
- package/lib/solution/BookingByStep/utils/resources.js +4 -1
- package/lib/solution/BuyTickets/index.js +8 -7
- package/lib/solution/ShopDiscount/index.d.ts +12 -10
- package/lib/solution/ShopDiscount/index.js +30 -51
- package/lib/solution/ShopDiscount/types.d.ts +0 -8
- package/lib/solution/index.d.ts +0 -2
- package/lib/solution/index.js +1 -5
- package/lib/types/index.d.ts +1 -4
- package/package.json +1 -3
- package/dist/modules/Customer/constants.d.ts +0 -7
- package/dist/modules/Customer/constants.js +0 -12
- package/dist/modules/Customer/index.d.ts +0 -122
- package/dist/modules/Customer/index.js +0 -696
- package/dist/modules/Customer/types.d.ts +0 -146
- package/dist/modules/Customer/types.js +0 -41
- package/dist/modules/Payment/cash.d.ts +0 -19
- package/dist/modules/Payment/cash.js +0 -97
- package/dist/modules/Payment/cashRecommendationAlgorithm.d.ts +0 -22
- package/dist/modules/Payment/cashRecommendationAlgorithm.js +0 -423
- package/dist/modules/Payment/eftpos.d.ts +0 -11
- package/dist/modules/Payment/eftpos.js +0 -80
- package/dist/modules/Payment/mx51.d.ts +0 -0
- package/dist/modules/Payment/mx51.js +0 -0
- package/dist/modules/Payment/utils.d.ts +0 -17
- package/dist/modules/Payment/utils.js +0 -62
- package/dist/modules/Payment/walletpass.d.ts +0 -99
- package/dist/modules/Payment/walletpass.js +0 -711
- package/dist/plugins/app-types/app/app.d.ts +0 -83
- package/dist/plugins/app-types/app/const.d.ts +0 -4
- package/dist/plugins/app-types/app/index.d.ts +0 -14
- package/dist/plugins/app-types/applicationManager/application.d.ts +0 -50
- package/dist/plugins/app-types/applicationManager/index.d.ts +0 -13
- package/dist/plugins/app-types/config.d.ts +0 -3
- package/dist/plugins/app-types/cookie/index.d.ts +0 -13
- package/dist/plugins/app-types/data/index.d.ts +0 -8
- package/dist/plugins/app-types/history/config.d.ts +0 -24
- package/dist/plugins/app-types/history/index.d.ts +0 -20
- package/dist/plugins/app-types/history/type.d.ts +0 -2
- package/dist/plugins/app-types/hooks/index.d.ts +0 -12
- package/dist/plugins/app-types/hooks/useDelayedValue/index.d.ts +0 -2
- package/dist/plugins/app-types/hooks/useDispatch/index.d.ts +0 -2
- package/dist/plugins/app-types/hooks/useLowCode/index.d.ts +0 -13
- package/dist/plugins/app-types/hooks/useStore/index.d.ts +0 -6
- package/dist/plugins/app-types/index.d.ts +0 -6
- package/dist/plugins/app-types/indexDB/index.d.ts +0 -178
- package/dist/plugins/app-types/locales/en.d.ts +0 -3
- package/dist/plugins/app-types/locales/index.d.ts +0 -37
- package/dist/plugins/app-types/locales/original.d.ts +0 -3
- package/dist/plugins/app-types/locales/type.d.ts +0 -19
- package/dist/plugins/app-types/locales/zh-CN.d.ts +0 -3
- package/dist/plugins/app-types/locales/zh-HK.d.ts +0 -3
- package/dist/plugins/app-types/logger/feishu.d.ts +0 -11
- package/dist/plugins/app-types/logger/index.d.ts +0 -122
- package/dist/plugins/app-types/menuManager/hooks.d.ts +0 -17
- package/dist/plugins/app-types/menuManager/index.d.ts +0 -28
- package/dist/plugins/app-types/models/global.d.ts +0 -32
- package/dist/plugins/app-types/models/index.d.ts +0 -45
- package/dist/plugins/app-types/models/type.d.ts +0 -2
- package/dist/plugins/app-types/package.json +0 -15
- package/dist/plugins/app-types/plugin/index.d.ts +0 -0
- package/dist/plugins/app-types/pubsub/example.d.ts +0 -5
- package/dist/plugins/app-types/pubsub/index.d.ts +0 -63
- package/dist/plugins/app-types/request/cache.d.ts +0 -46
- package/dist/plugins/app-types/request/cancelToken.d.ts +0 -38
- package/dist/plugins/app-types/request/config.d.ts +0 -3
- package/dist/plugins/app-types/request/constants.d.ts +0 -2
- package/dist/plugins/app-types/request/index.d.ts +0 -24
- package/dist/plugins/app-types/request/pisell2Request.d.ts +0 -6
- package/dist/plugins/app-types/request/type.d.ts +0 -41
- package/dist/plugins/app-types/request/utils.d.ts +0 -46
- package/dist/plugins/app-types/routes/config.d.ts +0 -7
- package/dist/plugins/app-types/routes/index.d.ts +0 -28
- package/dist/plugins/app-types/socket/components/SocketMonitorPage.d.ts +0 -6
- package/dist/plugins/app-types/socket/components/index.d.ts +0 -2
- package/dist/plugins/app-types/socket/constants.d.ts +0 -33
- package/dist/plugins/app-types/socket/events.d.ts +0 -31
- package/dist/plugins/app-types/socket/heartbeat.d.ts +0 -66
- package/dist/plugins/app-types/socket/index.d.ts +0 -61
- package/dist/plugins/app-types/socket/monitor.d.ts +0 -169
- package/dist/plugins/app-types/socket/reconnect.d.ts +0 -61
- package/dist/plugins/app-types/socket/socket.d.ts +0 -129
- package/dist/plugins/app-types/socket/types.d.ts +0 -85
- package/dist/plugins/app-types/storage/index.d.ts +0 -17
- package/dist/plugins/app-types/tasks/index.d.ts +0 -77
- package/dist/plugins/app-types/tasks/type.d.ts +0 -62
- package/dist/plugins/app-types/tasks/useTasks.d.ts +0 -5
- package/dist/plugins/app-types/type.d.ts +0 -2
- package/dist/plugins/app-types/variables/VariablesProvider.d.ts +0 -7
- package/dist/plugins/app-types/variables/config.d.ts +0 -3
- package/dist/plugins/app-types/variables/index.d.ts +0 -6
- package/dist/plugins/app-types/variables/type.d.ts +0 -2
- package/dist/plugins/app-types/website/index.d.ts +0 -6
- package/dist/plugins/app.d.ts +0 -8
- package/dist/plugins/app.js +0 -1
- package/dist/solution/BookingTicket/index.d.ts +0 -184
- package/dist/solution/BookingTicket/index.js +0 -698
- package/dist/solution/BookingTicket/types.d.ts +0 -68
- package/dist/solution/BookingTicket/types.js +0 -43
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.d.ts +0 -22
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +0 -159
- package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +0 -22
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +0 -189
- package/dist/solution/BookingTicket/utils/scan/index.d.ts +0 -85
- package/dist/solution/BookingTicket/utils/scan/index.js +0 -294
- package/dist/solution/BookingTicket/utils/scan/scanCache.d.ts +0 -78
- package/dist/solution/BookingTicket/utils/scan/scanCache.js +0 -305
- package/dist/solution/Checkout/appointmentDemo.json +0 -1
- package/dist/solution/Checkout/index.d.ts +0 -432
- package/dist/solution/Checkout/index.js +0 -4452
- package/dist/solution/Checkout/types.d.ts +0 -727
- package/dist/solution/Checkout/types.js +0 -104
- package/dist/solution/Checkout/utils/index.d.ts +0 -121
- package/dist/solution/Checkout/utils/index.js +0 -511
- package/dist/utils/task.d.ts +0 -40
- package/dist/utils/task.js +0 -171
- package/dist/utils/watch.d.ts +0 -102
- package/dist/utils/watch.js +0 -294
- package/lib/modules/Customer/constants.d.ts +0 -7
- package/lib/modules/Customer/constants.js +0 -39
- package/lib/modules/Customer/index.d.ts +0 -122
- package/lib/modules/Customer/index.js +0 -439
- package/lib/modules/Customer/types.d.ts +0 -146
- package/lib/modules/Customer/types.js +0 -37
- package/lib/modules/Payment/cash.d.ts +0 -19
- package/lib/modules/Payment/cash.js +0 -64
- package/lib/modules/Payment/cashRecommendationAlgorithm.d.ts +0 -22
- package/lib/modules/Payment/cashRecommendationAlgorithm.js +0 -342
- package/lib/modules/Payment/eftpos.d.ts +0 -11
- package/lib/modules/Payment/eftpos.js +0 -51
- package/lib/modules/Payment/mx51.d.ts +0 -0
- package/lib/modules/Payment/mx51.js +0 -0
- package/lib/modules/Payment/utils.d.ts +0 -17
- package/lib/modules/Payment/utils.js +0 -67
- package/lib/modules/Payment/walletpass.d.ts +0 -99
- package/lib/modules/Payment/walletpass.js +0 -484
- package/lib/plugins/app-types/app/app.d.ts +0 -83
- package/lib/plugins/app-types/app/const.d.ts +0 -4
- package/lib/plugins/app-types/app/index.d.ts +0 -14
- package/lib/plugins/app-types/applicationManager/application.d.ts +0 -50
- package/lib/plugins/app-types/applicationManager/index.d.ts +0 -13
- package/lib/plugins/app-types/config.d.ts +0 -3
- package/lib/plugins/app-types/cookie/index.d.ts +0 -13
- package/lib/plugins/app-types/data/index.d.ts +0 -8
- package/lib/plugins/app-types/history/config.d.ts +0 -24
- package/lib/plugins/app-types/history/index.d.ts +0 -20
- package/lib/plugins/app-types/history/type.d.ts +0 -2
- package/lib/plugins/app-types/hooks/index.d.ts +0 -12
- package/lib/plugins/app-types/hooks/useDelayedValue/index.d.ts +0 -2
- package/lib/plugins/app-types/hooks/useDispatch/index.d.ts +0 -2
- package/lib/plugins/app-types/hooks/useLowCode/index.d.ts +0 -13
- package/lib/plugins/app-types/hooks/useStore/index.d.ts +0 -6
- package/lib/plugins/app-types/index.d.ts +0 -6
- package/lib/plugins/app-types/indexDB/index.d.ts +0 -178
- package/lib/plugins/app-types/locales/en.d.ts +0 -3
- package/lib/plugins/app-types/locales/index.d.ts +0 -37
- package/lib/plugins/app-types/locales/original.d.ts +0 -3
- package/lib/plugins/app-types/locales/type.d.ts +0 -19
- package/lib/plugins/app-types/locales/zh-CN.d.ts +0 -3
- package/lib/plugins/app-types/locales/zh-HK.d.ts +0 -3
- package/lib/plugins/app-types/logger/feishu.d.ts +0 -11
- package/lib/plugins/app-types/logger/index.d.ts +0 -122
- package/lib/plugins/app-types/menuManager/hooks.d.ts +0 -17
- package/lib/plugins/app-types/menuManager/index.d.ts +0 -28
- package/lib/plugins/app-types/models/global.d.ts +0 -32
- package/lib/plugins/app-types/models/index.d.ts +0 -45
- package/lib/plugins/app-types/models/type.d.ts +0 -2
- package/lib/plugins/app-types/package.json +0 -15
- package/lib/plugins/app-types/plugin/index.d.ts +0 -0
- package/lib/plugins/app-types/pubsub/example.d.ts +0 -5
- package/lib/plugins/app-types/pubsub/index.d.ts +0 -63
- package/lib/plugins/app-types/request/cache.d.ts +0 -46
- package/lib/plugins/app-types/request/cancelToken.d.ts +0 -38
- package/lib/plugins/app-types/request/config.d.ts +0 -3
- package/lib/plugins/app-types/request/constants.d.ts +0 -2
- package/lib/plugins/app-types/request/index.d.ts +0 -24
- package/lib/plugins/app-types/request/pisell2Request.d.ts +0 -6
- package/lib/plugins/app-types/request/type.d.ts +0 -41
- package/lib/plugins/app-types/request/utils.d.ts +0 -46
- package/lib/plugins/app-types/routes/config.d.ts +0 -7
- package/lib/plugins/app-types/routes/index.d.ts +0 -28
- package/lib/plugins/app-types/socket/components/SocketMonitorPage.d.ts +0 -6
- package/lib/plugins/app-types/socket/components/index.d.ts +0 -2
- package/lib/plugins/app-types/socket/constants.d.ts +0 -33
- package/lib/plugins/app-types/socket/events.d.ts +0 -31
- package/lib/plugins/app-types/socket/heartbeat.d.ts +0 -66
- package/lib/plugins/app-types/socket/index.d.ts +0 -61
- package/lib/plugins/app-types/socket/monitor.d.ts +0 -169
- package/lib/plugins/app-types/socket/reconnect.d.ts +0 -61
- package/lib/plugins/app-types/socket/socket.d.ts +0 -129
- package/lib/plugins/app-types/socket/types.d.ts +0 -85
- package/lib/plugins/app-types/storage/index.d.ts +0 -17
- package/lib/plugins/app-types/tasks/index.d.ts +0 -77
- package/lib/plugins/app-types/tasks/type.d.ts +0 -62
- package/lib/plugins/app-types/tasks/useTasks.d.ts +0 -5
- package/lib/plugins/app-types/type.d.ts +0 -2
- package/lib/plugins/app-types/variables/VariablesProvider.d.ts +0 -7
- package/lib/plugins/app-types/variables/config.d.ts +0 -3
- package/lib/plugins/app-types/variables/index.d.ts +0 -6
- package/lib/plugins/app-types/variables/type.d.ts +0 -2
- package/lib/plugins/app-types/website/index.d.ts +0 -6
- package/lib/plugins/app.d.ts +0 -8
- package/lib/plugins/app.js +0 -17
- package/lib/solution/BookingTicket/index.d.ts +0 -184
- package/lib/solution/BookingTicket/index.js +0 -426
- package/lib/solution/BookingTicket/types.d.ts +0 -68
- package/lib/solution/BookingTicket/types.js +0 -72
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.d.ts +0 -22
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +0 -117
- package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +0 -22
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +0 -132
- package/lib/solution/BookingTicket/utils/scan/index.d.ts +0 -85
- package/lib/solution/BookingTicket/utils/scan/index.js +0 -216
- package/lib/solution/BookingTicket/utils/scan/scanCache.d.ts +0 -78
- package/lib/solution/BookingTicket/utils/scan/scanCache.js +0 -231
- package/lib/solution/Checkout/appointmentDemo.json +0 -1
- package/lib/solution/Checkout/index.d.ts +0 -432
- package/lib/solution/Checkout/index.js +0 -2776
- package/lib/solution/Checkout/types.d.ts +0 -727
- package/lib/solution/Checkout/types.js +0 -63
- package/lib/solution/Checkout/utils/index.d.ts +0 -121
- package/lib/solution/Checkout/utils/index.js +0 -362
- package/lib/utils/task.d.ts +0 -40
- package/lib/utils/task.js +0 -109
- package/lib/utils/watch.d.ts +0 -102
- package/lib/utils/watch.js +0 -217
|
@@ -24,6 +24,7 @@ __export(BuyTickets_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(BuyTickets_exports);
|
|
26
26
|
var import_modules = require("../../modules/");
|
|
27
|
+
var import_types = require("./types");
|
|
27
28
|
var import_BaseModule = require("../../modules/BaseModule");
|
|
28
29
|
__reExport(BuyTickets_exports, require("./types"), module.exports);
|
|
29
30
|
var BuyTicketsImpl = class extends import_BaseModule.BaseModule {
|
|
@@ -48,7 +49,7 @@ var BuyTicketsImpl = class extends import_BaseModule.BaseModule {
|
|
|
48
49
|
if (this.otherParams.prodctIds) {
|
|
49
50
|
await this.loadProductsByIds(this.otherParams.prodctIds);
|
|
50
51
|
}
|
|
51
|
-
await this.core.effects.emit(
|
|
52
|
+
await this.core.effects.emit(import_types.BuyTicketsHooks.onInited, {});
|
|
52
53
|
}
|
|
53
54
|
// 通过 ids 获取产品,在当前解决方案下,获取到的就是主商品
|
|
54
55
|
async loadProductsByIds(ids) {
|
|
@@ -68,13 +69,13 @@ var BuyTicketsImpl = class extends import_BaseModule.BaseModule {
|
|
|
68
69
|
}
|
|
69
70
|
});
|
|
70
71
|
this.store.mainProducts = mainProducts;
|
|
71
|
-
await this.core.effects.emit(
|
|
72
|
+
await this.core.effects.emit(import_types.BuyTicketsHooks.onMainProductsLoaded, {});
|
|
72
73
|
}
|
|
73
74
|
// 通过 ids 获取产品,在当前解决方案下,获取到的就是其他商品
|
|
74
75
|
async loadProductsByCategory(categoryId) {
|
|
75
76
|
}
|
|
76
77
|
async destroy() {
|
|
77
|
-
await this.core.effects.emit(
|
|
78
|
+
await this.core.effects.emit(import_types.BuyTicketsHooks.onDestroy, {});
|
|
78
79
|
console.log("[BuyTickets] 已销毁");
|
|
79
80
|
}
|
|
80
81
|
// 获取当前绑定的所有商品
|
|
@@ -82,7 +83,7 @@ var BuyTicketsImpl = class extends import_BaseModule.BaseModule {
|
|
|
82
83
|
var _a;
|
|
83
84
|
const mainData = await this.store.mainProducts.getProducts() || [];
|
|
84
85
|
const otherData = await ((_a = this.store.otherProducts) == null ? void 0 : _a.getProducts()) || [];
|
|
85
|
-
await this.core.effects.emit(
|
|
86
|
+
await this.core.effects.emit(import_types.BuyTicketsHooks.OnGetProducts, [
|
|
86
87
|
...mainData,
|
|
87
88
|
...otherData
|
|
88
89
|
]);
|
|
@@ -101,7 +102,7 @@ var BuyTicketsImpl = class extends import_BaseModule.BaseModule {
|
|
|
101
102
|
}
|
|
102
103
|
// 商品列表页提交
|
|
103
104
|
async listSubmit(data) {
|
|
104
|
-
const res = await this.core.effects.emit(
|
|
105
|
+
const res = await this.core.effects.emit(import_types.BuyTicketsHooks.onListSubmit, {
|
|
105
106
|
...data,
|
|
106
107
|
products: this.getProducts()
|
|
107
108
|
});
|
|
@@ -115,14 +116,14 @@ var BuyTicketsImpl = class extends import_BaseModule.BaseModule {
|
|
|
115
116
|
}
|
|
116
117
|
// 购物车提交
|
|
117
118
|
async cartSubmit(data) {
|
|
118
|
-
await this.core.effects.emit(
|
|
119
|
+
await this.core.effects.emit(import_types.BuyTicketsHooks.onCartSubmit, {
|
|
119
120
|
...data,
|
|
120
121
|
products: this.getProducts()
|
|
121
122
|
});
|
|
122
123
|
}
|
|
123
124
|
// 结算提交
|
|
124
125
|
async checkoutSubmit(data) {
|
|
125
|
-
await this.core.effects.emit(
|
|
126
|
+
await this.core.effects.emit(import_types.BuyTicketsHooks.onCheckoutSubmit, {
|
|
126
127
|
...data,
|
|
127
128
|
products: this.getProducts()
|
|
128
129
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Module, PisellCore } from '../../types';
|
|
2
2
|
import { BaseModule } from '../../modules/BaseModule';
|
|
3
|
-
import { Customer
|
|
3
|
+
import { Customer } from './types';
|
|
4
4
|
import { Discount } from '../../modules/Discount/types';
|
|
5
|
+
import { UnavailableReason } from '../../modules/Rules/types';
|
|
5
6
|
export declare class ShopDiscountImpl extends BaseModule implements Module {
|
|
6
7
|
protected defaultName: string;
|
|
7
8
|
protected defaultVersion: string;
|
|
@@ -28,11 +29,17 @@ export declare class ShopDiscountImpl extends BaseModule implements Module {
|
|
|
28
29
|
type?: 'form' | 'customer';
|
|
29
30
|
[key: string]: any;
|
|
30
31
|
}): void;
|
|
31
|
-
calcDiscount(productList: Record<string, any>[], options?:
|
|
32
|
+
calcDiscount(productList: Record<string, any>[], options?: {
|
|
33
|
+
discountId: number;
|
|
34
|
+
isSelected: boolean;
|
|
35
|
+
}): {
|
|
32
36
|
productList: Record<string, any>[];
|
|
33
37
|
discountList: Discount[];
|
|
34
38
|
};
|
|
35
|
-
setDiscountSelected(
|
|
39
|
+
setDiscountSelected({ discountId, isSelected, }: {
|
|
40
|
+
discountId: number;
|
|
41
|
+
isSelected: boolean;
|
|
42
|
+
}): {
|
|
36
43
|
productList: Record<string, any>[];
|
|
37
44
|
discountList: Discount[];
|
|
38
45
|
};
|
|
@@ -42,6 +49,7 @@ export declare class ShopDiscountImpl extends BaseModule implements Module {
|
|
|
42
49
|
productList: Record<string, any>[];
|
|
43
50
|
discountList: Discount[];
|
|
44
51
|
type: "server" | "clientCalc";
|
|
52
|
+
unavailableReason?: UnavailableReason;
|
|
45
53
|
}>;
|
|
46
54
|
calcDiscountApplicableProductTotalPrice(discount: Discount): number | undefined;
|
|
47
55
|
private getCustomer;
|
|
@@ -50,12 +58,6 @@ export declare class ShopDiscountImpl extends BaseModule implements Module {
|
|
|
50
58
|
private setDiscountList;
|
|
51
59
|
private getDiscountList;
|
|
52
60
|
private getCustomerWallet;
|
|
53
|
-
private
|
|
54
|
-
loadPrepareConfig(params: {
|
|
55
|
-
customerId: number;
|
|
56
|
-
action?: 'create' | 'update';
|
|
57
|
-
with_good_pass?: 0 | 1;
|
|
58
|
-
with_discount_card?: 0 | 1;
|
|
59
|
-
}): Promise<void>;
|
|
61
|
+
private loadPrepareConfig;
|
|
60
62
|
}
|
|
61
63
|
export default ShopDiscountImpl;
|
|
@@ -34,11 +34,12 @@ __export(ShopDiscount_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(ShopDiscount_exports);
|
|
36
36
|
var import_BaseModule = require("../../modules/BaseModule");
|
|
37
|
+
var import_types = require("./types");
|
|
37
38
|
var import_Discount = require("../../modules/Discount");
|
|
38
39
|
var import_Rules = require("../../modules/Rules");
|
|
39
40
|
var import_utils = require("./utils");
|
|
41
|
+
var import_types2 = require("../../modules/Rules/types");
|
|
40
42
|
var import_decimal = __toESM(require("decimal.js"));
|
|
41
|
-
var import_lodash_es = require("lodash-es");
|
|
42
43
|
var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
43
44
|
constructor(name, version) {
|
|
44
45
|
super(name, version);
|
|
@@ -77,7 +78,7 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
77
78
|
(_a = this.store.discount) == null ? void 0 : _a.destroy();
|
|
78
79
|
(_b = this.store.rules) == null ? void 0 : _b.destroy();
|
|
79
80
|
this.core.effects.offByModuleDestroy(this.name);
|
|
80
|
-
await this.core.effects.emit(
|
|
81
|
+
await this.core.effects.emit(import_types.ShopDiscountHooks.onDestroy, {});
|
|
81
82
|
console.log("[ShopDiscount] 已销毁");
|
|
82
83
|
}
|
|
83
84
|
async clear() {
|
|
@@ -127,8 +128,8 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
127
128
|
this.store.rules = rules;
|
|
128
129
|
}
|
|
129
130
|
registerEventListeners() {
|
|
130
|
-
this.core.effects.
|
|
131
|
-
|
|
131
|
+
this.core.effects.on(
|
|
132
|
+
import_types.ShopDiscountHooks.onCustomerChange,
|
|
132
133
|
(customer) => {
|
|
133
134
|
var _a;
|
|
134
135
|
if (((_a = this.options.otherParams) == null ? void 0 : _a.cacheId) && this.getDiscountList().length) {
|
|
@@ -188,7 +189,7 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
188
189
|
if (((_a = this.store.customer) == null ? void 0 : _a.id) !== customer.id) {
|
|
189
190
|
this.store.customer = customer;
|
|
190
191
|
await this.core.effects.emit(
|
|
191
|
-
|
|
192
|
+
import_types.ShopDiscountHooks.onCustomerChange,
|
|
192
193
|
customer
|
|
193
194
|
);
|
|
194
195
|
}
|
|
@@ -226,34 +227,27 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
226
227
|
};
|
|
227
228
|
}
|
|
228
229
|
// 设置优惠券使用状态
|
|
229
|
-
setDiscountSelected(
|
|
230
|
+
setDiscountSelected({
|
|
231
|
+
discountId,
|
|
232
|
+
isSelected
|
|
233
|
+
}) {
|
|
230
234
|
const discountList = this.getDiscountList();
|
|
231
|
-
const selectionOperations = [];
|
|
232
|
-
selectionOperations.push({
|
|
233
|
-
discountId: params.discountId,
|
|
234
|
-
isSelected: params.isSelected
|
|
235
|
-
});
|
|
236
|
-
if (params.selectedList && params.selectedList.length > 0) {
|
|
237
|
-
selectionOperations.push(...params.selectedList);
|
|
238
|
-
}
|
|
239
|
-
const selectionMap = /* @__PURE__ */ new Map();
|
|
240
|
-
selectionOperations.forEach((operation) => {
|
|
241
|
-
selectionMap.set(operation.discountId, operation.isSelected);
|
|
242
|
-
});
|
|
243
235
|
const newDiscountList = discountList.map((discount) => {
|
|
244
|
-
if (
|
|
245
|
-
const targetIsSelected = selectionMap.get(discount.id);
|
|
236
|
+
if (discount.id === discountId) {
|
|
246
237
|
return {
|
|
247
238
|
...discount,
|
|
248
|
-
isSelected
|
|
239
|
+
isSelected,
|
|
249
240
|
// 手动设置不使用
|
|
250
|
-
isManualSelect: !
|
|
241
|
+
isManualSelect: !isSelected
|
|
251
242
|
};
|
|
252
243
|
}
|
|
253
244
|
return { ...discount, isManualSelect: !(discount == null ? void 0 : discount.isSelected) };
|
|
254
245
|
});
|
|
255
246
|
this.setDiscountList(newDiscountList);
|
|
256
|
-
return this.calcDiscount(this.store.productList || [],
|
|
247
|
+
return this.calcDiscount(this.store.productList || [], {
|
|
248
|
+
discountId,
|
|
249
|
+
isSelected
|
|
250
|
+
});
|
|
257
251
|
}
|
|
258
252
|
setProductList(productList) {
|
|
259
253
|
this.store.productList = productList;
|
|
@@ -269,7 +263,8 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
269
263
|
type: "clientCalc",
|
|
270
264
|
isAvailable: false,
|
|
271
265
|
productList: this.store.productList || [],
|
|
272
|
-
discountList: this.getDiscountList()
|
|
266
|
+
discountList: this.getDiscountList(),
|
|
267
|
+
unavailableReason: import_types2.UnavailableReason.Unknown
|
|
273
268
|
};
|
|
274
269
|
}
|
|
275
270
|
if (!resultDiscountList.length) {
|
|
@@ -298,7 +293,8 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
298
293
|
const {
|
|
299
294
|
productList: newProductList,
|
|
300
295
|
discountList: newDiscountList,
|
|
301
|
-
isAvailable
|
|
296
|
+
isAvailable,
|
|
297
|
+
unavailableReason
|
|
302
298
|
} = rulesModule.isDiscountListAvailable({
|
|
303
299
|
productList: this.store.productList || [],
|
|
304
300
|
oldDiscountList: this.getDiscountList(),
|
|
@@ -312,7 +308,6 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
312
308
|
};
|
|
313
309
|
if (isAvailable) {
|
|
314
310
|
this.setDiscountList(newDiscountList || []);
|
|
315
|
-
this.store.originalDiscountList = newDiscountList || [];
|
|
316
311
|
this.setProductList(newProductList || []);
|
|
317
312
|
if (this.isWalkIn() && resultDiscountList.length && ((_c = this.options.otherParams) == null ? void 0 : _c.platform) === "shop") {
|
|
318
313
|
await this.getCustomerWallet(
|
|
@@ -324,7 +319,8 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
324
319
|
type: "clientCalc",
|
|
325
320
|
isAvailable: isAvailable || false,
|
|
326
321
|
productList: newProductList || this.store.productList || [],
|
|
327
|
-
discountList: newDiscountList || this.getDiscountList()
|
|
322
|
+
discountList: newDiscountList || this.getDiscountList(),
|
|
323
|
+
unavailableReason
|
|
328
324
|
};
|
|
329
325
|
} catch (error) {
|
|
330
326
|
console.error("[ShopDiscount] 扫码出错:", error);
|
|
@@ -332,7 +328,8 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
332
328
|
type: "clientCalc",
|
|
333
329
|
isAvailable: false,
|
|
334
330
|
productList: this.store.productList || [],
|
|
335
|
-
discountList: this.getDiscountList()
|
|
331
|
+
discountList: this.getDiscountList(),
|
|
332
|
+
unavailableReason: import_types2.UnavailableReason.Unknown
|
|
336
333
|
};
|
|
337
334
|
}
|
|
338
335
|
}
|
|
@@ -355,7 +352,7 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
355
352
|
// 触发优惠列表变更事件
|
|
356
353
|
async emitDiscountListChange(discountList) {
|
|
357
354
|
await this.core.effects.emit(
|
|
358
|
-
|
|
355
|
+
import_types.ShopDiscountHooks.onDiscountListChange,
|
|
359
356
|
discountList
|
|
360
357
|
);
|
|
361
358
|
}
|
|
@@ -387,7 +384,6 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
387
384
|
}
|
|
388
385
|
editModeDiscountList.push({
|
|
389
386
|
...discount,
|
|
390
|
-
name: discount.name || discount.discount.title.auto,
|
|
391
387
|
isEditMode: true,
|
|
392
388
|
limited_relation_product_data: {},
|
|
393
389
|
savedAmount: new import_decimal.default(discount.amount || 0).times((product == null ? void 0 : product.quantity) || (product == null ? void 0 : product.num) || 1).plus(((_b = discount == null ? void 0 : discount.metadata) == null ? void 0 : _b.product_discount_difference) || 0).toNumber(),
|
|
@@ -413,7 +409,7 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
413
409
|
if (!targetProduct)
|
|
414
410
|
return false;
|
|
415
411
|
const product = (_a2 = this.hooks) == null ? void 0 : _a2.getProduct(targetProduct);
|
|
416
|
-
return Number(product == null ? void 0 : product.total)
|
|
412
|
+
return Number(product == null ? void 0 : product.total) === 0 && (Number(product == null ? void 0 : product.origin_total) === 0 || !(product == null ? void 0 : product.origin_total));
|
|
417
413
|
};
|
|
418
414
|
const allUsedProductIds = newDiscountList.filter((item) => !(item == null ? void 0 : item.isEditMode)).map((n) => {
|
|
419
415
|
var _a2;
|
|
@@ -455,7 +451,7 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
455
451
|
const { ...customer } = result.data;
|
|
456
452
|
this.setCustomer(customer);
|
|
457
453
|
await this.core.effects.emit(
|
|
458
|
-
|
|
454
|
+
import_types.ShopDiscountHooks.onScanCustomerChange,
|
|
459
455
|
customer
|
|
460
456
|
);
|
|
461
457
|
}
|
|
@@ -463,23 +459,6 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
463
459
|
console.error("[ShopDiscount] 获取客户钱包信息出错:", error);
|
|
464
460
|
}
|
|
465
461
|
}
|
|
466
|
-
async bestDiscount(cb) {
|
|
467
|
-
var _a;
|
|
468
|
-
const newDiscountList = this.store.originalDiscountList;
|
|
469
|
-
this.setDiscountList(newDiscountList);
|
|
470
|
-
if ((_a = this.store.productList) == null ? void 0 : _a.length) {
|
|
471
|
-
const result = this.calcDiscount(this.store.productList);
|
|
472
|
-
cb == null ? void 0 : cb(result);
|
|
473
|
-
await this.core.effects.emit(
|
|
474
|
-
`${this.name}:onLoadPrepareCalcResult`,
|
|
475
|
-
result
|
|
476
|
-
);
|
|
477
|
-
}
|
|
478
|
-
await this.core.effects.emit(
|
|
479
|
-
`${this.name}:onLoadDiscountList`,
|
|
480
|
-
newDiscountList
|
|
481
|
-
);
|
|
482
|
-
}
|
|
483
462
|
// 加载准备配置
|
|
484
463
|
async loadPrepareConfig(params) {
|
|
485
464
|
var _a, _b, _c, _d, _e;
|
|
@@ -506,12 +485,12 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
506
485
|
if ((_e = this.store.productList) == null ? void 0 : _e.length) {
|
|
507
486
|
const result = this.calcDiscount(this.store.productList);
|
|
508
487
|
await this.core.effects.emit(
|
|
509
|
-
|
|
488
|
+
import_types.ShopDiscountHooks.onLoadPrepareCalcResult,
|
|
510
489
|
result
|
|
511
490
|
);
|
|
512
491
|
}
|
|
513
492
|
await this.core.effects.emit(
|
|
514
|
-
|
|
493
|
+
import_types.ShopDiscountHooks.onLoadDiscountList,
|
|
515
494
|
filteredDiscountList
|
|
516
495
|
);
|
|
517
496
|
} catch (error) {
|
package/lib/solution/index.d.ts
CHANGED
package/lib/solution/index.js
CHANGED
|
@@ -18,16 +18,12 @@ var solution_exports = {};
|
|
|
18
18
|
module.exports = __toCommonJS(solution_exports);
|
|
19
19
|
__reExport(solution_exports, require("./BuyTickets"), module.exports);
|
|
20
20
|
__reExport(solution_exports, require("./BookingByStep"), module.exports);
|
|
21
|
-
__reExport(solution_exports, require("./BookingTicket"), module.exports);
|
|
22
21
|
__reExport(solution_exports, require("./ShopDiscount"), module.exports);
|
|
23
22
|
__reExport(solution_exports, require("./RegisterAndLogin"), module.exports);
|
|
24
|
-
__reExport(solution_exports, require("./Checkout"), module.exports);
|
|
25
23
|
// Annotate the CommonJS export names for ESM import in node:
|
|
26
24
|
0 && (module.exports = {
|
|
27
25
|
...require("./BuyTickets"),
|
|
28
26
|
...require("./BookingByStep"),
|
|
29
|
-
...require("./BookingTicket"),
|
|
30
27
|
...require("./ShopDiscount"),
|
|
31
|
-
...require("./RegisterAndLogin")
|
|
32
|
-
...require("./Checkout")
|
|
28
|
+
...require("./RegisterAndLogin")
|
|
33
29
|
});
|
package/lib/types/index.d.ts
CHANGED
|
@@ -38,10 +38,7 @@ export interface PisellCore {
|
|
|
38
38
|
getModuleExports: <T = any>(name: string) => T | null;
|
|
39
39
|
hasModule: (name: string) => boolean;
|
|
40
40
|
effects: {
|
|
41
|
-
on: (event: string, callback: (payload: any) => void) =>
|
|
42
|
-
once: (event: string, callback: (payload: any) => void) => () => void;
|
|
43
|
-
only: (event: string, callback: (payload: any) => void) => () => void;
|
|
44
|
-
off: (event: string, callback: (payload: any) => void) => void;
|
|
41
|
+
on: (event: string, callback: (payload: any) => void) => void;
|
|
45
42
|
emit: (event: string, payload: any, value?: any) => Promise<{
|
|
46
43
|
status: boolean;
|
|
47
44
|
data: any;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@pisell/pisellos",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.78",
|
|
5
5
|
"description": "一个可扩展的前端模块化SDK框架,支持插件系统",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "father build",
|
|
14
14
|
"dev": "father dev --watch",
|
|
15
|
-
"push": "yalc push --replace",
|
|
16
15
|
"test": "vitest",
|
|
17
16
|
"lint": "eslint src --ext .ts",
|
|
18
17
|
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md}\"",
|
|
@@ -55,7 +54,6 @@
|
|
|
55
54
|
"@typescript-eslint/parser": "^5.57.1",
|
|
56
55
|
"axios": "1.7.2",
|
|
57
56
|
"eslint": "^8.37.0",
|
|
58
|
-
"fake-indexeddb": "^6.0.1",
|
|
59
57
|
"father": "^4.1.0",
|
|
60
58
|
"prettier": "^3.5.3",
|
|
61
59
|
"ts-node": "^10.9.1",
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { Module, PisellCore, ModuleOptions } from '../../types';
|
|
2
|
-
import { BaseModule } from '../BaseModule';
|
|
3
|
-
import { CustomerState, ShopCustomer, ShopGetCustomerListParams, CustomerModuleAPI, IPaginationInfo, ICustomerListResponse } from './types';
|
|
4
|
-
export declare class CustomerModule extends BaseModule implements Module, CustomerModuleAPI {
|
|
5
|
-
protected defaultName: string;
|
|
6
|
-
protected defaultVersion: string;
|
|
7
|
-
private store;
|
|
8
|
-
private request;
|
|
9
|
-
private cacheId;
|
|
10
|
-
private openCache;
|
|
11
|
-
private fatherModule;
|
|
12
|
-
constructor(name?: string, version?: string);
|
|
13
|
-
initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
|
|
14
|
-
/**
|
|
15
|
-
* 获取客户列表数据(内部方法)
|
|
16
|
-
* @param params 查询参数
|
|
17
|
-
* @returns API响应数据
|
|
18
|
-
*/
|
|
19
|
-
private fetchCustomerListData;
|
|
20
|
-
/**
|
|
21
|
-
* 处理客户列表操作的错误(内部方法)
|
|
22
|
-
* @param error 错误对象
|
|
23
|
-
* @param operation 操作名称
|
|
24
|
-
*/
|
|
25
|
-
private handleCustomerListError;
|
|
26
|
-
/**
|
|
27
|
-
* 获取客户列表
|
|
28
|
-
* @param params 查询参数
|
|
29
|
-
* @returns 客户列表响应
|
|
30
|
-
*/
|
|
31
|
-
getCustomerList(params?: ShopGetCustomerListParams): Promise<ICustomerListResponse>;
|
|
32
|
-
/**
|
|
33
|
-
* 设置客户列表
|
|
34
|
-
* @param customers 客户列表
|
|
35
|
-
* @param total 总数
|
|
36
|
-
*/
|
|
37
|
-
setCustomerList(customers: ShopCustomer[], total?: number): void;
|
|
38
|
-
/**
|
|
39
|
-
* 设置当前选择的客户
|
|
40
|
-
* @param customer 选择的客户
|
|
41
|
-
*/
|
|
42
|
-
setSelectedCustomer(customer: ShopCustomer | null): void;
|
|
43
|
-
/**
|
|
44
|
-
* 获取当前选择的客户
|
|
45
|
-
* @returns 当前选择的客户
|
|
46
|
-
*/
|
|
47
|
-
getSelectedCustomer(): ShopCustomer | null;
|
|
48
|
-
/**
|
|
49
|
-
* 获取客户列表
|
|
50
|
-
* @returns 客户列表
|
|
51
|
-
*/
|
|
52
|
-
getCustomers(): ShopCustomer[];
|
|
53
|
-
/**
|
|
54
|
-
* 根据ID查找客户
|
|
55
|
-
* @param id 客户ID
|
|
56
|
-
* @returns 客户信息
|
|
57
|
-
*/
|
|
58
|
-
getCustomerById(id: string | number): ShopCustomer | null;
|
|
59
|
-
/**
|
|
60
|
-
* 清空客户列表
|
|
61
|
-
*/
|
|
62
|
-
clearCustomers(): void;
|
|
63
|
-
/**
|
|
64
|
-
* 添加客户到列表第一位
|
|
65
|
-
* @param customer 要添加的客户信息
|
|
66
|
-
*/
|
|
67
|
-
addCustomerToFirst(customer: ShopCustomer): void;
|
|
68
|
-
/**
|
|
69
|
-
* 获取当前状态
|
|
70
|
-
* @returns 当前状态
|
|
71
|
-
*/
|
|
72
|
-
getState(): CustomerState;
|
|
73
|
-
/**
|
|
74
|
-
* 获取分页信息
|
|
75
|
-
* @returns 分页信息
|
|
76
|
-
*/
|
|
77
|
-
getPaginationInfo(): IPaginationInfo;
|
|
78
|
-
/**
|
|
79
|
-
* 触发分页变化事件
|
|
80
|
-
* @param pagination 分页信息
|
|
81
|
-
*/
|
|
82
|
-
triggerPaginationChange(pagination: IPaginationInfo): void;
|
|
83
|
-
/**
|
|
84
|
-
* 设置分页信息
|
|
85
|
-
* @param page 页码
|
|
86
|
-
* @param pageSize 每页数量
|
|
87
|
-
*/
|
|
88
|
-
setPaginationInfo(page: number, pageSize: number): void;
|
|
89
|
-
/**
|
|
90
|
-
* 便捷方法:切换分页并自动获取数据
|
|
91
|
-
* @param page 页码
|
|
92
|
-
* @param pageSize 每页数量(可选,不传则使用当前pageSize)
|
|
93
|
-
* @returns 客户列表响应
|
|
94
|
-
*/
|
|
95
|
-
changeCustomerPage(page: number, pageSize?: number): Promise<ICustomerListResponse>;
|
|
96
|
-
/**
|
|
97
|
-
* 滚动加载更多客户数据 - 数据会追加到现有列表中
|
|
98
|
-
* @returns 客户列表响应
|
|
99
|
-
*/
|
|
100
|
-
loadMoreCustomers(): Promise<ICustomerListResponse>;
|
|
101
|
-
/**
|
|
102
|
-
* 重置并重新开始滚动加载
|
|
103
|
-
* @param params 查询参数
|
|
104
|
-
* @returns 客户列表响应
|
|
105
|
-
*/
|
|
106
|
-
resetAndLoadCustomers(params?: ShopGetCustomerListParams): Promise<ICustomerListResponse>;
|
|
107
|
-
/**
|
|
108
|
-
* 检查是否还有更多数据可以加载
|
|
109
|
-
* @returns 是否还有更多数据
|
|
110
|
-
*/
|
|
111
|
-
hasMoreCustomers(): boolean;
|
|
112
|
-
/**
|
|
113
|
-
* 获取当前的搜索条件
|
|
114
|
-
* @returns 当前搜索条件
|
|
115
|
-
*/
|
|
116
|
-
getCurrentSearchParams(): Omit<ShopGetCustomerListParams, 'skip' | 'num'>;
|
|
117
|
-
/**
|
|
118
|
-
* 缓存状态变化
|
|
119
|
-
*/
|
|
120
|
-
private storeChange;
|
|
121
|
-
}
|
|
122
|
-
export * from './types';
|