ts-glitter 21.2.4 → 21.2.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/backend-manager/bg-blog.js +19 -21
- package/lowcode/backend-manager/bg-blog.ts +20 -21
- package/lowcode/backend-manager/bg-product.js +94 -99
- package/lowcode/backend-manager/bg-product.ts +104 -109
- package/lowcode/cms-plugin/filter-options.js +1 -0
- package/lowcode/cms-plugin/filter-options.ts +1 -0
- package/lowcode/cms-plugin/pos-pages/payment-page.js +16 -6
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +15 -2
- package/lowcode/cms-plugin/pos-pages/pos-function.js +102 -55
- package/lowcode/cms-plugin/pos-pages/pos-function.ts +111 -61
- package/lowcode/cms-plugin/pos-pages/pos-summary.js +4 -4
- package/lowcode/cms-plugin/pos-pages/pos-summary.ts +4 -1
- package/lowcode/cms-plugin/shopping-order-manager.js +10 -7
- package/lowcode/cms-plugin/shopping-order-manager.ts +10 -7
- package/lowcode/cms-plugin/shopping-product-setting.js +9 -6
- package/lowcode/cms-plugin/shopping-product-setting.ts +13 -6
- package/lowcode/cms-plugin/shopping-setting-basic.js +411 -405
- package/lowcode/cms-plugin/shopping-setting-basic.ts +497 -486
- package/lowcode/public-components/checkout/index.js +5 -3
- package/lowcode/public-components/checkout/index.ts +8 -3
- package/package.json +1 -1
- package/src/api-public/controllers/shop.js +6 -5
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +12 -13
- package/src/api-public/controllers/user.js +2 -1
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/controllers/user.ts +2 -1
- package/src/api-public/services/checkout-event.js +17 -7
- package/src/api-public/services/checkout-event.js.map +1 -1
- package/src/api-public/services/data-analyze.d.ts +1 -1
- package/src/api-public/services/fb-api.js +3 -2
- package/src/api-public/services/fb-api.js.map +1 -1
- package/src/api-public/services/fb-api.ts +3 -2
- 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/mail.js +3 -3
- package/src/api-public/services/mail.js.map +1 -1
- package/src/api-public/services/mail.ts +144 -134
- package/src/api-public/services/monitor.d.ts +1 -0
- package/src/api-public/services/monitor.js +5 -2
- package/src/api-public/services/monitor.js.map +1 -1
- package/src/api-public/services/monitor.ts +5 -2
- package/src/api-public/services/shopping.js +5 -4
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +15 -14
- package/src/api-public/services/user.js +17 -7
- package/src/api-public/services/user.js.map +1 -1
- package/src/index.js +17 -7
- package/src/index.js.map +1 -1
- package/src/seo-config.js +1 -1
- package/src/seo-config.js.map +1 -1
- package/src/seo-config.ts +1 -1
- package/src/services/app.js +17 -7
- package/src/services/app.js.map +1 -1
- package/src/services/ses.js.map +1 -1
- package/src/services/ses.ts +41 -35
|
@@ -215,7 +215,7 @@ export class ShoppingSettingBasic {
|
|
|
215
215
|
html: [
|
|
216
216
|
BgWidget.mainCard(html`
|
|
217
217
|
<div class="d-flex flex-column guide5-4">
|
|
218
|
-
<div style="font-weight: 700;"
|
|
218
|
+
<div style="font-weight: 700;">
|
|
219
219
|
${cat_title}名稱 ${BgWidget.languageInsignia(vm.language, 'margin-left:5px;')}
|
|
220
220
|
</div>
|
|
221
221
|
${BgWidget.editeInput({
|
|
@@ -383,494 +383,506 @@ export class ShoppingSettingBasic {
|
|
|
383
383
|
}),
|
|
384
384
|
].join(BgWidget.mbContainer(12))
|
|
385
385
|
),
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
language_data.content_json = language_data.content_json ?? [];
|
|
400
|
-
if (!vm_this.content_detail) {
|
|
401
|
-
ApiUser.getPublicConfig('text-manager', 'manager').then((data: any) => {
|
|
402
|
-
vm.documents = data.response.value;
|
|
403
|
-
if (!Array.isArray(vm.documents)) {
|
|
404
|
-
vm.documents = [];
|
|
405
|
-
}
|
|
406
|
-
vm_this.content_detail = vm.documents;
|
|
407
|
-
vm.loading = false;
|
|
408
|
-
gvc.notifyDataChange(vm.id);
|
|
409
|
-
});
|
|
410
|
-
} else {
|
|
411
|
-
vm.documents = vm_this.content_detail;
|
|
412
|
-
vm.loading = false;
|
|
413
|
-
}
|
|
386
|
+
obj.postMD.productType.giveaway
|
|
387
|
+
? ''
|
|
388
|
+
: BgWidget.mainCard(
|
|
389
|
+
[
|
|
390
|
+
obj.gvc.bindView(() => {
|
|
391
|
+
const vm_this = vm;
|
|
392
|
+
return (() => {
|
|
393
|
+
const vm = {
|
|
394
|
+
id: obj.gvc.glitter.getUUID(),
|
|
395
|
+
type: 'product-detail',
|
|
396
|
+
loading: true,
|
|
397
|
+
documents: [],
|
|
398
|
+
};
|
|
414
399
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
view: async () => {
|
|
418
|
-
if (vm.loading) {
|
|
419
|
-
return BgWidget.spinner();
|
|
420
|
-
}
|
|
421
|
-
language_data.content_array = language_data.content_array.filter((id: any) => {
|
|
422
|
-
return vm.documents.some((item: any) => item.id === id);
|
|
423
|
-
});
|
|
424
|
-
language_data.content_json = language_data.content_json.filter((d: any) => {
|
|
425
|
-
return vm.documents.some((item: any) => item.id === d.id);
|
|
426
|
-
});
|
|
400
|
+
language_data.content_array = language_data.content_array ?? [];
|
|
401
|
+
language_data.content_json = language_data.content_json ?? [];
|
|
427
402
|
|
|
428
|
-
|
|
429
|
-
text:
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
font_size: string;
|
|
434
|
-
font_color: string;
|
|
435
|
-
font_bgr: string;
|
|
436
|
-
}[],
|
|
437
|
-
jsonData: {
|
|
438
|
-
key: string;
|
|
439
|
-
value: string;
|
|
440
|
-
}[]
|
|
441
|
-
) {
|
|
442
|
-
let gText = `${text}`;
|
|
443
|
-
if (tags && tags.length > 0) {
|
|
444
|
-
for (const item of tags) {
|
|
445
|
-
const data = jsonData.find(j => j.key === item.key);
|
|
446
|
-
const textImage =
|
|
447
|
-
data && data.value
|
|
448
|
-
? html`<span
|
|
449
|
-
style="font-size: ${item.font_size ?? '14'}px; color: ${item.font_color ??
|
|
450
|
-
'#393939'}; background: ${item.font_bgr ?? '#fff'}"
|
|
451
|
-
>${data.value}</span
|
|
452
|
-
>`
|
|
453
|
-
: html`#${item.title}#`;
|
|
454
|
-
// : html`<img
|
|
455
|
-
// alt="${item.key}"
|
|
456
|
-
// class="rounded-2"
|
|
457
|
-
// src="https://assets.imgix.net/~text?bg=4d86db&txtclr=f2f2f2&w=${Tool.twenLength(item.title) *
|
|
458
|
-
// 20}&h=40&txtsize=12&txt=${item.title}&txtfont=Helvetica&txtalign=middle,center"
|
|
459
|
-
// />`;
|
|
460
|
-
|
|
461
|
-
const regex = new RegExp(`@{{${item.key}}}`, 'g');
|
|
462
|
-
gText = gText.replace(regex, textImage);
|
|
403
|
+
if (!vm_this.content_detail) {
|
|
404
|
+
ApiUser.getPublicConfig('text-manager', 'manager').then((data: any) => {
|
|
405
|
+
vm.documents = data.response.value;
|
|
406
|
+
if (!Array.isArray(vm.documents)) {
|
|
407
|
+
vm.documents = [];
|
|
463
408
|
}
|
|
464
|
-
|
|
465
|
-
|
|
409
|
+
vm_this.content_detail = vm.documents;
|
|
410
|
+
vm.loading = false;
|
|
411
|
+
gvc.notifyDataChange(vm.id);
|
|
412
|
+
});
|
|
413
|
+
} else {
|
|
414
|
+
vm.documents = vm_this.content_detail;
|
|
415
|
+
vm.loading = false;
|
|
466
416
|
}
|
|
467
417
|
|
|
468
|
-
return
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
418
|
+
return {
|
|
419
|
+
bind: vm.id,
|
|
420
|
+
view: async () => {
|
|
421
|
+
if (vm.loading) {
|
|
422
|
+
return BgWidget.spinner();
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
language_data.content_array = language_data.content_array.filter((id: any) => {
|
|
426
|
+
return vm.documents.some((item: any) => item.id === id);
|
|
427
|
+
});
|
|
428
|
+
language_data.content_json = language_data.content_json.filter((d: any) => {
|
|
429
|
+
return vm.documents.some((item: any) => item.id === d.id);
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
function formatRichtext(
|
|
433
|
+
text: string,
|
|
434
|
+
tags: {
|
|
435
|
+
key: string;
|
|
436
|
+
title: string;
|
|
437
|
+
font_size: string;
|
|
438
|
+
font_color: string;
|
|
439
|
+
font_bgr: string;
|
|
440
|
+
}[],
|
|
441
|
+
jsonData: {
|
|
442
|
+
key: string;
|
|
443
|
+
value: string;
|
|
444
|
+
}[]
|
|
445
|
+
) {
|
|
446
|
+
let gText = `${text}`;
|
|
447
|
+
if (tags && tags.length > 0) {
|
|
448
|
+
for (const item of tags) {
|
|
449
|
+
const data = jsonData.find(j => j.key === item.key);
|
|
450
|
+
const textImage =
|
|
451
|
+
data && data.value
|
|
452
|
+
? html`<span
|
|
453
|
+
style="font-size: ${item.font_size ?? '14'}px; color: ${item.font_color ??
|
|
454
|
+
'#393939'}; background: ${item.font_bgr ?? '#fff'}"
|
|
455
|
+
>${data.value}</span
|
|
456
|
+
>`
|
|
457
|
+
: html`#${item.title}#`;
|
|
458
|
+
// : html`<img
|
|
459
|
+
// alt="${item.key}"
|
|
460
|
+
// class="rounded-2"
|
|
461
|
+
// src="https://assets.imgix.net/~text?bg=4d86db&txtclr=f2f2f2&w=${Tool.twenLength(item.title) *
|
|
462
|
+
// 20}&h=40&txtsize=12&txt=${item.title}&txtfont=Helvetica&txtalign=middle,center"
|
|
463
|
+
// />`;
|
|
464
|
+
|
|
465
|
+
const regex = new RegExp(`@{{${item.key}}}`, 'g');
|
|
466
|
+
gText = gText.replace(regex, textImage);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
return gText;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
return html` <div class="d-flex align-items-center justify-content-end mb-3">
|
|
473
|
+
<div class="d-flex align-items-center gap-2">
|
|
474
|
+
<div style="color: #393939; font-weight: 700;">
|
|
475
|
+
${cat_title}詳細描述 ${BgWidget.languageInsignia(sel_lan(), 'margin-left:5px;')}
|
|
476
|
+
</div>
|
|
477
|
+
</div>
|
|
478
|
+
<div class="flex-fill"></div>
|
|
479
|
+
<div
|
|
480
|
+
class="cursor_pointer"
|
|
481
|
+
onclick="${gvc.event(() => {
|
|
482
|
+
BgWidget.dialog({
|
|
483
|
+
gvc: gvc,
|
|
484
|
+
title: '設定',
|
|
485
|
+
xmark: () => {
|
|
486
|
+
return new Promise<boolean>(resolve => {
|
|
487
|
+
gvc.notifyDataChange(vm.id);
|
|
488
|
+
resolve(true);
|
|
489
|
+
});
|
|
490
|
+
},
|
|
491
|
+
innerHTML: gvc => {
|
|
492
|
+
const id = gvc.glitter.getUUID();
|
|
493
|
+
return gvc.bindView(() => {
|
|
494
|
+
return {
|
|
495
|
+
bind: id,
|
|
496
|
+
view: () => {
|
|
497
|
+
return vm.documents
|
|
498
|
+
.map((dd: any) => {
|
|
499
|
+
return html` <li class="w-100 px-2">
|
|
500
|
+
<div class="w-100 d-flex justify-content-between">
|
|
501
|
+
<div class="d-flex justify-content-start align-items-center gap-3">
|
|
502
|
+
<i
|
|
503
|
+
class="fa-solid fa-grip-dots-vertical dragItem cursor_pointer"
|
|
504
|
+
></i>
|
|
505
|
+
<div class="tx_normal">${dd.title}</div>
|
|
506
|
+
</div>
|
|
507
|
+
${gvc.bindView(
|
|
508
|
+
(() => {
|
|
509
|
+
const iconId = gvc.glitter.getUUID();
|
|
510
|
+
return {
|
|
511
|
+
bind: iconId,
|
|
512
|
+
view: () => {
|
|
513
|
+
return html` <i
|
|
514
|
+
class="${language_data.content_array.includes(dd.id)
|
|
515
|
+
? 'fa-solid fa-eye'
|
|
516
|
+
: 'fa-sharp fa-solid fa-eye-slash'} d-flex align-items-center justify-content-center cursor_pointer"
|
|
517
|
+
onclick="${gvc.event(() => {
|
|
518
|
+
if (language_data.content_array.includes(dd.id)) {
|
|
519
|
+
language_data.content_array =
|
|
520
|
+
language_data.content_array.filter(
|
|
521
|
+
(d: any) => d !== dd.id
|
|
522
|
+
);
|
|
523
|
+
} else {
|
|
524
|
+
language_data.content_array.push(dd.id);
|
|
525
|
+
}
|
|
526
|
+
gvc.notifyDataChange(iconId);
|
|
527
|
+
})}"
|
|
528
|
+
></i>`;
|
|
529
|
+
},
|
|
530
|
+
divCreate: {
|
|
531
|
+
class: 'd-flex',
|
|
532
|
+
},
|
|
533
|
+
};
|
|
534
|
+
})()
|
|
535
|
+
)}
|
|
536
|
+
</div>
|
|
537
|
+
</li>`;
|
|
538
|
+
})
|
|
539
|
+
.join('');
|
|
540
|
+
},
|
|
541
|
+
divCreate: {
|
|
542
|
+
elem: 'ul',
|
|
543
|
+
class: 'w-100 my-2 d-flex flex-column gap-4',
|
|
544
|
+
},
|
|
545
|
+
onCreate: () => {
|
|
546
|
+
if (!vm.loading) {
|
|
547
|
+
gvc.glitter.addMtScript(
|
|
548
|
+
[
|
|
549
|
+
{
|
|
550
|
+
src: `https://raw.githack.com/SortableJS/Sortable/master/Sortable.js`,
|
|
551
|
+
},
|
|
552
|
+
],
|
|
553
|
+
() => {},
|
|
554
|
+
() => {}
|
|
555
|
+
);
|
|
556
|
+
const interval = setInterval(() => {
|
|
557
|
+
if ((window as any).Sortable) {
|
|
558
|
+
try {
|
|
559
|
+
gvc.addStyle(`
|
|
554
560
|
ul {
|
|
555
561
|
list-style: none;
|
|
556
562
|
padding: 0;
|
|
557
563
|
}
|
|
558
564
|
`);
|
|
559
565
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
566
|
+
function swapArr(arr: any, t1: number, t2: number) {
|
|
567
|
+
const data = arr[t1];
|
|
568
|
+
arr.splice(t1, 1);
|
|
569
|
+
arr.splice(t2, 0, data);
|
|
570
|
+
}
|
|
565
571
|
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
572
|
+
let startIndex = 0;
|
|
573
|
+
//@ts-ignore
|
|
574
|
+
Sortable.create(gvc.getBindViewElem(id).get(0), {
|
|
575
|
+
group: id,
|
|
576
|
+
animation: 100,
|
|
577
|
+
handle: '.dragItem',
|
|
578
|
+
onEnd: (evt: any) => {
|
|
579
|
+
swapArr(vm.documents, startIndex, evt.newIndex);
|
|
580
|
+
ApiUser.setPublicConfig({
|
|
581
|
+
key: 'text-manager',
|
|
582
|
+
user_id: 'manager',
|
|
583
|
+
value: vm.documents,
|
|
584
|
+
}).then(result => {
|
|
585
|
+
if (!result.response.result) {
|
|
586
|
+
dialog.errorMessage({ text: '設定失敗' });
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
},
|
|
590
|
+
onStart: (evt: any) => {
|
|
591
|
+
startIndex = evt.oldIndex;
|
|
592
|
+
},
|
|
582
593
|
});
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
});
|
|
588
|
-
} catch (e) {}
|
|
589
|
-
clearInterval(interval);
|
|
594
|
+
} catch (e) {}
|
|
595
|
+
clearInterval(interval);
|
|
596
|
+
}
|
|
597
|
+
}, 100);
|
|
590
598
|
}
|
|
591
|
-
},
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
}
|
|
599
|
+
},
|
|
600
|
+
};
|
|
601
|
+
});
|
|
602
|
+
},
|
|
595
603
|
});
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
gvc2.recreateView();
|
|
628
|
-
});
|
|
629
|
-
},
|
|
630
|
-
})}
|
|
631
|
-
</div>`;
|
|
632
|
-
},
|
|
633
|
-
innerHTML: gvc2 => {
|
|
634
|
-
return html` <div>
|
|
635
|
-
${EditorElem.richText({
|
|
636
|
-
gvc: gvc2,
|
|
637
|
-
def: language_data.content,
|
|
638
|
-
setHeight: '100vh',
|
|
639
|
-
hiddenBorder: true,
|
|
640
|
-
insertImageEvent: editor => {
|
|
641
|
-
const mark = `{{${Tool.randomString(8)}}}`;
|
|
642
|
-
editor.selection.setAtEnd(editor.$el.get(0));
|
|
643
|
-
editor.html.insert(mark);
|
|
644
|
-
editor.undo.saveStep();
|
|
645
|
-
|
|
646
|
-
imageLibrary.selectImageLibrary(
|
|
647
|
-
gvc,
|
|
648
|
-
urlArray => {
|
|
649
|
-
if (urlArray.length > 0) {
|
|
650
|
-
const imgHTML = urlArray
|
|
651
|
-
.map(url => {
|
|
652
|
-
return html` <img src="${url.data}" />`;
|
|
653
|
-
})
|
|
654
|
-
.join('');
|
|
655
|
-
editor.html.set(
|
|
656
|
-
editor.html
|
|
657
|
-
.get(0)
|
|
658
|
-
.replace(
|
|
659
|
-
mark,
|
|
660
|
-
html` <div class="d-flex flex-column">${imgHTML}</div>`
|
|
661
|
-
)
|
|
662
|
-
);
|
|
663
|
-
editor.undo.saveStep();
|
|
664
|
-
} else {
|
|
665
|
-
dialog.errorMessage({ text: '請選擇至少一張圖片' });
|
|
666
|
-
}
|
|
604
|
+
})}"
|
|
605
|
+
>
|
|
606
|
+
設定<i class="fa-regular fa-gear ms-1"></i>
|
|
607
|
+
</div>
|
|
608
|
+
</div>
|
|
609
|
+
<div class="my-3">
|
|
610
|
+
${gvc.bindView(
|
|
611
|
+
(() => {
|
|
612
|
+
const id = gvc.glitter.getUUID();
|
|
613
|
+
return {
|
|
614
|
+
bind: id,
|
|
615
|
+
view: () => {
|
|
616
|
+
return html` <div
|
|
617
|
+
class="d-flex justify-content-between align-items-center gap-3 mb-1"
|
|
618
|
+
style="cursor: pointer;"
|
|
619
|
+
onclick="${gvc.event(() => {
|
|
620
|
+
const originContent = `${language_data.content}`;
|
|
621
|
+
BgWidget.fullDialog({
|
|
622
|
+
gvc: gvc,
|
|
623
|
+
title: gvc2 => {
|
|
624
|
+
return html`<div class="d-flex align-items-center" style="gap:10px;">
|
|
625
|
+
${`${cat_title}描述` +
|
|
626
|
+
BgWidget.aiChatButton({
|
|
627
|
+
gvc: gvc2,
|
|
628
|
+
select: 'writer',
|
|
629
|
+
click: () => {
|
|
630
|
+
ProductAi.generateRichText(gvc, text => {
|
|
631
|
+
language_data.content += text;
|
|
632
|
+
gvc.notifyDataChange(vm.id);
|
|
633
|
+
gvc2.recreateView();
|
|
634
|
+
});
|
|
667
635
|
},
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
},
|
|
686
|
-
rich_height: `calc(${(window.parent as any).innerHeight}px - 70px - 58px - 49px - 64px - 40px + ${
|
|
687
|
-
document.body.clientWidth < 800 ? `70` : `0`
|
|
688
|
-
}px)`,
|
|
689
|
-
})}
|
|
690
|
-
</div>`;
|
|
691
|
-
},
|
|
692
|
-
footer_html: (gvc2: GVC) => {
|
|
693
|
-
return [
|
|
694
|
-
BgWidget.cancel(
|
|
695
|
-
gvc2.event(() => {
|
|
696
|
-
language_data.content = originContent;
|
|
697
|
-
gvc2.closeDialog();
|
|
698
|
-
})
|
|
699
|
-
),
|
|
700
|
-
BgWidget.save(
|
|
701
|
-
gvc2.event(() => {
|
|
702
|
-
gvc2.closeDialog();
|
|
703
|
-
gvc.notifyDataChange(id);
|
|
704
|
-
})
|
|
705
|
-
),
|
|
706
|
-
].join('');
|
|
707
|
-
},
|
|
708
|
-
closeCallback: () => {
|
|
709
|
-
language_data.content = originContent;
|
|
710
|
-
},
|
|
711
|
-
});
|
|
712
|
-
})}"
|
|
713
|
-
>
|
|
714
|
-
${(() => {
|
|
715
|
-
const text = gvc.glitter.utText.removeTag(language_data.content);
|
|
716
|
-
return BgWidget.richTextView(Tool.truncateString(text, 100));
|
|
717
|
-
})()}
|
|
718
|
-
</div>`;
|
|
719
|
-
},
|
|
720
|
-
};
|
|
721
|
-
})()
|
|
722
|
-
)}
|
|
723
|
-
</div>
|
|
724
|
-
${(vm.documents || [])
|
|
725
|
-
.filter((item: any) => {
|
|
726
|
-
return language_data.content_array.includes(item.id);
|
|
727
|
-
})
|
|
728
|
-
.map((item: any, index) => {
|
|
729
|
-
return BgWidget.openBoxContainer({
|
|
730
|
-
gvc,
|
|
731
|
-
tag: 'content_array',
|
|
732
|
-
title: item.title,
|
|
733
|
-
insideHTML: (() => {
|
|
734
|
-
if (item.data.tags && item.data.tags.length > 0) {
|
|
735
|
-
const id = obj.gvc.glitter.getUUID();
|
|
736
|
-
return html` <div
|
|
737
|
-
class="cursor_pointer text-end me-1 mb-2"
|
|
738
|
-
onclick="${gvc.event(() => {
|
|
739
|
-
const originJson = JSON.parse(JSON.stringify(language_data.content_json));
|
|
740
|
-
BgWidget.settingDialog({
|
|
741
|
-
gvc: gvc,
|
|
742
|
-
title: '設定',
|
|
743
|
-
innerHTML: gvc => {
|
|
744
|
-
return html` <div>
|
|
745
|
-
${item.data.tags
|
|
746
|
-
.map((tag: { key: string; title: string }) => {
|
|
747
|
-
return html` <div>
|
|
748
|
-
${BgWidget.editeInput({
|
|
636
|
+
})}
|
|
637
|
+
</div>`;
|
|
638
|
+
},
|
|
639
|
+
innerHTML: gvc2 => {
|
|
640
|
+
return html` <div>
|
|
641
|
+
${EditorElem.richText({
|
|
642
|
+
gvc: gvc2,
|
|
643
|
+
def: language_data.content,
|
|
644
|
+
setHeight: '100vh',
|
|
645
|
+
hiddenBorder: true,
|
|
646
|
+
insertImageEvent: editor => {
|
|
647
|
+
const mark = `{{${Tool.randomString(8)}}}`;
|
|
648
|
+
editor.selection.setAtEnd(editor.$el.get(0));
|
|
649
|
+
editor.html.insert(mark);
|
|
650
|
+
editor.undo.saveStep();
|
|
651
|
+
|
|
652
|
+
imageLibrary.selectImageLibrary(
|
|
749
653
|
gvc,
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
654
|
+
urlArray => {
|
|
655
|
+
if (urlArray.length > 0) {
|
|
656
|
+
const imgHTML = urlArray
|
|
657
|
+
.map(url => {
|
|
658
|
+
return html` <img src="${url.data}" />`;
|
|
659
|
+
})
|
|
660
|
+
.join('');
|
|
661
|
+
editor.html.set(
|
|
662
|
+
editor.html
|
|
663
|
+
.get(0)
|
|
664
|
+
.replace(
|
|
665
|
+
mark,
|
|
666
|
+
html` <div class="d-flex flex-column">${imgHTML}</div>`
|
|
667
|
+
)
|
|
668
|
+
);
|
|
669
|
+
editor.undo.saveStep();
|
|
670
|
+
} else {
|
|
671
|
+
dialog.errorMessage({ text: '請選擇至少一張圖片' });
|
|
766
672
|
}
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
673
|
+
},
|
|
674
|
+
html` <div
|
|
675
|
+
class="d-flex flex-column"
|
|
676
|
+
style="border-radius: 10px 10px 0px 0px;background: #F2F2F2;"
|
|
677
|
+
>
|
|
678
|
+
圖片庫
|
|
679
|
+
</div>`,
|
|
680
|
+
{
|
|
681
|
+
mul: true,
|
|
682
|
+
cancelEvent: () => {
|
|
683
|
+
editor.html.set(editor.html.get(0).replace(mark, ''));
|
|
684
|
+
editor.undo.saveStep();
|
|
685
|
+
},
|
|
686
|
+
}
|
|
687
|
+
);
|
|
688
|
+
},
|
|
689
|
+
callback: text => {
|
|
690
|
+
language_data.content = text;
|
|
691
|
+
},
|
|
692
|
+
rich_height: `calc(${(window.parent as any).innerHeight}px - 70px - 58px - 49px - 64px - 40px + ${
|
|
693
|
+
document.body.clientWidth < 800 ? `70` : `0`
|
|
694
|
+
}px)`,
|
|
695
|
+
})}
|
|
696
|
+
</div>`;
|
|
697
|
+
},
|
|
698
|
+
footer_html: (gvc2: GVC) => {
|
|
699
|
+
return [
|
|
700
|
+
BgWidget.cancel(
|
|
701
|
+
gvc2.event(() => {
|
|
702
|
+
language_data.content = originContent;
|
|
703
|
+
gvc2.closeDialog();
|
|
704
|
+
})
|
|
705
|
+
),
|
|
706
|
+
BgWidget.save(
|
|
707
|
+
gvc2.event(() => {
|
|
708
|
+
gvc2.closeDialog();
|
|
709
|
+
gvc.notifyDataChange(id);
|
|
710
|
+
})
|
|
711
|
+
),
|
|
712
|
+
].join('');
|
|
713
|
+
},
|
|
714
|
+
closeCallback: () => {
|
|
715
|
+
language_data.content = originContent;
|
|
716
|
+
},
|
|
717
|
+
});
|
|
718
|
+
})}"
|
|
719
|
+
>
|
|
720
|
+
${(() => {
|
|
721
|
+
const text = gvc.glitter.utText.removeTag(language_data.content);
|
|
722
|
+
return BgWidget.richTextView(Tool.truncateString(text, 100));
|
|
723
|
+
})()}
|
|
724
|
+
</div>`;
|
|
725
|
+
},
|
|
726
|
+
};
|
|
727
|
+
})()
|
|
728
|
+
)}
|
|
729
|
+
</div>
|
|
730
|
+
${(vm.documents || [])
|
|
731
|
+
.filter((item: any) => {
|
|
732
|
+
return language_data.content_array.includes(item.id);
|
|
733
|
+
})
|
|
734
|
+
.map((item: any, index) => {
|
|
735
|
+
return BgWidget.openBoxContainer({
|
|
736
|
+
gvc,
|
|
737
|
+
tag: 'content_array',
|
|
738
|
+
title: item.title,
|
|
739
|
+
insideHTML: (() => {
|
|
740
|
+
if (item.data.tags && item.data.tags.length > 0) {
|
|
741
|
+
const id = obj.gvc.glitter.getUUID();
|
|
742
|
+
return html` <div
|
|
743
|
+
class="cursor_pointer text-end me-1 mb-2"
|
|
744
|
+
onclick="${gvc.event(() => {
|
|
745
|
+
const originJson = JSON.parse(JSON.stringify(language_data.content_json));
|
|
746
|
+
BgWidget.settingDialog({
|
|
747
|
+
gvc: gvc,
|
|
748
|
+
title: '設定',
|
|
749
|
+
innerHTML: gvc => {
|
|
750
|
+
return html` <div>
|
|
751
|
+
${item.data.tags
|
|
752
|
+
.map((tag: { key: string; title: string }) => {
|
|
753
|
+
return html` <div>
|
|
754
|
+
${BgWidget.editeInput({
|
|
755
|
+
gvc,
|
|
756
|
+
title: tag.title,
|
|
757
|
+
default: (() => {
|
|
758
|
+
const docIndex = language_data.content_json.findIndex(
|
|
759
|
+
(c: any) => c.id === item.id
|
|
760
|
+
);
|
|
761
|
+
if (docIndex === -1) {
|
|
762
|
+
return '';
|
|
763
|
+
}
|
|
764
|
+
if (
|
|
765
|
+
language_data.content_json[docIndex].list === undefined
|
|
766
|
+
) {
|
|
767
|
+
return '';
|
|
768
|
+
}
|
|
769
|
+
const keyIndex = language_data.content_json[
|
|
770
|
+
docIndex
|
|
771
|
+
].list.findIndex((l: any) => l.key === tag.key);
|
|
772
|
+
if (keyIndex === -1) {
|
|
773
|
+
return '';
|
|
774
|
+
}
|
|
775
|
+
return language_data.content_json[docIndex].list[keyIndex]
|
|
776
|
+
.value;
|
|
777
|
+
})(),
|
|
778
|
+
callback: text => {
|
|
779
|
+
const docIndex = language_data.content_json.findIndex(
|
|
780
|
+
(c: any) => c.id === item.id
|
|
781
|
+
);
|
|
782
|
+
if (docIndex === -1) {
|
|
783
|
+
language_data.content_json.push({
|
|
784
|
+
id: item.id,
|
|
785
|
+
list: [
|
|
786
|
+
{
|
|
787
|
+
key: tag.key,
|
|
788
|
+
value: text,
|
|
789
|
+
},
|
|
790
|
+
],
|
|
791
|
+
});
|
|
792
|
+
return;
|
|
793
|
+
}
|
|
794
|
+
if (
|
|
795
|
+
language_data.content_json[docIndex].list === undefined
|
|
796
|
+
) {
|
|
797
|
+
language_data.content_json[docIndex].list = [
|
|
798
|
+
{
|
|
799
|
+
key: tag.key,
|
|
800
|
+
value: text,
|
|
801
|
+
},
|
|
802
|
+
];
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
805
|
+
const keyIndex = language_data.content_json[
|
|
806
|
+
docIndex
|
|
807
|
+
].list.findIndex((l: any) => l.key === tag.key);
|
|
808
|
+
if (keyIndex === -1) {
|
|
809
|
+
language_data.content_json[docIndex].list.push({
|
|
779
810
|
key: tag.key,
|
|
780
811
|
value: text,
|
|
781
|
-
}
|
|
782
|
-
|
|
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
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
812
|
+
});
|
|
813
|
+
return;
|
|
814
|
+
}
|
|
815
|
+
language_data.content_json[docIndex].list[keyIndex].value =
|
|
816
|
+
text;
|
|
817
|
+
},
|
|
818
|
+
placeHolder: '輸入文本標籤',
|
|
819
|
+
})}
|
|
820
|
+
</div>`;
|
|
821
|
+
})
|
|
822
|
+
.join(BgWidget.mbContainer(12))}
|
|
823
|
+
</div>`;
|
|
824
|
+
},
|
|
825
|
+
footer_html: (gvc2: GVC) => {
|
|
826
|
+
return [
|
|
827
|
+
BgWidget.cancel(
|
|
828
|
+
gvc2.event(() => {
|
|
829
|
+
language_data.content_json = originJson;
|
|
830
|
+
gvc2.closeDialog();
|
|
831
|
+
})
|
|
832
|
+
),
|
|
833
|
+
BgWidget.save(
|
|
834
|
+
gvc2.event(() => {
|
|
835
|
+
gvc2.closeDialog();
|
|
836
|
+
gvc.notifyDataChange(`${id}-${index}`);
|
|
837
|
+
})
|
|
838
|
+
),
|
|
839
|
+
].join('');
|
|
840
|
+
},
|
|
841
|
+
closeCallback: () => {
|
|
842
|
+
language_data.content_json = originJson;
|
|
843
|
+
},
|
|
844
|
+
});
|
|
845
|
+
})}"
|
|
846
|
+
>
|
|
847
|
+
標籤設值
|
|
848
|
+
</div>
|
|
849
|
+
${gvc.bindView(
|
|
850
|
+
(() => {
|
|
851
|
+
return {
|
|
852
|
+
bind: `${id}-${index}`,
|
|
853
|
+
view: () => {
|
|
854
|
+
const content = item.data.content || '';
|
|
855
|
+
const tags = item.data.tags;
|
|
856
|
+
const jsonData = language_data.content_json.find(
|
|
857
|
+
(c: any) => c.id === item.id
|
|
858
|
+
);
|
|
859
|
+
return html` <div
|
|
860
|
+
style="border: 2px #DDDDDD solid; border-radius: 6px; padding: 12px;"
|
|
861
|
+
>
|
|
862
|
+
${tags
|
|
863
|
+
? formatRichtext(content, tags, jsonData ? jsonData.list : [])
|
|
864
|
+
: content}
|
|
865
|
+
</div>`;
|
|
866
|
+
},
|
|
867
|
+
};
|
|
868
|
+
})()
|
|
869
|
+
)}`;
|
|
870
|
+
}
|
|
871
|
+
return html` <div
|
|
872
|
+
style="border: 1px #DDDDDD solid; border-radius: 6px; padding: 12px"
|
|
836
873
|
>
|
|
837
|
-
|
|
838
|
-
</div
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
return html` <div
|
|
850
|
-
style="border: 2px #DDDDDD solid; border-radius: 6px; padding: 12px;"
|
|
851
|
-
>
|
|
852
|
-
${tags
|
|
853
|
-
? formatRichtext(content, tags, jsonData ? jsonData.list : [])
|
|
854
|
-
: content}
|
|
855
|
-
</div>`;
|
|
856
|
-
},
|
|
857
|
-
};
|
|
858
|
-
})()
|
|
859
|
-
)}`;
|
|
860
|
-
}
|
|
861
|
-
return html` <div style="border: 1px #DDDDDD solid; border-radius: 6px; padding: 12px">
|
|
862
|
-
${item.data.content || ''}
|
|
863
|
-
</div>`;
|
|
864
|
-
})(),
|
|
865
|
-
});
|
|
866
|
-
})
|
|
867
|
-
.join(BgWidget.mbContainer(8))}`;
|
|
868
|
-
},
|
|
869
|
-
};
|
|
870
|
-
})();
|
|
871
|
-
}),
|
|
872
|
-
].join(BgWidget.mbContainer(12))
|
|
873
|
-
),
|
|
874
|
+
${item.data.content || ''}
|
|
875
|
+
</div>`;
|
|
876
|
+
})(),
|
|
877
|
+
});
|
|
878
|
+
})
|
|
879
|
+
.join(BgWidget.mbContainer(8))}`;
|
|
880
|
+
},
|
|
881
|
+
};
|
|
882
|
+
})();
|
|
883
|
+
}),
|
|
884
|
+
].join(BgWidget.mbContainer(12))
|
|
885
|
+
),
|
|
874
886
|
BgWidget.mainCard(html`
|
|
875
887
|
<div
|
|
876
888
|
class="d-flex align-items-center justify-content-between"
|
|
@@ -962,7 +974,6 @@ export class ShoppingSettingBasic {
|
|
|
962
974
|
};
|
|
963
975
|
})}
|
|
964
976
|
`),
|
|
965
|
-
|
|
966
977
|
(() => {
|
|
967
978
|
if (postMD.variants.length === 1) {
|
|
968
979
|
try {
|
|
@@ -1084,7 +1095,7 @@ export class ShoppingSettingBasic {
|
|
|
1084
1095
|
${(dd.language_title as any)[sel_lan()] || dd.title}
|
|
1085
1096
|
</div>
|
|
1086
1097
|
${(() => {
|
|
1087
|
-
let returnHTML =
|
|
1098
|
+
let returnHTML = '';
|
|
1088
1099
|
dd.option.map((opt: any, index: number) => {
|
|
1089
1100
|
opt.language_title = (opt.language_title ?? ({} as any)) as any;
|
|
1090
1101
|
returnHTML += html`
|
|
@@ -1198,7 +1209,7 @@ export class ShoppingSettingBasic {
|
|
|
1198
1209
|
},
|
|
1199
1210
|
],
|
|
1200
1211
|
view: () => {
|
|
1201
|
-
let returnHTML =
|
|
1212
|
+
let returnHTML = '';
|
|
1202
1213
|
let specs_in_line: string[] = [];
|
|
1203
1214
|
temp.option = temp.option ?? [];
|
|
1204
1215
|
specs_in_line.push(
|
|
@@ -1309,7 +1320,7 @@ export class ShoppingSettingBasic {
|
|
|
1309
1320
|
divCreate: { class: `w-100 position-relative` },
|
|
1310
1321
|
}),
|
|
1311
1322
|
innerHtml: (gvc: GVC) => {
|
|
1312
|
-
return
|
|
1323
|
+
return '';
|
|
1313
1324
|
},
|
|
1314
1325
|
editTitle: `編輯規格`,
|
|
1315
1326
|
draggable: editSpectPage[specIndex].type === 'show',
|
|
@@ -1514,7 +1525,7 @@ export class ShoppingSettingBasic {
|
|
|
1514
1525
|
<div
|
|
1515
1526
|
class="d-flex flex-column"
|
|
1516
1527
|
style="font-size: 16px;font-weight: 700;color:#393939;${(postMD as any).shopee_id
|
|
1517
|
-
?
|
|
1528
|
+
? ''
|
|
1518
1529
|
: `margin-bottom: 10px;`}"
|
|
1519
1530
|
>
|
|
1520
1531
|
組合費用
|
|
@@ -1603,7 +1614,7 @@ export class ShoppingSettingBasic {
|
|
|
1603
1614
|
<div
|
|
1604
1615
|
class="d-flex flex-column"
|
|
1605
1616
|
style="font-size: 16px;font-weight: 700;color:#393939;${(postMD as any).shopee_id
|
|
1606
|
-
?
|
|
1617
|
+
? ''
|
|
1607
1618
|
: `margin-bottom: 10px;`}"
|
|
1608
1619
|
>
|
|
1609
1620
|
組合費用 ${BgWidget.grayNote('如未輸入庫存數量則不追蹤庫存')}
|
|
@@ -1664,7 +1675,7 @@ export class ShoppingSettingBasic {
|
|
|
1664
1675
|
html`
|
|
1665
1676
|
<div
|
|
1666
1677
|
style="font-size: 16px;font-weight: 700;color:#393939;${(postMD as any).shopee_id
|
|
1667
|
-
?
|
|
1678
|
+
? ''
|
|
1668
1679
|
: `margin-bottom: 18px;`}"
|
|
1669
1680
|
>
|
|
1670
1681
|
<span class="me-2">規格設定</span>
|
|
@@ -1673,7 +1684,7 @@ export class ShoppingSettingBasic {
|
|
|
1673
1684
|
: ''}
|
|
1674
1685
|
</div>
|
|
1675
1686
|
<div
|
|
1676
|
-
class="w-100 ${(postMD as any).shopee_id ?
|
|
1687
|
+
class="w-100 ${(postMD as any).shopee_id ? '' : `d-none`}"
|
|
1677
1688
|
style="font-size: 14px;font-weight: 400;color: #8D8D8D;margin-bottom: 18px;"
|
|
1678
1689
|
>
|
|
1679
1690
|
此商品來源為蝦皮電商平台,將自動同步蝦皮庫存
|
|
@@ -2011,7 +2022,7 @@ export class ShoppingSettingBasic {
|
|
|
2011
2022
|
style="margin-bottom:18px;padding: 0px 20px;gap:18px;color:#393939;"
|
|
2012
2023
|
>
|
|
2013
2024
|
${(() => {
|
|
2014
|
-
let arrayHTML =
|
|
2025
|
+
let arrayHTML = '';
|
|
2015
2026
|
postMD.specs[0].option.map((option: any) => {
|
|
2016
2027
|
option.sortQueue.map((data: any) => {
|
|
2017
2028
|
if (data.select) {
|
|
@@ -2487,7 +2498,7 @@ export class ShoppingSettingBasic {
|
|
|
2487
2498
|
</div>
|
|
2488
2499
|
</div>
|
|
2489
2500
|
`
|
|
2490
|
-
:
|
|
2501
|
+
: ''}
|
|
2491
2502
|
</div>
|
|
2492
2503
|
</div>
|
|
2493
2504
|
`;
|
|
@@ -3010,7 +3021,7 @@ export class ShoppingSettingBasic {
|
|
|
3010
3021
|
style="width: 100%;height: 40px;padding: 0px 18px;border-radius: 10px;border: 1px solid #DDD;background: #FFF;"
|
|
3011
3022
|
value="${(data as any)[dd] ?? 0}"
|
|
3012
3023
|
min="0"
|
|
3013
|
-
${index === 1 ? `readonly` :
|
|
3024
|
+
${index === 1 ? `readonly` : ''}
|
|
3014
3025
|
onclick="${gvc.event(() => {
|
|
3015
3026
|
if (index === 1) {
|
|
3016
3027
|
ProductSetting.showBatchEditDialog({
|
|
@@ -3055,19 +3066,19 @@ export class ShoppingSettingBasic {
|
|
|
3055
3066
|
>
|
|
3056
3067
|
<option
|
|
3057
3068
|
value="none"
|
|
3058
|
-
${data.shipment_type == 'none' ? `selected` :
|
|
3069
|
+
${data.shipment_type == 'none' ? `selected` : ''}
|
|
3059
3070
|
>
|
|
3060
3071
|
無運費
|
|
3061
3072
|
</option>
|
|
3062
3073
|
<option
|
|
3063
3074
|
value="volume"
|
|
3064
|
-
${data.shipment_type == 'volume' ? `selected` :
|
|
3075
|
+
${data.shipment_type == 'volume' ? `selected` : ''}
|
|
3065
3076
|
>
|
|
3066
3077
|
依材積
|
|
3067
3078
|
</option>
|
|
3068
3079
|
<option
|
|
3069
3080
|
value="weight"
|
|
3070
|
-
${data.shipment_type == 'weight' ? `selected` :
|
|
3081
|
+
${data.shipment_type == 'weight' ? `selected` : ''}
|
|
3071
3082
|
>
|
|
3072
3083
|
依重量
|
|
3073
3084
|
</option>
|
|
@@ -3077,7 +3088,7 @@ export class ShoppingSettingBasic {
|
|
|
3077
3088
|
`;
|
|
3078
3089
|
},
|
|
3079
3090
|
divCreate: {
|
|
3080
|
-
class: `w-100 ${viewID} ${index === 0 && postMD.specs.length > 1 ? `border-top` :
|
|
3091
|
+
class: `w-100 ${viewID} ${index === 0 && postMD.specs.length > 1 ? `border-top` : ''}`,
|
|
3081
3092
|
},
|
|
3082
3093
|
});
|
|
3083
3094
|
})
|
|
@@ -3105,7 +3116,7 @@ export class ShoppingSettingBasic {
|
|
|
3105
3116
|
})
|
|
3106
3117
|
);
|
|
3107
3118
|
})()
|
|
3108
|
-
:
|
|
3119
|
+
: '',
|
|
3109
3120
|
BgWidget.mainCard(
|
|
3110
3121
|
obj.gvc.bindView(() => {
|
|
3111
3122
|
postMD.seo = postMD.seo ?? {
|
|
@@ -3122,7 +3133,7 @@ export class ShoppingSettingBasic {
|
|
|
3122
3133
|
搜尋引擎列表 ${BgWidget.languageInsignia(sel_lan(), 'margin-left:5px;')}
|
|
3123
3134
|
</div>
|
|
3124
3135
|
${[
|
|
3125
|
-
html` <div class="tx_normal fw-normal mb-2"
|
|
3136
|
+
html` <div class="tx_normal fw-normal mb-2">${cat_title}網址</div>`,
|
|
3126
3137
|
html` <div
|
|
3127
3138
|
style="justify-content: flex-start; align-items: center; display: inline-flex;border:1px solid #EAEAEA;border-radius: 10px;overflow: hidden; ${document
|
|
3128
3139
|
.body.clientWidth > 768
|
|
@@ -3198,7 +3209,7 @@ ${language_data.seo.content ?? ''}</textarea
|
|
|
3198
3209
|
})
|
|
3199
3210
|
),
|
|
3200
3211
|
]
|
|
3201
|
-
.filter(
|
|
3212
|
+
.filter(Boolean)
|
|
3202
3213
|
.join(BgWidget.mbContainer(18)),
|
|
3203
3214
|
ratio: 77,
|
|
3204
3215
|
},
|