@pisell/pisellos 0.0.249 → 0.0.250
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/Payment/walletpass.js +20 -9
- package/dist/modules/Product/index.d.ts +1 -1
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/lib/modules/Payment/walletpass.js +7 -0
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -110,21 +110,32 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
110
110
|
key: "initializeWalletDataFromBusinessAsync",
|
|
111
111
|
value: (function () {
|
|
112
112
|
var _initializeWalletDataFromBusinessAsync = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(businessData) {
|
|
113
|
+
var _businessData$amountI, _businessData$amountI2;
|
|
113
114
|
var startTime, walletParams, result, endTime, duration, _endTime, _duration;
|
|
114
115
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
115
116
|
while (1) switch (_context.prev = _context.next) {
|
|
116
117
|
case 0:
|
|
117
|
-
startTime = Date.now();
|
|
118
|
+
startTime = Date.now();
|
|
119
|
+
if (!(Number((businessData === null || businessData === void 0 || (_businessData$amountI = businessData.amountInfo) === null || _businessData$amountI === void 0 ? void 0 : _businessData$amountI.totalAmount) || 0) <= 0 || Number((businessData === null || businessData === void 0 || (_businessData$amountI2 = businessData.amountInfo) === null || _businessData$amountI2 === void 0 ? void 0 : _businessData$amountI2.subTotal) || 0) <= 0)) {
|
|
120
|
+
_context.next = 3;
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
return _context.abrupt("return", {
|
|
124
|
+
walletRecommendList: [],
|
|
125
|
+
userIdentificationCodes: []
|
|
126
|
+
});
|
|
127
|
+
case 3:
|
|
128
|
+
// 发送初始化开始事件
|
|
118
129
|
this.emitEvent(WalletPassHooks.OnWalletInitializationStarted, {
|
|
119
130
|
businessData: businessData,
|
|
120
131
|
startTime: startTime
|
|
121
132
|
});
|
|
122
|
-
_context.prev =
|
|
133
|
+
_context.prev = 4;
|
|
123
134
|
// 生成钱包API参数
|
|
124
135
|
walletParams = this.generateWalletParams(businessData); // 调用标准的初始化流程
|
|
125
|
-
_context.next =
|
|
136
|
+
_context.next = 8;
|
|
126
137
|
return this.initializeWalletDataAsync(walletParams);
|
|
127
|
-
case
|
|
138
|
+
case 8:
|
|
128
139
|
result = _context.sent;
|
|
129
140
|
endTime = Date.now();
|
|
130
141
|
duration = endTime - startTime; // 发送初始化完成事件
|
|
@@ -137,9 +148,9 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
137
148
|
});
|
|
138
149
|
console.log("[WalletPass] \u4ECE\u4E1A\u52A1\u6570\u636E\u521D\u59CB\u5316\u94B1\u5305\u6570\u636E\u6210\u529F\uFF0C\u8017\u65F6: ".concat(duration, "ms"));
|
|
139
150
|
return _context.abrupt("return", result);
|
|
140
|
-
case
|
|
141
|
-
_context.prev =
|
|
142
|
-
_context.t0 = _context["catch"](
|
|
151
|
+
case 16:
|
|
152
|
+
_context.prev = 16;
|
|
153
|
+
_context.t0 = _context["catch"](4);
|
|
143
154
|
_endTime = Date.now();
|
|
144
155
|
_duration = _endTime - startTime; // 发送初始化失败事件
|
|
145
156
|
this.emitEvent(WalletPassHooks.OnWalletInitializationFailed, {
|
|
@@ -151,11 +162,11 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
|
|
|
151
162
|
});
|
|
152
163
|
console.error("[WalletPass] \u4ECE\u4E1A\u52A1\u6570\u636E\u521D\u59CB\u5316\u94B1\u5305\u6570\u636E\u5931\u8D25\uFF0C\u8017\u65F6: ".concat(_duration, "ms"), _context.t0);
|
|
153
164
|
throw _context.t0;
|
|
154
|
-
case
|
|
165
|
+
case 23:
|
|
155
166
|
case "end":
|
|
156
167
|
return _context.stop();
|
|
157
168
|
}
|
|
158
|
-
}, _callee, this, [[
|
|
169
|
+
}, _callee, this, [[4, 16]]);
|
|
159
170
|
}));
|
|
160
171
|
function initializeWalletDataFromBusinessAsync(_x) {
|
|
161
172
|
return _initializeWalletDataFromBusinessAsync.apply(this, arguments);
|
|
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
|
|
|
49
49
|
getCategories(): ProductCategory[];
|
|
50
50
|
setOtherParams(key: string, value: any): void;
|
|
51
51
|
getOtherParams(): any;
|
|
52
|
-
getProductType(): "
|
|
52
|
+
getProductType(): "normal" | "duration" | "session";
|
|
53
53
|
}
|
|
@@ -314,7 +314,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
314
314
|
}[];
|
|
315
315
|
setOtherData(key: string, value: any): void;
|
|
316
316
|
getOtherData(key: string): any;
|
|
317
|
-
getProductTypeById(id: number): Promise<"
|
|
317
|
+
getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
|
|
318
318
|
/**
|
|
319
319
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
320
320
|
*
|
|
@@ -111,7 +111,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
|
|
|
111
111
|
* 获取当前的客户搜索条件
|
|
112
112
|
* @returns 当前搜索条件
|
|
113
113
|
*/
|
|
114
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
114
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
|
|
115
115
|
/**
|
|
116
116
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
117
117
|
* @returns 客户状态
|
|
@@ -88,7 +88,14 @@ var WalletPassPaymentImpl = class {
|
|
|
88
88
|
* 内部生成参数,然后调用标准的初始化流程
|
|
89
89
|
*/
|
|
90
90
|
async initializeWalletDataFromBusinessAsync(businessData) {
|
|
91
|
+
var _a, _b;
|
|
91
92
|
const startTime = Date.now();
|
|
93
|
+
if (Number(((_a = businessData == null ? void 0 : businessData.amountInfo) == null ? void 0 : _a.totalAmount) || 0) <= 0 || Number(((_b = businessData == null ? void 0 : businessData.amountInfo) == null ? void 0 : _b.subTotal) || 0) <= 0) {
|
|
94
|
+
return {
|
|
95
|
+
walletRecommendList: [],
|
|
96
|
+
userIdentificationCodes: []
|
|
97
|
+
};
|
|
98
|
+
}
|
|
92
99
|
this.emitEvent(import_types.WalletPassHooks.OnWalletInitializationStarted, {
|
|
93
100
|
businessData,
|
|
94
101
|
startTime
|
|
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
|
|
|
49
49
|
getCategories(): ProductCategory[];
|
|
50
50
|
setOtherParams(key: string, value: any): void;
|
|
51
51
|
getOtherParams(): any;
|
|
52
|
-
getProductType(): "
|
|
52
|
+
getProductType(): "normal" | "duration" | "session";
|
|
53
53
|
}
|
|
@@ -314,7 +314,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
314
314
|
}[];
|
|
315
315
|
setOtherData(key: string, value: any): void;
|
|
316
316
|
getOtherData(key: string): any;
|
|
317
|
-
getProductTypeById(id: number): Promise<"
|
|
317
|
+
getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
|
|
318
318
|
/**
|
|
319
319
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
320
320
|
*
|
|
@@ -111,7 +111,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
|
|
|
111
111
|
* 获取当前的客户搜索条件
|
|
112
112
|
* @returns 当前搜索条件
|
|
113
113
|
*/
|
|
114
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
114
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
|
|
115
115
|
/**
|
|
116
116
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
117
117
|
* @returns 客户状态
|