ts-glitter 13.8.3 → 13.8.4

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 (58) hide show
  1. package/lowcode/Entry.js +59 -51
  2. package/lowcode/Entry.ts +85 -79
  3. package/lowcode/backend-manager/bg-guide.js +209 -170
  4. package/lowcode/backend-manager/bg-guide.ts +281 -216
  5. package/lowcode/backend-manager/bg-widget.js +953 -691
  6. package/lowcode/backend-manager/bg-widget.ts +1739 -1378
  7. package/lowcode/cms-plugin/ai-message.js +48 -75
  8. package/lowcode/cms-plugin/ai-message.ts +54 -89
  9. package/lowcode/cms-plugin/shopping-finance-setting.js +196 -151
  10. package/lowcode/cms-plugin/shopping-finance-setting.ts +836 -779
  11. package/lowcode/cms-plugin/shopping-product-text.js +700 -73
  12. package/lowcode/cms-plugin/shopping-product-text.ts +721 -56
  13. package/lowcode/cms-plugin/shopping-shipment-setting.js +15 -9
  14. package/lowcode/cms-plugin/shopping-shipment-setting.ts +15 -9
  15. package/lowcode/css/editor.css +25 -0
  16. package/lowcode/glitter-base/route/shopping.js +28 -0
  17. package/lowcode/glitter-base/route/shopping.ts +28 -0
  18. package/lowcode/glitterBundle/Glitter.js +1 -0
  19. package/lowcode/glitterBundle/Glitter.ts +1 -0
  20. package/lowcode/glitterBundle/dialog/dialog.js +1 -1
  21. package/lowcode/glitterBundle/dialog/dialog.ts +1 -1
  22. package/lowcode/glitterBundle/module/html-generate.js +158 -169
  23. package/lowcode/glitterBundle/module/html-generate.ts +849 -905
  24. package/lowcode/jspage/editor.js +29 -17
  25. package/lowcode/jspage/editor.ts +59 -28
  26. package/lowcode/jspage/function-page/setting_editor.js +214 -225
  27. package/lowcode/jspage/function-page/setting_editor.ts +222 -239
  28. package/lowcode/jspage/main.js +7 -3
  29. package/lowcode/jspage/main.ts +9 -5
  30. package/lowcode/public-components/product/product-list.js +651 -0
  31. package/lowcode/public-components/product/product-list.ts +709 -0
  32. package/lowcode/view-model/saas-view-model.js +1 -1
  33. package/lowcode/view-model/saas-view-model.ts +1 -1
  34. package/package.json +1 -1
  35. package/src/api-public/controllers/ai-chat.js +11 -0
  36. package/src/api-public/controllers/ai-chat.js.map +1 -1
  37. package/src/api-public/controllers/ai-chat.ts +11 -0
  38. package/src/api-public/controllers/chat.js.map +1 -1
  39. package/src/api-public/services/ai-robot.d.ts +10 -1
  40. package/src/api-public/services/ai-robot.js +116 -2
  41. package/src/api-public/services/ai-robot.js.map +1 -1
  42. package/src/api-public/services/ai-robot.ts +123 -10
  43. package/src/api-public/services/chat.js +20 -21
  44. package/src/api-public/services/chat.js.map +1 -1
  45. package/src/api-public/services/chat.ts +22 -22
  46. package/src/api-public/services/fake-data-model/fake-order.js.map +1 -1
  47. package/src/api-public/services/fb-message.js.map +1 -1
  48. package/src/api-public/services/notify.js +8 -0
  49. package/src/api-public/services/notify.js.map +1 -1
  50. package/src/api-public/services/notify.ts +8 -0
  51. package/src/controllers/ai.js.map +1 -1
  52. package/src/helper/glitter-util.d.ts +1 -0
  53. package/src/helper/glitter-util.js.map +1 -1
  54. package/src/modules/database.d.ts +0 -1
  55. package/src/modules/database.js.map +1 -1
  56. package/src/services/template.js.map +1 -1
  57. package/src/update-script.js.map +1 -1
  58. package/w6ppvcb8yb.json +1 -0
@@ -140,8 +140,20 @@ export class BgGuide {
140
140
  this.clearEvent();
141
141
  element.remove();
142
142
  this.step = step !== null && step !== void 0 ? step : -1;
143
- this.guide = 0;
144
- this.drawBG();
143
+ if (!step) {
144
+ ApiShop.getFEGuideLeave().then(r => {
145
+ var _a;
146
+ if (!((_a = r.response) === null || _a === void 0 ? void 0 : _a.value)) {
147
+ ApiShop.setFEGuideLeave().then(r => {
148
+ this.guide = 0;
149
+ this.drawBG();
150
+ });
151
+ }
152
+ else {
153
+ document.querySelector(`.guide-BG`).remove();
154
+ }
155
+ });
156
+ }
145
157
  }
