ts-glitter 21.1.7 → 21.1.9

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.
Files changed (111) hide show
  1. package/lowcode/Entry.js +14 -1
  2. package/lowcode/Entry.ts +13 -1
  3. package/lowcode/backend-manager/bg-line.js +18 -10
  4. package/lowcode/backend-manager/bg-line.ts +19 -10
  5. package/lowcode/backend-manager/bg-list-component.js +1 -2
  6. package/lowcode/backend-manager/bg-list-component.ts +1 -1
  7. package/lowcode/backend-manager/bg-notify.js +17 -10
  8. package/lowcode/backend-manager/bg-notify.ts +19 -11
  9. package/lowcode/backend-manager/bg-product.js +39 -18
  10. package/lowcode/backend-manager/bg-product.ts +54 -23
  11. package/lowcode/backend-manager/bg-recommend.js +15 -9
  12. package/lowcode/backend-manager/bg-recommend.ts +16 -9
  13. package/lowcode/backend-manager/bg-sns.js +16 -9
  14. package/lowcode/backend-manager/bg-sns.ts +18 -11
  15. package/lowcode/backend-manager/bg-widget.js +325 -261
  16. package/lowcode/backend-manager/bg-widget.ts +117 -45
  17. package/lowcode/cms-plugin/auto-fcm-history.js +15 -6
  18. package/lowcode/cms-plugin/auto-fcm-history.ts +18 -11
  19. package/lowcode/cms-plugin/auto-reply.js +17 -1
  20. package/lowcode/cms-plugin/auto-reply.ts +16 -1
  21. package/lowcode/cms-plugin/exhibition-list.js +11 -2
  22. package/lowcode/cms-plugin/exhibition-list.ts +12 -2
  23. package/lowcode/cms-plugin/live_capture.js +2 -2
  24. package/lowcode/cms-plugin/live_capture.ts +2 -2
  25. package/lowcode/cms-plugin/model/order.d.ts +1 -0
  26. package/lowcode/cms-plugin/module/order-excel.js +15 -1
  27. package/lowcode/cms-plugin/module/order-excel.ts +22 -2
  28. package/lowcode/cms-plugin/module/table-storage.js +11 -0
  29. package/lowcode/cms-plugin/module/table-storage.ts +12 -0
  30. package/lowcode/cms-plugin/permission-setting.js +16 -9
  31. package/lowcode/cms-plugin/permission-setting.ts +18 -10
  32. package/lowcode/cms-plugin/pos-pages/payment-page.js +37 -29
  33. package/lowcode/cms-plugin/pos-pages/payment-page.ts +61 -49
  34. package/lowcode/cms-plugin/pos-pages/pos-function.js +6 -1
  35. package/lowcode/cms-plugin/pos-pages/pos-function.ts +8 -1
  36. package/lowcode/cms-plugin/reconciliation-area.js +12 -3
  37. package/lowcode/cms-plugin/reconciliation-area.ts +13 -3
  38. package/lowcode/cms-plugin/shopping-allowance-manager.js +12 -3
  39. package/lowcode/cms-plugin/shopping-allowance-manager.ts +13 -3
  40. package/lowcode/cms-plugin/shopping-invoice-manager.js +12 -3
  41. package/lowcode/cms-plugin/shopping-invoice-manager.ts +13 -4
  42. package/lowcode/cms-plugin/shopping-order-manager.js +12 -3
  43. package/lowcode/cms-plugin/shopping-order-manager.ts +13 -4
  44. package/lowcode/cms-plugin/shopping-product-setting.js +16 -10
  45. package/lowcode/cms-plugin/shopping-product-setting.ts +17 -10
  46. package/lowcode/cms-plugin/shopping-product-stock.js +17 -11
  47. package/lowcode/cms-plugin/shopping-product-stock.ts +18 -11
  48. package/lowcode/cms-plugin/shopping-setting-basic.js +129 -38
  49. package/lowcode/cms-plugin/shopping-setting-basic.ts +134 -38
  50. package/lowcode/cms-plugin/stock-history.js +15 -7
  51. package/lowcode/cms-plugin/stock-history.ts +16 -17
  52. package/lowcode/cms-plugin/stock-stores.js +13 -6
  53. package/lowcode/cms-plugin/stock-stores.ts +14 -6
  54. package/lowcode/cms-plugin/stock-vendors.js +13 -6
  55. package/lowcode/cms-plugin/stock-vendors.ts +14 -6
  56. package/lowcode/cms-plugin/user-list.js +24 -7
  57. package/lowcode/cms-plugin/user-list.ts +25 -7
  58. package/lowcode/css/editor.css +11 -6
  59. package/lowcode/form-view/e-commerce/product-select.js +13 -11
  60. package/lowcode/form-view/e-commerce/product-select.ts +14 -12
  61. package/lowcode/modules/tool.js +9 -0
  62. package/lowcode/modules/tool.ts +12 -0
  63. package/lowcode/public-components/checkout/index.js +216 -207
  64. package/lowcode/public-components/checkout/index.ts +1315 -1309
  65. package/lowcode/public-components/product/pd-class.js +11 -2
  66. package/lowcode/public-components/product/pd-class.ts +16 -3
  67. package/lowcode/public-components/public/ad.js +42 -10
  68. package/lowcode/public-components/public/ad.ts +28 -1
  69. package/lowcode/public-models/product.ts +1 -0
  70. package/lowcode/view-model/saas-view-model.js +394 -379
  71. package/lowcode/view-model/saas-view-model.ts +1451 -1405
  72. package/package.json +1 -1
  73. package/src/api-public/controllers/user.js +4 -4
  74. package/src/api-public/controllers/user.js.map +1 -1
  75. package/src/api-public/controllers/user.ts +4 -4
  76. package/src/api-public/models/glitter-finance.js +1 -2
  77. package/src/api-public/models/glitter-finance.js.map +1 -5
  78. package/src/api-public/services/data-analyze.d.ts +1 -1
  79. package/src/api-public/services/fb-api.d.ts +4 -3
  80. package/src/api-public/services/fb-api.js +72 -27
  81. package/src/api-public/services/fb-api.js.map +1 -1
  82. package/src/api-public/services/fb-api.ts +183 -127
  83. package/src/api-public/services/fb-service.js +4 -4
  84. package/src/api-public/services/fb-service.js.map +1 -1
  85. package/src/api-public/services/schedule.d.ts +1 -1
  86. package/src/api-public/services/schedule.js +18 -14
  87. package/src/api-public/services/schedule.js.map +1 -1
  88. package/src/api-public/services/schedule.ts +18 -14
  89. package/src/api-public/services/user.d.ts +6 -5
  90. package/src/api-public/services/user.js +12 -10
  91. package/src/api-public/services/user.js.map +1 -1
  92. package/src/api-public/services/user.ts +14 -10
  93. package/src/config.d.ts +1 -1
  94. package/src/modules/AWSLib.js +2 -3
  95. package/src/modules/AWSLib.js.map +1 -1
  96. package/src/modules/database.d.ts +1 -1
  97. package/src/modules/redis.d.ts +1 -1
  98. package/src/modules/tool.d.ts +4 -4
  99. package/src/modules/tool.js +1 -2
  100. package/src/modules/tool.js.map +1 -1
  101. package/src/seo-config.js +1 -0
  102. package/src/seo-config.js.map +1 -1
  103. package/src/seo-config.ts +1 -0
  104. package/src/services/backend-service.js +17 -7
  105. package/src/services/backend-service.js.map +1 -1
  106. package/src/services/create-instance.js +3 -4
  107. package/src/services/create-instance.js.map +1 -1
  108. package/src/services/saas-table-check.js +2 -2
  109. package/src/services/saas-table-check.js.map +1 -5
  110. package/src/services/tool.js +2 -3
  111. package/src/services/tool.js.map +1 -1
