ts-glitter 20.5.1 → 20.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/cms-plugin/member-setting.js +2 -4
- package/lowcode/cms-plugin/member-setting.ts +2 -4
- package/lowcode/cms-plugin/module/user-excel.js +25 -21
- package/lowcode/cms-plugin/module/user-excel.ts +9 -6
- package/lowcode/cms-plugin/stock-history.ts +0 -1
- package/lowcode/cms-plugin/user-list.js +98 -97
- package/lowcode/cms-plugin/user-list.ts +111 -103
- package/lowcode/modules/checkInput.js +2 -2
- package/lowcode/modules/checkInput.ts +58 -61
- package/lowcode/public-components/checkout/index.js +0 -1
- package/lowcode/public-components/checkout/index.ts +0 -1
- package/lowcode/public-components/user-manager/um-info.js +49 -48
- package/lowcode/public-components/user-manager/um-info.ts +219 -204
- package/lowcode/public-components/user-manager/um-order.js +25 -22
- package/lowcode/public-components/user-manager/um-order.ts +32 -23
- package/lowcode/src/glitterBundle/module/Animation.js +7 -13
- package/lowcode/src/glitterBundle/module/Enum.js +2 -6
- package/lowcode/src/glitterBundle/module/Html_generate.js +50 -42
- package/lowcode/src/glitterBundle/module/PageManager.js +23 -30
- package/lowcode/src/glitterBundle/plugins/click-event.js +25 -19
- package/lowcode/src/glitterBundle/plugins/dialog-style-editor.js +13 -16
- package/lowcode/src/glitterBundle/plugins/editor-elem.js +1 -6
- package/lowcode/src/glitterBundle/plugins/editor.js +1 -5
- package/lowcode/src/glitterBundle/plugins/html-render.js +2 -5
- package/lowcode/src/glitterBundle/plugins/plugin-creater.js +28 -22
- package/lowcode/src/glitterBundle/plugins/seo-manager.js +1 -5
- package/lowcode/src/glitterBundle/plugins/style-attr.js +1 -5
- package/lowcode/src/glitterBundle/plugins/style-editor.js +1 -3
- package/package.json +1 -1
- package/src/api-public/services/financial-service.js +7 -6
- package/src/api-public/services/financial-service.js.map +1 -1
- package/src/api-public/services/financial-service.ts +11 -8
- package/src/api-public/services/model/handlePaymentTransaction.js +29 -2
- package/src/api-public/services/model/handlePaymentTransaction.js.map +1 -1
- package/src/api-public/services/model/handlePaymentTransaction.ts +8 -9
- package/src/api-public/services/shopping.d.ts +1 -1
- package/src/api-public/services/shopping.js +12 -9
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +5 -3
- package/src/api-public/services/user.js +48 -61
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +62 -66
|
@@ -119,7 +119,8 @@ export class UMInfo {
|
|
|
119
119
|
<div class="row">
|
|
120
120
|
<div class="col-12 align-items-center d-none d-lg-flex" style="gap:10px;">
|
|
121
121
|
<div style="background: #FF9705;width:4px;height: 20px;"></div>
|
|
122
|
-
<div class="um-info-title fw-bold" style="font-size: 24px;"
|
|
122
|
+
<div class="um-info-title fw-bold" style="font-size: 24px;">
|
|
123
|
+
${Language.text('account_user_info')}
|
|
123
124
|
</div>
|
|
124
125
|
</div>
|
|
125
126
|
<div style="margin-top:24px;" class="col-12">
|
|
@@ -170,12 +171,11 @@ export class UMInfo {
|
|
|
170
171
|
>
|
|
171
172
|
<div class="w-100">
|
|
172
173
|
${(() => {
|
|
173
|
-
if (!vm.memberNext) {
|
|
174
|
+
if (!vm.memberNext || !vm.memberNext.leak) {
|
|
174
175
|
return '';
|
|
175
176
|
}
|
|
176
177
|
const solidButtonBgr = `#FF9705`;
|
|
177
|
-
return html`
|
|
178
|
-
<div class="um-title mb-1 mt-2">
|
|
178
|
+
return html` <div class="um-title mb-1 mt-2">
|
|
179
179
|
${Language.text('current_accumulated_spending_amount')}
|
|
180
180
|
</div>
|
|
181
181
|
<div class="w-100 um-linebar-container">
|
|
@@ -183,7 +183,7 @@ export class UMInfo {
|
|
|
183
183
|
<div class="um-content">NT. ${(vm.memberNext.sum ?? 0).toLocaleString()}</div>
|
|
184
184
|
<div class="um-content um-text-danger">
|
|
185
185
|
${Language.text('distance_from_target_amount')}
|
|
186
|
-
|
|
186
|
+
NT.${vm.memberNext.leak.toLocaleString()} ${Language.text('can_upgrade')}
|
|
187
187
|
</div>
|
|
188
188
|
</div>
|
|
189
189
|
<div class="w-100 um-linebar">
|
|
@@ -194,10 +194,10 @@ export class UMInfo {
|
|
|
194
194
|
const sum = vm.memberNext.sum;
|
|
195
195
|
const leak = vm.memberNext.leak;
|
|
196
196
|
return `
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
background: ${solidButtonBgr};
|
|
198
|
+
width: ${sum ? (sum * 100) / (leak + sum) : 0}%;
|
|
199
|
+
z-index: 10;
|
|
200
|
+
`;
|
|
201
201
|
})()}"
|
|
202
202
|
></div>
|
|
203
203
|
</div>
|
|
@@ -253,8 +253,7 @@ export class UMInfo {
|
|
|
253
253
|
]
|
|
254
254
|
.map(str => {
|
|
255
255
|
return str.length > 0
|
|
256
|
-
? html`
|
|
257
|
-
<div class="um-info-note" style="font-size: 14px;">${str}</div> `
|
|
256
|
+
? html` <div class="um-info-note" style="font-size: 14px;">${str}</div> `
|
|
258
257
|
: '';
|
|
259
258
|
})
|
|
260
259
|
.join('')}
|
|
@@ -268,8 +267,7 @@ export class UMInfo {
|
|
|
268
267
|
tag: 'level-of-detail',
|
|
269
268
|
title: Language.text('rules_explanation'),
|
|
270
269
|
innerHTML: (gvc: GVC) => {
|
|
271
|
-
return html`
|
|
272
|
-
<div
|
|
270
|
+
return html` <div
|
|
273
271
|
class="mt-1 pb-2 ${vm.data.member.length > 0 ? 'border-bottom' : ''}"
|
|
274
272
|
>
|
|
275
273
|
<div class="um-title">${Language.text('membership_level_rules')}</div>
|
|
@@ -348,10 +346,9 @@ export class UMInfo {
|
|
|
348
346
|
},
|
|
349
347
|
});
|
|
350
348
|
} else {
|
|
351
|
-
return html`
|
|
352
|
-
<
|
|
353
|
-
|
|
354
|
-
</div>`;
|
|
349
|
+
return html` <div style="text-align: center; vertical-align: middle;">
|
|
350
|
+
<img src="${img}" />
|
|
351
|
+
</div>`;
|
|
355
352
|
}
|
|
356
353
|
},
|
|
357
354
|
divCreate: {},
|
|
@@ -387,8 +384,7 @@ export class UMInfo {
|
|
|
387
384
|
}
|
|
388
385
|
}, 300);
|
|
389
386
|
},
|
|
390
|
-
() => {
|
|
391
|
-
}
|
|
387
|
+
() => {}
|
|
392
388
|
);
|
|
393
389
|
}
|
|
394
390
|
},
|
|
@@ -423,7 +419,6 @@ export class UMInfo {
|
|
|
423
419
|
gvc.glitter.addMtScript(
|
|
424
420
|
[`https://cdn.jsdelivr.net/npm/jsbarcode@3.11.5/dist/JsBarcode.all.min.js`],
|
|
425
421
|
() => {
|
|
426
|
-
|
|
427
422
|
//@ts-ignore
|
|
428
423
|
JsBarcode(document.querySelector('#barcode'), `user-${vm.data.userID}`, {
|
|
429
424
|
format: 'CODE128', // 條碼格式,可根據需求更換
|
|
@@ -433,8 +428,7 @@ export class UMInfo {
|
|
|
433
428
|
displayValue: true, // 是否顯示條碼值
|
|
434
429
|
});
|
|
435
430
|
},
|
|
436
|
-
() => {
|
|
437
|
-
}
|
|
431
|
+
() => {}
|
|
438
432
|
);
|
|
439
433
|
},
|
|
440
434
|
};
|
|
@@ -445,109 +439,109 @@ export class UMInfo {
|
|
|
445
439
|
<div
|
|
446
440
|
style="align-self: stretch; justify-content: flex-start; align-items: center; gap: 12px; display: inline-flex"
|
|
447
441
|
>
|
|
448
|
-
${
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
442
|
+
${[
|
|
443
|
+
{
|
|
444
|
+
title: glitter.share.rebateConfig.title || Language.text('shopping_credit'),
|
|
445
|
+
value: gvc.bindView(() => {
|
|
446
|
+
const id = glitter.getUUID();
|
|
447
|
+
let sum: string = '-';
|
|
448
|
+
ApiShop.getRebate({}).then(res => {
|
|
449
|
+
sum = res.response.sum.toLocaleString();
|
|
450
|
+
gvc.notifyDataChange(id);
|
|
451
|
+
});
|
|
452
|
+
return {
|
|
453
|
+
bind: id,
|
|
454
|
+
view: () => {
|
|
455
|
+
return sum;
|
|
456
|
+
},
|
|
457
|
+
divCreate: {
|
|
458
|
+
style: `align-self: stretch; text-align: center; color: #393939; font-size: 20px; font-weight: 700; line-height: 28px; word-wrap: break-word`,
|
|
459
|
+
},
|
|
460
|
+
};
|
|
461
|
+
}),
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
title: Language.text('coupons'),
|
|
465
|
+
value: gvc.bindView(() => {
|
|
466
|
+
const id = glitter.getUUID();
|
|
467
|
+
let sum: string = '-';
|
|
468
|
+
ApiShop.getVoucher({
|
|
469
|
+
page: 0,
|
|
470
|
+
limit: 10000,
|
|
471
|
+
data_from: 'user',
|
|
472
|
+
}).then(res => {
|
|
473
|
+
sum = res.response.data
|
|
474
|
+
.filter((item: Voucher) => item.content.trigger === 'code')
|
|
475
|
+
.length.toLocaleString();
|
|
476
|
+
gvc.notifyDataChange(id);
|
|
477
|
+
});
|
|
478
|
+
return {
|
|
479
|
+
bind: id,
|
|
480
|
+
view: () => {
|
|
481
|
+
return sum;
|
|
482
|
+
},
|
|
483
|
+
divCreate: {
|
|
484
|
+
style: `align-self: stretch; text-align: center; color: #393939; font-size: 20px; font-weight: 700; line-height: 28px; word-wrap: break-word`,
|
|
485
|
+
},
|
|
486
|
+
};
|
|
487
|
+
}),
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
title: Language.text('wait_ship'),
|
|
491
|
+
value: gvc.bindView(() => {
|
|
492
|
+
const id = glitter.getUUID();
|
|
493
|
+
let sum: string = '-';
|
|
494
|
+
ApiShop.getOrder({
|
|
495
|
+
limit: 1,
|
|
496
|
+
page: 0,
|
|
497
|
+
filter: {
|
|
498
|
+
progress: ['in_stock', 'wait'],
|
|
499
|
+
},
|
|
500
|
+
data_from: 'user',
|
|
501
|
+
}).then((res: any) => {
|
|
502
|
+
sum = res.response.total.toLocaleString();
|
|
503
|
+
gvc.notifyDataChange(id);
|
|
504
|
+
});
|
|
505
|
+
return {
|
|
506
|
+
bind: id,
|
|
507
|
+
view: () => {
|
|
508
|
+
return sum;
|
|
509
|
+
},
|
|
510
|
+
divCreate: {
|
|
511
|
+
style: `align-self: stretch; text-align: center; color: #393939; font-size: 20px; font-weight: 700; line-height: 28px; word-wrap: break-word`,
|
|
512
|
+
},
|
|
513
|
+
};
|
|
514
|
+
}),
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
title: Language.text('shipped'),
|
|
518
|
+
value: gvc.bindView(() => {
|
|
519
|
+
const id = glitter.getUUID();
|
|
520
|
+
let sum: string = '-';
|
|
521
|
+
ApiShop.getOrder({
|
|
522
|
+
limit: 1,
|
|
523
|
+
page: 0,
|
|
524
|
+
filter: {
|
|
525
|
+
progress: ['shipping'],
|
|
526
|
+
},
|
|
527
|
+
data_from: 'user',
|
|
528
|
+
}).then((res: any) => {
|
|
529
|
+
sum = res.response.total.toLocaleString();
|
|
530
|
+
gvc.notifyDataChange(id);
|
|
531
|
+
});
|
|
532
|
+
return {
|
|
533
|
+
bind: id,
|
|
534
|
+
view: () => {
|
|
535
|
+
return sum;
|
|
536
|
+
},
|
|
537
|
+
divCreate: {
|
|
538
|
+
style: `align-self: stretch; text-align: center; color: #393939; font-size: 20px; font-weight: 700; line-height: 28px; word-wrap: break-word`,
|
|
539
|
+
},
|
|
540
|
+
};
|
|
541
|
+
}),
|
|
542
|
+
},
|
|
543
|
+
]
|
|
544
|
+
.map(dd => {
|
|
551
545
|
return `<div
|
|
552
546
|
style="flex: 1 1 0; flex-direction: column; justify-content: flex-start; align-items: center; display: inline-flex"
|
|
553
547
|
>
|
|
@@ -557,9 +551,9 @@ export class UMInfo {
|
|
|
557
551
|
>
|
|
558
552
|
${dd.title}
|
|
559
553
|
</div>
|
|
560
|
-
</div
|
|
561
|
-
})
|
|
562
|
-
|
|
554
|
+
</div>`;
|
|
555
|
+
})
|
|
556
|
+
.join(`<div class="border-end" style="width:1px;height: 30px;"></div>`)}
|
|
563
557
|
</div>
|
|
564
558
|
</div>
|
|
565
559
|
</div>
|
|
@@ -573,28 +567,37 @@ export class UMInfo {
|
|
|
573
567
|
title: Language.text('member_info'),
|
|
574
568
|
icon: '<i class="fa-solid fa-address-book fs-3"></i>',
|
|
575
569
|
event: () => {
|
|
576
|
-
gvc.glitter.getModule(
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
570
|
+
gvc.glitter.getModule(
|
|
571
|
+
new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href,
|
|
572
|
+
cl => {
|
|
573
|
+
cl.changePage('account_edit', 'page', {});
|
|
574
|
+
}
|
|
575
|
+
);
|
|
576
|
+
},
|
|
580
577
|
},
|
|
581
578
|
{
|
|
582
579
|
title: Language.text('order_history'),
|
|
583
580
|
icon: `<i class="fa-solid fa-square-list fs-3"></i>`,
|
|
584
581
|
event: () => {
|
|
585
|
-
gvc.glitter.getModule(
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
582
|
+
gvc.glitter.getModule(
|
|
583
|
+
new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href,
|
|
584
|
+
cl => {
|
|
585
|
+
cl.changePage('order_list', 'home', {});
|
|
586
|
+
}
|
|
587
|
+
);
|
|
588
|
+
},
|
|
589
589
|
},
|
|
590
590
|
{
|
|
591
591
|
title: Language.text('wishlist'),
|
|
592
592
|
icon: `<i class="fa-solid fa-heart fs-3"></i>`,
|
|
593
593
|
event: () => {
|
|
594
|
-
gvc.glitter.getModule(
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
594
|
+
gvc.glitter.getModule(
|
|
595
|
+
new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href,
|
|
596
|
+
cl => {
|
|
597
|
+
cl.changePage('wishlist', 'home', {});
|
|
598
|
+
}
|
|
599
|
+
);
|
|
600
|
+
},
|
|
598
601
|
},
|
|
599
602
|
]
|
|
600
603
|
.map((dd: any) => {
|
|
@@ -602,8 +605,8 @@ export class UMInfo {
|
|
|
602
605
|
<div
|
|
603
606
|
style="flex: 1 1 0; flex-direction: column; justify-content: flex-start; align-items: center; gap: 8px; display: inline-flex;cursor:pointer;"
|
|
604
607
|
onclick="${gvc.event(() => {
|
|
605
|
-
|
|
606
|
-
|
|
608
|
+
dd.event();
|
|
609
|
+
})}">
|
|
607
610
|
${dd.icon}
|
|
608
611
|
<div
|
|
609
612
|
style="font-size:16px;" class="fw-500">
|
|
@@ -642,11 +645,9 @@ export class UMInfo {
|
|
|
642
645
|
});
|
|
643
646
|
}
|
|
644
647
|
|
|
645
|
-
static edit(gvc:GVC){
|
|
648
|
+
static edit(gvc: GVC) {
|
|
646
649
|
const vm = {
|
|
647
|
-
data: {
|
|
648
|
-
|
|
649
|
-
} as User,
|
|
650
|
+
data: {} as User,
|
|
650
651
|
memberNext: {} as Member | undefined,
|
|
651
652
|
resetPassword: false,
|
|
652
653
|
};
|
|
@@ -663,27 +664,30 @@ export class UMInfo {
|
|
|
663
664
|
form_array: [],
|
|
664
665
|
login_config: {},
|
|
665
666
|
};
|
|
666
|
-
let update_userData:any = {};
|
|
667
|
+
let update_userData: any = {};
|
|
667
668
|
|
|
668
669
|
async function loadConfig() {
|
|
669
670
|
try {
|
|
670
671
|
vm_info.loading = true;
|
|
671
672
|
|
|
672
|
-
const [res, data, userSeeting,userData] = await Promise.all([
|
|
673
|
+
const [res, data, userSeeting, userData] = await Promise.all([
|
|
673
674
|
ApiUser.getPublicConfig('custom_form_register', 'manager'),
|
|
674
675
|
ApiUser.getPublicConfig('login_config', 'manager'),
|
|
675
676
|
ApiUser.getPublicConfig('customer_form_user_setting', 'manager'),
|
|
676
|
-
UmClass.getUserData(gvc)
|
|
677
|
+
UmClass.getUserData(gvc),
|
|
677
678
|
]);
|
|
678
679
|
|
|
679
680
|
// 設定回傳結果
|
|
680
681
|
const defaultList = { list: [] };
|
|
681
682
|
vm_info.login_config = data.response.value ?? {};
|
|
682
|
-
vm_info.list = [
|
|
683
|
+
vm_info.list = [
|
|
684
|
+
...(res.response.value?.list ?? defaultList.list),
|
|
685
|
+
...(userSeeting.response.value?.list ?? defaultList.list),
|
|
686
|
+
];
|
|
683
687
|
vm_info.form_array = FormCheck.initialRegisterForm(vm_info.list).filter((dd: any) => !dd.hidden);
|
|
684
688
|
vm.data = userData as any;
|
|
685
689
|
vm_info.loading = false;
|
|
686
|
-
update_userData=JSON.parse(JSON.stringify(vm.data.userData));
|
|
690
|
+
update_userData = JSON.parse(JSON.stringify(vm.data.userData));
|
|
687
691
|
gvc.notifyDataChange(id);
|
|
688
692
|
} catch (error) {
|
|
689
693
|
console.error('載入設定時發生錯誤:', error);
|
|
@@ -825,7 +829,8 @@ export class UMInfo {
|
|
|
825
829
|
list: [
|
|
826
830
|
{
|
|
827
831
|
class: 'um-content mb-2',
|
|
828
|
-
style:
|
|
832
|
+
style:
|
|
833
|
+
'return `color:${glitter.share.globalValue[`theme_color.0.title`]} !important;font-size:16px !important;`',
|
|
829
834
|
stylist: [],
|
|
830
835
|
dataType: 'code',
|
|
831
836
|
style_from: 'code',
|
|
@@ -863,16 +868,26 @@ export class UMInfo {
|
|
|
863
868
|
return [
|
|
864
869
|
` <div class="w-100 align-items-center d-flex py-3 pb-lg-3 pt-lg-0" style="gap:10px;">
|
|
865
870
|
|
|
866
|
-
<div class="d-none d-lg-flex" style="background: #FF9705;background: #FF9705;width:4px;height: 20px;" onclick="${gvc.event(
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
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
|
+
);
|
|
879
|
+
}
|
|
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
|
+
)}">
|
|
876
891
|
<i class="fa-solid fa-angle-left fs-4"></i>
|
|
877
892
|
</div>
|
|
878
893
|
<div class="um-info-title fw-bold " style="font-size: 24px;">${Language.text('member_info')}</div>
|
|
@@ -899,60 +914,60 @@ export class UMInfo {
|
|
|
899
914
|
}),
|
|
900
915
|
refresh: () => {
|
|
901
916
|
setTimeout(() => {
|
|
902
|
-
|
|
903
917
|
gvc.notifyDataChange(id);
|
|
904
918
|
});
|
|
905
919
|
},
|
|
906
920
|
formData: update_userData,
|
|
907
921
|
}),
|
|
908
922
|
html` <div
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
923
|
+
class="mt-2 w-100 d-flex align-items-center justify-content-end ${JSON.stringify(update_userData) ===
|
|
924
|
+
JSON.stringify(vm.data.userData)
|
|
925
|
+
? `d-none`
|
|
926
|
+
: ``}"
|
|
927
|
+
>
|
|
928
|
+
<div
|
|
929
|
+
class="um-nav-btn um-nav-btn-active d-flex align-items-center justify-content-center fw-bold"
|
|
930
|
+
onclick="${gvc.event(() => {
|
|
931
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
932
|
+
const leak = form_array.find((dd: any) => {
|
|
933
|
+
return `${dd.require}` === 'true' && !update_userData[dd.key];
|
|
934
|
+
});
|
|
935
|
+
if (leak) {
|
|
936
|
+
dialog.errorMessage({ text: `${Language.text('not_filled_in_yet')} ${leak.title}` });
|
|
937
|
+
return;
|
|
938
|
+
}
|
|
939
|
+
dialog.dataLoading({ visible: true });
|
|
940
|
+
ApiUser.updateUserData({
|
|
941
|
+
userData: update_userData,
|
|
942
|
+
}).then(res => {
|
|
943
|
+
dialog.dataLoading({ visible: false });
|
|
944
|
+
if (!res.result && res.response.data.msg === 'email-verify-false') {
|
|
945
|
+
dialog.errorMessage({ text: Language.text('email_verification_code_incorrect') });
|
|
946
|
+
} else if (!res.result && res.response.data.msg === 'phone-verify-false') {
|
|
947
|
+
dialog.errorMessage({ text: Language.text('sms_verification_code_incorrect') });
|
|
948
|
+
} else if (!res.result && res.response.data.msg === 'phone-exists') {
|
|
949
|
+
dialog.errorMessage({ text: Language.text('phone_number_already_exists') });
|
|
950
|
+
} else if (!res.result && res.response.data.msg === 'email-exists') {
|
|
951
|
+
dialog.errorMessage({ text: Language.text('email_already_exists') });
|
|
952
|
+
} else if (!res.result) {
|
|
953
|
+
dialog.errorMessage({ text: Language.text('update_exception') });
|
|
954
|
+
} else {
|
|
955
|
+
dialog.successMessage({ text: Language.text('change_success') });
|
|
956
|
+
gvc.recreateView();
|
|
957
|
+
}
|
|
958
|
+
});
|
|
959
|
+
})}"
|
|
960
|
+
>
|
|
961
|
+
${Language.text('confirm_reset')}
|
|
962
|
+
</div>
|
|
963
|
+
</div>`,
|
|
949
964
|
].join('');
|
|
950
965
|
},
|
|
951
966
|
divCreate: {
|
|
952
967
|
class: `w-100`,
|
|
953
968
|
},
|
|
954
969
|
};
|
|
955
|
-
})
|
|
970
|
+
});
|
|
956
971
|
}
|
|
957
972
|
}
|
|
958
973
|
|