ts-glitter 21.1.5 → 21.1.6

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