ts-glitter 14.2.3 → 14.2.5
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/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-product.js +2 -1
- package/lowcode/backend-manager/bg-product.ts +2 -1
- package/lowcode/cms-plugin/shopping-discount-setting.js +1 -1
- package/lowcode/cms-plugin/shopping-discount-setting.ts +1 -1
- package/lowcode/cms-plugin/shopping-order-manager.js +8 -1
- package/lowcode/cms-plugin/shopping-order-manager.ts +8 -1
- package/lowcode/public-components/blogs/blogs-01.js +4 -0
- package/lowcode/public-components/checkout/index.js +906 -189
- package/lowcode/public-components/checkout/index.ts +914 -194
- package/lowcode/public-components/product/pd-class.js +17 -12
- package/lowcode/public-components/product/pd-class.ts +20 -13
- package/package.json +1 -1
- package/src/api-public/controllers/ai-chat.js.map +1 -1
- package/src/api-public/controllers/app-release.js.map +1 -1
- package/src/api-public/controllers/article.js.map +1 -1
- package/src/api-public/controllers/post.js.map +1 -1
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/services/ai-robot.d.ts +0 -1
- package/src/api-public/services/ai-robot.js.map +1 -1
- package/src/api-public/services/post.js.map +1 -1
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/shopping.d.ts +2 -0
- package/src/api-public/services/shopping.js +49 -50
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +50 -49
- package/src/index.js +3 -3
- package/src/index.js.map +1 -5
package/lowcode/Entry.js
CHANGED
|
@@ -70,7 +70,7 @@ export class Entry {
|
|
|
70
70
|
}
|
|
71
71
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
72
72
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
73
|
-
glitter.share.editerVersion = 'V_14.2.
|
|
73
|
+
glitter.share.editerVersion = 'V_14.2.5';
|
|
74
74
|
glitter.share.start = new Date();
|
|
75
75
|
const vm = {
|
|
76
76
|
appConfig: [],
|
package/lowcode/Entry.ts
CHANGED
|
@@ -72,7 +72,7 @@ export class Entry {
|
|
|
72
72
|
}
|
|
73
73
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
74
74
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
75
|
-
glitter.share.editerVersion = 'V_14.2.
|
|
75
|
+
glitter.share.editerVersion = 'V_14.2.5';
|
|
76
76
|
glitter.share.start = new Date();
|
|
77
77
|
const vm: {
|
|
78
78
|
appConfig: any;
|
|
@@ -314,7 +314,7 @@ export class BgProduct {
|
|
|
314
314
|
return text.replace(/\//g, html `<i class="fa-solid fa-angle-right mx-1"></i>`);
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
-
BgProduct.getProductOpts = (def) => {
|
|
317
|
+
BgProduct.getProductOpts = (def, product_type) => {
|
|
318
318
|
return new Promise((resolve) => {
|
|
319
319
|
if (!def || def.length === 0) {
|
|
320
320
|
resolve([]);
|
|
@@ -323,6 +323,7 @@ BgProduct.getProductOpts = (def) => {
|
|
|
323
323
|
ApiShop.getProduct({
|
|
324
324
|
page: 0,
|
|
325
325
|
limit: 99999,
|
|
326
|
+
productType: product_type,
|
|
326
327
|
id_list: def.map((d) => `${d}`).join(','),
|
|
327
328
|
}).then((data) => {
|
|
328
329
|
resolve(data.response.data.map((product) => {
|
|
@@ -252,7 +252,7 @@ export class BgProduct {
|
|
|
252
252
|
}, 'productsDialog');
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
static getProductOpts = (def: (number | string)[]) => {
|
|
255
|
+
static getProductOpts = (def: (number | string)[],product_type?: 'product' | 'addProduct' | 'giveaway' ) => {
|
|
256
256
|
return new Promise<OptionsItem[]>((resolve) => {
|
|
257
257
|
if (!def || def.length === 0) {
|
|
258
258
|
resolve([]);
|
|
@@ -261,6 +261,7 @@ export class BgProduct {
|
|
|
261
261
|
ApiShop.getProduct({
|
|
262
262
|
page: 0,
|
|
263
263
|
limit: 99999,
|
|
264
|
+
productType:product_type,
|
|
264
265
|
id_list: def.map((d) => `${d}`).join(','),
|
|
265
266
|
}).then((data) => {
|
|
266
267
|
resolve(
|
|
@@ -976,7 +976,7 @@ export class ShoppingDiscountSetting {
|
|
|
976
976
|
loading: true,
|
|
977
977
|
data: [],
|
|
978
978
|
};
|
|
979
|
-
BgProduct.getProductOpts(voucherData.add_on_products).then((res) => {
|
|
979
|
+
BgProduct.getProductOpts(voucherData.add_on_products, voucherData.reBackType === 'add_on_items' ? 'addProduct' : 'giveaway').then((res) => {
|
|
980
980
|
vm.data = res;
|
|
981
981
|
vm.loading = false;
|
|
982
982
|
gvc.notifyDataChange(vm.id);
|
|
@@ -1089,7 +1089,7 @@ export class ShoppingDiscountSetting {
|
|
|
1089
1089
|
loading: true,
|
|
1090
1090
|
data: [],
|
|
1091
1091
|
};
|
|
1092
|
-
BgProduct.getProductOpts(voucherData.add_on_products
|
|
1092
|
+
BgProduct.getProductOpts(voucherData.add_on_products!,voucherData.reBackType === 'add_on_items' ? 'addProduct' : 'giveaway').then((res) => {
|
|
1093
1093
|
vm.data = res;
|
|
1094
1094
|
vm.loading = false;
|
|
1095
1095
|
gvc.notifyDataChange(vm.id);
|
|
@@ -858,6 +858,13 @@ export class ShoppingOrderManager {
|
|
|
858
858
|
}
|
|
859
859
|
})(),
|
|
860
860
|
...orderData.orderData.voucherList.map((dd) => {
|
|
861
|
+
if (dd.reBackType === 'add_on_items') {
|
|
862
|
+
return {
|
|
863
|
+
title: '加購優惠',
|
|
864
|
+
description: `<div style="color: #8D8D8D;font-size: 14px;white-space:nowrap;text-overflow:ellipsis;">${dd.title}</div>`,
|
|
865
|
+
total: `--`,
|
|
866
|
+
};
|
|
867
|
+
}
|
|
861
868
|
return {
|
|
862
869
|
title: '折扣',
|
|
863
870
|
description: `<div style="color: #8D8D8D;font-size: 14px;white-space:nowrap;text-overflow:ellipsis;">${dd.title}</div>`,
|
|
@@ -875,7 +882,7 @@ export class ShoppingOrderManager {
|
|
|
875
882
|
var _a;
|
|
876
883
|
return html `
|
|
877
884
|
<div class="d-flex align-items-center justify-content-end">
|
|
878
|
-
<div class="tx_normal_14">${dd.title}
|
|
885
|
+
<div class="tx_normal_14 " style="text-align: end;">${dd.title}
|
|
879
886
|
${(_a = dd.description) !== null && _a !== void 0 ? _a : ''}
|
|
880
887
|
</div>
|
|
881
888
|
<div class="tx_normal"
|
|
@@ -1055,6 +1055,13 @@ export class ShoppingOrderManager {
|
|
|
1055
1055
|
}
|
|
1056
1056
|
})(),
|
|
1057
1057
|
...orderData.orderData.voucherList.map((dd: any) => {
|
|
1058
|
+
if(dd.reBackType === 'add_on_items'){
|
|
1059
|
+
return {
|
|
1060
|
+
title: '加購優惠',
|
|
1061
|
+
description: `<div style="color: #8D8D8D;font-size: 14px;white-space:nowrap;text-overflow:ellipsis;">${dd.title}</div>`,
|
|
1062
|
+
total: `--`,
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1058
1065
|
return {
|
|
1059
1066
|
title: '折扣',
|
|
1060
1067
|
description: `<div style="color: #8D8D8D;font-size: 14px;white-space:nowrap;text-overflow:ellipsis;">${dd.title}</div>`,
|
|
@@ -1071,7 +1078,7 @@ export class ShoppingOrderManager {
|
|
|
1071
1078
|
.map((dd) => {
|
|
1072
1079
|
return html`
|
|
1073
1080
|
<div class="d-flex align-items-center justify-content-end">
|
|
1074
|
-
<div class="tx_normal_14">${dd.title}
|
|
1081
|
+
<div class="tx_normal_14 " style="text-align: end;">${dd.title}
|
|
1075
1082
|
${dd.description ?? ''}
|
|
1076
1083
|
</div>
|
|
1077
1084
|
<div class="tx_normal"
|