@@ -93,7 +93,7 @@ export class CheckoutIndex {
93
93
  role="status"
94
94
  ></div>
95
95
  <span class="mt-3 ${textAttr.visible ? '' : 'd-none'}" style="font-size: ${textAttr.fontSize}px;"
96
- >${textAttr.value}</span
96
+ >${textAttr.value}</span
97
97
  >
98
98
  </div>`;
99
99
  }
@@ -439,28 +439,28 @@ export class CheckoutIndex {
439
439
  })(),
440
440
  item.usePass
441
441
  ? html ` <button
442
- class="${gClass('button-bgr')} my-2"
443
- style="max-width: 150px;"
444
- onclick="${gvc.event(() => {
442
+ class="${gClass('button-bgr')} my-2"
443
+ style="max-width: 150px;"
444
+ onclick="${gvc.event(() => {
445
445
  apiCart.setCart(cartItem => {
446
446
  cartItem.code = item.code;
447
447
  refreshCartData();
448
448
  gvc.closeDialog();
449
449
  });
450
450
  })}"
451
- >
451
+ >
452
452
  <span class="${gClass('button-text')}"
453
- >${Language.text('select_to_use')}</span
453
+ >${Language.text('select_to_use')}</span
454
454
  >
455
- </button>`
455
+ </button>`
456
456
  : html ` <button
457
- class="${gClass('button-bgr-disable')} my-2"
458
- style="max-width: 150px; cursor: not-allowed"
459
- >
457
+ class="${gClass('button-bgr-disable')} my-2"
458
+ style="max-width: 150px; cursor: not-allowed"
459
+ >
460
460
  <span class="${gClass('button-text')}"
461
- >${Language.text('not_meet_usage_criteria')}</span
461
+ >${Language.text('not_meet_usage_criteria')}</span
462
462
  >
463
- </button>`,
463
+ </button>`,
464
464
  ];
465
465
  }
466
466
  const dialog = new ShareDialog(gvc.glitter);
@@ -495,7 +495,7 @@ export class CheckoutIndex {
495
495
  <div>
496
496
  <div class="d-flex align-items-center mb-2">
497
497
  <label class="${gClass('label')} mb-0 me-2" style="min-width: 80px;"
498
- >${Language.text('enter_code')}</label
498
+ >${Language.text('enter_code')}</label
499
499
  >
500
500
  <input
501
501
  class="${gClass('input')}"
@@ -506,37 +506,48 @@ export class CheckoutIndex {
506
506
  />
507
507
  </div>
508
508
  </div>
509
- <div class="w-100 d-sm-flex py-4 um-th-bar">
510
- ${header
511
- .map((item, index) => {
512
- return html ` <div class="um-th" style="flex: ${flexList[index]};">
513
- ${item.title}
514
- </div>`;
515
- })
516
- .join('')}
517
- </div>
518
- ${vmi.dataList
519
- .map((item, t1) => {
520
- const fText = formatText(item.content);
521
- return html ` <div class="w-100 d-sm-flex py-1 align-items-center">
522
- ${fText
523
- .map((dd, t2) => {
509
+ ${vmi.dataList.length > 0
510
+ ? html `<div class="w-100 d-sm-flex py-4 um-th-bar">
511
+ ${header
512
+ .map((item, index) => {
524
513
  return html ` <div
525
- class="um-td ${t2 === fText.length - 1 ? 'text-center' : ''}"
526
- style="flex: ${flexList[t2]}"
527
- >
528
- ${dd}
529
- </div>`;
514
+ class="um-th"
515
+ style="flex: ${flexList[index]};"
516
+ >
517
+ ${item.title}
518
+ </div>`;
530
519
  })
531
520
  .join('')}
532
- </div>`;
533
- })
534
- .join('')}
521
+ </div>
522
+ ${vmi.dataList
523
+ .map(item => {
524
+ const fText = formatText(item.content);
525
+ return html ` <div class="w-100 d-sm-flex py-1 align-items-center">
526
+ ${fText
527
+ .map((dd, t2) => {
528
+ return html ` <div
529
+ class="um-td ${t2 === fText.length - 1
530
+ ? 'text-center'
531
+ : ''}"
532
+ style="flex: ${flexList[t2]}"
533
+ >
534
+ ${dd}
535
+ </div>`;
536
+ })
537
+ .join('')}
538
+ </div>`;
539
+ })
540
+ .join('')}`
541
+ : html `<div
542
+ class="d-flex justify-content-center align-items-center"
543
+ style="height: 250px;"
544
+ >
545
+ 尚無可使用的優惠券
546
+ </div>`}
535
547
  `;
536
548
  }
537
- return html ` <div>
538
- <div class="d-flex flex-column flex-sm-row align-items-center ">
539
- <div class="d-flex align-items-center">
549
+ return html `<div class="d-flex flex-column flex-sm-row align-items-center">
550
+ <div class="d-flex align-items-center w-100">
540
551
  <input
541
552
  class="${gClass('input')}"
542
553
  type="text"
@@ -551,30 +562,36 @@ export class CheckoutIndex {
551
562
  })}"
552
563
  >
553
564
  <span class="${gClass('button-text')}"
554
- >${Language.text('confirm')}</span
565
+ >${Language.text('confirm')}</span
555
566
  >
556
567
  </button>
557
568
  </div>
558
569
  </div>
559
570
  <div class="w-100 d-sm-none mb-3 s162413">
560
- ${vmi.dataList
561
- .map(item => {
562
- return html ` <div class="um-mobile-area">
563
- ${formatText(item.content)
564
- .map((dd, index) => {
565
- if (header[index].title === '') {
566
- return dd;
567
- }
568
- return html ` <div class="um-mobile-text">
569
- ${header[index].title} : ${dd}
570
- </div>`;
571
+ ${vmi.dataList.length > 0
572
+ ? vmi.dataList
573
+ .map(item => {
574
+ return html ` <div class="um-mobile-area">
575
+ ${formatText(item.content)
576
+ .map((dd, index) => {
577
+ if (header[index].title === '') {
578
+ return dd;
579
+ }
580
+ return html ` <div class="um-mobile-text">
581
+ ${header[index].title} : ${dd}
582
+ </div>`;
583
+ })
584
+ .join('')}
585
+ </div>`;
571
586
  })
572
- .join('')}
573
- </div>`;
574
- })
575
- .join('')}
576
- </div>
577
- </div>`;
587
+ .join('')
588
+ : html `<div
589
+ class="d-flex justify-content-center align-items-center"
590
+ style="height: 200px;"
591
+ >
592
+ 尚無可使用的優惠券
593
+ </div>`}
594
+ </div>`;
578
595
  }
579
596
  }
580
597
  catch (e) {
@@ -583,15 +600,6 @@ export class CheckoutIndex {
583
600
  },
584
601
  onCreate: () => {
585
602
  if (loading) {
586
- function isNowBetweenDates(startIso, endIso) {
587
- const now = new Date();
588
- const startDate = new Date(startIso);
589
- const endDate = new Date(endIso);
590
- if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
591
- return true;
592
- }
593
- return now >= startDate && now <= endDate;
594
- }
595
603
  gvc.addMtScript([
596
604
  {
597
605
  src: `${gvc.glitter.root_path}/jslib/lottie-player.js`,
@@ -604,8 +612,9 @@ export class CheckoutIndex {
604
612
  }).then((res) => __awaiter(this, void 0, void 0, function* () {
605
613
  if (res.result && res.response.data) {
606
614
  vmi.dataList = res.response.data.filter((item) => {
607
- return (item.content.trigger === 'code' &&
608
- isNowBetweenDates(item.content.start_ISO_Date, item.content.end_ISO_Date));
615
+ return (item.content.status === 1 &&
616
+ item.content.trigger === 'code' &&
617
+ Tool.isNowBetweenDates(item.content.start_ISO_Date, item.content.end_ISO_Date));
609
618
  });
610
619
  }
611
620
  else {
@@ -654,16 +663,16 @@ export class CheckoutIndex {
654
663
  >
655
664
  ${vm.cartData.code
656
665
  ? html `${vm.cartData.code}<i
657
- class="fa-solid fa-xmark-large ms-2"
658
- style="cursor: pointer;"
659
- onclick="${gvc.event((e, event) => {
666
+ class="fa-solid fa-xmark-large ms-2"
667
+ style="cursor: pointer;"
668
+ onclick="${gvc.event((e, event) => {
660
669
  event.stopPropagation();
661
670
  apiCart.setCart(cartItem => {
662
671
  cartItem.code = '';
663
672
  refreshCartData();
664
673
  });
665
674
  })}"
