ts-glitter 21.4.0 → 21.4.2
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 +18 -1
- package/lowcode/Entry.ts +19 -1
- package/lowcode/api/pageConfig.js +29 -10
- package/lowcode/api/pageConfig.ts +43 -11
- package/lowcode/backend-manager/bg-blog.js +5 -0
- package/lowcode/backend-manager/bg-blog.ts +5 -0
- package/lowcode/cms-plugin/menus-setting.js +15 -6
- package/lowcode/cms-plugin/menus-setting.ts +23 -6
- package/lowcode/cms-plugin/module/user-excel.js +11 -5
- package/lowcode/cms-plugin/module/user-excel.ts +11 -5
- package/lowcode/cms-plugin/shopping-discount-setting.js +236 -234
- package/lowcode/cms-plugin/shopping-discount-setting.ts +137 -134
- package/lowcode/cms-plugin/third-party-line.js +34 -0
- package/lowcode/cms-plugin/third-party-line.ts +34 -0
- package/lowcode/editor-components/global-editor.js +60 -0
- package/lowcode/editor-components/global-editor.ts +65 -0
- package/lowcode/editor-components/global-widget/bridge.js +40 -34
- package/lowcode/editor-components/global-widget/bridge.ts +42 -34
- package/lowcode/glitterBundle/html-component/global-widget.js +265 -170
- package/lowcode/glitterBundle/html-component/global-widget.ts +264 -159
- package/lowcode/index.html +1 -1
- package/lowcode/jspage/function-page/tool-setting.js +9 -1
- package/lowcode/jspage/function-page/tool-setting.ts +9 -1
- package/lowcode/jspage/main.js +78 -16
- package/lowcode/jspage/main.ts +108 -22
- package/lowcode/official_view_component/official/component.js +17 -10
- package/lowcode/official_view_component/official/component.ts +38 -27
- package/lowcode/public-components/blogs/blogs-01.js +200 -140
- package/lowcode/public-components/blogs/blogs-01.ts +232 -145
- package/lowcode/public-components/checkout/index.js +1 -1
- package/lowcode/public-components/checkout/index.ts +1 -1
- package/lowcode/public-components/headers/head-initial.ts +1 -1
- package/lowcode/public-components/headers/sy-02.js +1 -0
- package/lowcode/public-components/headers/sy-02.ts +1 -0
- package/lowcode/public-components/headers/sy-03.js +1 -0
- package/lowcode/public-components/headers/sy-03.ts +1 -0
- package/lowcode/public-components/headers/sy-04.js +1 -0
- package/lowcode/public-components/headers/sy-04.ts +1 -0
- package/lowcode/public-components/headers/sy-05.js +1 -0
- package/lowcode/public-components/headers/sy-05.ts +1 -0
- package/lowcode/public-components/product/product-detail.js +2 -2
- package/lowcode/public-components/product/product-detail.ts +4 -4
- package/lowcode/public-components/terms-related/index.ts +1 -0
- package/lowcode/public-components/user-manager/um-login.js +7 -1
- package/lowcode/public-components/user-manager/um-login.ts +8 -1
- package/package.json +1 -1
- package/src/api-public/models/glitter-finance.js +1 -2
- package/src/api-public/models/glitter-finance.js.map +1 -1
- package/src/api-public/services/checkout-event.js +1 -0
- package/src/api-public/services/checkout-event.js.map +1 -1
- package/src/api-public/services/checkout-event.ts +1 -0
- package/src/api-public/services/ezpay/tool.d.ts +0 -1
- package/src/api-public/services/user.js +7 -3
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +6 -3
- package/src/app-project/serverless/src/modules/database.d.ts +1 -1
- package/src/app-project/serverless/src/modules/redis.d.ts +1 -1
- package/src/controllers/template.js +2 -2
- package/src/controllers/template.js.map +1 -1
- package/src/controllers/template.ts +5 -2
- package/src/firebase/message.js +1 -2
- package/src/firebase/message.js.map +1 -1
- package/src/helper/app_creater.js +1 -2
- package/src/helper/app_creater.js.map +1 -1
- package/src/helper/glitter-util.d.ts +0 -1
- package/src/index.js +1 -1
- package/src/index.js.map +1 -1
- package/src/index.ts +1 -1
- package/src/lambda/interface.js +2 -2
- package/src/lambda/interface.js.map +1 -1
- package/src/modules/database.d.ts +1 -1
- package/src/run.js +1 -2
- package/src/run.js.map +1 -1
- package/src/seo-config.d.ts +1 -1
- package/src/seo-config.js +13 -12
- package/src/seo-config.js.map +1 -1
- package/src/seo-config.ts +18 -12
- package/src/services/app.d.ts +2 -1
- package/src/services/app.js +4 -2
- package/src/services/app.js.map +1 -1
- package/src/services/app.ts +5 -2
- package/src/services/backend-service.js +7 -17
- package/src/services/backend-service.js.map +1 -1
- package/src/services/saas-table-check.js +2 -2
- package/src/services/saas-table-check.js.map +1 -1
- package/src/services/seo.d.ts +2 -1
- package/src/services/seo.js +7 -4
- package/src/services/seo.js.map +1 -1
- package/src/services/seo.ts +7 -4
- package/src/services/ses.js +1 -2
- package/src/services/ses.js.map +1 -1
- package/src/services/template.d.ts +3 -1
- package/src/services/template.js +55 -34
- package/src/services/template.js.map +1 -1
- package/src/services/template.ts +68 -35
- package/nxv0ptv53w.json +0 -1
- package/omr85cp878.json +0 -1
|
@@ -780,108 +780,109 @@ export class ShoppingDiscountSetting {
|
|
|
780
780
|
.filter(Boolean)
|
|
781
781
|
.map(str => html `<div>${str}</div>`)
|
|
782
782
|
.join(BgWidget.horizontalLine())),
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
783
|
+
...(['shipment_free', 'add_on_items', 'giveaway'].includes(voucherData.reBackType)) ? [] : [
|
|
784
|
+
BgWidget.mainCard(gvc.bindView(() => {
|
|
785
|
+
var _a;
|
|
786
|
+
const id = glitter.getUUID();
|
|
787
|
+
const originForType = String(voucherData.for);
|
|
788
|
+
voucherData.forKey = (_a = voucherData.forKey) !== null && _a !== void 0 ? _a : [];
|
|
789
|
+
let defKeys = {
|
|
790
|
+
collection: JSON.parse(JSON.stringify(voucherData.forKey)),
|
|
791
|
+
product: JSON.parse(JSON.stringify(voucherData.forKey)),
|
|
792
|
+
manager_tag: JSON.parse(JSON.stringify(voucherData.forKey)),
|
|
793
|
+
};
|
|
794
|
+
return {
|
|
795
|
+
bind: id,
|
|
796
|
+
dataList: [
|
|
797
|
+
{ obj: voucherData, key: 'method' },
|
|
798
|
+
{ obj: voucherData, key: 'reBackType' },
|
|
799
|
+
],
|
|
800
|
+
view: () => {
|
|
801
|
+
return [
|
|
802
|
+
...(() => {
|
|
803
|
+
if (['shipment_free', 'add_on_items', 'giveaway'].includes(voucherData.reBackType)) {
|
|
804
|
+
return [];
|
|
805
|
+
}
|
|
806
|
+
const valueInput = (obj) => {
|
|
807
|
+
return BgWidget.editeInput({
|
|
808
|
+
gvc: gvc,
|
|
809
|
+
type: 'number',
|
|
810
|
+
divStyle: 'width:150px;',
|
|
811
|
+
title: '',
|
|
812
|
+
default: voucherData.value,
|
|
813
|
+
placeHolder: '',
|
|
814
|
+
callback: text => {
|
|
815
|
+
const texInt = parseInt(text, 10);
|
|
816
|
+
if (voucherData.method === 'percent' && (texInt > 100 || texInt < 0)) {
|
|
817
|
+
dialog.infoMessage({ text: '數值需介於0~100' });
|
|
818
|
+
gvc.notifyDataChange(id);
|
|
819
|
+
gvc.notifyDataChange(pageVM.countingID);
|
|
820
|
+
}
|
|
821
|
+
else {
|
|
822
|
+
voucherData.value = text;
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
startText: obj.startText,
|
|
826
|
+
endText: obj.endText,
|
|
827
|
+
});
|
|
828
|
+
};
|
|
829
|
+
return [
|
|
830
|
+
html ` <div>
|
|
830
831
|
<div class="tx_700">折扣金額</div>
|
|
831
832
|
${BgWidget.mbContainer(18)}
|
|
832
833
|
${BgWidget.multiCheckboxContainer(gvc, [
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
834
|
+
{
|
|
835
|
+
key: 'fixed',
|
|
836
|
+
name: '固定金額',
|
|
837
|
+
innerHtml: valueInput({ startText: '$' }),
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
key: 'percent',
|
|
841
|
+
name: '百分比',
|
|
842
|
+
innerHtml: valueInput({ endText: '%' }),
|
|
843
|
+
},
|
|
844
|
+
], [voucherData.method], text => {
|
|
845
|
+
voucherData.value = '0';
|
|
846
|
+
voucherData.method = text[0];
|
|
847
|
+
gvc.notifyDataChange(pageVM.conditionID);
|
|
848
|
+
}, { single: true })}
|
|
848
849
|
</div>`,
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
850
|
+
];
|
|
851
|
+
})(),
|
|
852
|
+
...(() => {
|
|
853
|
+
var _a;
|
|
854
|
+
if (voucherData.trigger === 'distribution') {
|
|
855
|
+
return [];
|
|
856
|
+
}
|
|
857
|
+
return [
|
|
858
|
+
html `
|
|
858
859
|
<div class="tx_700">套用至</div>
|
|
859
860
|
${BgWidget.mbContainer(18)}
|
|
860
861
|
${EditorElem.radio({
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
862
|
+
gvc: gvc,
|
|
863
|
+
title: '',
|
|
864
|
+
def: (_a = voucherData.for) !== null && _a !== void 0 ? _a : 'all',
|
|
865
|
+
array: ShoppingDiscountSetting.productForList,
|
|
866
|
+
callback: text => {
|
|
867
|
+
voucherData.forKey = defKeys[text];
|
|
868
|
+
voucherData.for = text;
|
|
869
|
+
gvc.notifyDataChange(id);
|
|
870
|
+
},
|
|
871
|
+
oneLine: true,
|
|
872
|
+
})}
|
|
872
873
|
${BgWidget.mbContainer(8)}
|
|
873
874
|
${(() => {
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
875
|
+
switch (voucherData.for) {
|
|
876
|
+
case 'manager_tag':
|
|
877
|
+
return gvc.bindView(() => {
|
|
878
|
+
const subVM = {
|
|
879
|
+
id: gvc.glitter.getUUID(),
|
|
880
|
+
dataList: originForType === 'manager_tag' ? [...defKeys.manager_tag] : [],
|
|
881
|
+
};
|
|
882
|
+
return {
|
|
883
|
+
bind: subVM.id,
|
|
884
|
+
view: () => {
|
|
885
|
+
return html `
|
|
885
886
|
<div class="d-flex flex-column p-2" style="gap: 18px;">
|
|
886
887
|
<div
|
|
887
888
|
class="d-flex align-items-center gray-bottom-line-18"
|
|
@@ -891,47 +892,47 @@ export class ShoppingDiscountSetting {
|
|
|
891
892
|
<div class="tx_normal">標籤列表</div>
|
|
892
893
|
</div>
|
|
893
894
|
${BgWidget.grayButton('選擇標籤', gvc.event(() => {
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
895
|
+
BgProduct.useProductTags({
|
|
896
|
+
gvc,
|
|
897
|
+
config_key: 'product_manager_tags',
|
|
898
|
+
def: originForType === 'manager_tag' && voucherData.forKey
|
|
899
|
+
? voucherData.forKey.map(item => `${item}`)
|
|
900
|
+
: [],
|
|
901
|
+
callback: (value) => __awaiter(this, void 0, void 0, function* () {
|
|
902
|
+
voucherData.forKey = value;
|
|
903
|
+
defKeys.manager_tag = value;
|
|
904
|
+
subVM.dataList = value;
|
|
905
|
+
gvc.notifyDataChange(subVM.id);
|
|
906
|
+
}),
|
|
907
|
+
});
|
|
908
|
+
}), { textStyle: 'font-weight: 400;' })}
|
|
908
909
|
</div>
|
|
909
910
|
${obj.gvc.map(subVM.dataList.map((opt, index) => {
|
|
910
|
-
|
|
911
|
+
return html ` <div
|
|
911
912
|
class="d-flex align-items-center form-check-label c_updown_label gap-3"
|
|
912
913
|
>
|
|
913
914
|
<span class="tx_normal">${index + 1}. #${opt}</span>
|
|
914
915
|
</div>`;
|
|
915
|
-
|
|
916
|
+
}))}
|
|
916
917
|
</div>
|
|
917
918
|
`;
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
919
|
+
},
|
|
920
|
+
};
|
|
921
|
+
});
|
|
922
|
+
case 'collection':
|
|
923
|
+
return gvc.bindView(() => {
|
|
924
|
+
const subVM = {
|
|
925
|
+
id: gvc.glitter.getUUID(),
|
|
926
|
+
loading: true,
|
|
927
|
+
dataList: [],
|
|
928
|
+
};
|
|
929
|
+
return {
|
|
930
|
+
bind: subVM.id,
|
|
931
|
+
view: () => {
|
|
932
|
+
if (subVM.loading) {
|
|
933
|
+
return BgWidget.spinner();
|
|
934
|
+
}
|
|
935
|
+
return html `
|
|
935
936
|
<div class="d-flex flex-column p-2" style="gap: 18px;">
|
|
936
937
|
<div
|
|
937
938
|
class="d-flex align-items-center gray-bottom-line-18"
|
|
@@ -941,69 +942,69 @@ export class ShoppingDiscountSetting {
|
|
|
941
942
|
<div class="tx_normal">分類列表</div>
|
|
942
943
|
</div>
|
|
943
944
|
${BgWidget.grayButton('選擇分類', gvc.event(() => {
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
945
|
+
var _a;
|
|
946
|
+
BgProduct.collectionsDialog({
|
|
947
|
+
gvc: gvc,
|
|
948
|
+
default: (_a = voucherData.forKey) !== null && _a !== void 0 ? _a : [],
|
|
949
|
+
callback: (value) => __awaiter(this, void 0, void 0, function* () {
|
|
950
|
+
voucherData.forKey = value;
|
|
951
|
+
defKeys.collection = value;
|
|
952
|
+
subVM.dataList = yield BgProduct.getCollectiosOpts(value);
|
|
953
|
+
subVM.loading = true;
|
|
954
|
+
gvc.notifyDataChange(subVM.id);
|
|
955
|
+
}),
|
|
956
|
+
});
|
|
957
|
+
}), { textStyle: 'font-weight: 400;' })}
|
|
957
958
|
</div>
|
|
958
959
|
${obj.gvc.map(subVM.dataList.map((opt, index) => {
|
|
959
|
-
|
|
960
|
+
return html ` <div
|
|
960
961
|
class="d-flex align-items-center form-check-label c_updown_label gap-3"
|
|
961
962
|
>
|
|
962
963
|
<span class="tx_normal">${index + 1}. ${opt.value}</span>
|
|
963
964
|
${opt.note
|
|
964
|
-
|
|
965
|
-
|
|
965
|
+
? html ` <span class="tx_gray_12 ms-2">${opt.note}</span> `
|
|
966
|
+
: ''}
|
|
966
967
|
</div>`;
|
|
967
|
-
|
|
968
|
+
}))}
|
|
968
969
|
</div>
|
|
969
970
|
`;
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
971
|
+
},
|
|
972
|
+
onCreate: () => {
|
|
973
|
+
if (subVM.loading) {
|
|
974
|
+
if (voucherData.forKey.length === 0) {
|
|
975
|
+
setTimeout(() => {
|
|
976
|
+
subVM.dataList = [];
|
|
977
|
+
subVM.loading = false;
|
|
978
|
+
gvc.notifyDataChange(subVM.id);
|
|
979
|
+
}, 200);
|
|
980
|
+
}
|
|
981
|
+
else {
|
|
982
|
+
new Promise(resolve => {
|
|
983
|
+
resolve(BgProduct.getCollectiosOpts(voucherData.forKey));
|
|
984
|
+
}).then(data => {
|
|
985
|
+
subVM.dataList = data;
|
|
986
|
+
subVM.loading = false;
|
|
987
|
+
gvc.notifyDataChange(subVM.id);
|
|
988
|
+
});
|
|
989
|
+
}
|
|
979
990
|
}
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
991
|
+
},
|
|
992
|
+
};
|
|
993
|
+
});
|
|
994
|
+
case 'product':
|
|
995
|
+
return gvc.bindView(() => {
|
|
996
|
+
const subVM = {
|
|
997
|
+
id: gvc.glitter.getUUID(),
|
|
998
|
+
loading: true,
|
|
999
|
+
dataList: [],
|
|
1000
|
+
};
|
|
1001
|
+
return {
|
|
1002
|
+
bind: subVM.id,
|
|
1003
|
+
view: () => {
|
|
1004
|
+
if (subVM.loading) {
|
|
1005
|
+
return BgWidget.spinner();
|
|
988
1006
|
}
|
|
989
|
-
|
|
990
|
-
},
|
|
991
|
-
};
|
|
992
|
-
});
|
|
993
|
-
case 'product':
|
|
994
|
-
return gvc.bindView(() => {
|
|
995
|
-
const subVM = {
|
|
996
|
-
id: gvc.glitter.getUUID(),
|
|
997
|
-
loading: true,
|
|
998
|
-
dataList: [],
|
|
999
|
-
};
|
|
1000
|
-
return {
|
|
1001
|
-
bind: subVM.id,
|
|
1002
|
-
view: () => {
|
|
1003
|
-
if (subVM.loading) {
|
|
1004
|
-
return BgWidget.spinner();
|
|
1005
|
-
}
|
|
1006
|
-
return html `
|
|
1007
|
+
return html `
|
|
1007
1008
|
<div class="d-flex flex-column p-2" style="gap: 18px;">
|
|
1008
1009
|
<div
|
|
1009
1010
|
class="d-flex align-items-center gray-bottom-line-18"
|
|
@@ -1013,77 +1014,78 @@ export class ShoppingDiscountSetting {
|
|
|
1013
1014
|
<div class="tx_normal">商品列表</div>
|
|
1014
1015
|
</div>
|
|
1015
1016
|
${BgWidget.grayButton('選擇商品', gvc.event(() => {
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1017
|
+
var _a;
|
|
1018
|
+
BgProduct.productsDialog({
|
|
1019
|
+
gvc: gvc,
|
|
1020
|
+
default: (_a = voucherData.forKey) !== null && _a !== void 0 ? _a : [],
|
|
1021
|
+
callback: (value) => __awaiter(this, void 0, void 0, function* () {
|
|
1022
|
+
voucherData.forKey = value;
|
|
1023
|
+
defKeys.product = value;
|
|
1024
|
+
subVM.dataList = yield BgProduct.getProductOpts(voucherData.forKey);
|
|
1025
|
+
subVM.loading = true;
|
|
1026
|
+
gvc.notifyDataChange(subVM.id);
|
|
1027
|
+
}),
|
|
1028
|
+
});
|
|
1029
|
+
}), { textStyle: 'font-weight: 400;' })}
|
|
1029
1030
|
</div>
|
|
1030
1031
|
${subVM.dataList
|
|
1031
|
-
|
|
1032
|
-
|
|
1032
|
+
.map((opt, index) => {
|
|
1033
|
+
return html ` <div
|
|
1033
1034
|
class="d-flex align-items-center form-check-label c_updown_label gap-3"
|
|
1034
1035
|
>
|
|
1035
1036
|
<span class="tx_normal">${index + 1}.</span>
|
|
1036
1037
|
${BgWidget.validImageBox({
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1038
|
+
gvc: gvc,
|
|
1039
|
+
image: opt.image,
|
|
1040
|
+
width: 40,
|
|
1041
|
+
})}
|
|
1041
1042
|
<div class="tx_normal ${opt.note ? 'mb-1' : ''}">
|
|
1042
1043
|
${opt.value}
|
|
1043
1044
|
</div>
|
|
1044
1045
|
${opt.note
|
|
1045
|
-
|
|
1046
|
-
|
|
1046
|
+
? html ` <div class="tx_gray_12">${opt.note}</div> `
|
|
1047
|
+
: ''}
|
|
1047
1048
|
</div>`;
|
|
1048
|
-
|
|
1049
|
-
|
|
1049
|
+
})
|
|
1050
|
+
.join(``)}
|
|
1050
1051
|
</div>
|
|
1051
1052
|
`;
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1053
|
+
},
|
|
1054
|
+
onCreate: () => {
|
|
1055
|
+
if (subVM.loading) {
|
|
1056
|
+
if (voucherData.forKey.length === 0) {
|
|
1057
|
+
setTimeout(() => {
|
|
1058
|
+
subVM.dataList = [];
|
|
1059
|
+
subVM.loading = false;
|
|
1060
|
+
gvc.notifyDataChange(subVM.id);
|
|
1061
|
+
}, 200);
|
|
1062
|
+
}
|
|
1063
|
+
else {
|
|
1064
|
+
new Promise(resolve => {
|
|
1065
|
+
resolve(BgProduct.getProductOpts(voucherData.forKey));
|
|
1066
|
+
}).then(data => {
|
|
1067
|
+
subVM.dataList = data;
|
|
1068
|
+
subVM.loading = false;
|
|
1069
|
+
gvc.notifyDataChange(subVM.id);
|
|
1070
|
+
});
|
|
1071
|
+
}
|
|
1070
1072
|
}
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
};
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
}
|
|
1079
|
-
})()}
|
|
1073
|
+
},
|
|
1074
|
+
};
|
|
1075
|
+
});
|
|
1076
|
+
case 'all':
|
|
1077
|
+
default:
|
|
1078
|
+
return '';
|
|
1079
|
+
}
|
|
1080
|
+
})()}
|
|
1080
1081
|
`,
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1082
|
+
];
|
|
1083
|
+
})(),
|
|
1084
|
+
].join(BgWidget.horizontalLine());
|
|
1085
|
+
},
|
|
1086
|
+
};
|
|
1087
|
+
}))
|
|
1088
|
+
],
|
|
1087
1089
|
['giveaway', 'add_on_items'].includes(voucherData.reBackType)
|
|
1088
1090
|
? BgWidget.mainCard(rebackProduct())
|
|
1089
1091
|
: '',
|