ts-glitter 21.5.3 → 21.5.5

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 (79) hide show
  1. package/lowcode/Entry.js +1 -1
  2. package/lowcode/Entry.ts +1 -1
  3. package/lowcode/cms-plugin/account-info.js +79 -67
  4. package/lowcode/cms-plugin/account-info.ts +327 -311
  5. package/lowcode/cms-plugin/information/information-module.ts +3 -1
  6. package/lowcode/cms-plugin/list-header-option.js +1 -0
  7. package/lowcode/cms-plugin/list-header-option.ts +1 -0
  8. package/lowcode/cms-plugin/shopping-information.js +468 -0
  9. package/lowcode/cms-plugin/shopping-information.ts +557 -0
  10. package/lowcode/cms-plugin/shopping-market-shopee.js +283 -231
  11. package/lowcode/cms-plugin/shopping-market-shopee.ts +401 -361
  12. package/lowcode/cms-plugin/shopping-order-manager.js +16 -4
  13. package/lowcode/cms-plugin/shopping-order-manager.ts +18 -3
  14. package/lowcode/glitter-base/global/language.js +4 -1
  15. package/lowcode/glitter-base/global/language.ts +4 -2
  16. package/lowcode/glitter-base/route/shopee.js +48 -11
  17. package/lowcode/glitter-base/route/shopee.ts +119 -80
  18. package/lowcode/glitterBundle/plugins/html-render.js +121 -90
  19. package/lowcode/glitterBundle/plugins/html-render.ts +367 -318
  20. package/lowcode/modules/image-library.js +2 -3
  21. package/lowcode/modules/image-library.ts +21 -7
  22. package/lowcode/public-components/checkout/index.js +90 -41
  23. package/lowcode/public-components/checkout/index.ts +101 -49
  24. package/lowcode/public-components/footer/footer-initial.js +11 -2
  25. package/lowcode/public-components/footer/footer-initial.ts +29 -18
  26. package/lowcode/public-components/headers/header-class.js +47 -35
  27. package/lowcode/public-components/headers/header-class.ts +54 -38
  28. package/lowcode/public-components/layout-plugin/social-links-01.js +122 -3
  29. package/lowcode/public-components/layout-plugin/social-links-01.ts +135 -10
  30. package/lowcode/public-components/product/pd-card-01.js +23 -14
  31. package/lowcode/public-components/product/pd-card-01.ts +25 -14
  32. package/lowcode/public-components/product/pd-card-02.js +23 -16
  33. package/lowcode/public-components/product/pd-card-02.ts +25 -16
  34. package/lowcode/public-components/product/pd-card-03.js +25 -16
  35. package/lowcode/public-components/product/pd-card-03.ts +27 -16
  36. package/lowcode/public-components/terms-related/index.js +13 -2
  37. package/lowcode/public-components/terms-related/index.ts +15 -2
  38. package/lowcode/public-components/user-manager/um-class.js +490 -501
  39. package/lowcode/public-components/user-manager/um-class.ts +872 -882
  40. package/lowcode/public-components/user-manager/um-info.js +41 -40
  41. package/lowcode/public-components/user-manager/um-info.ts +54 -56
  42. package/lowcode/public-components/user-manager/um-login.js +10 -13
  43. package/lowcode/public-components/user-manager/um-login.ts +15 -23
  44. package/lowcode/public-components/user-manager/um-orderlist.js +60 -51
  45. package/lowcode/public-components/user-manager/um-orderlist.ts +289 -275
  46. package/lowcode/public-components/user-manager/um-rebate.js +104 -82
  47. package/lowcode/public-components/user-manager/um-rebate.ts +294 -267
  48. package/lowcode/public-components/user-manager/um-receive.js +582 -0
  49. package/lowcode/public-components/user-manager/um-receive.ts +599 -0
  50. package/lowcode/public-components/user-manager/um-wishlist.js +72 -68
  51. package/lowcode/public-components/user-manager/um-wishlist.ts +240 -230
  52. package/package.json +1 -1
  53. package/src/api-public/controllers/shopee.js +17 -0
  54. package/src/api-public/controllers/shopee.js.map +1 -1
  55. package/src/api-public/controllers/shopee.ts +32 -0
  56. package/src/api-public/services/monitor.d.ts +1 -0
  57. package/src/api-public/services/post.js +17 -7
  58. package/src/api-public/services/post.js.map +1 -1
  59. package/src/api-public/services/rebate.js +2 -11
  60. package/src/api-public/services/rebate.js.map +1 -1
  61. package/src/api-public/services/rebate.ts +5 -12
  62. package/src/api-public/services/shopee.d.ts +23 -2
  63. package/src/api-public/services/shopee.js +230 -111
  64. package/src/api-public/services/shopee.js.map +1 -1
  65. package/src/api-public/services/shopee.ts +1012 -838
  66. package/src/api-public/services/user.js +2 -2
  67. package/src/api-public/services/user.js.map +1 -1
  68. package/src/api-public/services/user.ts +3 -3
  69. package/src/index.js +17 -7
  70. package/src/index.js.map +1 -1
  71. package/src/modules/tool.d.ts +4 -4
  72. package/src/modules/tool.js +2 -1
  73. package/src/modules/tool.js.map +1 -1
  74. package/src/services/backend-service.js +17 -7
  75. package/src/services/backend-service.js.map +1 -1
  76. package/src/services/template.d.ts +1 -1
  77. package/src/services/template.js +24 -18
  78. package/src/services/template.js.map +1 -1
  79. package/src/services/template.ts +34 -37