666
- ></i>`
675
+ ></i>`
667
676
  : Language.text('add')}
668
677
  </div>
669
678
  </div>
@@ -676,30 +685,30 @@ export class CheckoutIndex {
676
685
  let tempRebate = 0;
677
686
  const dialog = new ShareDialog(gvc.glitter);
678
687
  return html ` <div class="${gClass(['price-row', 'text-2'])}">
679
- <div>${vm.rebateConfig.title}${Language.text('discount')}</div>
680
- <div>- ${Currency.convertCurrencyText(vm.cartData.use_rebate)}</div>
681
- </div>
682
- <div class="${gClass(['price-row', 'text-2'])}">
683
- <div>${vm.rebateConfig.title}${Language.text('reback_text')}</div>
684
- <div>+ ${vm.cartData.rebate.toLocaleString()}</div>
685
- </div>
688
+ <div>${vm.rebateConfig.title}${Language.text('discount')}</div>
689
+ <div>- ${Currency.convertCurrencyText(vm.cartData.use_rebate)}</div>
690
+ </div>
691
+ <div class="${gClass(['price-row', 'text-2'])}">
692
+ <div>${vm.rebateConfig.title}${Language.text('reback_text')}</div>
693
+ <div>+ ${vm.cartData.rebate.toLocaleString()}</div>
694
+ </div>
686
695
 
687
- <div class="${gClass(['price-row', 'text-2'])}">
688
- <div
689
- style=" justify-content: flex-start; align-items: center; display: inline-flex;border:1px solid #EAEAEA;border-radius: 10px;overflow: hidden; ${document
696
+ <div class="${gClass(['price-row', 'text-2'])}">
697
+ <div
698
+ style=" justify-content: flex-start; align-items: center; display: inline-flex;border:1px solid #EAEAEA;border-radius: 10px;overflow: hidden; ${document
690
699
  .body.clientWidth > 768
691
700
  ? 'gap: 18px;'
692
701
  : 'gap: 0px;'}"
693
- class="w-100"
694
- >
695
- <input
696
- class="flex-fill ${gClass('group-input')}"
697
- placeholder="${Language.text('please_enter')}${vm.rebateConfig.title}"
698
- style="${document.body.clientWidth < 800
702
+ class="w-100"
703
+ >
704
+ <input
705
+ class="flex-fill ${gClass('group-input')}"
706
+ placeholder="${Language.text('please_enter')}${vm.rebateConfig.title}"
707
+ style="${document.body.clientWidth < 800
699
708
  ? `width:calc(100% - 150px) !important;`
700
709
  : ''}"
701
- value="${vm.cartData.use_rebate || ''}"
702
- onchange="${gvc.event((e, event) => {
710
+ value="${vm.cartData.use_rebate || ''}"
711
+ onchange="${gvc.event((e, event) => {
703
712
  if (CheckInput.isNumberString(e.value)) {
704
713
  tempRebate = parseInt(e.value, 10);
705
714
  }
@@ -708,11 +717,11 @@ export class CheckoutIndex {
708
717
  gvc.notifyDataChange(ids.page);
709
718
  }
710
719
  })}"
711
- />
712
- <div class="${gClass('group-button')}">
713
- <div
714
- class="${gClass('button-text')}"
715
- onclick="${gvc.event(() => __awaiter(this, void 0, void 0, function* () {
720
+ />
721
+ <div class="${gClass('group-button')}">
722
+ <div
723
+ class="${gClass('button-text')}"
724
+ onclick="${gvc.event(() => __awaiter(this, void 0, void 0, function* () {
716
725
  const sum = yield new Promise((resolve, reject) => {
717
726
  ApiShop.getRebate({}).then((res) => __awaiter(this, void 0, void 0, function* () {
718
727
  if (res.result && res.response.sum) {
@@ -741,15 +750,15 @@ export class CheckoutIndex {
741
750
  refreshCartData();
742
751
  });
743
752
  }))}"
744
- >
745
- ${Language.text('apply')}
753
+ >
754
+ ${Language.text('apply')}
755
+ </div>
756
+ </div>
746
757
  </div>
747
- </div>
748
- </div>
749
- </div>`;
758
+ </div>`;
750
759
  })()}
751
- <div class="${gClass(['price-row', 'text-2'])}">
752
- ${(() => {
760
+ <div class="${gClass(['price-row', 'text-2'])}">
761
+ ${(() => {
753
762
  return gvc.bindView(() => {
754
763
  return {
755
764
  bind: gvc.glitter.getUUID(),
@@ -770,13 +779,13 @@ export class CheckoutIndex {
770
779
  const info = vm.cartData.useRebateInfo;
771
780
  if (info.condition) {
772
781
  return html `${Language.text('distance_from_target_amount')}$
773
- ${info.condition.toLocaleString()} ${Language.text('can_use_now')}
774
- ${vm.rebateConfig.title} ${Language.text('discount')}`;
782
+ ${info.condition.toLocaleString()} ${Language.text('can_use_now')}
783
+ ${vm.rebateConfig.title} ${Language.text('discount')}`;
775
784
  }
