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
|
@@ -41,7 +41,8 @@ export class UMInfo {
|
|
|
41
41
|
<div class="row">
|
|
42
42
|
<div class="col-12 align-items-center d-none d-lg-flex" style="gap:10px;">
|
|
43
43
|
<div style="background: #FF9705;width:4px;height: 20px;"></div>
|
|
44
|
-
<div class="um-info-title fw-bold" style="font-size: 24px;"
|
|
44
|
+
<div class="um-info-title fw-bold" style="font-size: 24px;">
|
|
45
|
+
${Language.text('account_user_info')}
|
|
45
46
|
</div>
|
|
46
47
|
</div>
|
|
47
48
|
<div style="margin-top:24px;" class="col-12">
|
|
@@ -93,12 +94,11 @@ export class UMInfo {
|
|
|
93
94
|
<div class="w-100">
|
|
94
95
|
${(() => {
|
|
95
96
|
var _a;
|
|
96
|
-
if (!vm.memberNext) {
|
|
97
|
+
if (!vm.memberNext || !vm.memberNext.leak) {
|
|
97
98
|
return '';
|
|
98
99
|
}
|
|
99
100
|
const solidButtonBgr = `#FF9705`;
|
|
100
|
-
return html `
|
|
101
|
-
<div class="um-title mb-1 mt-2">
|
|
101
|
+
return html ` <div class="um-title mb-1 mt-2">
|
|
102
102
|
${Language.text('current_accumulated_spending_amount')}
|
|
103
103
|
</div>
|
|
104
104
|
<div class="w-100 um-linebar-container">
|
|
@@ -106,7 +106,7 @@ export class UMInfo {
|
|
|
106
106
|
<div class="um-content">NT. ${((_a = vm.memberNext.sum) !== null && _a !== void 0 ? _a : 0).toLocaleString()}</div>
|
|
107
107
|
<div class="um-content um-text-danger">
|
|
108
108
|
${Language.text('distance_from_target_amount')}
|
|
109
|
-
|
|
109
|
+
NT.${vm.memberNext.leak.toLocaleString()} ${Language.text('can_upgrade')}
|
|
110
110
|
</div>
|
|
111
111
|
</div>
|
|
112
112
|
<div class="w-100 um-linebar">
|
|
@@ -117,10 +117,10 @@ export class UMInfo {
|
|
|
117
117
|
const sum = vm.memberNext.sum;
|
|
118
118
|
const leak = vm.memberNext.leak;
|
|
119
119
|
return `
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
background: ${solidButtonBgr};
|
|
121
|
+
width: ${sum ? (sum * 100) / (leak + sum) : 0}%;
|
|
122
|
+
z-index: 10;
|
|
123
|
+
`;
|
|
124
124
|
})()}"
|
|
125
125
|
></div>
|
|
126
126
|
</div>
|
|
@@ -171,8 +171,7 @@ export class UMInfo {
|
|
|
171
171
|
]
|
|
172
172
|
.map(str => {
|
|
173
173
|
return str.length > 0
|
|
174
|
-
? html `
|
|
175
|
-
<div class="um-info-note" style="font-size: 14px;">${str}</div> `
|
|
174
|
+
? html ` <div class="um-info-note" style="font-size: 14px;">${str}</div> `
|
|
176
175
|
: '';
|
|
177
176
|
})
|
|
178
177
|
.join('')}
|
|
@@ -186,8 +185,7 @@ export class UMInfo {
|
|
|
186
185
|
tag: 'level-of-detail',
|
|
187
186
|
title: Language.text('rules_explanation'),
|
|
188
187
|
innerHTML: (gvc) => {
|
|
189
|
-
return html `
|
|
190
|
-
<div
|
|
188
|
+
return html ` <div
|
|
191
189
|
class="mt-1 pb-2 ${vm.data.member.length > 0 ? 'border-bottom' : ''}"
|
|
192
190
|
>
|
|
193
191
|
<div class="um-title">${Language.text('membership_level_rules')}</div>
|
|
@@ -261,10 +259,9 @@ export class UMInfo {
|
|
|
261
259
|
});
|
|
262
260
|
}
|
|
263
261
|
else {
|
|
264
|
-
return html `
|
|
265
|
-
<
|
|
266
|
-
|
|
267
|
-
</div>`;
|
|
262
|
+
return html ` <div style="text-align: center; vertical-align: middle;">
|
|
263
|
+
<img src="${img}" />
|
|
264
|
+
</div>`;
|
|
268
265
|
}
|
|
269
266
|
},
|
|
270
267
|
divCreate: {},
|
|
@@ -293,8 +290,7 @@ export class UMInfo {
|
|
|
293
290
|
clearInterval(si);
|
|
294
291
|
}
|
|
295
292
|
}, 300);
|
|
296
|
-
}, () => {
|
|
297
|
-
});
|
|
293
|
+
}, () => { });
|
|
298
294
|
}
|
|
299
295
|
},
|
|
300
296
|
};
|
|
@@ -332,8 +328,7 @@ export class UMInfo {
|
|
|
332
328
|
height: 50,
|
|
333
329
|
displayValue: true,
|
|
334
330
|
});
|
|
335
|
-
}, () => {
|
|
336
|
-
});
|
|
331
|
+
}, () => { });
|
|
337
332
|
},
|
|
338
333
|
};
|
|
339
334
|
});
|
|
@@ -362,7 +357,7 @@ export class UMInfo {
|
|
|
362
357
|
style: `align-self: stretch; text-align: center; color: #393939; font-size: 20px; font-weight: 700; line-height: 28px; word-wrap: break-word`,
|
|
363
358
|
},
|
|
364
359
|
};
|
|
365
|
-
})
|
|
360
|
+
}),
|
|
366
361
|
},
|
|
367
362
|
{
|
|
368
363
|
title: Language.text('coupons'),
|
|
@@ -388,7 +383,7 @@ export class UMInfo {
|
|
|
388
383
|
style: `align-self: stretch; text-align: center; color: #393939; font-size: 20px; font-weight: 700; line-height: 28px; word-wrap: break-word`,
|
|
389
384
|
},
|
|
390
385
|
};
|
|
391
|
-
})
|
|
386
|
+
}),
|
|
392
387
|
},
|
|
393
388
|
{
|
|
394
389
|
title: Language.text('wait_ship'),
|
|
@@ -415,7 +410,7 @@ export class UMInfo {
|
|
|
415
410
|
style: `align-self: stretch; text-align: center; color: #393939; font-size: 20px; font-weight: 700; line-height: 28px; word-wrap: break-word`,
|
|
416
411
|
},
|
|
417
412
|
};
|
|
418
|
-
})
|
|
413
|
+
}),
|
|
419
414
|
},
|
|
420
415
|
{
|
|
421
416
|
title: Language.text('shipped'),
|
|
@@ -442,9 +437,10 @@ export class UMInfo {
|
|
|
442
437
|
style: `align-self: stretch; text-align: center; color: #393939; font-size: 20px; font-weight: 700; line-height: 28px; word-wrap: break-word`,
|
|
443
438
|
},
|
|
444
439
|
};
|
|
445
|
-
})
|
|
446
|
-
}
|
|
447
|
-
]
|
|
440
|
+
}),
|
|
441
|
+
},
|
|
442
|
+
]
|
|
443
|
+
.map(dd => {
|
|
448
444
|
return `<div
|
|
449
445
|
style="flex: 1 1 0; flex-direction: column; justify-content: flex-start; align-items: center; display: inline-flex"
|
|
450
446
|
>
|
|
@@ -455,7 +451,8 @@ export class UMInfo {
|
|
|
455
451
|
${dd.title}
|
|
456
452
|
</div>
|
|
457
453
|
</div>`;
|
|
458
|
-
})
|
|
454
|
+
})
|
|
455
|
+
.join(`<div class="border-end" style="width:1px;height: 30px;"></div>`)}
|
|
459
456
|
</div>
|
|
460
457
|
</div>
|
|
461
458
|
</div>
|
|
@@ -469,28 +466,28 @@ export class UMInfo {
|
|
|
469
466
|
title: Language.text('member_info'),
|
|
470
467
|
icon: '<i class="fa-solid fa-address-book fs-3"></i>',
|
|
471
468
|
event: () => {
|
|
472
|
-
gvc.glitter.getModule(new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href,
|
|
469
|
+
gvc.glitter.getModule(new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href, cl => {
|
|
473
470
|
cl.changePage('account_edit', 'page', {});
|
|
474
471
|
});
|
|
475
|
-
}
|
|
472
|
+
},
|
|
476
473
|
},
|
|
477
474
|
{
|
|
478
475
|
title: Language.text('order_history'),
|
|
479
476
|
icon: `<i class="fa-solid fa-square-list fs-3"></i>`,
|
|
480
477
|
event: () => {
|
|
481
|
-
gvc.glitter.getModule(new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href,
|
|
478
|
+
gvc.glitter.getModule(new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href, cl => {
|
|
482
479
|
cl.changePage('order_list', 'home', {});
|
|
483
480
|
});
|
|
484
|
-
}
|
|
481
|
+
},
|
|
485
482
|
},
|
|
486
483
|
{
|
|
487
484
|
title: Language.text('wishlist'),
|
|
488
485
|
icon: `<i class="fa-solid fa-heart fs-3"></i>`,
|
|
489
486
|
event: () => {
|
|
490
|
-
gvc.glitter.getModule(new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href,
|
|
487
|
+
gvc.glitter.getModule(new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href, cl => {
|
|
491
488
|
cl.changePage('wishlist', 'home', {});
|
|
492
489
|
});
|
|
493
|
-
}
|
|
490
|
+
},
|
|
494
491
|
},
|
|
495
492
|
]
|
|
496
493
|
.map((dd) => {
|
|
@@ -563,11 +560,14 @@ export class UMInfo {
|
|
|
563
560
|
ApiUser.getPublicConfig('custom_form_register', 'manager'),
|
|
564
561
|
ApiUser.getPublicConfig('login_config', 'manager'),
|
|
565
562
|
ApiUser.getPublicConfig('customer_form_user_setting', 'manager'),
|
|
566
|
-
UmClass.getUserData(gvc)
|
|
563
|
+
UmClass.getUserData(gvc),
|
|
567
564
|
]);
|
|
568
565
|
const defaultList = { list: [] };
|
|
569
566
|
vm_info.login_config = (_a = data.response.value) !== null && _a !== void 0 ? _a : {};
|
|
570
|
-
vm_info.list = [
|
|
567
|
+
vm_info.list = [
|
|
568
|
+
...((_c = (_b = res.response.value) === null || _b === void 0 ? void 0 : _b.list) !== null && _c !== void 0 ? _c : defaultList.list),
|
|
569
|
+
...((_e = (_d = userSeeting.response.value) === null || _d === void 0 ? void 0 : _d.list) !== null && _e !== void 0 ? _e : defaultList.list),
|
|
570
|
+
];
|
|
571
571
|
vm_info.form_array = FormCheck.initialRegisterForm(vm_info.list).filter((dd) => !dd.hidden);
|
|
572
572
|
vm.data = userData;
|
|
573
573
|
vm_info.loading = false;
|
|
@@ -741,12 +741,12 @@ export class UMInfo {
|
|
|
741
741
|
` <div class="w-100 align-items-center d-flex py-3 pb-lg-3 pt-lg-0" style="gap:10px;">
|
|
742
742
|
|
|
743
743
|
<div class="d-none d-lg-flex" style="background: #FF9705;background: #FF9705;width:4px;height: 20px;" onclick="${gvc.event(() => {
|
|
744
|
-
gvc.glitter.getModule(new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href,
|
|
744
|
+
gvc.glitter.getModule(new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href, cl => {
|
|
745
745
|
cl.changePage('account_userinfo', 'home', {});
|
|
746
746
|
});
|
|
747
747
|
})}"></div>
|
|
748
748
|
<div class="d-flex d-lg-none align-items-center justify-content-center" style="width:20px;height: 20px;" onclick="${gvc.event(() => {
|
|
749
|
-
gvc.glitter.getModule(new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href,
|
|
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
752
|
})}">
|
|
@@ -782,13 +782,14 @@ export class UMInfo {
|
|
|
782
782
|
formData: update_userData,
|
|
783
783
|
}),
|
|
784
784
|
html ` <div
|
|
785
|
-
|
|
785
|
+
class="mt-2 w-100 d-flex align-items-center justify-content-end ${JSON.stringify(update_userData) ===
|
|
786
|
+
JSON.stringify(vm.data.userData)
|
|
786
787
|
? `d-none`
|
|
787
788
|
: ``}"
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
789
|
+
>
|
|
790
|
+
<div
|
|
791
|
+
class="um-nav-btn um-nav-btn-active d-flex align-items-center justify-content-center fw-bold"
|
|
792
|
+
onclick="${gvc.event(() => {
|
|
792
793
|
const dialog = new ShareDialog(gvc.glitter);
|
|
793
794
|
const leak = form_array.find((dd) => {
|
|
794
795
|
return `${dd.require}` === 'true' && !update_userData[dd.key];
|
|
@@ -800,7 +801,7 @@ export class UMInfo {
|
|
|
800
801
|
dialog.dataLoading({ visible: true });
|
|
801
802
|
ApiUser.updateUserData({
|
|
802
803
|
userData: update_userData,
|
|
803
|
-
}).then(
|
|
804
|
+
}).then(res => {
|
|
804
805
|
dialog.dataLoading({ visible: false });
|
|
805
806
|
if (!res.result && res.response.data.msg === 'email-verify-false') {
|
|
806
807
|
dialog.errorMessage({ text: Language.text('email_verification_code_incorrect') });
|
|
@@ -823,10 +824,10 @@ export class UMInfo {
|
|
|
823
824
|
}
|
|
824
825
|
});
|
|
825
826
|
})}"
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
827
|
+
>
|
|
828
|
+
${Language.text('confirm_reset')}
|
|
829
|
+
</div>
|
|
830
|
+
</div>`,
|
|
830
831
|
].join('');
|
|
831
832
|
},
|
|
832
833
|
divCreate: {
|