@@ -78,9 +78,7 @@ export class UMInfo {
78
78
  >
79
79
  <div style="color: white; font-size: 14px; font-weight: 700; word-wrap: break-word">
80
80
  ${(() => {
81
- const mem = vm.data.member.find(d => {
82
- return d.trigger;
83
- });
81
+ const mem = vm.data.member.find(d => d.trigger);
84
82
  return mem ? mem.tag_name : Language.text('normal_member');
85
83
  })()}
86
84
  </div>
@@ -264,7 +262,6 @@ export class UMInfo {
264
262
  </div>`;
265
263
  }
266
264
  },
267
- divCreate: {},
268
265
  onCreate: () => {
269
266
  if (loading) {
270
267
  glitter.addMtScript([
@@ -441,18 +438,18 @@ export class UMInfo {
441
438
  },
442
439
  ]
443
440
  .map(dd => {
444
- return `<div
445
- style="flex: 1 1 0; flex-direction: column; justify-content: flex-start; align-items: center; display: inline-flex"
446
- >
447
- ${dd.value}
448
- <div
449
- style="align-self: stretch; text-align: center; color: #393939; font-size: 16px; font-weight: 400; line-height: 22.40px; word-wrap: break-word"
450
- >
451
- ${dd.title}
452
- </div>
453
- </div>`;
441
+ return html `<div
442
+ style="flex: 1 1 0; flex-direction: column; justify-content: flex-start; align-items: center; display: inline-flex"
443
+ >
444
+ ${dd.value}
445
+ <div
446
+ style="align-self: stretch; text-align: center; color: #393939; font-size: 16px; font-weight: 400; line-height: 22.40px; word-wrap: break-word"
447
+ >
448
+ ${dd.title}
449
+ </div>
450
+ </div>`;
454
451
  })
455
- .join(`<div class="border-end" style="width:1px;height: 30px;"></div>`)}
452
+ .join(html `<div class="border-end" style="width:1px;height: 30px;"></div>`)}
456
453
  </div>
457
454
  </div>
458
455
  </div>
@@ -491,19 +488,17 @@ export class UMInfo {
491
488
  },
492
489
  ]
493
490
  .map((dd) => {
494
- return `
495
- <div
496
- style="flex: 1 1 0; flex-direction: column; justify-content: flex-start; align-items: center; gap: 8px; display: inline-flex;cursor:pointer;"
497
- onclick="${gvc.event(() => {
491
+ return html `
492
+ <div
493
+ style="flex: 1 1 0; flex-direction: column; justify-content: flex-start; align-items: center; gap: 8px; display: inline-flex;cursor:pointer;"
494
+ onclick="${gvc.event(() => {
498
495
  dd.event();
499
- })}">
500
- ${dd.icon}
501
- <div
502
- style="font-size:16px;" class="fw-500">
503
- ${dd.title}
504
- </div>
505
- </div>
506
- `;
496
+ })}"
497
+ >
498
+ ${dd.icon}
499
+ <div style="font-size:16px;" class="fw-500">${dd.title}</div>
500
+ </div>
501
+ `;
507
502
  })
508
503
  .join('')}
509
504
  </div>
@@ -517,7 +512,6 @@ export class UMInfo {
517
512
  }
518
513
  }
519
514
  },
520
- divCreate: {},
521
515
  onCreate: () => {
522
516
  if (loadings.view) {
523
517
  UmClass.getUserData(gvc).then((resp) => {
@@ -738,23 +732,30 @@ export class UMInfo {
738
732
  };
739
733
  });
740
734
  return [
741
- ` <div class="w-100 align-items-center d-flex py-3 pb-lg-3 pt-lg-0" style="gap:10px;">
742
-
743
- <div class="d-none d-lg-flex" style="background: #FF9705;background: #FF9705;width:4px;height: 20px;" onclick="${gvc.event(() => {
735
+ html ` <div class="w-100 align-items-center d-flex py-3 pb-lg-3 pt-lg-0" style="gap:10px;">
736
+ <div
737
+ class="d-none d-lg-flex"
738
+ style="background: #FF9705;background: #FF9705;width:4px;height: 20px;"
739
+ onclick="${gvc.event(() => {
744
740
  gvc.glitter.getModule(new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href, cl => {
745
741
  cl.changePage('account_userinfo', 'home', {});
746
742
  });
747
- })}"></div>
748
- <div class="d-flex d-lg-none align-items-center justify-content-center" style="width:20px;height: 20px;" onclick="${gvc.event(() => {
743
+ })}"
744
+ ></div>
745
+ <div
746
+ class="d-flex d-lg-none align-items-center justify-content-center"
747
+ style="width:20px;height: 20px;"
748
+ onclick="${gvc.event(() => {
749
749
  gvc.glitter.getModule(new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href, cl => {
750
750
  cl.changePage('account_userinfo', 'home', {});
751
751
  });
752
- })}">
753
- <i class="fa-solid fa-angle-left fs-4"></i>
754
- </div>
755
- <div class="um-info-title fw-bold " style="font-size: 24px;">${Language.text('member_info')}</div>
756
- </div>`,
757
- `<div style="height:5px;"></div>`,
752
+ })}"
753
+ >
754
+ <i class="fa-solid fa-angle-left fs-4"></i>
755
+ </div>
756
+ <div class="um-info-title fw-bold " style="font-size: 24px;">${Language.text('member_info')}</div>
757
+ </div>`,
758
+ html `<div style="height:5px;"></div>`,
758
759
  FormWidget.editorView({
759
760
  gvc: gvc,
760
761
  array: form_array.map((dd) => {
@@ -781,7 +782,7 @@ export class UMInfo {
781
782
  },
782
783
  formData: update_userData,
783
784
  }),
784
- html ` <div
785
+ html `<div
785
786
  class="mt-2 w-100 d-flex align-items-center justify-content-end ${JSON.stringify(update_userData) ===
786
787
  JSON.stringify(vm.data.userData)
787
788
  ? `d-none`
@@ -156,9 +156,7 @@ export class UMInfo {
156
156
  >
157
157
  <div style="color: white; font-size: 14px; font-weight: 700; word-wrap: break-word">
158
158
  ${(() => {
159
- const mem = vm.data.member.find(d => {
160
- return d.trigger;
161
- });
159
+ const mem = vm.data.member.find(d => d.trigger);
162
160
  return mem ? mem.tag_name : Language.text('normal_member');
163
161
  })()}
164
162
  </div>
@@ -351,7 +349,6 @@ export class UMInfo {
351
349
  </div>`;