146
158
  holeBG(left, right, top, bottom) {
147
159
  return `clip-path: polygon(0% 0%, 0% 100%, ${left.toFixed(0)}px 100%, ${left.toFixed(0)}px ${top.toFixed(0)}px, ${right.toFixed(0)}px ${top.toFixed(0)}px, ${right.toFixed(0)}px ${bottom.toFixed(0)}px, ${left.toFixed(0)}px ${bottom.toFixed(0)}px, ${left.toFixed(0)}px 100%, 100% 100%, 100% 0%);`;
@@ -166,10 +178,31 @@ export class BgGuide {
166
178
  return this.findPageIframe().contentWindow.document.querySelector(cssSelector);
167
179
  }
168
180
  disableScroll() {
169
- this.findIframeDom('.guideOverflow').parentElement.style.overflow = 'hidden';
181
+ this.enableScroll(BgGuide.disableFunction);
182
+ BgGuide.disableFunction = (event) => {
183
+ event.preventDefault();
184
+ };
185
+ const contentWindow = this.findPageIframe().contentWindow;
186
+ if (contentWindow) {
187
+ contentWindow.addEventListener('scroll', BgGuide.disableFunction, { passive: false });
188
+ contentWindow.addEventListener('wheel', BgGuide.disableFunction, { passive: false });
189
+ contentWindow.addEventListener('touchmove', BgGuide.disableFunction, { passive: false });
190
+ contentWindow.document.addEventListener('scroll', BgGuide.disableFunction, { passive: false });
191
+ contentWindow.document.addEventListener('wheel', BgGuide.disableFunction, { passive: false });
192
+ contentWindow.document.addEventListener('touchmove', BgGuide.disableFunction, { passive: false });
193
+ }
194
+ return BgGuide.disableFunction;
170
195
  }
171
- enableScroll() {
172
- this.findIframeDom('.guideOverflow').parentElement.style.overflow = 'auto';
196
+ enableScroll(preventScroll) {
197
+ const contentWindow = this.findPageIframe().contentWindow;
198
+ if (contentWindow) {
199
+ contentWindow.removeEventListener('scroll', preventScroll);
200
+ contentWindow.removeEventListener('wheel', preventScroll);
201
+ contentWindow.removeEventListener('touchmove', preventScroll);
202
+ contentWindow.document.removeEventListener('scroll', preventScroll);
203
+ contentWindow.document.removeEventListener('wheel', preventScroll);
204
+ contentWindow.document.removeEventListener('touchmove', preventScroll);
205
+ }
173
206
  }
174
207
  finGuide(key) {
175
208
  ApiShop.getGuide().then((r) => {
@@ -297,7 +330,7 @@ export class BgGuide {
297
330
  return ``;
298
331
  }
299
332
  drawBGwithBelowWindow(BG, vm, targetSelector, viewID, step, allStep, window, closeEvent) {
300
- var _a;
333
+ var _a, _b;
301
334
  let gvc = this.gvc;
302
335
  function close() {
303
336
  if (closeEvent) {
@@ -317,7 +350,7 @@ export class BgGuide {
317
350
  }
318
351
  let iframe = this.findPageIframe();
319
352
  let iframeRect = iframe.getBoundingClientRect();
320
- let target = this.findIframeDom(`${targetSelector}`);
353
+ let target = (_a = window.dom) !== null && _a !== void 0 ? _a : this.findIframeDom(`${targetSelector}`);
321
354
  let rect = target.getBoundingClientRect();
322
355
  let left = rect.left + iframeRect.left - 6;
323
356
  let top = rect.top + iframeRect.top - 6;
@@ -431,7 +464,7 @@ export class BgGuide {
431
464
  }
432
465
  })}"
433
466
  >
434
- ${(_a = window.btnText) !== null && _a !== void 0 ? _a : '下一步'}
467
+ ${(_b = window.btnText) !== null && _b !== void 0 ? _b : '下一步'}
435
468
  </div>
436
469
  </div>
437
470
  </div>
@@ -746,7 +779,7 @@ export class BgGuide {
746
779
  </div>
747
780
  `;
748
781
  }
749
- drawFinBG(BG, vm, targetSelector, viewID, step, key) {
782
+ drawFinBG(BG, vm, targetSelector, viewID, step, key, window) {
750
783
  function close() {
751
784
  BG.classList.remove(targetSelector);
752
785
  }
@@ -766,9 +799,23 @@ export class BgGuide {
766
799
  }
767
800
  `);
768
801
  this.detectClickThrough(target, () => {
769
- close();
770
- this.finGuide(key);
771
- this.leaveGuide(vm, 0);
802
+ if (window === null || window === void 0 ? void 0 : window.loading) {
803
+ let timer1 = setInterval(() => {
804
+ if (document.querySelector('.dialog-success')) {
805
+ setTimeout(() => {
806
+ close();
807
+ this.finGuide(key);
808
+ this.leaveGuide(vm, 0);
809
+ clearInterval(timer1);
810
+ }, 1500);
811
+ }
812
+ }, 400);
813
+ }
814
+ else {
815
+ close();
816
+ this.finGuide(key);
817
+ this.leaveGuide(vm, 0);
818
+ }
772
819
  });
773
820
  return html `
774
821
  <div class="d-flex flex-column"
@@ -1028,7 +1075,7 @@ export class BgGuide {
1028
1075
  step: this.step,
1029
1076
  };
1030
1077
  const that = this;
1031
- let totalStep = 8;
1078
+ let totalStep = 6;
1032
1079
  let layer2Delay = true;
1033
1080
  let themeNumbers = 0;
1034
1081
  return gvc.bindView({
@@ -1085,54 +1132,6 @@ export class BgGuide {
1085
1132
  return this.drawSecondRowBG(BG, vm, `.guide7-2`, viewID, '佈景主題', totalStep);
1086
1133
  }
1087
1134
  case 3: {
1088
- let target = this.findIframeDom(`.guide7-3`);
1089
- let check = true;
1090
- if (!target) {
1091
- const timer = setInterval(() => {
1092
- if (this.findIframeDom(`.guide7-3`)) {
1093
- clearInterval(timer);
1094
- gvc.notifyDataChange(viewID);
1095
- }
1096
- }, 400);
1097
- }
1098
- target.scrollIntoView();
1099
- return this.drawBGwithTopWindow(BG, vm, '.guide7-3', viewID, totalStep - 6, totalStep, {
1100
- width: 332,
1101
- height: 209,
1102
- title: '當前主題',
1103
- content: '為當前首頁套用的主題資訊',
1104
- cover: true,
1105
- preview: true
1106
- }, () => {
1107
- });
1108
- }
1109
- case 4: {
1110
- let target = this.findIframeDom(`.guide7-4`);
1111
- if (!target) {
1112
- const timer = setInterval(() => {
1113
- if (this.findIframeDom(`.guide7-4`)) {
1114
- clearInterval(timer);
1115
- gvc.notifyDataChange(viewID);
1116
- }
1117
- }, 600);
1118
- }
1119
- let content = html `
1120
- <div class="d-flex flex-wrap"
1121
- style="font-size: 16px;font-style: normal;font-weight: 400;line-height: 160%;letter-spacing: 0.64px;">
1122
- 點擊<span style="font-weight: 700;">自訂</span>,可前往<span style="font-weight: 700;">頁面編輯器頁面</span>,自由將官網編輯成您理想中的模樣
1123
- </div>
1124
- `;
1125
- target.scrollIntoView();
1126
- return this.drawBGwithBelowWindow(BG, vm, '.guide7-4', viewID, totalStep - 5, totalStep, {
1127
- width: 332,
1128
- height: 235,
1129
- title: '自訂主題',
1130
- content: content,
1131
- alignment: 'left',
1132
- cover: true,
1133
- });
1134
- }
1135
- case 5: {
1136
1135
  let target = this.findIframeDom(`.guide8-5`);
1137
1136
  if (!target) {
1138
1137
  const timer = setInterval(() => {
@@ -1157,7 +1156,7 @@ export class BgGuide {
1157
1156
  cover: true
1158
1157
  });
1159
1158
  }
1160
- case 6: {
1159
+ case 4: {
1161
1160
  let target = this.findIframeDom(`.themeGroup`);
1162
1161
  if (!target) {
1163
1162
  const timer = setInterval(() => {
@@ -1186,7 +1185,7 @@ export class BgGuide {
1186
1185
  next: true
1187
1186
  });
1188
1187
  }
1189
- case 7: {
1188
+ case 5: {
1190
1189
  let target = this.findIframeDom(`.guide8-5`);
1191
1190
  let themeRow = this.findPageIframe().contentWindow.document.querySelectorAll('.themeRow');
1192
1191
  if (themeNumbers == 0) {
@@ -1222,7 +1221,7 @@ export class BgGuide {
1222
1221
  content: content,
1223
1222
  });
1224
1223
  }
1225
- case 8: {
1224
+ case 6: {
1226
1225
  let target = this.findIframeDom(`.themeSwitch`);
1227
1226
  if (!target) {
1228
1227
  const timer = setInterval(() => {
@@ -1251,7 +1250,7 @@ export class BgGuide {
1251
1250
  },
1252
1251
  });
1253
1252
  }
1254
- case 9: {
1253
+ case 7: {
1255
1254
  return html `
1256
1255
  <div
1257
1256
  class="d-flex flex-column align-items-center justify-content-center"
@@ -1294,6 +1293,54 @@ export class BgGuide {
1294
1293
  </div>
1295
1294
  </div>`;
1296
1295
  }
1296
+ case -3: {
1297
+ let target = this.findIframeDom(`.guide7-3`);
1298
+ let check = true;
1299
+ if (!target) {
1300
+ const timer = setInterval(() => {
1301
+ if (this.findIframeDom(`.guide7-3`)) {
1302
+ clearInterval(timer);
1303
+ gvc.notifyDataChange(viewID);
1304
+ }
1305
+ }, 400);
1306
+ }
1307
+ target.scrollIntoView();
1308
+ return this.drawBGwithTopWindow(BG, vm, '.guide7-3', viewID, totalStep - 6, totalStep, {
1309
+ width: 332,
1310
+ height: 209,
1311
+ title: '當前主題',
1312
+ content: '為當前首頁套用的主題資訊',
1313
+ cover: true,
1314
+ preview: true
1315
+ }, () => {
1316
+ });
1317
+ }
1318
+ case -4: {
1319
+ let target = this.findIframeDom(`.guide7-4`);
1320
+ if (!target) {
1321
+ const timer = setInterval(() => {
1322
+ if (this.findIframeDom(`.guide7-4`)) {
1323
+ clearInterval(timer);
1324
+ gvc.notifyDataChange(viewID);
1325
+ }
1326
+ }, 600);
1327
+ }
1328
+ let content = html `
1329
+ <div class="d-flex flex-wrap"
1330
+ style="font-size: 16px;font-style: normal;font-weight: 400;line-height: 160%;letter-spacing: 0.64px;">
1331
+ 點擊<span style="font-weight: 700;">自訂</span>,可前往<span style="font-weight: 700;">頁面編輯器頁面</span>,自由將官網編輯成您理想中的模樣
1332
+ </div>
1333
+ `;
1334
+ target.scrollIntoView();
1335
+ return this.drawBGwithBelowWindow(BG, vm, '.guide7-4', viewID, totalStep - 5, totalStep, {
1336
+ width: 332,
1337
+ height: 235,
1338
+ title: '自訂主題',
1339
+ content: content,
1340
+ alignment: 'left',
1341
+ cover: true,
1342
+ });
1343
+ }
1297
1344
  default: {
1298
1345
  function close() {
1299
1346
  BG.classList.remove('guide7-1');
@@ -1304,7 +1351,7 @@ export class BgGuide {
1304
1351
  let iframeRect = iframe.getBoundingClientRect();
1305
1352
  this.detectClickThrough(target1, () => {
1306
1353
  close();
1307
- totalStep = 9;
1354
+ totalStep = 7;
1308
1355
  vm.step = 2;
1309
1356
  gvc.notifyDataChange(viewID);
1310
1357
  });
@@ -1483,7 +1530,7 @@ export class BgGuide {
1483
1530
  content: '您可以選擇使用免費的子網域,或是額外付費申請獨立網域',
1484
1531
  btnText: '完成',
1485
1532
  }, () => {
1486
- this.leaveGuide(vm, 1);
1533
+ this.leaveGuide(vm, 0);
1487
1534
  this.finGuide('shop_information');
1488
1535
  });
1489
1536
  }
@@ -1657,7 +1704,10 @@ export class BgGuide {
1657
1704
  width: 332,
1658
1705
  height: 209,
1659
1706
  title: '運費計算',
1660
- content: '選擇此商品的運費計算方式',
1707
+ content: html `
1708
+ <div class="" style="white-space: normal">
1709
+ 點擊<span style="font-weight: 700;">依材積計算</span>,作為此商品的運費計算方式
1710
+ </div>`,
1661
1711
  next: true,
1662
1712
  });
1663
1713
  }
@@ -1694,7 +1744,7 @@ export class BgGuide {
1694
1744
  });
1695
1745
  }
1696
1746
  case 8: {
1697
- return this.drawFinBG(BG, vm, 'guide5-8', 'productInit', 8, 'product-manager');
1747
+ return this.drawFinBG(BG, vm, 'guide5-8', 'productInit', 8, 'product-manager', { loading: true });
1698
1748
  }
1699
1749
  default: {
1700
1750
  return this.drawMainRowBG(BG, vm, `.mainRow2`, 'productInit', 8, '商品管理');
@@ -1902,26 +1952,13 @@ export class BgGuide {
1902
1952
  可以刪除計算區間
1903
1953
  </div>
1904
1954
  `;
1905
- let body = document.querySelector('.editorContainer');
1906
- if (body && !document.querySelector('.clickInterface')) {
1907
- $(body).append(html `
1908
- <div
1909
- class="clickInterface"
1910
- style="height: 100vh;width: 100vw;position: fixed;left: 0;top: 0;z-index: 1030;cursor: pointer;"
1911
- onclick="${gvc.event(() => {
1912
- if (document.querySelector('.breathing-light')) {
1913
- document.querySelector('.breathing-light').click();
1914
- }
1915
- })}"
1916
- ></div>
1917
- `);
1918
- }
1919
1955
  return this.drawBGwithBelowWindow(BG, vm, '.guide4-6', 'logisticsInit', 6, 8, {
1920
1956
  width: 332,
1921
1957
  height: 209,
1922
1958
  title: '刪除計算區間',
1923
1959
  content: content,
1924
1960
  next: true,
1961
+ dom: target
1925
1962
  }, () => {
1926
1963
  if (document.querySelector('.clickInterface')) {
1927
1964
  document.querySelector('.clickInterface').remove();
@@ -1945,7 +1982,7 @@ export class BgGuide {
1945
1982
  });
1946
1983
  }
1947
1984
  case 8: {
1948
- return this.drawFinBG(BG, vm, 'guide4-8', 'logisticsInit', 8, 'logistics_setting');
1985
+ return this.drawFinBG(BG, vm, 'guide4-8', 'logisticsInit', 8, 'logistics_setting', { loading: true });
1949
1986
  }
1950
1987
  default: {
1951
1988
  return this.drawMainRowBG(BG, vm, `.mainRow1`, 'logisticsInit', 8);
@@ -2005,9 +2042,12 @@ export class BgGuide {
2005
2042
  return this.drawSecondRowBG(BG, vm, `.guide3-2`, 'shipInit', '配送設定', 5);
2006
2043
  }
2007
2044
  case 3: {
2045
+ const scrollEvent = this.disableScroll();
2046
+ const that = this;
2008
2047
  function close() {
2009
2048
  BG.classList.remove(`guide3-3`);
2010
- clearInterval(timer);
2049
+ that.enableScroll(scrollEvent);
2050
+ that.findIframeDom('.innerGuide').remove();
2011
2051
  }
2012
2052
  function next() {
2013
2053
  vm.step++;
@@ -2024,102 +2064,97 @@ export class BgGuide {
2024
2064
  }
2025
2065
  }, 500);
2026
2066
  }
2027
- target.scrollIntoView();
2028
2067
  let rect = target.getBoundingClientRect();
2029
2068
  let left = rect.left + iframeRect.left;
2030
2069
  let top = rect.top + iframeRect.top;
2031
2070
  let right = rect.right + iframeRect.left;
2032
2071
  let bottom = rect.bottom + iframeRect.top;
2033
- let mid = (right + left) / 2;
2034
- let checked = target.querySelector('input[checked]');
2035
2072
  gvc.addStyle(`
2036
2073
  .guide3-3 {
2037
2074
  ${this.holeBG(left, right, top, bottom)}
2038
2075
  }
2039
2076
  `);
2040
- const timer = setInterval(() => {
2041
- checked = target.querySelector('input[checked]');
2042
- }, 500);
2043
2077
  BG.classList.add(`guide3-3`);
2044
- return html `
2045
- <div class="d-flex flex-column"
2046
- style="width: 332px;height: 209px;flex-shrink: 0;position: absolute;left: ${mid - 166}px;top:${rect.bottom + iframeRect.top + 24}px;">
2047
- <div class="w-100" style="padding-left: 155px;height:23px;">
2048
- <svg xmlns="http://www.w3.org/2000/svg" width="22" height="18" viewBox="0 0 22 18"
2049
- fill="none">
2050
- <path d="M11.002 0L21.3943 18L0.609648 18L11.002 0Z" fill="#FEAD20"/>
2051
- </svg>
2052
- </div>
2053
- <div class="w-100" style="border-radius: 10px;">
2054
- <div
2055
- style="display: flex;padding: 12px 24px;gap: 10px;width: 100%;background: #FEAD20;border-radius: 10px 10px 0 0;color:white;font-size: 20px;font-style: normal;font-weight: 700;line-height: normal;letter-spacing: 0.8px;"
2056
- >
2057
- 選擇配送方式
2058
- <div
2059
- class="d-flex ms-auto align-items-center"
2060
- style="gap:10px;color: #FFF;font-size: 16px;font-style: normal;font-weight: 400;line-height: normal;letter-spacing: 0.64px;"
2061
- >
2062
- 步驟 3/5
2063
- <svg
2064
- style="cursor: pointer;"
2065
- xmlns="http://www.w3.org/2000/svg"
2066
- width="14"
2067
- height="13"
2068
- viewBox="0 0 14 13"
2069
- fill="none"
2070
- onclick="${gvc.event(() => {
2071
- close();
2072
- this.leaveGuide(vm);
2073
- })}"
2074
- >
2075
- <path d="M1 0.5L13 12.5" stroke="white" stroke-linecap="round"/>
2076
- <path d="M13 0.5L1 12.5" stroke="white" stroke-linecap="round"/>
2077
- </svg>
2078
- </div>
2079
- </div>
2080
- <div
2081
- class="d-flex flex-column w-100"
2082
- style="background: #FFF;width:100%;padding: 18px 24px;border-radius: 0 0 10px 10px;font-size: 16px;font-style: normal;font-weight: 400;line-height: 160%;letter-spacing: 0.64px;"
2083
- >
2084
- 開啟您要使用的配送方式
2085
- <div class="d-flex align-items-center justify-content-between"
2086
- style="margin-top: 24px;height:52px;">
2087
- <div
2088
- style="padding: 6px 18px;border-radius: 10px;border:solid 1px #FEAD20;color: #FEAD20;font-size: 16px;font-style: normal;font-weight: 700;line-height: normal;cursor: pointer;"
2089
- onclick="${gvc.event(() => {
2090
- vm.step--;
2091
- close();
2092
- gvc.notifyDataChange('shipInit');
2093
- })}"
2094
- >
2095
- 上一步
2096
- </div>
2097
- <div class="d-flex align-items-center justify-content-center"
2098
- style="width: 96px;height: 46px;">
2078
+ target.classList.add(`position-relative`);
2079
+ const child_gvc = document.querySelector(`iframe`).contentWindow.glitter.pageConfig[0].gvc;
2080
+ $(target).append(child_gvc.bindView({
2081
+ bind: `guide3-3`,
2082
+ view: () => {
2083
+ return html `
2084
+ <div class="d-flex flex-column"
2085
+ style="width: 332px;height: 209px;flex-shrink: 0;position: absolute;left: calc(50% - 166px);bottom:calc(50% - 104px);filter: drop-shadow(0px 0px 20px rgba(0, 0, 0, 0.40));">
2086
+ <div class="w-100" style="border-radius: 10px;">
2099
2087
  <div
2100
- class="breathing-light"
2101
- style="padding: 6px 18px;border-radius: 10px;${checked
2102
- ? `background: #FEAD20;`
2103
- : `background: #FFE9B2;opacity: 0.8;`};color: #FFF; ;font-size: 16px;font-style: normal;font-weight: 700;line-height: normal;cursor: pointer;"
2104
- onclick="${gvc.event(() => {
2105
- if (!checked) {
2106
- return;
2107
- }
2108
- next();
2109
- })}"
2088
+ style="display: flex;padding: 12px 24px;gap: 10px;width: 100%;background: #FEAD20;border-radius: 10px 10px 0 0;color:white;font-size: 20px;font-style: normal;font-weight: 700;line-height: normal;letter-spacing: 0.8px;"
2110
2089
  >
2111
- 下一步
2090
+ 配送方式
2091
+ <div
2092
+ class="d-flex ms-auto align-items-center"
2093
+ style="gap:10px;color: #FFF;font-size: 16px;font-style: normal;font-weight: 400;line-height: normal;letter-spacing: 0.64px;"
2094
+ >
2095
+ 步驟 3/5
2096
+ <svg
2097
+ style="cursor: pointer;"
2098
+ xmlns="http://www.w3.org/2000/svg"
2099
+ width="14"
2100
+ height="13"
2101
+ viewBox="0 0 14 13"
2102
+ fill="none"
2103
+ onclick="${child_gvc.event(() => {
2104
+ close();
2105
+ this.leaveGuide(vm);
2106
+ })}"
2107
+ >
2108
+ <path d="M1 0.5L13 12.5" stroke="white" stroke-linecap="round"/>
2109
+ <path d="M13 0.5L1 12.5" stroke="white" stroke-linecap="round"/>
2110
+ </svg>
2111
+ </div>
2112
+ </div>
2113
+ <div
2114
+ class="d-flex flex-column w-100"
2115
+ style="background: #FFF;width:100%;padding: 18px 24px;border-radius: 0 0 10px 10px;font-size: 16px;font-style: normal;font-weight: 400;line-height: 160%;letter-spacing: 0.64px;"
2116
+ >
2117
+ 這裡可以設定配送方式
2118
+ <div class="d-flex align-items-center justify-content-between"
2119
+ style="margin-top: 24px;height:52px;">
2120
+ <div
2121
+ style="padding: 6px 18px;border-radius: 10px;border:solid 1px #FEAD20;color: #FEAD20;font-size: 16px;font-style: normal;font-weight: 700;line-height: normal;cursor: pointer;"
2122
+ onclick="${child_gvc.event(() => {
2123
+ vm.step--;
2124
+ close();
2125
+ gvc.notifyDataChange('shipInit');
2126
+ })}"
2127
+ >
2128
+ 上一步
2129
+ </div>
2130
+ <div class="d-flex align-items-center justify-content-center"
2131
+ style="width: 96px;height: 46px;">
2132
+ <div
2133
+ class="breathing-light"
2134
+ style=" padding: 6px 18px;border-radius: 10px;background: #FEAD20;color: #FFF; ;font-size: 16px;font-style: normal;font-weight: 700;line-height: normal;cursor: pointer;"
2135
+ onclick="${child_gvc.event(() => {
2136
+ next();
2137
+ })}"
2138
+ >
2139
+ 下一步
2140
+ </div>
2141
+ </div>
2142
+ </div>
2112
2143
  </div>