776
785
  if (info.limit) {
777
786
  return html `${Language.text('remaining_balance')} ${sum || 0}
778
- ${Language.text('point')} ${vm.rebateConfig.title} <br />${Language.text('max_discount_order')}
779
- ${info.limit.toLocaleString()} ${Language.text('point')} ${vm.rebateConfig.title}`;
787
+ ${Language.text('point')} ${vm.rebateConfig.title} <br />${Language.text('max_discount_order')}
788
+ ${info.limit.toLocaleString()} ${Language.text('point')} ${vm.rebateConfig.title}`;
780
789
  }
781
790
  else {
782
791
  return `${Language.text('remaining_balance')} ${sum || 0} ${Language.text('point')} ${vm.rebateConfig.title}`;
@@ -785,7 +794,7 @@ export class CheckoutIndex {
785
794
  };
786
795
  });
787
796
  })()}
788
- </div>`;
797
+ </div>`;
789
798
  }
790
799
  })()}
791
800
  <div class="${gClass(['price-row', 'text-2', 'bold'])}">
@@ -1319,7 +1328,7 @@ export class CheckoutIndex {
1319
1328
  })}"
1320
1329
  >
1321
1330
  <span class="${gClass('button-text')}"
1322
- >${isSelected
1331
+ >${isSelected
1323
1332
  ? isSelected.id === pd.id
1324
1333
  ? Language.text('selected')
1325
1334
  : Language.text('change_gift')
@@ -1590,14 +1599,14 @@ export class CheckoutIndex {
1590
1599
  ? shipmentList
1591
1600
  .map((dd) => {
1592
1601
  return html ` <option
1593
- value="${dd.value}"
1594
- ${vm.cartData.user_info.shipment === dd.value
1602
+ value="${dd.value}"
1603
+ ${vm.cartData.user_info.shipment === dd.value
1595
1604
  ? `selected`
1596
1605
  : ''}
1597
- >
1598
- ${Language.text(`ship_${dd.value}`) ||
1606
+ >
1607
+ ${Language.text(`ship_${dd.value}`) ||
1599
1608
  Language.getLanguageCustomText(dd.name)}
1600
- </option>`;
1609
+ </option>`;
1601
1610
  })
1602
1611
  .join('')
1603
1612
  : html ` <option selected>(${Language.text('disable_ship')})</option>`}