352
350
  }
353
351
  },
354
- divCreate: {},
355
352
  onCreate: () => {
356
353
  if (loading) {
357
354
  glitter.addMtScript(
@@ -542,18 +539,18 @@ export class UMInfo {
542
539
  },
543
540
  ]
544
541
  .map(dd => {
545
- return `<div
546
- style="flex: 1 1 0; flex-direction: column; justify-content: flex-start; align-items: center; display: inline-flex"
547
- >
548
- ${dd.value}
549
- <div
550
- style="align-self: stretch; text-align: center; color: #393939; font-size: 16px; font-weight: 400; line-height: 22.40px; word-wrap: break-word"
551
- >
552
- ${dd.title}
553
- </div>
554
- </div>`;
542
+ return html`<div
543
+ style="flex: 1 1 0; flex-direction: column; justify-content: flex-start; align-items: center; display: inline-flex"
544
+ >
545
+ ${dd.value}
546
+ <div
547
+ style="align-self: stretch; text-align: center; color: #393939; font-size: 16px; font-weight: 400; line-height: 22.40px; word-wrap: break-word"
548
+ >
549
+ ${dd.title}
550
+ </div>
551
+ </div>`;
555
552
  })
556
- .join(`<div class="border-end" style="width:1px;height: 30px;"></div>`)}
553
+ .join(html`<div class="border-end" style="width:1px;height: 30px;"></div>`)}
557
554
  </div>