2113
2144
  </div>
2114
2145
  </div>
2115
- </div>
2116
- </div>
2117
- </div>
2118
- `;
2146
+ `;
2147
+ },
2148
+ divCreate: { class: `innerGuide` },
2149
+ }));
2150
+ return ``;
2119
2151
  }
2120
2152
  case 4: {
2153
+ let that = this;
2154
+ const scrollEvent = this.disableScroll();
2121
2155
  function close() {
2122
2156
  BG.classList.remove(`guide3-4`);
2157
+ that.enableScroll(scrollEvent);
2123
2158
  that.findIframeDom('.innerGuide').remove();
2124
2159
  }
2125
2160
  function next() {
@@ -2149,7 +2184,7 @@ export class BgGuide {
2149
2184
  return html `
2150
2185
  <div
2151
2186
  class="d-flex flex-column"
2152
- style="width: 332px;height: 209px;flex-shrink: 0;position: absolute;left: 50%;bottom:30px;filter: drop-shadow(2px 2px 10px rgba(0, 0, 0, 0.15));transform: translate(-50%,0%);z-index: 1;"
2187
+ style="width: 332px;height: 209px;flex-shrink: 0;position: absolute;left: 50%;bottom:35px;filter: drop-shadow(2px 2px 10px rgba(0, 0, 0, 0.15));transform: translate(-50%,0%);z-index: 1;"
2153
2188
  >
2154
2189
  <div class="w-100" style="padding-left: 155px;height:23px;">
2155
2190
  <svg xmlns="http://www.w3.org/2000/svg" width="22" height="18"
@@ -2228,7 +2263,7 @@ export class BgGuide {
2228
2263
  return ``;
2229
2264
  }
2230
2265
  case 5: {
2231
- return this.drawFinBG(BG, vm, 'guide3-5', 'shipInit', 5, 'shippment_setting');
2266
+ return this.drawFinBG(BG, vm, 'guide3-5', 'shipInit', 5, 'shippment_setting', { loading: true });
2232
2267
  }
2233
2268
  default: {
2234
2269
  return this.drawMainRowBG(BG, vm, `.mainRow1`, 'shipInit', 5);
@@ -2395,6 +2430,7 @@ export class BgGuide {
2395
2430
  let top = iframeRect.top + 4;
2396
2431
  let right = rect.right + iframeRect.left + 24;
2397
2432
  let bottom = iframeRect.bottom - 230;
2433
+ const scrollEvent = this.disableScroll();
2398
2434
  BG.classList.add('guide2-5');
2399
2435
  target.classList.add(`position-relative`);
2400
2436
  const child_gvc = iframe.contentWindow.glitter.pageConfig[0].gvc;
@@ -2486,6 +2522,7 @@ export class BgGuide {
2486
2522
  fill="none"
2487
2523
  onclick="${child_gvc.event(() => {
2488
2524
  close();
2525
+ this.enableScroll(scrollEvent);
2489
2526
  this.leaveGuide(vm);
2490
2527
  })}"
2491
2528
  >
@@ -2511,6 +2548,7 @@ export class BgGuide {
2511
2548
  openGroup.forEach((el) => {
2512
2549
  el.classList.toggle('openIt');
2513
2550
  });
2551
+ this.enableScroll(scrollEvent);
2514
2552
  close();
2515
2553
  setTimeout(() => {
2516
2554
  this.findIframeDom('.guide2-4').scrollIntoView({});
@@ -2530,6 +2568,7 @@ export class BgGuide {
2530
2568
  style="padding: 6px 18px;border-radius: 10px;background: #FEAD20;color: #FFF;font-size: 16px;font-style: normal;font-weight: 700;line-height: normal;cursor: pointer;"
2531
2569
  onclick="${child_gvc.event(() => {
2532
2570
  vm.step++;
2571
+ this.enableScroll(scrollEvent);
2533
2572
  close();
2534
2573
  gvc.notifyDataChange('financeInit');
2535
2574
  })}"
@@ -2561,7 +2600,7 @@ export class BgGuide {
2561
2600
  return ``;
2562
2601
  }
2563
2602
  case 6: {
2564
- return this.drawFinBG(BG, vm, 'guide2-6', 'financeInit', 6, 'setFinanceWay');
2603
+ return this.drawFinBG(BG, vm, 'guide2-6', 'financeInit', 6, 'setFinanceWay', { loading: true });
2565
2604
  }
2566
2605
  default: {
2567
2606
  return this.drawMainRowBG(BG, vm, `.mainRow1`, 'financeInit', 6);
@@ -2582,7 +2621,6 @@ export class BgGuide {
2582
2621
  bind: 'init',
2583
2622
  dataList: [{ key: 'step', obj: vm }],
2584
2623
  view: () => {
2585
- console.log(" vm.progress -- ", vm.progress);
2586
2624
  if (vm.progress.length == 0) {
2587
2625
  ApiShop.getGuide().then((r) => {
2588
2626
  vm.progress = r.response.value;
@@ -2761,9 +2799,6 @@ export class BgGuide {
2761
2799
  `;
2762
2800
  }
2763
2801
  case 0: {
2764
- if (vm.progress.length == 0) {
2765
- let dialog = new ShareDialog(gvc.glitter);
2766
- }
2767
2802
  return html `
2768
2803
  <div class="d-flex flex-column"
2769
2804
  style="width:588px;border-radius: 10px;background-color: white;">
@@ -2808,6 +2843,11 @@ export class BgGuide {
2808
2843
  ${gvc.bindView({
2809
2844
  bind: 'guideDirect',
2810
2845
  view: () => {
2846
+ let dialog = new ShareDialog(gvc.glitter);
2847
+ dialog.dataLoading({ visible: true });
2848
+ setTimeout(() => {
2849
+ dialog.dataLoading({ visible: false });
2850
+ }, 300);
2811
2851
  return vm.progress
2812
2852
  .map((data, index) => {
2813
2853
  return html `
@@ -3431,7 +3471,6 @@ export class BgGuide {
3431
3471
  previewEvent: () => {
3432
3472
  let previewBTN = document.querySelector(`.offcanvas-title`).nextElementSibling.nextElementSibling;
3433
3473
  previewBTN.click();
3434
- console.log(previewBTN);
3435
3474
  }
3436
3475
  });
3437
3476
  }
@@ -4045,7 +4084,6 @@ export class BgGuide {
4045
4084
  }, 500);
4046
4085
  }
4047
4086
  let target = document.querySelector(`.${className}`);
4048
- console.log("target -- ", target);
4049
4087
  if (target) {
4050
4088
  const context = html `
4051
4089
  <div>點擊<span style="font-weight: 700">配色1</span>進入編輯</div>`;
@@ -4455,3 +4493,4 @@ export class BgGuide {
4455
4493
  return html ``;
4456
4494
  }
4457
4495
  }
4496
+ BgGuide.disableFunction = () => { };