@@ -1614,9 +1623,9 @@ export class CheckoutIndex {
1614
1623
  const log_config = (yield ApiUser.getPublicConfig('shipment_config_' + vm.cartData.user_info.shipment, 'manager')).response.value;
1615
1624
  if (log_config.content) {
1616
1625
  return html ` <label class="${gClass('label')}"
1617
- >${Language.text('shipping_instructions')}</label
1618
- >
1619
- <div class="border rounded-3 p-2">${log_config.content}</div>`;
1626
+ >${Language.text('shipping_instructions')}</label
1627
+ >
1628
+ <div class="border rounded-3 p-2">${log_config.content}</div>`;
1620
1629
  }
1621
1630
  return '';
1622
1631
  }),
@@ -1658,13 +1667,13 @@ export class CheckoutIndex {
1658
1667
  view: () => {
1659
1668
  select_id = gvc.glitter.getUUID();
1660
1669
  return html `<label
1661
- class="${gClass('label')} w-100 d-flex align-items-center"
1662
- >${Language.text('shipping_address')}
1663
- <div class="flex-fill"></div>
1664
- <div
1665
- class="fs-sm fw-500 ${!GlobalUser.token ? `d-none` : ''}"
1666
- style="cursor: pointer; color: #3366bb;"
1667
- onclick="${gvc.event(() => {
1670
+ class="${gClass('label')} w-100 d-flex align-items-center"
1671
+ >${Language.text('shipping_address')}
1672
+ <div class="flex-fill"></div>
1673
+ <div
1674
+ class="fs-sm fw-500 ${!GlobalUser.token ? `d-none` : ''}"
1675
+ style="cursor: pointer; color: #3366bb;"
1676
+ onclick="${gvc.event(() => {
1668
1677
  ApiUser.getUserData(GlobalUser.token, 'me').then(res => {
1669
1678
  vm.cartData.user_info.address =
1670
1679
  res.response.userData.consignee_address;
@@ -1672,32 +1681,32 @@ export class CheckoutIndex {
1672
1681
  gvc.notifyDataChange(id);
1673
1682
  });
1674
1683
  })}"
