ts-glitter 21.1.4 → 21.1.6
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/module/order-excel.js +256 -132
- package/lowcode/cms-plugin/module/order-excel.ts +228 -81
- package/lowcode/cms-plugin/shopping-finance-setting.js +1 -1
- package/lowcode/cms-plugin/shopping-finance-setting.ts +1 -1
- package/lowcode/cms-plugin/shopping-order-manager.js +33 -29
- package/lowcode/cms-plugin/shopping-order-manager.ts +36 -30
- package/lowcode/editor-components/global-widget/global-widget.js +254 -0
- package/lowcode/editor-components/global-widget/global-widget.ts +269 -0
- package/lowcode/editor-components/global-widget/src/banner.jpg +0 -0
- package/lowcode/editor-components/global-widget/src/footer.jpg +0 -0
- package/lowcode/editor-components/global-widget/src/header.png +0 -0
- package/lowcode/editor-components/global-widget/src/product.jpg +0 -0
- package/lowcode/glitterBundle/html-component/widget.js +3 -16
- package/lowcode/glitterBundle/html-component/widget.ts +18 -15
- package/lowcode/jspage/function-page/tool-setting.js +18 -94
- package/lowcode/jspage/function-page/tool-setting.ts +21 -93
- package/lowcode/official_view_component/official/component.js +4 -17
- package/lowcode/official_view_component/official/component.ts +21 -17
- package/lowcode/public-components/checkout/index.js +32 -1
- package/lowcode/public-components/checkout/index.ts +32 -1
- package/lowcode/public-components/product/pd-card-01.js +0 -58
- package/lowcode/public-components/product/pd-card-01.ts +0 -45
- package/lowcode/public-components/product/pd-card-02.js +1 -59
- package/lowcode/public-components/product/pd-card-02.ts +1 -45
- package/lowcode/public-components/product/pd-card-03.js +2 -59
- package/lowcode/public-components/product/pd-card-03.ts +2 -46
- package/package.json +1 -1
- package/src/api-public/services/financial-serviceV2.js +17 -7
- package/src/api-public/services/financial-serviceV2.js.map +1 -1
- package/src/api-public/services/post.js +17 -7
- package/src/api-public/services/post.js.map +1 -1
- package/src/api-public/services/shopee.js +17 -7
- package/src/api-public/services/shopee.js.map +1 -1
- package/src/api-public/services/shopping.js.map +1 -1
|
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { BgWidget } from '../../backend-manager/bg-widget.js';
|
|
11
11
|
import { ApiPageConfig } from '../../api/pageConfig.js';
|
|
12
|
-
import { ShareDialog } from '../../glitterBundle/dialog/ShareDialog.js';
|
|
13
12
|
import { FirstBanner } from "../../public-components/banner/first-banner.js";
|
|
13
|
+
import { GlobalWidget } from '../../editor-components/global-widget/global-widget.js';
|
|
14
14
|
export class ToolSetting {
|
|
15
15
|
static main(gvc) {
|
|
16
16
|
const html = String.raw;
|
|
@@ -87,7 +87,6 @@ export class ToolSetting {
|
|
|
87
87
|
html: ``,
|
|
88
88
|
};
|
|
89
89
|
function loadData() {
|
|
90
|
-
var _a;
|
|
91
90
|
return __awaiter(this, void 0, void 0, function* () {
|
|
92
91
|
let module_list = (yield ApiPageConfig.getPageTemplate({
|
|
93
92
|
template_from: 'all',
|
|
@@ -168,7 +167,18 @@ export class ToolSetting {
|
|
|
168
167
|
>
|
|
169
168
|
<div style="align-self: stretch; justify-content: flex-start; align-items: center; gap: 10px; display: inline-flex">
|
|
170
169
|
<div class="rounded-2 shadow"
|
|
171
|
-
style="background-position:center;background-repeat: no-repeat;background-size: cover;width:93px;height: 59px;background-image: url('${(
|
|
170
|
+
style="background-position:center;background-repeat: no-repeat;background-size: cover;width:93px;height: 59px;background-image: url('${(() => {
|
|
171
|
+
switch (dd.tag) {
|
|
172
|
+
case '標頭元件':
|
|
173
|
+
return `${gvc.glitter.root_path}/editor-components/global-widget/src/header.png`;
|
|
174
|
+
case '頁腳元件':
|
|
175
|
+
return `${gvc.glitter.root_path}/editor-components/global-widget/src/footer.jpg`;
|
|
176
|
+
case '商品卡片':
|
|
177
|
+
return `${gvc.glitter.root_path}/editor-components/global-widget/src/product.jpg`;
|
|
178
|
+
case '廣告輪播':
|
|
179
|
+
return `${gvc.glitter.root_path}/editor-components/global-widget/src/banner.jpg`;
|
|
180
|
+
}
|
|
181
|
+
})()}');">
|
|
172
182
|
|
|
173
183
|
</div>
|
|
174
184
|
<div style="flex: 1 1 0; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; display: inline-flex">
|
|
@@ -227,97 +237,11 @@ export class ToolSetting {
|
|
|
227
237
|
<div class="bt_border_editor"
|
|
228
238
|
data-bs-toggle="dropdown"
|
|
229
239
|
aria-haspopup="true"
|
|
230
|
-
aria-expanded="false"
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
return `<div class="d-flex flex-column w-100" style="max-height: 300px;overflow-y: auto;">
|
|
236
|
-
${module_list.map((dd, index) => {
|
|
237
|
-
var _a;
|
|
238
|
-
return html `
|
|
239
|
-
<div
|
|
240
|
-
class="position-relative"
|
|
241
|
-
style="max-width: 100%;width: 300px; padding: 18px 12px;border-radius: 7px; overflow: hidden; flex-direction: column; justify-content: center; align-items: flex-start; gap: 32px; display: inline-flex"
|
|
242
|
-
onclick="${gvc.event(() => {
|
|
243
|
-
const dialog = new ShareDialog(gvc.glitter);
|
|
244
|
-
dialog.checkYesOrNot({
|
|
245
|
-
text: '是否確認替換樣式?',
|
|
246
|
-
callback: (response) => {
|
|
247
|
-
if (response) {
|
|
248
|
-
dialog.dataLoading({ visible: true });
|
|
249
|
-
(window.glitterInitialHelper).getPageData({
|
|
250
|
-
tag: dd.tag,
|
|
251
|
-
appName: dd.appName
|
|
252
|
-
}, (d3) => {
|
|
253
|
-
widget.config[0] = {
|
|
254
|
-
id: gvc.glitter.getUUID(),
|
|
255
|
-
js: './official_view_component/official.js',
|
|
256
|
-
css: {
|
|
257
|
-
class: {},
|
|
258
|
-
style: {},
|
|
259
|
-
},
|
|
260
|
-
data: {
|
|
261
|
-
refer_app: dd.appName,
|
|
262
|
-
refer_form_data: d3.response.result[0].page_config.formData,
|
|
263
|
-
tag: dd.tag,
|
|
264
|
-
list: [],
|
|
265
|
-
carryData: {},
|
|
266
|
-
},
|
|
267
|
-
type: 'component',
|
|
268
|
-
class: 'w-100',
|
|
269
|
-
index: 0,
|
|
270
|
-
label: dd.name,
|
|
271
|
-
style: '',
|
|
272
|
-
bundle: {},
|
|
273
|
-
global: [],
|
|
274
|
-
toggle: false,
|
|
275
|
-
stylist: [],
|
|
276
|
-
dataType: 'static',
|
|
277
|
-
style_from: 'code',
|
|
278
|
-
classDataType: 'static',
|
|
279
|
-
preloadEvenet: {},
|
|
280
|
-
share: {},
|
|
281
|
-
"gCount": "single"
|
|
282
|
-
};
|
|
283
|
-
ApiPageConfig.setPage({
|
|
284
|
-
id: widget.id,
|
|
285
|
-
appName: widget.appName,
|
|
286
|
-
tag: widget.tag,
|
|
287
|
-
name: widget.name,
|
|
288
|
-
config: widget.config,
|
|
289
|
-
group: widget.group,
|
|
290
|
-
page_config: widget.page_config,
|
|
291
|
-
page_type: widget.page_type,
|
|
292
|
-
preview_image: widget.preview_image,
|
|
293
|
-
favorite: widget.favorite,
|
|
294
|
-
}).then((api) => {
|
|
295
|
-
dialog.dataLoading({ visible: false });
|
|
296
|
-
location.reload();
|
|
297
|
-
});
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
|
-
});
|
|
302
|
-
})}"
|
|
303
|
-
>
|
|
304
|
-
<div style="align-self: stretch; justify-content: flex-start; align-items: center; gap: 10px; display: inline-flex">
|
|
305
|
-
<div class="rounded-2 shadow"
|
|
306
|
-
style="background-position:center;background-repeat: no-repeat;background-size: cover;width:93px;height: 59px;background-image: url('${(_a = dd.template_config.image[0]) !== null && _a !== void 0 ? _a : 'https://d3jnmi1tfjgtti.cloudfront.net/file/252530754/1713445383494-未命名(1080x1080像素).jpg'}');">
|
|
307
|
-
|
|
308
|
-
</div>
|
|
309
|
-
<div style="flex: 1 1 0; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; display: inline-flex">
|
|
310
|
-
<div style="align-self: stretch; color: #393939; font-size: 15px; font-weight: 400; word-wrap: break-word">
|
|
311
|
-
${dd.template_config.name}
|
|
312
|
-
</div>
|
|
313
|
-
</div>
|
|
314
|
-
|
|
315
|
-
</div>
|
|
316
|
-
</div>
|
|
317
|
-
`;
|
|
318
|
-
}).join(`<div class="w-100 border-top"></div>`)}
|
|
319
|
-
</div>`;
|
|
320
|
-
})()}
|
|
240
|
+
aria-expanded="false"
|
|
241
|
+
onclick="${gvc.event(() => {
|
|
242
|
+
GlobalWidget.open(gvc, dd.tag);
|
|
243
|
+
})}"
|
|
244
|
+
>變更樣式
|
|
321
245
|
</div>
|
|
322
246
|
</div>
|
|
323
247
|
</div>
|
|
@@ -4,6 +4,7 @@ import {ApiPageConfig} from '../../api/pageConfig.js';
|
|
|
4
4
|
import {ShareDialog} from '../../glitterBundle/dialog/ShareDialog.js';
|
|
5
5
|
import {NormalPageEditor} from "../../editor/normal-page-editor.js";
|
|
6
6
|
import {FirstBanner} from "../../public-components/banner/first-banner.js";
|
|
7
|
+
import { GlobalWidget } from '../../editor-components/global-widget/global-widget.js';
|
|
7
8
|
|
|
8
9
|
export class ToolSetting {
|
|
9
10
|
public static tool_setting_list = [
|
|
@@ -202,8 +203,21 @@ export class ToolSetting {
|
|
|
202
203
|
>
|
|
203
204
|
<div style="align-self: stretch; justify-content: flex-start; align-items: center; gap: 10px; display: inline-flex">
|
|
204
205
|
<div class="rounded-2 shadow"
|
|
205
|
-
style="background-position:center;background-repeat: no-repeat;background-size: cover;width:93px;height: 59px;background-image: url('${
|
|
206
|
-
|
|
206
|
+
style="background-position:center;background-repeat: no-repeat;background-size: cover;width:93px;height: 59px;background-image: url('${
|
|
207
|
+
(()=>{
|
|
208
|
+
switch (dd.tag){
|
|
209
|
+
case '標頭元件':
|
|
210
|
+
return `${gvc.glitter.root_path}/editor-components/global-widget/src/header.png`
|
|
211
|
+
case '頁腳元件':
|
|
212
|
+
return `${gvc.glitter.root_path}/editor-components/global-widget/src/footer.jpg`
|
|
213
|
+
case '商品卡片':
|
|
214
|
+
return `${gvc.glitter.root_path}/editor-components/global-widget/src/product.jpg`
|
|
215
|
+
case '廣告輪播':
|
|
216
|
+
|
|
217
|
+
return `${gvc.glitter.root_path}/editor-components/global-widget/src/banner.jpg`
|
|
218
|
+
}
|
|
219
|
+
})()
|
|
220
|
+
}');">
|
|
207
221
|
|
|
208
222
|
</div>
|
|
209
223
|
<div style="flex: 1 1 0; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; display: inline-flex">
|
|
@@ -261,97 +275,11 @@ export class ToolSetting {
|
|
|
261
275
|
<div class="bt_border_editor"
|
|
262
276
|
data-bs-toggle="dropdown"
|
|
263
277
|
aria-haspopup="true"
|
|
264
|
-
aria-expanded="false"
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
return `<div class="d-flex flex-column w-100" style="max-height: 300px;overflow-y: auto;">
|
|
270
|
-
${module_list.map((dd: any, index: number) => {
|
|
271
|
-
return html`
|
|
272
|
-
<div
|
|
273
|
-
class="position-relative"
|
|
274
|
-
style="max-width: 100%;width: 300px; padding: 18px 12px;border-radius: 7px; overflow: hidden; flex-direction: column; justify-content: center; align-items: flex-start; gap: 32px; display: inline-flex"
|
|
275
|
-
onclick="${gvc.event(() => {
|
|
276
|
-
const dialog = new ShareDialog(gvc.glitter);
|
|
277
|
-
dialog.checkYesOrNot({
|
|
278
|
-
text: '是否確認替換樣式?',
|
|
279
|
-
callback: (response) => {
|
|
280
|
-
if (response) {
|
|
281
|
-
dialog.dataLoading({visible: true});
|
|
282
|
-
((window as any).glitterInitialHelper).getPageData({
|
|
283
|
-
tag: dd.tag,
|
|
284
|
-
appName: dd.appName
|
|
285
|
-
}, (d3: any) => {
|
|
286
|
-
widget.config[0] = {
|
|
287
|
-
id: gvc.glitter.getUUID(),
|
|
288
|
-
js: './official_view_component/official.js',
|
|
289
|
-
css: {
|
|
290
|
-
class: {},
|
|
291
|
-
style: {},
|
|
292
|
-
},
|
|
293
|
-
data: {
|
|
294
|
-
refer_app: dd.appName,
|
|
295
|
-
refer_form_data: d3.response.result[0].page_config.formData,
|
|
296
|
-
tag: dd.tag,
|
|
297
|
-
list: [],
|
|
298
|
-
carryData: {},
|
|
299
|
-
},
|
|
300
|
-
type: 'component',
|
|
301
|
-
class: 'w-100',
|
|
302
|
-
index: 0,
|
|
303
|
-
label: dd.name,
|
|
304
|
-
style: '',
|
|
305
|
-
bundle: {},
|
|
306
|
-
global: [],
|
|
307
|
-
toggle: false,
|
|
308
|
-
stylist: [],
|
|
309
|
-
dataType: 'static',
|
|
310
|
-
style_from: 'code',
|
|
311
|
-
classDataType: 'static',
|
|
312
|
-
preloadEvenet: {},
|
|
313
|
-
share: {},
|
|
314
|
-
"gCount": "single"
|
|
315
|
-
};
|
|
316
|
-
ApiPageConfig.setPage({
|
|
317
|
-
id: widget.id,
|
|
318
|
-
appName: widget.appName,
|
|
319
|
-
tag: widget.tag,
|
|
320
|
-
name: widget.name,
|
|
321
|
-
config: widget.config,
|
|
322
|
-
group: widget.group,
|
|
323
|
-
page_config: widget.page_config,
|
|
324
|
-
page_type: widget.page_type,
|
|
325
|
-
preview_image: widget.preview_image,
|
|
326
|
-
favorite: widget.favorite,
|
|
327
|
-
}).then((api) => {
|
|
328
|
-
dialog.dataLoading({visible: false});
|
|
329
|
-
location.reload();
|
|
330
|
-
});
|
|
331
|
-
})
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
});
|
|
335
|
-
})}"
|
|
336
|
-
>
|
|
337
|
-
<div style="align-self: stretch; justify-content: flex-start; align-items: center; gap: 10px; display: inline-flex">
|
|
338
|
-
<div class="rounded-2 shadow"
|
|
339
|
-
style="background-position:center;background-repeat: no-repeat;background-size: cover;width:93px;height: 59px;background-image: url('${dd.template_config.image[0] ??
|
|
340
|
-
'https://d3jnmi1tfjgtti.cloudfront.net/file/252530754/1713445383494-未命名(1080x1080像素).jpg'}');">
|
|
341
|
-
|
|
342
|
-
</div>
|
|
343
|
-
<div style="flex: 1 1 0; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; display: inline-flex">
|
|
344
|
-
<div style="align-self: stretch; color: #393939; font-size: 15px; font-weight: 400; word-wrap: break-word">
|
|
345
|
-
${dd.template_config.name}
|
|
346
|
-
</div>
|
|
347
|
-
</div>
|
|
348
|
-
|
|
349
|
-
</div>
|
|
350
|
-
</div>
|
|
351
|
-
`;
|
|
352
|
-
}).join(`<div class="w-100 border-top"></div>`)}
|
|
353
|
-
</div>`
|
|
354
|
-
})()}
|
|
278
|
+
aria-expanded="false"
|
|
279
|
+
onclick="${gvc.event(()=>{
|
|
280
|
+
GlobalWidget.open(gvc,dd.tag)
|
|
281
|
+
})}"
|
|
282
|
+
>變更樣式
|
|
355
283
|
</div>
|
|
356
284
|
</div>
|
|
357
285
|
</div>
|
|
@@ -811,23 +811,10 @@ export const component = Plugin.createComponent(import.meta.url, (glitter, editM
|
|
|
811
811
|
return;
|
|
812
812
|
}
|
|
813
813
|
const select_ = glitter.share.findWidgetIndex(glitter.share.editorViewModel.selectItem.id);
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
widget: select_.container_cf,
|
|
819
|
-
widgetComponentID: select_.container_cf.id,
|
|
820
|
-
gvc: gvc_,
|
|
821
|
-
scroll_to_hover: true,
|
|
822
|
-
glitter: glitter,
|
|
823
|
-
});
|
|
824
|
-
}
|
|
825
|
-
else {
|
|
826
|
-
Storage.lastSelect = '';
|
|
827
|
-
gvc.glitter.share.editorViewModel.selectItem =
|
|
828
|
-
undefined;
|
|
829
|
-
gvc.glitter.share.selectEditorItem();
|
|
830
|
-
}
|
|
814
|
+
Storage.lastSelect = '';
|
|
815
|
+
gvc.glitter.share.editorViewModel.selectItem =
|
|
816
|
+
undefined;
|
|
817
|
+
gvc.glitter.share.selectEditorItem();
|
|
831
818
|
}),
|
|
832
819
|
},
|
|
833
820
|
],
|
|
@@ -873,23 +873,27 @@ export const component = Plugin.createComponent(import.meta.url, (glitter: Glitt
|
|
|
873
873
|
const select_ = glitter.share.findWidgetIndex(
|
|
874
874
|
glitter.share.editorViewModel.selectItem.id
|
|
875
875
|
);
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
876
|
+
Storage.lastSelect = '';
|
|
877
|
+
gvc.glitter.share.editorViewModel.selectItem =
|
|
878
|
+
undefined;
|
|
879
|
+
gvc.glitter.share.selectEditorItem();
|
|
880
|
+
// if (select_.container_cf) {
|
|
881
|
+
// const gvc_ =
|
|
882
|
+
// gvc.glitter.document.querySelector('.iframe_view')
|
|
883
|
+
// .contentWindow.glitter.pageConfig[0].gvc;
|
|
884
|
+
// gvc_.glitter.htmlGenerate.selectWidget({
|
|
885
|
+
// widget: select_.container_cf,
|
|
886
|
+
// widgetComponentID: select_.container_cf.id,
|
|
887
|
+
// gvc: gvc_,
|
|
888
|
+
// scroll_to_hover: true,
|
|
889
|
+
// glitter: glitter,
|
|
890
|
+
// });
|
|
891
|
+
// } else {
|
|
892
|
+
// Storage.lastSelect = '';
|
|
893
|
+
// gvc.glitter.share.editorViewModel.selectItem =
|
|
894
|
+
// undefined;
|
|
895
|
+
// gvc.glitter.share.selectEditorItem();
|
|
896
|
+
// }
|
|
893
897
|
}),
|
|
894
898
|
},
|
|
895
899
|
],
|
|
@@ -1941,7 +1941,38 @@ export class CheckoutIndex {
|
|
|
1941
1941
|
].join('');
|
|
1942
1942
|
}
|
|
1943
1943
|
catch (e) {
|
|
1944
|
-
console.error(`error 3 =>`, e);
|
|
1944
|
+
console.error(`error 3-1 =>`, e);
|
|
1945
|
+
return '';
|
|
1946
|
+
}
|
|
1947
|
+
})()}
|
|
1948
|
+
${(() => {
|
|
1949
|
+
var _a, _b;
|
|
1950
|
+
try {
|
|
1951
|
+
vm.cartData.user_info.custom_form_payment =
|
|
1952
|
+
(_a = vm.cartData.user_info.custom_form_payment) !== null && _a !== void 0 ? _a : {};
|
|
1953
|
+
const formData = (_b = vm.cartData.payment_customer_form.find((dd) => {
|
|
1954
|
+
return vm.cartData.customer_info.payment_select === dd.id;
|
|
1955
|
+
})) === null || _b === void 0 ? void 0 : _b.list;
|
|
1956
|
+
if (!formData) {
|
|
1957
|
+
return '';
|
|
1958
|
+
}
|
|
1959
|
+
const form_array = JSON.parse(JSON.stringify(formData));
|
|
1960
|
+
form_array.map((dd) => {
|
|
1961
|
+
return formatterFormElement(dd);
|
|
1962
|
+
});
|
|
1963
|
+
return [
|
|
1964
|
+
FormWidget.editorView({
|
|
1965
|
+
gvc: gvc,
|
|
1966
|
+
array: form_array,
|
|
1967
|
+
refresh: () => {
|
|
1968
|
+
this.storeLocalData(vm.cartData);
|
|
1969
|
+
},
|
|
1970
|
+
formData: vm.cartData.user_info.custom_form_payment,
|
|
1971
|
+
}),
|
|
1972
|
+
].join('');
|
|
1973
|
+
}
|
|
1974
|
+
catch (e) {
|
|
1975
|
+
console.error(`error 3-2 =>`, e);
|
|
1945
1976
|
return '';
|
|
1946
1977
|
}
|
|
1947
1978
|
})()}
|
|
@@ -2146,7 +2146,38 @@ export class CheckoutIndex {
|
|
|
2146
2146
|
}),
|
|
2147
2147
|
].join('');
|
|
2148
2148
|
} catch (e) {
|
|
2149
|
-
console.error(`error 3 =>`, e);
|
|
2149
|
+
console.error(`error 3-1 =>`, e);
|
|
2150
|
+
return '';
|
|
2151
|
+
}
|
|
2152
|
+
})()}
|
|
2153
|
+
${(() => {
|
|
2154
|
+
try {
|
|
2155
|
+
vm.cartData.user_info.custom_form_payment =
|
|
2156
|
+
vm.cartData.user_info.custom_form_payment ?? {};
|
|
2157
|
+
|
|
2158
|
+
const formData = vm.cartData.payment_customer_form.find((dd: any) => {
|
|
2159
|
+
return vm.cartData.customer_info.payment_select === dd.id;
|
|
2160
|
+
})?.list;
|
|
2161
|
+
|
|
2162
|
+
if (!formData) {
|
|
2163
|
+
return '';
|
|
2164
|
+
}
|
|
2165
|
+
const form_array = JSON.parse(JSON.stringify(formData));
|
|
2166
|
+
form_array.map((dd: any) => {
|
|
2167
|
+
return formatterFormElement(dd);
|
|
2168
|
+
});
|
|
2169
|
+
return [
|
|
2170
|
+
FormWidget.editorView({
|
|
2171
|
+
gvc: gvc,
|
|
2172
|
+
array: form_array,
|
|
2173
|
+
refresh: () => {
|
|
2174
|
+
this.storeLocalData(vm.cartData);
|
|
2175
|
+
},
|
|
2176
|
+
formData: vm.cartData.user_info.custom_form_payment,
|
|
2177
|
+
}),
|
|
2178
|
+
].join('');
|
|
2179
|
+
} catch (e) {
|
|
2180
|
+
console.error(`error 3-2 =>`, e);
|
|
2150
2181
|
return '';
|
|
2151
2182
|
}
|
|
2152
2183
|
})()}
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { ApiShop } from '../../glitter-base/route/shopping.js';
|
|
11
|
-
import { GlobalUser } from '../../glitter-base/global/global-user.js';
|
|
12
|
-
import { CheckInput } from '../../modules/checkInput.js';
|
|
13
1
|
import { PdClass } from './pd-class.js';
|
|
14
2
|
import { ApiUser } from '../../glitter-base/route/user.js';
|
|
15
3
|
import { Language } from '../../glitter-base/global/language.js';
|
|
@@ -234,52 +222,6 @@ export class ProductCard01 {
|
|
|
234
222
|
</div>
|
|
235
223
|
</div>
|
|
236
224
|
</div>
|
|
237
|
-
<div
|
|
238
|
-
class="wishBt wish-button ${window.store_info.wishlist === false ? 'd-none' : 'd-flex'}"
|
|
239
|
-
onclick="${gvc.event((e, event) => {
|
|
240
|
-
event.stopPropagation();
|
|
241
|
-
if (CheckInput.isEmpty(GlobalUser.token)) {
|
|
242
|
-
changePage('login', 'page', {});
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
if (vm.wishStatus) {
|
|
246
|
-
ApiShop.deleteWishList(`${prod.id}`).then(() => __awaiter(this, void 0, void 0, function* () {
|
|
247
|
-
PdClass.jumpAlert({
|
|
248
|
-
gvc,
|
|
249
|
-
text: Language.text('delete_success'),
|
|
250
|
-
justify: 'top',
|
|
251
|
-
align: 'center',
|
|
252
|
-
});
|
|
253
|
-
vm.wishStatus = !vm.wishStatus;
|
|
254
|
-
gvc.notifyDataChange(wishId);
|
|
255
|
-
}));
|
|
256
|
-
}
|
|
257
|
-
else {
|
|
258
|
-
ApiShop.postWishList(`${prod.id}`).then(() => __awaiter(this, void 0, void 0, function* () {
|
|
259
|
-
PdClass.jumpAlert({
|
|
260
|
-
gvc,
|
|
261
|
-
text: Language.text('add_success'),
|
|
262
|
-
justify: 'top',
|
|
263
|
-
align: 'center',
|
|
264
|
-
});
|
|
265
|
-
vm.wishStatus = !vm.wishStatus;
|
|
266
|
-
gvc.notifyDataChange(wishId);
|
|
267
|
-
}));
|
|
268
|
-
}
|
|
269
|
-
})}"
|
|
270
|
-
>
|
|
271
|
-
${gvc.bindView({
|
|
272
|
-
bind: wishId,
|
|
273
|
-
view: () => {
|
|
274
|
-
if (vm.wishStatus) {
|
|
275
|
-
return html ` <i class="fa-solid fa-heart" style="color: #da1313"></i>`;
|
|
276
|
-
}
|
|
277
|
-
else {
|
|
278
|
-
return html ` <i class="fa-regular fa-heart"></i>`;
|
|
279
|
-
}
|
|
280
|
-
},
|
|
281
|
-
})}
|
|
282
|
-
</div>
|
|
283
225
|
<div class="card-collapse-parent cursor_pointer">
|
|
284
226
|
<div>
|
|
285
227
|
<div class="row gx-0 card-title-container mb-1">
|
|
@@ -240,51 +240,6 @@ export class ProductCard01 {
|
|
|
240
240
|
</div>
|
|
241
241
|
</div>
|
|
242
242
|
</div>
|
|
243
|
-
<div
|
|
244
|
-
class="wishBt wish-button ${(window as any).store_info.wishlist === false ? 'd-none' : 'd-flex'}"
|
|
245
|
-
onclick="${gvc.event((e, event) => {
|
|
246
|
-
event.stopPropagation();
|
|
247
|
-
if (CheckInput.isEmpty(GlobalUser.token)) {
|
|
248
|
-
changePage('login', 'page', {});
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
if (vm.wishStatus) {
|
|
253
|
-
ApiShop.deleteWishList(`${prod.id}`).then(async () => {
|
|
254
|
-
PdClass.jumpAlert({
|
|
255
|
-
gvc,
|
|
256
|
-
text: Language.text('delete_success'),
|
|
257
|
-
justify: 'top',
|
|
258
|
-
align: 'center',
|
|
259
|
-
});
|
|
260
|
-
vm.wishStatus = !vm.wishStatus;
|
|
261
|
-
gvc.notifyDataChange(wishId);
|
|
262
|
-
});
|
|
263
|
-
} else {
|
|
264
|
-
ApiShop.postWishList(`${prod.id}`).then(async () => {
|
|
265
|
-
PdClass.jumpAlert({
|
|
266
|
-
gvc,
|
|
267
|
-
text: Language.text('add_success'),
|
|
268
|
-
justify: 'top',
|
|
269
|
-
align: 'center',
|
|
270
|
-
});
|
|
271
|
-
vm.wishStatus = !vm.wishStatus;
|
|
272
|
-
gvc.notifyDataChange(wishId);
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
})}"
|
|
276
|
-
>
|
|
277
|
-
${gvc.bindView({
|
|
278
|
-
bind: wishId,
|
|
279
|
-
view: () => {
|
|
280
|
-
if (vm.wishStatus) {
|
|
281
|
-
return html` <i class="fa-solid fa-heart" style="color: #da1313"></i>`;
|
|
282
|
-
} else {
|
|
283
|
-
return html` <i class="fa-regular fa-heart"></i>`;
|
|
284
|
-
}
|
|
285
|
-
},
|
|
286
|
-
})}
|
|
287
|
-
</div>
|
|
288
243
|
<div class="card-collapse-parent cursor_pointer">
|
|
289
244
|
<div>
|
|
290
245
|
<div class="row gx-0 card-title-container mb-1">
|