ts-glitter 22.0.3 → 22.0.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/cms-plugin/shopping-collections.js +82 -100
- package/lowcode/cms-plugin/shopping-collections.ts +152 -172
- package/lowcode/cms-plugin/shopping-finance-setting.js +8 -12
- package/lowcode/cms-plugin/shopping-finance-setting.ts +8 -12
- package/lowcode/css/editor.css +2 -2
- package/lowcode/glitter-base/route/shopping.js +1 -1
- package/lowcode/glitter-base/route/shopping.ts +3 -3
- package/lowcode/public-components/product/pd-class.js +4 -1
- package/lowcode/public-components/product/pd-class.ts +6 -1
- package/package.json +1 -1
- package/src/api-public/controllers/rebate.js +3 -1
- package/src/api-public/controllers/rebate.js.map +1 -1
- package/src/api-public/controllers/rebate.ts +97 -91
- package/src/api-public/services/rebate.js +1 -1
- package/src/api-public/services/rebate.js.map +1 -1
- package/src/api-public/services/rebate.ts +2 -3
- package/src/api-public/services/shopping.js +0 -1
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +0 -2
|
@@ -4,10 +4,11 @@ import { BgProduct, OptionsItem } from '../backend-manager/bg-product.js';
|
|
|
4
4
|
import { ApiShop } from '../glitter-base/route/shopping.js';
|
|
5
5
|
import { EditorElem } from '../glitterBundle/plugins/editor-elem.js';
|
|
6
6
|
import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
|
|
7
|
-
import { FilterOptions } from './filter-options.js';
|
|
8
7
|
import { CheckInput } from '../modules/checkInput.js';
|
|
9
8
|
import { Language, LanguageLocation } from '../glitter-base/global/language.js';
|
|
10
9
|
|
|
10
|
+
const html = String.raw;
|
|
11
|
+
|
|
11
12
|
type ViewModel = {
|
|
12
13
|
id: string;
|
|
13
14
|
filterID: string;
|
|
@@ -64,7 +65,7 @@ function getEmptyLanguageData() {
|
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
export class ShoppingCollections {
|
|
67
|
-
|
|
68
|
+
static main(gvc: GVC) {
|
|
68
69
|
const glitter = gvc.glitter;
|
|
69
70
|
const vm: ViewModel = {
|
|
70
71
|
id: glitter.getUUID(),
|
|
@@ -92,7 +93,6 @@ export class ShoppingCollections {
|
|
|
92
93
|
query: '',
|
|
93
94
|
allParents: [],
|
|
94
95
|
};
|
|
95
|
-
const html = String.raw;
|
|
96
96
|
const dialog = new ShareDialog(gvc.glitter);
|
|
97
97
|
|
|
98
98
|
const updateCollections = (data: { products: Product[]; collections: Collection[] }): Collection[] => {
|
|
@@ -198,51 +198,7 @@ export class ShoppingCollections {
|
|
|
198
198
|
bind: id,
|
|
199
199
|
view: () => {
|
|
200
200
|
if (loading) {
|
|
201
|
-
|
|
202
|
-
.parent-container,
|
|
203
|
-
.child-container {
|
|
204
|
-
flex: 1;
|
|
205
|
-
margin-right: 20px;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.parent-container:last-child,
|
|
209
|
-
.child-container:last-child {
|
|
210
|
-
margin-right: 0;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.ul-style {
|
|
214
|
-
list-style-type: none;
|
|
215
|
-
padding: 0;
|
|
216
|
-
margin: 0;
|
|
217
|
-
min-height: 200px;
|
|
218
|
-
border: 1px solid #ccc;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.li-style {
|
|
222
|
-
padding: 6px 10px;
|
|
223
|
-
margin-bottom: 5px;
|
|
224
|
-
background-color: #eee;
|
|
225
|
-
cursor: move;
|
|
226
|
-
border: 1px solid #ccc;
|
|
227
|
-
display: flex;
|
|
228
|
-
align-items: center;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.drag-icon {
|
|
232
|
-
margin-right: 10px;
|
|
233
|
-
cursor: move;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.drag-icon::before {
|
|
237
|
-
content: '↕';
|
|
238
|
-
font-size: 18px;
|
|
239
|
-
margin-right: 10px;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.selectCol {
|
|
243
|
-
background-color: #dcdcdc;
|
|
244
|
-
}
|
|
245
|
-
`);
|
|
201
|
+
this.addStyle(gvc);
|
|
246
202
|
return '';
|
|
247
203
|
} else {
|
|
248
204
|
return html` <div class="d-flex">
|
|
@@ -429,7 +385,7 @@ export class ShoppingCollections {
|
|
|
429
385
|
ApiShop.putCollections({
|
|
430
386
|
data: { replace: dd, original },
|
|
431
387
|
token: (window.parent as any).config.token,
|
|
432
|
-
}).then(
|
|
388
|
+
}).then(() => {
|
|
433
389
|
dialog.dataLoading({ visible: false });
|
|
434
390
|
gvc.notifyDataChange(vm.id);
|
|
435
391
|
});
|
|
@@ -502,7 +458,7 @@ export class ShoppingCollections {
|
|
|
502
458
|
}
|
|
503
459
|
});
|
|
504
460
|
},
|
|
505
|
-
rowClick: (
|
|
461
|
+
rowClick: (_, index) => {
|
|
506
462
|
vm.data = vm.dataList[index];
|
|
507
463
|
vm.type = 'replace';
|
|
508
464
|
},
|
|
@@ -559,9 +515,57 @@ export class ShoppingCollections {
|
|
|
559
515
|
});
|
|
560
516
|
}
|
|
561
517
|
|
|
562
|
-
|
|
563
|
-
|
|
518
|
+
static addStyle(gvc: GVC) {
|
|
519
|
+
gvc.addStyle(`
|
|
520
|
+
.parent-container,
|
|
521
|
+
.child-container {
|
|
522
|
+
flex: 1;
|
|
523
|
+
margin-right: 20px;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.parent-container:last-child,
|
|
527
|
+
.child-container:last-child {
|
|
528
|
+
margin-right: 0;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.ul-style {
|
|
532
|
+
list-style-type: none;
|
|
533
|
+
padding: 0;
|
|
534
|
+
margin: 0;
|
|
535
|
+
min-height: 200px;
|
|
536
|
+
border: 1px solid #ccc;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.li-style {
|
|
540
|
+
padding: 6px 10px;
|
|
541
|
+
margin-bottom: 5px;
|
|
542
|
+
background-color: #eee;
|
|
543
|
+
cursor: move;
|
|
544
|
+
border: 1px solid #ccc;
|
|
545
|
+
display: flex;
|
|
546
|
+
align-items: center;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.drag-icon {
|
|
550
|
+
margin-right: 10px;
|
|
551
|
+
cursor: move;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.drag-icon::before {
|
|
555
|
+
content: '↕';
|
|
556
|
+
font-size: 18px;
|
|
557
|
+
margin-right: 10px;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.selectCol {
|
|
561
|
+
background-color: #dcdcdc;
|
|
562
|
+
}
|
|
563
|
+
`);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
static editorDetail(obj: { vm: ViewModel; gvc: GVC; type?: 'add' | 'replace' }) {
|
|
564
567
|
const gvc = obj.gvc;
|
|
568
|
+
const glitter = gvc.glitter;
|
|
565
569
|
const vm = obj.vm;
|
|
566
570
|
const original = JSON.parse(JSON.stringify(vm.data));
|
|
567
571
|
const dialog = new ShareDialog(gvc.glitter);
|
|
@@ -589,13 +593,13 @@ export class ShoppingCollections {
|
|
|
589
593
|
|
|
590
594
|
for (const data of lagDomain) {
|
|
591
595
|
if (data.domains.includes(vm.data.language_data[data.lang].seo.domain)) {
|
|
592
|
-
const
|
|
596
|
+
const text = Language.getLanguageText({
|
|
593
597
|
local: true,
|
|
594
598
|
compare: data.lang,
|
|
595
599
|
});
|
|
596
600
|
return {
|
|
597
601
|
result: false,
|
|
598
|
-
text: `語系「${
|
|
602
|
+
text: `語系「${text}」的連結網址「${vm.data.language_data[data.lang].seo.domain}」<br />已存在於其他類別,請更換連結網址`,
|
|
599
603
|
};
|
|
600
604
|
}
|
|
601
605
|
}
|
|
@@ -657,8 +661,6 @@ export class ShoppingCollections {
|
|
|
657
661
|
return gvc.bindView(
|
|
658
662
|
(() => {
|
|
659
663
|
const id = gvc.glitter.getUUID();
|
|
660
|
-
const glitter = gvc.glitter;
|
|
661
|
-
const html = String.raw;
|
|
662
664
|
return {
|
|
663
665
|
bind: id,
|
|
664
666
|
view: () => {
|
|
@@ -667,7 +669,6 @@ export class ShoppingCollections {
|
|
|
667
669
|
>
|
|
668
670
|
${BgWidget.grayNote('前往商店設定->商店訊息中,設定支援的語言。')}
|
|
669
671
|
${gvc.bindView(() => {
|
|
670
|
-
const html = String.raw;
|
|
671
672
|
return {
|
|
672
673
|
bind: glitter.getUUID(),
|
|
673
674
|
view: () => {
|
|
@@ -738,7 +739,7 @@ export class ShoppingCollections {
|
|
|
738
739
|
},
|
|
739
740
|
title: '切換語系',
|
|
740
741
|
footer_html: gvc => {
|
|
741
|
-
return
|
|
742
|
+
return '';
|
|
742
743
|
},
|
|
743
744
|
width: 300,
|
|
744
745
|
});
|
|
@@ -752,7 +753,7 @@ export class ShoppingCollections {
|
|
|
752
753
|
// 左容器
|
|
753
754
|
html: [
|
|
754
755
|
BgWidget.mainCard(
|
|
755
|
-
html` <div class="tx_700" style="margin-bottom:
|
|
756
|
+
html` <div class="tx_700" style="margin-bottom: 12px">分類標籤 ${BgWidget.requiredStar()}</div>
|
|
756
757
|
${EditorElem.editeInput({
|
|
757
758
|
gvc: gvc,
|
|
758
759
|
title: '',
|
|
@@ -772,7 +773,7 @@ export class ShoppingCollections {
|
|
|
772
773
|
gvc: gvc,
|
|
773
774
|
title: '',
|
|
774
775
|
default: language_data.title,
|
|
775
|
-
placeHolder: vm.data.title || '',
|
|
776
|
+
placeHolder: vm.data.title || '預設為「分類標籤」輸入值',
|
|
776
777
|
callback: text => {
|
|
777
778
|
language_data.title = text;
|
|
778
779
|
if (language_data.seo.domain === '') {
|
|
@@ -789,7 +790,7 @@ export class ShoppingCollections {
|
|
|
789
790
|
view: () => {
|
|
790
791
|
return BgWidget.mainCard(
|
|
791
792
|
[
|
|
792
|
-
html` <div class="
|
|
793
|
+
html` <div class="tx_700 mb-2">
|
|
793
794
|
連結網址 ${BgWidget.requiredStar()} ${BgWidget.languageInsignia(select_lan)}
|
|
794
795
|
</div>`,
|
|
795
796
|
gvc.bindView({
|
|
@@ -797,8 +798,8 @@ export class ShoppingCollections {
|
|
|
797
798
|
view: () => {
|
|
798
799
|
return html`<div
|
|
799
800
|
class="${document.body.clientWidth < 800
|
|
800
|
-
?
|
|
801
|
-
:
|
|
801
|
+
? 'w-100'
|
|
802
|
+
: ''} justify-content-start justify-content-lg-center"
|
|
802
803
|
style="padding: 9px 18px;background: #EAEAEA; justify-content: center; align-items: center; gap: 5px; display: flex"
|
|
803
804
|
>
|
|
804
805
|
<div
|
|
@@ -818,7 +819,6 @@ export class ShoppingCollections {
|
|
|
818
819
|
onchange="${gvc.event(e => {
|
|
819
820
|
let text = e.value;
|
|
820
821
|
if (text.length > 0 && !CheckInput.isChineseEnglishNumberHyphen(text)) {
|
|
821
|
-
const dialog = new ShareDialog(gvc.glitter);
|
|
822
822
|
dialog.infoMessage({ text: '連結僅限使用中英文數字與連接號' });
|
|
823
823
|
} else {
|
|
824
824
|
language_data.seo.domain = text;
|
|
@@ -829,9 +829,7 @@ export class ShoppingCollections {
|
|
|
829
829
|
},
|
|
830
830
|
divCreate: {
|
|
831
831
|
style: `width: 100%; justify-content: flex-start; align-items: center; display: inline-flex;border:1px solid #EAEAEA;border-radius: 10px;overflow: hidden; ${
|
|
832
|
-
document.body.clientWidth > 768
|
|
833
|
-
? 'gap: 18px; '
|
|
834
|
-
: 'flex-direction: column; gap: 0px; '
|
|
832
|
+
document.body.clientWidth > 768 ? 'gap: 18px;' : 'flex-direction: column; gap: 0px;'
|
|
835
833
|
}`,
|
|
836
834
|
},
|
|
837
835
|
}),
|
|
@@ -848,115 +846,98 @@ export class ShoppingCollections {
|
|
|
848
846
|
);
|
|
849
847
|
},
|
|
850
848
|
divCreate: {
|
|
851
|
-
class: `${gvc.glitter.ut.frSize(
|
|
852
|
-
{
|
|
853
|
-
sm: ``,
|
|
854
|
-
},
|
|
855
|
-
`p-0`
|
|
856
|
-
)}`,
|
|
849
|
+
class: `${gvc.glitter.ut.frSize({ sm: '' }, 'p-0')}`,
|
|
857
850
|
},
|
|
858
851
|
};
|
|
859
852
|
}),
|
|
860
853
|
BgWidget.mainCard(
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
<div class="d-flex
|
|
871
|
-
<div
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
gvc
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
854
|
+
(() => {
|
|
855
|
+
const pvm = {
|
|
856
|
+
id: gvc.glitter.getUUID(),
|
|
857
|
+
loading: true,
|
|
858
|
+
dataList: vm.data.product_id,
|
|
859
|
+
productList: [],
|
|
860
|
+
};
|
|
861
|
+
return html`
|
|
862
|
+
<div class="d-flex flex-column">
|
|
863
|
+
<div class="d-flex align-items-center" style="justify-content: space-between;">
|
|
864
|
+
<div class="tx_700" style="margin-bottom: 12px">商品</div>
|
|
865
|
+
${BgWidget.grayButton(
|
|
866
|
+
'選擇商品',
|
|
867
|
+
gvc.event(() => {
|
|
868
|
+
BgProduct.productsDialog({
|
|
869
|
+
gvc: gvc,
|
|
870
|
+
default: vm.data.product_id,
|
|
871
|
+
callback: value => {
|
|
872
|
+
pvm.dataList = value;
|
|
873
|
+
vm.data.product_id = value;
|
|
874
|
+
pvm.loading = true;
|
|
875
|
+
gvc.notifyDataChange(pvm.id);
|
|
876
|
+
},
|
|
877
|
+
});
|
|
878
|
+
})
|
|
879
|
+
)}
|
|
880
|
+
</div>
|
|
881
|
+
${gvc.bindView({
|
|
882
|
+
bind: pvm.id,
|
|
883
|
+
view: () => {
|
|
884
|
+
if (pvm.loading) {
|
|
885
|
+
return '資料載入中';
|
|
886
|
+
}
|
|
887
|
+
if (pvm.productList.length === 0) {
|
|
888
|
+
return '目前無選取任何商品';
|
|
889
|
+
}
|
|
890
|
+
return gvc.map(
|
|
891
|
+
pvm.productList.map((opt: OptionsItem, index: number) => {
|
|
892
|
+
return html` <div
|
|
893
|
+
class="form-check-label c_updown_label"
|
|
894
|
+
style="display: flex; align-items: center; min-height: 60px; gap: 8px;"
|
|
895
|
+
>
|
|
896
|
+
<span class="tx_normal" style="min-width: 30px;">${index + 1}.</span>
|
|
897
|
+
${BgWidget.validImageBox({ gvc, image: opt.image, width: 40 })}
|
|
898
|
+
<span class="tx_normal">${opt.value}</span>
|
|
899
|
+
${opt.note ? html` <span class="tx_gray_12 ms-2">${opt.note}</span> ` : ''}
|
|
900
|
+
</div>`;
|
|
891
901
|
})
|
|
892
|
-
)
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
);
|
|
922
|
-
},
|
|
923
|
-
onCreate: () => {
|
|
924
|
-
if (pvm.loading) {
|
|
925
|
-
if (pvm.dataList.length === 0) {
|
|
926
|
-
pvm.productList = [];
|
|
902
|
+
);
|
|
903
|
+
},
|
|
904
|
+
onCreate: () => {
|
|
905
|
+
if (pvm.loading) {
|
|
906
|
+
if (pvm.dataList.length === 0) {
|
|
907
|
+
pvm.productList = [];
|
|
908
|
+
pvm.loading = false;
|
|
909
|
+
setTimeout(() => gvc.notifyDataChange(pvm.id), 100);
|
|
910
|
+
} else {
|
|
911
|
+
ApiShop.getProduct({
|
|
912
|
+
page: 0,
|
|
913
|
+
limit: 99999,
|
|
914
|
+
id_list: pvm.dataList.join(','),
|
|
915
|
+
}).then(data => {
|
|
916
|
+
pvm.productList = data.response.data.map(
|
|
917
|
+
(product: {
|
|
918
|
+
content: {
|
|
919
|
+
id: number;
|
|
920
|
+
title: string;
|
|
921
|
+
preview_image: string[];
|
|
922
|
+
};
|
|
923
|
+
}) => {
|
|
924
|
+
return {
|
|
925
|
+
key: product.content.id,
|
|
926
|
+
value: product.content.title,
|
|
927
|
+
image: product.content.preview_image[0] ?? BgWidget.noImageURL,
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
);
|
|
927
931
|
pvm.loading = false;
|
|
928
|
-
|
|
929
|
-
}
|
|
930
|
-
ApiShop.getProduct({
|
|
931
|
-
page: 0,
|
|
932
|
-
limit: 99999,
|
|
933
|
-
id_list: pvm.dataList.join(','),
|
|
934
|
-
}).then(data => {
|
|
935
|
-
pvm.productList = data.response.data.map(
|
|
936
|
-
(product: {
|
|
937
|
-
content: {
|
|
938
|
-
id: number;
|
|
939
|
-
title: string;
|
|
940
|
-
preview_image: string[];
|
|
941
|
-
};
|
|
942
|
-
}) => {
|
|
943
|
-
return {
|
|
944
|
-
key: product.content.id,
|
|
945
|
-
value: product.content.title,
|
|
946
|
-
image: product.content.preview_image[0] ?? BgWidget.noImageURL,
|
|
947
|
-
};
|
|
948
|
-
}
|
|
949
|
-
);
|
|
950
|
-
pvm.loading = false;
|
|
951
|
-
gvc.notifyDataChange(pvm.id);
|
|
952
|
-
});
|
|
953
|
-
}
|
|
932
|
+
gvc.notifyDataChange(pvm.id);
|
|
933
|
+
});
|
|
954
934
|
}
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
935
|
+
}
|
|
936
|
+
},
|
|
937
|
+
})}
|
|
938
|
+
</div>
|
|
939
|
+
`;
|
|
940
|
+
})()
|
|
960
941
|
),
|
|
961
942
|
BgWidget.mainCard(
|
|
962
943
|
[
|
|
@@ -1012,7 +993,7 @@ export class ShoppingCollections {
|
|
|
1012
993
|
vm.data.parentTitles.length > 0) ||
|
|
1013
994
|
vm.type === 'add'
|
|
1014
995
|
) {
|
|
1015
|
-
return html` <div class="tx_700" style="margin-bottom:
|
|
996
|
+
return html` <div class="tx_700" style="margin-bottom: 12px">父層</div>
|
|
1016
997
|
${BgWidget.select({
|
|
1017
998
|
gvc: gvc,
|
|
1018
999
|
callback: text => {
|
|
@@ -1027,7 +1008,7 @@ export class ShoppingCollections {
|
|
|
1027
1008
|
}
|
|
1028
1009
|
const id = gvc.glitter.getUUID();
|
|
1029
1010
|
return html`
|
|
1030
|
-
<div class="tx_700" style="margin-bottom:
|
|
1011
|
+
<div class="tx_700" style="margin-bottom: 12px">子分類</div>
|
|
1031
1012
|
${gvc.bindView({
|
|
1032
1013
|
bind: id,
|
|
1033
1014
|
view: () => {
|
|
@@ -1100,7 +1081,6 @@ export class ShoppingCollections {
|
|
|
1100
1081
|
return;
|
|
1101
1082
|
}
|
|
1102
1083
|
|
|
1103
|
-
// const regexTitle = /[\s,\/\\]+/g;
|
|
1104
1084
|
const forbiddenRegex = /[,/\\]/;
|
|
1105
1085
|
if (forbiddenRegex.test(vm.data.title)) {
|
|
1106
1086
|
dialog.infoMessage({ text: '標題不可包含空白格與以下符號:<br />「 , 」「 / 」「 \\ 」' });
|
|
@@ -899,7 +899,7 @@ export class ShoppingFinanceSetting {
|
|
|
899
899
|
BgWidget.tab(viewList, gvc, vm.key, res => {
|
|
900
900
|
vm.key = res;
|
|
901
901
|
gvc.notifyDataChange(vm.id);
|
|
902
|
-
}, 'margin
|
|
902
|
+
}, 'margin: 10px 0 !important'),
|
|
903
903
|
page,
|
|
904
904
|
].join(BgWidget.mbContainer(12));
|
|
905
905
|
},
|
|
@@ -1117,9 +1117,8 @@ export class ShoppingFinanceSetting {
|
|
|
1117
1117
|
}, { single: false }),
|
|
1118
1118
|
BgWidget.editeInput({
|
|
1119
1119
|
gvc: gvc,
|
|
1120
|
-
title: html `<div class="d-flex align-items-center mt-
|
|
1121
|
-
|
|
1122
|
-
</div>`,
|
|
1120
|
+
title: html `<div class="d-flex align-items-center mt-3 gap-2">最低消費金額(輸入 0 則沒有限制)</div>
|
|
1121
|
+
${BgWidget.grayNote(`購物車需達到此金額,才可使用此${t}流`)}`,
|
|
1123
1122
|
default: `${data.cartSetting.minimumTotal}`,
|
|
1124
1123
|
type: 'number',
|
|
1125
1124
|
callback: text => {
|
|
@@ -1129,9 +1128,8 @@ export class ShoppingFinanceSetting {
|
|
|
1129
1128
|
}),
|
|
1130
1129
|
BgWidget.editeInput({
|
|
1131
1130
|
gvc: gvc,
|
|
1132
|
-
title: html `<div class="d-flex align-items-center mt-
|
|
1133
|
-
|
|
1134
|
-
</div>`,
|
|
1131
|
+
title: html `<div class="d-flex align-items-center mt-3 gap-2">最高消費金額(輸入 0 則沒有限制)</div>
|
|
1132
|
+
${BgWidget.grayNote(`購物車需低於此金額,才可使用此${t}流`)}`,
|
|
1135
1133
|
default: `${data.cartSetting.maximumTotal}`,
|
|
1136
1134
|
type: 'number',
|
|
1137
1135
|
callback: text => {
|
|
@@ -1139,13 +1137,11 @@ export class ShoppingFinanceSetting {
|
|
|
1139
1137
|
},
|
|
1140
1138
|
placeHolder: '請輸入金額',
|
|
1141
1139
|
}),
|
|
1142
|
-
BgWidget.horizontalLine(),
|
|
1140
|
+
BgWidget.horizontalLine({ margin: 1.5 }),
|
|
1143
1141
|
BgWidget.editeInput({
|
|
1144
1142
|
gvc: gvc,
|
|
1145
|
-
title: html `<div class="
|
|
1146
|
-
|
|
1147
|
-
${questionDialog(html `訂單中「所有商品小計(A)」若達到輸入的指定值,使用此物流則免運`)}
|
|
1148
|
-
</div>`,
|
|
1143
|
+
title: html `<div class="mt-3" style="white-space: break-spaces;">滿額免運(輸入 0 則不啟用)</div>
|
|
1144
|
+
${BgWidget.grayNote('購物車達到此金額即享有免運優惠')}`,
|
|
1149
1145
|
default: `${data.cartSetting.freeShipmnetTarget}`,
|
|
1150
1146
|
type: 'number',
|
|
1151
1147
|
callback: text => {
|
|
@@ -993,7 +993,7 @@ export class ShoppingFinanceSetting {
|
|
|
993
993
|
vm.key = res;
|
|
994
994
|
gvc.notifyDataChange(vm.id);
|
|
995
995
|
},
|
|
996
|
-
'margin
|
|
996
|
+
'margin: 10px 0 !important'
|
|
997
997
|
),
|
|
998
998
|
page,
|
|
999
999
|
].join(BgWidget.mbContainer(12));
|
|
@@ -1238,9 +1238,8 @@ export class ShoppingFinanceSetting {
|
|
|
1238
1238
|
),
|
|
1239
1239
|
BgWidget.editeInput({
|
|
1240
1240
|
gvc: gvc,
|
|
1241
|
-
title: html`<div class="d-flex align-items-center mt-
|
|
1242
|
-
|
|
1243
|
-
</div>`,
|
|
1241
|
+
title: html`<div class="d-flex align-items-center mt-3 gap-2">最低消費金額(輸入 0 則沒有限制)</div>
|
|
1242
|
+
${BgWidget.grayNote(`購物車需達到此金額,才可使用此${t}流`)}`,
|
|
1244
1243
|
default: `${data.cartSetting.minimumTotal}`,
|
|
1245
1244
|
type: 'number',
|
|
1246
1245
|
callback: text => {
|
|
@@ -1250,9 +1249,8 @@ export class ShoppingFinanceSetting {
|
|
|
1250
1249
|
}),
|
|
1251
1250
|
BgWidget.editeInput({
|
|
1252
1251
|
gvc: gvc,
|
|
1253
|
-
title: html`<div class="d-flex align-items-center mt-
|
|
1254
|
-
|
|
1255
|
-
</div>`,
|
|
1252
|
+
title: html`<div class="d-flex align-items-center mt-3 gap-2">最高消費金額(輸入 0 則沒有限制)</div>
|
|
1253
|
+
${BgWidget.grayNote(`購物車需低於此金額,才可使用此${t}流`)}`,
|
|
1256
1254
|
default: `${data.cartSetting.maximumTotal}`,
|
|
1257
1255
|
type: 'number',
|
|
1258
1256
|
callback: text => {
|
|
@@ -1260,13 +1258,11 @@ export class ShoppingFinanceSetting {
|
|
|
1260
1258
|
},
|
|
1261
1259
|
placeHolder: '請輸入金額',
|
|
1262
1260
|
}),
|
|
1263
|
-
BgWidget.horizontalLine(),
|
|
1261
|
+
BgWidget.horizontalLine({ margin: 1.5 }),
|
|
1264
1262
|
BgWidget.editeInput({
|
|
1265
1263
|
gvc: gvc,
|
|
1266
|
-
title: html`<div class="
|
|
1267
|
-
|
|
1268
|
-
${questionDialog(html`訂單中「所有商品小計(A)」若達到輸入的指定值,使用此物流則免運`)}
|
|
1269
|
-
</div>`,
|
|
1264
|
+
title: html`<div class="mt-3" style="white-space: break-spaces;">滿額免運(輸入 0 則不啟用)</div>
|
|
1265
|
+
${BgWidget.grayNote('購物車達到此金額即享有免運優惠')}`,
|
|
1270
1266
|
default: `${data.cartSetting.freeShipmnetTarget}`,
|
|
1271
1267
|
type: 'number',
|
|
1272
1268
|
callback: text => {
|
package/lowcode/css/editor.css
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
--main-orange-2: #ffb400;
|
|
30
30
|
--main-orange-3: #ff6c02;
|
|
31
31
|
--main-green: #10931d;
|
|
32
|
-
--main-yellow: #
|
|
32
|
+
--main-yellow: #ffb21c;
|
|
33
33
|
|
|
34
34
|
--item-primary: #4d86db;
|
|
35
35
|
--item-success: #d8ecda;
|
|
@@ -1130,7 +1130,7 @@ h6 {
|
|
|
1130
1130
|
.insignia-sm {
|
|
1131
1131
|
border-radius: 0.25rem;
|
|
1132
1132
|
min-height: 20px;
|
|
1133
|
-
padding: 3px
|
|
1133
|
+
padding: 3px 6px;
|
|
1134
1134
|
font-size: 12px;
|
|
1135
1135
|
}
|
|
1136
1136
|
|
|
@@ -790,7 +790,7 @@ export class ApiShop {
|
|
|
790
790
|
});
|
|
791
791
|
}
|
|
792
792
|
static getCollection() {
|
|
793
|
-
return new Promise(
|
|
793
|
+
return new Promise(resolve => {
|
|
794
794
|
var _a;
|
|
795
795
|
window.glitter.share._public_config = (_a = window.glitter.share._public_config) !== null && _a !== void 0 ? _a : {};
|
|
796
796
|
const config = window.glitter.share._public_config;
|
|
@@ -654,8 +654,8 @@ export class ApiShop {
|
|
|
654
654
|
valid?: boolean;
|
|
655
655
|
is_shipment?: boolean;
|
|
656
656
|
is_reconciliation?: boolean;
|
|
657
|
-
buyer_name?:string
|
|
658
|
-
buyer_phone?:string
|
|
657
|
+
buyer_name?: string;
|
|
658
|
+
buyer_phone?: string;
|
|
659
659
|
}) {
|
|
660
660
|
const filterString = this.orderListFilterString(json.filter);
|
|
661
661
|
return BaseApi.create({
|
|
@@ -936,7 +936,7 @@ export class ApiShop {
|
|
|
936
936
|
}
|
|
937
937
|
|
|
938
938
|
static getCollection() {
|
|
939
|
-
return new Promise<{ result: boolean; response: any }>(
|
|
939
|
+
return new Promise<{ result: boolean; response: any }>(resolve => {
|
|
940
940
|
(window as any).glitter.share._public_config = (window as any).glitter.share._public_config ?? {};
|
|
941
941
|
const config = (window as any).glitter.share._public_config;
|
|
942
942
|
if (config[`collection-manager`] && (window as any).glitter.getUrlParameter('cms') !== 'true') {
|
|
@@ -1459,8 +1459,11 @@ export class PdClass {
|
|
|
1459
1459
|
let minVariant = null;
|
|
1460
1460
|
let maxVariant = null;
|
|
1461
1461
|
for (const variant of variants) {
|
|
1462
|
-
const { sale_price, origin_price } = variant;
|
|
1462
|
+
const { sale_price, origin_price, invisible } = variant;
|
|
1463
1463
|
specPriceMap.set(sale_price, { sale_price, origin_price });
|
|
1464
|
+
if (invisible) {
|
|
1465
|
+
continue;
|
|
1466
|
+
}
|
|
1464
1467
|
if (!minVariant || sale_price < minVariant.sale_price) {
|
|
1465
1468
|
minVariant = { sale_price, origin_price };
|
|
1466
1469
|
}
|