1675
- >
1676
- ${Language.text('quick_input')}
1677
- </div>
1678
- </label>
1679
- <div class="row">
1680
- <div class="col-12 mb-3">
1681
- <div
1682
- role="tw-city-selector"
1683
- id="select_id_${id}"
1684
- class="w-100 city-selector d-flex d_${select_id}"
1685
- style="gap:15px;"
1686
- ></div>
1687
- </div>
1688
- <div class="col-12">
1689
- <input
1690
- class="${gClass('input')}"
1691
- type="address"
1692
- placeholder="${Language.text('please_enter_street_location')}"
1693
- value="${vm.cartData.user_info.address || ''}"
1694
- onchange="${gvc.event(e => {
1684
+ >
1685
+ ${Language.text('quick_input')}
1686
+ </div>
1687
+ </label>
1688
+ <div class="row">
1689
+ <div class="col-12 mb-3">
1690
+ <div
1691
+ role="tw-city-selector"
1692
+ id="select_id_${id}"
1693
+ class="w-100 city-selector d-flex d_${select_id}"
1694
+ style="gap:15px;"
1695
+ ></div>
1696
+ </div>
1697
+ <div class="col-12">
1698
+ <input
1699
+ class="${gClass('input')}"
1700
+ type="address"
1701
+ placeholder="${Language.text('please_enter_street_location')}"
1702
+ value="${vm.cartData.user_info.address || ''}"
1703
+ onchange="${gvc.event(e => {
1695
1704
  vm.cartData.user_info.address = e.value;
1696
1705
  this.storeLocalData(vm.cartData);
1697
1706
  })}"
1698
- />
1699
- </div>
1700
- </div> `;
1707
+ />
1708
+ </div>
1709
+ </div> `;
1701
1710
  },
