@pisell/pisellos 0.0.119 → 0.0.121
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.
|
@@ -99,8 +99,13 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
101
|
if (order.type === 'appointment_booking') {
|
|
102
|
-
var
|
|
103
|
-
|
|
102
|
+
var _params$cartItems$fil;
|
|
103
|
+
var firstAppointmentCartItem = (_params$cartItems$fil = params.cartItems.filter(function (n) {
|
|
104
|
+
return !isNormalProduct(n._productOrigin);
|
|
105
|
+
})) === null || _params$cartItems$fil === void 0 ? void 0 : _params$cartItems$fil[0];
|
|
106
|
+
if (firstAppointmentCartItem) {
|
|
107
|
+
order.schedule_date = firstAppointmentCartItem.start_date + ' ' + firstAppointmentCartItem.start_time + ':00';
|
|
108
|
+
}
|
|
104
109
|
}
|
|
105
110
|
order.is_deposit = is_deposit;
|
|
106
111
|
}
|
|
@@ -1430,7 +1430,10 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1430
1430
|
key: "checkCartItems",
|
|
1431
1431
|
value: function checkCartItems(type) {
|
|
1432
1432
|
var _this8 = this;
|
|
1433
|
-
|
|
1433
|
+
// 预约流程中普通商品无需检测这些东西
|
|
1434
|
+
var cartItems = this.store.cart.getItems().filter(function (n) {
|
|
1435
|
+
return !isNormalProduct(n._productOrigin);
|
|
1436
|
+
});
|
|
1434
1437
|
var errorCartItemIds = [];
|
|
1435
1438
|
cartItems.forEach(function (cartItem) {
|
|
1436
1439
|
var result = _this8.store.cart.checkCartItemByType(cartItem, type);
|
|
@@ -37,6 +37,7 @@ var OrderModule = class extends import_BaseModule.BaseModule {
|
|
|
37
37
|
this.request = this.core.getPlugin("request");
|
|
38
38
|
}
|
|
39
39
|
createOrder(params) {
|
|
40
|
+
var _a;
|
|
40
41
|
const order = {
|
|
41
42
|
type: params.type || "appointment_booking",
|
|
42
43
|
// 要从外面拿,virtual
|
|
@@ -71,8 +72,10 @@ var OrderModule = class extends import_BaseModule.BaseModule {
|
|
|
71
72
|
}
|
|
72
73
|
});
|
|
73
74
|
if (order.type === "appointment_booking") {
|
|
74
|
-
const
|
|
75
|
-
|
|
75
|
+
const firstAppointmentCartItem = (_a = params.cartItems.filter((n) => !(0, import_utils2.isNormalProduct)(n._productOrigin))) == null ? void 0 : _a[0];
|
|
76
|
+
if (firstAppointmentCartItem) {
|
|
77
|
+
order.schedule_date = firstAppointmentCartItem.start_date + " " + firstAppointmentCartItem.start_time + ":00";
|
|
78
|
+
}
|
|
76
79
|
}
|
|
77
80
|
order.is_deposit = is_deposit;
|
|
78
81
|
}
|
|
@@ -779,7 +779,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
779
779
|
* @returns 不符合条件的购物车商品ID列表
|
|
780
780
|
*/
|
|
781
781
|
checkCartItems(type) {
|
|
782
|
-
const cartItems = this.store.cart.getItems();
|
|
782
|
+
const cartItems = this.store.cart.getItems().filter((n) => !(0, import_utils4.isNormalProduct)(n._productOrigin));
|
|
783
783
|
const errorCartItemIds = [];
|
|
784
784
|
cartItems.forEach((cartItem) => {
|
|
785
785
|
const result = this.store.cart.checkCartItemByType(cartItem, type);
|