558
555
  </div>
559
556
  </div>
@@ -601,19 +598,17 @@ export class UMInfo {
601
598
  },
602
599
  ]
603
600
  .map((dd: any) => {
604
- return `
605
- <div
606
- style="flex: 1 1 0; flex-direction: column; justify-content: flex-start; align-items: center; gap: 8px; display: inline-flex;cursor:pointer;"
607
- onclick="${gvc.event(() => {
608
- dd.event();
609
- })}">
610
- ${dd.icon}
611
- <div
612
- style="font-size:16px;" class="fw-500">
613
- ${dd.title}
614
- </div>
615
- </div>
616
- `;
601
+ return html`
602
+ <div
603
+ style="flex: 1 1 0; flex-direction: column; justify-content: flex-start; align-items: center; gap: 8px; display: inline-flex;cursor:pointer;"
604
+ onclick="${gvc.event(() => {
605
+ dd.event();
606
+ })}"
607
+ >
608
+ ${dd.icon}
609
+ <div style="font-size:16px;" class="fw-500">${dd.title}</div>
610
+ </div>
611
+ `;
617
612
  })
618
613
  .join('')}
619
614
  </div>
@@ -626,7 +621,6 @@ export class UMInfo {
626
621
  }
627
622
  }
628
623
  },
629
- divCreate: {},
630
624
  onCreate: () => {
631
625
  if (loadings.view) {
632
626
  UmClass.getUserData(gvc).then((resp: any) => {
@@ -865,34 +859,38 @@ export class UMInfo {
865
859
  classDataType: 'static',
866
860
  };
867
861
  });
868
- return [
869
- ` <div class="w-100 align-items-center d-flex py-3 pb-lg-3 pt-lg-0" style="gap:10px;">
870
862
 
871
- <div class="d-none d-lg-flex" style="background: #FF9705;background: #FF9705;width:4px;height: 20px;" onclick="${gvc.event(
872
- () => {
873
- gvc.glitter.getModule(
874
- new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href,
875
- cl => {
876
- cl.changePage('account_userinfo', 'home', {});
877
- }
878
- );
863
+ return [
864
+ html` <div class="w-100 align-items-center d-flex py-3 pb-lg-3 pt-lg-0" style="gap:10px;">
865
+ <div
866
+ class="d-none d-lg-flex"
867
+ style="background: #FF9705;background: #FF9705;width:4px;height: 20px;"
868
+ onclick="${gvc.event(() => {
869
+ gvc.glitter.getModule(
870
+ new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href,
871
+ cl => {
872
+ cl.changePage('account_userinfo', 'home', {});
879
873
  }
880
- )}"></div>
881
- <div class="d-flex d-lg-none align-items-center justify-content-center" style="width:20px;height: 20px;" onclick="${gvc.event(
882
- () => {
883
- gvc.glitter.getModule(
884
- new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href,
885
- cl => {
886
- cl.changePage('account_userinfo', 'home', {});
887
- }
888
- );
889
- }
890
- )}">
891
- <i class="fa-solid fa-angle-left fs-4"></i>
892
- </div>
893
- <div class="um-info-title fw-bold " style="font-size: 24px;">${Language.text('member_info')}</div>
894
- </div>`,
895
- `<div style="height:5px;"></div>`,
874
+ );
875
+ })}"
876
+ ></div>
877
+ <div
878
+ class="d-flex d-lg-none align-items-center justify-content-center"
879
+ style="width:20px;height: 20px;"
880
+ onclick="${gvc.event(() => {
881
+ gvc.glitter.getModule(
882
+ new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href,
883
+ cl => {
884
+ cl.changePage('account_userinfo', 'home', {});
885
+ }
886
+ );
887
+ })}"
888
+ >
889
+ <i class="fa-solid fa-angle-left fs-4"></i>
890
+ </div>
891
+ <div class="um-info-title fw-bold " style="font-size: 24px;">${Language.text('member_info')}</div>
892
+ </div>`,
893
+ html`<div style="height:5px;"></div>`,
896
894
  FormWidget.editorView({
897
895
  gvc: gvc,
898
896
  array: form_array.map((dd: any) => {
@@ -919,7 +917,7 @@ export class UMInfo {
919
917
  },
920
918
  formData: update_userData,
921
919
  }),
922
- html` <div
920
+ html`<div
923
921
  class="mt-2 w-100 d-flex align-items-center justify-content-end ${JSON.stringify(update_userData) ===
924
922
  JSON.stringify(vm.data.userData)
925
923
  ? `d-none`
@@ -160,7 +160,7 @@ export class UMLogin {
160
160
  type="${item.form_config.type}"
161
161
  id="reg-${item.key}"
162
162
  ${item.form_config.type === 'date'
163
- ? ``
163
+ ? ''
164
164
  : ` placeholder="${placeholder}"
165
165
  data-placeholder="${placeholder}"`}
166
166
  onchange="${gvc.event(e => {
@@ -320,8 +320,8 @@ export class UMLogin {
320
320
  </section>`;
321
321
  }
322
322
  catch (e) {
323
- console.log(`error==>`, e);
324
- return ``;
323
+ console.error(`error==>`, e);
324
+ return '';
325
325
  }
326
326
  },
327
327
  divCreate: {},
@@ -362,7 +362,7 @@ export class UMLogin {
362
362
  }
363
363
  static addStyle(gvc, prefix) {
364
364
  const isPhone = document.body.clientWidth < 768;
365
- gvc.addStyle(css `
365
+ gvc.addStyle(`
366
366
  .${prefix}-container {
367
367
  box-sizing: border-box;
368
368
  display: flex;
@@ -537,7 +537,7 @@ export class UMLogin {
537
537
  return '';
538
538
  }
539
539
  if (gvc.glitter.deviceType === gvc.glitter.deviceTypeEnum.Android && item.type === 'apple') {
540
- return ``;
540
+ return '';
541
541
  }
542
542
  const event = loginEvents.find(data => data.key === item.type);
543
543
  if (!event) {
@@ -634,11 +634,9 @@ export class UMLogin {
634
634
  else {
635
635
  const redirect_url = location.origin + location.pathname;
636
636
  widget.share.line.support_scope = (_a = widget.share.line.support_scope) !== null && _a !== void 0 ? _a : [];
637
- gvc.glitter.href = `https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id=${widget.share.line.id}&redirect_uri=${encodeURI(redirect_url)}&state=line_login&scope=${[
638
- 'profile',
639
- 'openid',
640
- 'email'
641
- ].concat(widget.share.line.support_scope).join('%20')}&nonce=09876xyz`;
637
+ gvc.glitter.href = `https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id=${widget.share.line.id}&redirect_uri=${encodeURI(redirect_url)}&state=line_login&scope=${['profile', 'openid', 'email']
638
+ .concat(widget.share.line.support_scope)
639
+ .join('%20')}&nonce=09876xyz`;
642
640
  }
643
641
  }
644
642
  return {
@@ -672,7 +670,7 @@ export class UMLogin {
672
670
  });
673
671
  }
674
672
  else {
675
- ApiUser.getPublicConfig('login_line_setting', 'manager').then((dd) => {
673
+ ApiUser.getPublicConfig('login_line_setting', 'manager').then(dd => {
676
674
  widget.share.line = dd.response.value || {};
677
675
  if (gvc.glitter.getUrlParameter('line_liff') === 'true') {
678
676
  callLogin();
@@ -774,8 +772,7 @@ export class UMLogin {
774
772
  });
775
773
  },
776
774
  call: () => {
777
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
778
- console.log('call fb', widget.share.fb);
775
+ return new Promise(() => __awaiter(this, void 0, void 0, function* () {
779
776
  if (glitter.deviceType !== glitter.deviceTypeEnum.Web) {
780
777
  gvc.glitter.runJsInterFace('facebook_login', {
781
778
  app_id: widget.share.fb.id,
@@ -173,7 +173,7 @@ export class UMLogin {
173
173
  type="${item.form_config.type}"
174
174
  id="reg-${item.key}"
175
175
  ${item.form_config.type === 'date'
176
- ? ``
176
+ ? ''
177
177
  : ` placeholder="${placeholder}"
178
178
  data-placeholder="${placeholder}"`}
179
179
  onchange="${gvc.event(e => {
@@ -335,8 +335,8 @@ export class UMLogin {
335
335
  </div>
336
336
  </section>`;
337
337
  } catch (e) {
338
- console.log(`error==>`, e);
339
- return ``;
338
+ console.error(`error==>`, e);
339
+ return '';
340
340
  }
341
341
  },
342
342
  divCreate: {},
@@ -376,7 +376,7 @@ export class UMLogin {
376
376
 
377
377
  static addStyle(gvc: GVC, prefix: string) {
378
378
  const isPhone = document.body.clientWidth < 768;
379
- gvc.addStyle(css`
379
+ gvc.addStyle(`
380
380
  .${prefix}-container {
381
381
  box-sizing: border-box;
382
382
  display: flex;
@@ -556,7 +556,7 @@ export class UMLogin {
556
556
 
557
557
  //Android版本不需要有APPLE登入
558
558
  if (gvc.glitter.deviceType === gvc.glitter.deviceTypeEnum.Android && item.type === 'apple') {
559
- return ``;
559
+ return '';
560
560
  }
561
561
  const event = loginEvents.find(data => data.key === item.type);
562
562
  if (!event) {
@@ -660,16 +660,12 @@ export class UMLogin {
660
660
  );
661
661
  } else {
662
662
  const redirect_url = location.origin + location.pathname;
663
- widget.share.line.support_scope=widget.share.line.support_scope??[]
663
+ widget.share.line.support_scope = widget.share.line.support_scope ?? [];
664
664
  gvc.glitter.href = `https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id=${widget.share.line.id}&redirect_uri=${encodeURI(
665
665
  redirect_url
666
- )}&state=line_login&scope=${
667
- [
668
- 'profile',
669
- 'openid',
670
- 'email'
671
- ].concat(widget.share.line.support_scope).join('%20')
672
- }&nonce=09876xyz`;
666
+ )}&state=line_login&scope=${['profile', 'openid', 'email']
667
+ .concat(widget.share.line.support_scope)
668
+ .join('%20')}&nonce=09876xyz`;
673
669
  }
674
670
  }
675
671
 
@@ -701,13 +697,13 @@ export class UMLogin {
701
697
  }
702
698
  });
703
699
  } else {
704
- ApiUser.getPublicConfig('login_line_setting', 'manager').then((dd) => {
700
+ ApiUser.getPublicConfig('login_line_setting', 'manager').then(dd => {
705
701
  widget.share.line = dd.response.value || {};
706
702
  if (gvc.glitter.getUrlParameter('line_liff') === 'true') {
707
703
  callLogin();
708
704
  }
709
- })
710
- }
705
+ });
706
+ }
711
707
  },
712
708
  call: () => {
713
709
  callLogin();
@@ -809,9 +805,7 @@ export class UMLogin {
809
805
  });
810
806
  },
811
807
  call: () => {
812
- return new Promise(async (resolve, reject) => {
813
- console.log('call fb', widget.share.fb);
814
-
808
+ return new Promise(async () => {
815
809
  if (glitter.deviceType !== glitter.deviceTypeEnum.Web) {
816
810
  gvc.glitter.runJsInterFace(
817
811
  'facebook_login',
@@ -1025,7 +1019,6 @@ export class UMLogin {
1025
1019
  return;
1026
1020
  }
1027
1021
 
1028
-
1029
1022
  vm.resetEmail = email;
1030
1023
  }
1031
1024
 
@@ -1047,17 +1040,16 @@ export class UMLogin {
1047
1040
 
1048
1041
  static sendVerifyEmailCode(widget: any, id: string) {
1049
1042
  const email = this.checkValue(id);
1050
- //
1051
1043
  if (!email) {
1052
1044
  widget.event('error', { title: Language.text('email_placeholder') });
1053
1045
  return;
1054
1046
  }
1055
- //
1047
+
1056
1048
  if (!CheckInput.isEmail(email)) {
1057
1049
  widget.event('error', { title: Language.text('enter_valid_email') });
1058
1050
  return;
1059
1051
  }
1060
- //
1052
+
1061
1053
  ApiUser.emailVerify(email).then(r => {
1062
1054
  if (r.result && r.response.result) {
1063
1055
  widget.event('success', { title: Language.text('verification_code_sent') });