1702
1711
  divCreate: {
1703
1712
  class: `col-12 mb-2`,
@@ -1742,9 +1751,9 @@ export class CheckoutIndex {
1742
1751
  <!-- 選取超商 -->
1743
1752
  ${ShipmentConfig.supermarketList.includes(vm.cartData.user_info.shipment)
1744
1753
  ? html ` <div class="col-12">
1745
- <button
1746
- class="${gClass('button-bgr')}"
1747
- onclick="${gvc.event(() => {
1754
+ <button
1755
+ class="${gClass('button-bgr')}"
1756
+ onclick="${gvc.event(() => {
1748
1757
  ApiDelivery.storeMaps({
1749
1758
  returnURL: (() => {
1750
1759
  if (ApplicationConfig.device_type === 'ios') {
@@ -1770,9 +1779,9 @@ export class CheckoutIndex {
1770
1779
  }
1771
1780
  }));
1772
1781
  })}"
1773
- >
1782
+ >
1774
1783
  <span class="${gClass('button-text')}"
1775
- >${(() => {
1784
+ >${(() => {
1776
1785
  let cvs = glitter.getUrlParameter('CVSStoreName') || '';
1777
1786
  if (decodeURIComponent(cvs)) {
1778
1787
  return `${decodeURIComponent(cvs)} 『 ${Language.text('click_to_reselct_store')} 』`;
@@ -1782,8 +1791,8 @@ export class CheckoutIndex {
1782
1791
  }
1783
1792
  })()}</span
1784
1793
  >
1785
- </button>
1786
- </div>`
1794
+ </button>
1795
+ </div>`
1787
1796
  : ''}
1788
1797
  ${(() => {
1789
1798
  var _a;
@@ -1800,7 +1809,7 @@ export class CheckoutIndex {
1800
1809
  })()
1801
1810
  ? [
1802
1811
  html `<label class="${gClass('label')}">${Language.text('country')}</label>
1803
- ${gvc.bindView(() => {
1812
+ ${gvc.bindView(() => {
1804
1813
  const id = gvc.glitter.getUUID();
1805
1814
  return {
1806
1815
  bind: id,
@@ -1825,89 +1834,89 @@ export class CheckoutIndex {
1825
1834
  });
1826
1835
  });
1827
1836
  return html `<select
1828
- class="w-100 ${gClass('select')}"
1829
- onchange="${gvc.event((e, event) => {
1837
+ class="w-100 ${gClass('select')}"
1838
+ onchange="${gvc.event((e, event) => {
1830
1839
  vm.cartData.user_info.country = e.value;
1831
1840
  this.storeLocalData(vm.cartData);
1832
1841
  refreshCartData();
1833
1842
  })}"
1834
- >
1835
- ${(() => {
1843
+ >
1844
+ ${(() => {
1836
1845
  let map = country_select.map((dd) => {
1837
1846
  return html `
1838
- <option
1839
- value="${dd.countryCode}"
1840
- ${vm.cartData.user_info.country === dd.countryCode
1847
+ <option
1848
+ value="${dd.countryCode}"
1849
+ ${vm.cartData.user_info.country === dd.countryCode
1841
1850
  ? `selected`
1842
1851
  : ''}
1843
- >
1844
- ${dd.countryName}
1845
- </option>
1846
- `;
1852
+ >
1853
+ ${dd.countryName}
1854
+ </option>
1855
+ `;
1847
1856
  });
1848
1857
  if (!country_select.find((dd) => {
1849
1858
  return dd.countryCode === vm.cartData.user_info.country;
1850
1859
  })) {
1851
1860
  delete vm.cartData.user_info.country;
1852
1861
  map.push(html ` <option class="d-none" selected>
1853
- ${Language.text('select_country')}
1854
- </option>`);
1862
+ ${Language.text('select_country')}
1863
+ </option>`);
1855
1864
  }
1856
1865
  return map.join('');
1857
1866
  })()}
1858
- </select>`;
1867
+ </select>`;
1859
1868
  }),
1860
1869
  };
1861
1870
  })}`,
1862
1871
  html ` <label class="${gClass('label')}"
1863
- >${Language.text('shipping_address')}</label
1864
- >
1865
- <input
1866
- class="${gClass('input')}"
1867
- type="address"
1868
- placeholder="${Language.text('please_enter_delivery_address')}"
1869
- value="${vm.cartData.user_info.address || ''}"
1870
- onchange="${gvc.event(e => {
1872
+ >${Language.text('shipping_address')}</label
1873
+ >
1874
+ <input
1875
+ class="${gClass('input')}"
1876
+ type="address"
1877
+ placeholder="${Language.text('please_enter_delivery_address')}"
1878
+ value="${vm.cartData.user_info.address || ''}"
1879
+ onchange="${gvc.event(e => {
1871
1880
  vm.cartData.user_info.address = e.value;
1872
1881
  this.storeLocalData(vm.cartData);
1873
1882
  })}"
1874
- />`,
1883
+ />`,
1875
1884
  html ` <label class="${gClass('label')}">${Language.text('city')}</label>
1876
- <input
1877
- class="${gClass('input')}"
1878
- type="city"
1879
- placeholder="${Language.text('city')}"
1880
- value="${vm.cartData.user_info.city || ''}"
1881
- onchange="${gvc.event(e => {
1885
+ <input
1886
+ class="${gClass('input')}"
1887
+ type="city"
1888
+ placeholder="${Language.text('city')}"
1889
+ value="${vm.cartData.user_info.city || ''}"
1890
+ onchange="${gvc.event(e => {
1882
1891
  vm.cartData.user_info.city = e.value;
1883
1892
  this.storeLocalData(vm.cartData);
1884
1893
  })}"
1885
- />`,
1894
+ />`,
1886
1895
  html ` <label class="${gClass('label')}">${Language.text('state')}</label>
1887
- <input
1888
- class="${gClass('input')}"
1889
- class="${gClass('input')}"
1890
- type="state"
1891
- placeholder="${Language.text('state')}"
1892
- value="${vm.cartData.user_info.state || ''}"
1893
- onchange="${gvc.event(e => {
1896
+ <input
1897
+ class="${gClass('input')}"
1898
+ class="${gClass('input')}"
1899
+ type="state"
1900
+ placeholder="${Language.text('state')}"
1901
+ value="${vm.cartData.user_info.state || ''}"
1902
+ onchange="${gvc.event(e => {
1894
1903
  vm.cartData.user_info.state = e.value;
1895
1904
  this.storeLocalData(vm.cartData);
1896
1905
  })}"
1897
- />`,
1906
+ />`,
1898
1907
  html ` <label class="${gClass('label')}"
1899
- >${Language.text('postal_code')}</label
1900
- >
1901
- <input
1902
- class="${gClass('input')}"
1903
- type=""
1904
- placeholder="${Language.text('postal_code')}"
1905
- value="${vm.cartData.user_info.postal_code || ''}"
1906
- onchange="${gvc.event(e => {
1908
+ >${Language.text('postal_code')}</label
1909
+ >
1910
+ <input
1911
+ class="${gClass('input')}"
1912
+ type=""
1913
+ placeholder="${Language.text('postal_code')}"
1914
+ value="${vm.cartData.user_info.postal_code || ''}"
1915
+ onchange="${gvc.event(e => {
1907
1916
  vm.cartData.user_info.postal_code = e.value;
1908
1917
  this.storeLocalData(vm.cartData);
1909
1918
  })}"
1910
- />`,
1919
+ />`,
1911
1920
  ]
