@pisell/pisellos 0.0.22 → 0.0.23
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.
|
@@ -177,6 +177,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
177
177
|
open_quotation: 1,
|
|
178
178
|
open_bundle: 1,
|
|
179
179
|
extension_type: ["product_appointment", "appointment_ticket"],
|
|
180
|
+
with: ["category", "collection"],
|
|
180
181
|
status: "published",
|
|
181
182
|
num: 500,
|
|
182
183
|
skip: 1,
|
|
@@ -1022,6 +1023,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1022
1023
|
}
|
|
1023
1024
|
} else {
|
|
1024
1025
|
var _productResources$fin;
|
|
1026
|
+
debugger;
|
|
1025
1027
|
// 如果没有传递 timeSlots,代表是第一种资源,则直接拿商品的 duration,到资源列表里找一个公共可用的
|
|
1026
1028
|
var productResources = getResourcesByProduct(resourcesMap, item, allCartItems);
|
|
1027
1029
|
// 自动选择 productResources 中对应 resources_code 的资源
|
|
@@ -1042,6 +1044,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1042
1044
|
}
|
|
1043
1045
|
});
|
|
1044
1046
|
});
|
|
1047
|
+
debugger;
|
|
1045
1048
|
return {
|
|
1046
1049
|
errorList: errorList
|
|
1047
1050
|
};
|
|
@@ -1084,6 +1087,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1084
1087
|
duration = accountDuration;
|
|
1085
1088
|
}
|
|
1086
1089
|
});
|
|
1090
|
+
debugger;
|
|
1087
1091
|
var timeSlots = getTimeSlicesByResources({
|
|
1088
1092
|
resourceIds: resourceIds,
|
|
1089
1093
|
resourcesMap: resourcesMap,
|
|
@@ -517,44 +517,40 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
517
517
|
while (1) switch (_context9.prev = _context9.next) {
|
|
518
518
|
case 0:
|
|
519
519
|
_context9.prev = 0;
|
|
520
|
-
customerId = params.customerId || ((_this$getCustomer2 = this.getCustomer()) === null || _this$getCustomer2 === void 0 ? void 0 : _this$getCustomer2.id);
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
}
|
|
525
|
-
return _context9.abrupt("return");
|
|
526
|
-
case 4:
|
|
527
|
-
_context9.next = 6;
|
|
520
|
+
customerId = params.customerId || ((_this$getCustomer2 = this.getCustomer()) === null || _this$getCustomer2 === void 0 ? void 0 : _this$getCustomer2.id); // if (customerId === 1 || !customerId) {
|
|
521
|
+
// return
|
|
522
|
+
// }
|
|
523
|
+
_context9.next = 4;
|
|
528
524
|
return (_this$store$discount7 = this.store.discount) === null || _this$store$discount7 === void 0 ? void 0 : _this$store$discount7.loadPrepareConfig({
|
|
529
525
|
customer_id: customerId,
|
|
530
526
|
action: "create",
|
|
531
527
|
with_good_pass: 1
|
|
532
528
|
});
|
|
533
|
-
case
|
|
529
|
+
case 4:
|
|
534
530
|
goodPassList = _context9.sent;
|
|
535
531
|
this.setDiscountList(goodPassList || []);
|
|
536
532
|
if (!((_this$store$productLi = this.store.productList) !== null && _this$store$productLi !== void 0 && _this$store$productLi.length)) {
|
|
537
|
-
_context9.next =
|
|
533
|
+
_context9.next = 10;
|
|
538
534
|
break;
|
|
539
535
|
}
|
|
540
536
|
result = this.calcDiscount(this.store.productList);
|
|
541
|
-
_context9.next =
|
|
537
|
+
_context9.next = 10;
|
|
542
538
|
return this.core.effects.emit(ShopDiscountHooks.onLoadPrepareCalcResult, result);
|
|
543
|
-
case
|
|
544
|
-
_context9.next =
|
|
539
|
+
case 10:
|
|
540
|
+
_context9.next = 12;
|
|
545
541
|
return this.core.effects.emit(ShopDiscountHooks.onLoadDiscountList, goodPassList);
|
|
546
|
-
case
|
|
547
|
-
_context9.next =
|
|
542
|
+
case 12:
|
|
543
|
+
_context9.next = 17;
|
|
548
544
|
break;
|
|
549
|
-
case
|
|
550
|
-
_context9.prev =
|
|
545
|
+
case 14:
|
|
546
|
+
_context9.prev = 14;
|
|
551
547
|
_context9.t0 = _context9["catch"](0);
|
|
552
548
|
console.error("[ShopDiscount] 加载准备配置出错:", _context9.t0);
|
|
553
|
-
case
|
|
549
|
+
case 17:
|
|
554
550
|
case "end":
|
|
555
551
|
return _context9.stop();
|
|
556
552
|
}
|
|
557
|
-
}, _callee9, this, [[0,
|
|
553
|
+
}, _callee9, this, [[0, 14]]);
|
|
558
554
|
}));
|
|
559
555
|
function loadPrepareConfig(_x8) {
|
|
560
556
|
return _loadPrepareConfig.apply(this, arguments);
|
|
@@ -134,6 +134,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
134
134
|
open_quotation: 1,
|
|
135
135
|
open_bundle: 1,
|
|
136
136
|
extension_type: ["product_appointment", "appointment_ticket"],
|
|
137
|
+
with: ["category", "collection"],
|
|
137
138
|
status: "published",
|
|
138
139
|
num: 500,
|
|
139
140
|
skip: 1,
|
|
@@ -571,6 +572,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
571
572
|
errorList.push(item._id);
|
|
572
573
|
}
|
|
573
574
|
} else {
|
|
575
|
+
debugger;
|
|
574
576
|
const productResources = (0, import_resources.getResourcesByProduct)(resourcesMap, item, allCartItems);
|
|
575
577
|
const targetRenderList = (_a = productResources.find((n) => n.code === resources_code)) == null ? void 0 : _a.renderList;
|
|
576
578
|
if (targetRenderList && targetRenderList.length > 0) {
|
|
@@ -589,6 +591,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
589
591
|
}
|
|
590
592
|
});
|
|
591
593
|
});
|
|
594
|
+
debugger;
|
|
592
595
|
return { errorList };
|
|
593
596
|
}
|
|
594
597
|
// 从购物车中获取已经分配好第一步资源的所有时间片
|
|
@@ -621,6 +624,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
621
624
|
duration = accountDuration;
|
|
622
625
|
}
|
|
623
626
|
});
|
|
627
|
+
debugger;
|
|
624
628
|
const timeSlots = (0, import_resources.getTimeSlicesByResources)({
|
|
625
629
|
resourceIds,
|
|
626
630
|
resourcesMap,
|
|
@@ -307,9 +307,6 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
|
|
|
307
307
|
var _a, _b, _c;
|
|
308
308
|
try {
|
|
309
309
|
const customerId = params.customerId || ((_a = this.getCustomer()) == null ? void 0 : _a.id);
|
|
310
|
-
if (customerId === 1 || !customerId) {
|
|
311
|
-
return;
|
|
312
|
-
}
|
|
313
310
|
const goodPassList = await ((_b = this.store.discount) == null ? void 0 : _b.loadPrepareConfig({
|
|
314
311
|
customer_id: customerId,
|
|
315
312
|
action: "create",
|