1912
1921
  .map(dd => {
1913
1922
  return html ` <div class="col-12 col-md-6 mb-2">${dd}</div>`;
@@ -2680,10 +2689,10 @@ export class CheckoutIndex {
2680
2689
  class="d-flex align-items-center justify-content-end"
2681
2690
  style="width:1180px;max-width: 100%;gap:24px;"
2682
2691
  >
2683
- <div class="d-flex align-items-end fs-base" style="gap:5px;">
2684
- <span style="white-space:nowrap;" class="fw-bold fs-sm">
2685
- ${Language.text('total_amount')}</span
2686
- >
2692
+ <div class="d-flex align-items-center fs-base" style="gap:5px;">
2693
+ <div style="white-space:nowrap;" class="fw-bold fs-sm">
2694
+ ${Language.text('total_amount')}
2695
+ </div>
2687
2696
  <div class="${gClass(['price-row', 'text-1', 'bold'])}">
2688
2697
  <div class="fs-5 fw-bold ${gClass('price-text')}">
2689
2698
  ${Currency.convertCurrencyText(vm.cartData.total)}
@@ -2817,7 +2826,7 @@ export class CheckoutIndex {
2817
2826
  dialog.dataLoading({ visible: false });
2818
2827
  if (!res.result) {
2819
2828
  dialog.infoMessage({
2820
- text: '系統處理您的付款時遇到一些問題,導致交易未能完成。請聯繫我們的客服團隊以取得進一步的協助'
2829
+ text: '系統處理您的付款時遇到一些問題,導致交易未能完成。請聯繫我們的客服團隊以取得進一步的協助',
2821
2830
  });
2822
2831
  return;
2823
2832
  }
@@ -3280,7 +3289,7 @@ export class CheckoutIndex {
3280
3289
  </div>
3281
3290
  <div class="c_dialog">
3282
3291
  <div class="c_dialog_body">
3283
- <div class="c_dialog_main" style="gap: 24px; height: auto; max-height: 500px; padding: 12px 20px;">
3292
+ <div class="c_dialog_main" style="gap: 24px; height: auto; max-height: 500px; padding: 12px;">
3284
3293
  ${obj.innerHTML(gvc)}
3285
3294
  </div>
3286
3295
  </div>