ts-glitter 14.2.8 → 14.3.0
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/cjbt8743y0.json +1 -0
- package/lowcode/Entry.js +29 -9
- package/lowcode/Entry.ts +28 -9
- package/lowcode/backend-manager/bg-recommend.js +4 -6
- package/lowcode/backend-manager/bg-recommend.ts +4 -6
- package/lowcode/cms-plugin/member-setting.js +36 -2
- package/lowcode/cms-plugin/member-setting.ts +36 -1
- package/lowcode/cms-plugin/shopping-rebate-setting.js +21 -6
- package/lowcode/cms-plugin/shopping-rebate-setting.ts +24 -8
- package/lowcode/glitter-base/route/wallet.js +11 -0
- package/lowcode/glitter-base/route/wallet.ts +14 -2
- package/lowcode/glitterBundle/plugins/editor-elem.js +32 -11
- package/lowcode/glitterBundle/plugins/editor-elem.ts +42 -12
- package/lowcode/public-components/checkout/index.js +35 -27
- package/lowcode/public-components/checkout/index.ts +111 -106
- package/lowcode/public-components/product/product-detail.js +182 -171
- package/lowcode/public-components/product/product-detail.ts +214 -196
- package/lowcode/public-components/user-manager/um-class.js +234 -193
- package/lowcode/public-components/user-manager/um-class.ts +230 -189
- package/lowcode/public-components/user-manager/um-rebate.js +13 -8
- package/lowcode/public-components/user-manager/um-rebate.ts +17 -12
- package/lowcode/public-components/user-manager/um-voucher.js +3 -3
- package/lowcode/public-components/user-manager/um-voucher.ts +3 -3
- package/package.json +1 -1
- package/src/api-public/controllers/ai-chat.js.map +1 -1
- package/src/api-public/controllers/app-release.js.map +1 -1
- package/src/api-public/controllers/article.js.map +1 -1
- package/src/api-public/controllers/post.js.map +1 -1
- package/src/api-public/controllers/shop.js +23 -12
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +36 -36
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/services/EcInvoice.js.map +5 -1
- package/src/api-public/services/ai-robot.js.map +1 -1
- package/src/api-public/services/financial-service.d.ts +1 -0
- package/src/api-public/services/financial-service.js.map +1 -1
- package/src/api-public/services/post.js.map +1 -1
- package/src/api-public/services/rebate.d.ts +1 -0
- package/src/api-public/services/rebate.js +15 -0
- package/src/api-public/services/rebate.js.map +1 -1
- package/src/api-public/services/rebate.ts +21 -5
- package/src/api-public/services/shopping.js +0 -3
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +0 -4
- package/src/index.js +9 -4
- package/src/index.js.map +5 -1
- package/src/index.ts +7 -1
- package/src/services/template.js.map +1 -1
|
@@ -12,206 +12,234 @@ import { GlobalUser } from '../../glitter-base/global/global-user.js';
|
|
|
12
12
|
import { Tool } from '../../modules/tool.js';
|
|
13
13
|
import { BgWidget } from '../../backend-manager/bg-widget.js';
|
|
14
14
|
import { ShareDialog } from '../../glitterBundle/dialog/ShareDialog.js';
|
|
15
|
+
import { ApiWallet } from '../../glitter-base/route/wallet.js';
|
|
16
|
+
import { CheckInput } from '../../modules/checkInput.js';
|
|
15
17
|
const html = String.raw;
|
|
18
|
+
const css = String.raw;
|
|
16
19
|
export class UmClass {
|
|
17
20
|
static nav(gvc) {
|
|
21
|
+
const glitter = gvc.glitter;
|
|
18
22
|
this.addStyle(gvc);
|
|
23
|
+
const vm = {
|
|
24
|
+
id: gvc.glitter.getUUID(),
|
|
25
|
+
loading: true,
|
|
26
|
+
pageName: glitter.getUrlParameter('page'),
|
|
27
|
+
};
|
|
19
28
|
let changePage = (index, type, subData) => { };
|
|
20
29
|
gvc.glitter.getModule(new URL('./official_event/page/change-page.js', gvc.glitter.root_path).href, (cl) => {
|
|
21
30
|
changePage = cl.changePage;
|
|
22
31
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
key: 'voucher-list',
|
|
31
|
-
title: '我的優惠券',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
key: 'rebate',
|
|
35
|
-
title: '我的購物金',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
key: 'order_list',
|
|
39
|
-
title: '訂單記錄',
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
key: 'wishlist',
|
|
43
|
-
title: '心願單',
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
key: 'reset_password',
|
|
47
|
-
title: '重設密碼',
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
key: 'logout',
|
|
51
|
-
title: '登出',
|
|
52
|
-
},
|
|
53
|
-
]
|
|
54
|
-
.map((item) => {
|
|
55
|
-
return html `
|
|
56
|
-
<div
|
|
57
|
-
class="option px-2 d-flex justify-content-center um-nav-btn ${pageName === item.key ? 'um-nav-btn-active' : ''}"
|
|
58
|
-
onclick="${gvc.event(() => __awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
if (item.key === 'reset_password') {
|
|
60
|
-
const dialog = new ShareDialog(gvc.glitter);
|
|
61
|
-
dialog.dataLoading({ visible: true });
|
|
62
|
-
const userData = yield UmClass.getUserData(gvc);
|
|
63
|
-
dialog.dataLoading({ visible: false });
|
|
64
|
-
UmClass.dialog({
|
|
65
|
-
gvc: gvc,
|
|
66
|
-
title: '重設密碼事件',
|
|
67
|
-
tag: '',
|
|
68
|
-
innerHTML: (gvc) => {
|
|
69
|
-
let update_vm = {
|
|
70
|
-
verify_code: '',
|
|
71
|
-
pwd: '',
|
|
72
|
-
};
|
|
73
|
-
let get_verify_timer = 0;
|
|
74
|
-
let repeat_pwd = '';
|
|
75
|
-
return [
|
|
76
|
-
html `<div class="tx_normal fw-normal mb-1" style="">密碼</div>`,
|
|
77
|
-
html `<input
|
|
78
|
-
class="bgw-input "
|
|
79
|
-
style=""
|
|
80
|
-
type="password"
|
|
81
|
-
placeholder="請輸入密碼"
|
|
82
|
-
oninput="${gvc.event((e, event) => {
|
|
83
|
-
update_vm.pwd = e.value;
|
|
84
|
-
})}"
|
|
85
|
-
value="${update_vm.pwd}"
|
|
86
|
-
/>`,
|
|
87
|
-
html `<div class="tx_normal fw-normal mt-2 mb-1" style="">確認密碼</div>`,
|
|
88
|
-
html `<input
|
|
89
|
-
class="bgw-input mb-2"
|
|
90
|
-
style=""
|
|
91
|
-
type="password"
|
|
92
|
-
placeholder="請再次輸入密碼"
|
|
93
|
-
oninput="${gvc.event((e, event) => {
|
|
94
|
-
repeat_pwd = e.value;
|
|
95
|
-
})}"
|
|
96
|
-
value="${repeat_pwd}"
|
|
97
|
-
/>`,
|
|
98
|
-
gvc.bindView(() => {
|
|
99
|
-
const id = gvc.glitter.getUUID();
|
|
100
|
-
return {
|
|
101
|
-
bind: id,
|
|
102
|
-
view: () => {
|
|
103
|
-
return html `重設密碼驗證碼
|
|
104
|
-
${BgWidget.blueNote(get_verify_timer ? `驗證碼已發送至『${userData.userData.email}』` : '點我取得驗證碼', gvc.event(() => {
|
|
105
|
-
if (!get_verify_timer) {
|
|
106
|
-
const dialog = new ShareDialog(gvc.glitter);
|
|
107
|
-
dialog.dataLoading({ visible: true });
|
|
108
|
-
ApiUser.emailVerify(userData.userData.email, window.appName).then((r) => __awaiter(this, void 0, void 0, function* () {
|
|
109
|
-
dialog.dataLoading({ visible: false });
|
|
110
|
-
get_verify_timer = 60;
|
|
111
|
-
gvc.notifyDataChange(id);
|
|
112
|
-
}));
|
|
113
|
-
}
|
|
114
|
-
}))}`;
|
|
115
|
-
},
|
|
116
|
-
divCreate: {
|
|
117
|
-
class: `d-flex flex-column`,
|
|
118
|
-
style: `gap:3px;`,
|
|
119
|
-
},
|
|
120
|
-
onCreate: () => {
|
|
121
|
-
if (get_verify_timer > 0) {
|
|
122
|
-
get_verify_timer--;
|
|
123
|
-
setTimeout(() => {
|
|
124
|
-
gvc.notifyDataChange(id);
|
|
125
|
-
}, 1000);
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
};
|
|
129
|
-
}),
|
|
130
|
-
html `<input
|
|
131
|
-
class="bgw-input mt-2 mb-4"
|
|
132
|
-
style=""
|
|
133
|
-
type="text"
|
|
134
|
-
placeholder="請輸入驗證碼"
|
|
135
|
-
oninput="${gvc.event((e, event) => {
|
|
136
|
-
update_vm.verify_code = e.value;
|
|
137
|
-
})}"
|
|
138
|
-
value="${update_vm.verify_code}"
|
|
139
|
-
/>`,
|
|
140
|
-
html `<div class="d-flex align-items-center justify-content-end pt-2 border-top mx-n3">
|
|
141
|
-
<div
|
|
142
|
-
class="um-nav-btn um-nav-btn-active d-flex align-items-center justify-content-center"
|
|
143
|
-
style="cursor:pointer;"
|
|
144
|
-
type="button"
|
|
145
|
-
onclick="${gvc.event(() => {
|
|
146
|
-
if (update_vm.pwd.length < 8) {
|
|
147
|
-
dialog.errorMessage({ text: '密碼必須大於8位數' });
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
if (repeat_pwd !== update_vm.pwd) {
|
|
151
|
-
dialog.errorMessage({ text: '請再次確認密碼' });
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
dialog.dataLoading({ visible: true });
|
|
155
|
-
ApiUser.updateUserData({
|
|
156
|
-
userData: update_vm,
|
|
157
|
-
}).then((res) => {
|
|
158
|
-
dialog.dataLoading({ visible: false });
|
|
159
|
-
if (!res.result && res.response.data.msg === 'email-verify-false') {
|
|
160
|
-
dialog.errorMessage({ text: '信箱驗證碼輸入錯誤' });
|
|
161
|
-
}
|
|
162
|
-
else if (!res.result && res.response.data.msg === 'phone-verify-false') {
|
|
163
|
-
dialog.errorMessage({ text: '簡訊驗證碼輸入錯誤' });
|
|
164
|
-
}
|
|
165
|
-
else if (!res.result && res.response.data.msg === 'phone-exists') {
|
|
166
|
-
dialog.errorMessage({ text: '此電話號碼已存在' });
|
|
167
|
-
}
|
|
168
|
-
else if (!res.result && res.response.data.msg === 'email-exists') {
|
|
169
|
-
dialog.errorMessage({ text: '此信箱已存在' });
|
|
170
|
-
}
|
|
171
|
-
else if (!res.result) {
|
|
172
|
-
dialog.errorMessage({ text: '更新異常' });
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
dialog.successMessage({ text: '更改成功' });
|
|
176
|
-
gvc.closeDialog();
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
})}"
|
|
180
|
-
>
|
|
181
|
-
<span class="tx_700_white">確認重設</span>
|
|
182
|
-
</div>
|
|
183
|
-
</div>`,
|
|
184
|
-
].join('');
|
|
185
|
-
},
|
|
186
|
-
});
|
|
187
|
-
console.log('重設密碼事件');
|
|
188
|
-
}
|
|
189
|
-
else if (item.key === 'logout') {
|
|
190
|
-
GlobalUser.token = '';
|
|
191
|
-
changePage('index', 'home', {});
|
|
32
|
+
return gvc.bindView({
|
|
33
|
+
bind: vm.id,
|
|
34
|
+
view: () => {
|
|
35
|
+
if (vm.loading) {
|
|
36
|
+
return '';
|
|
192
37
|
}
|
|
193
38
|
else {
|
|
194
|
-
|
|
39
|
+
glitter.share.rebateConfig.title = CheckInput.isEmpty(glitter.share.rebateConfig.title) ? '購物金' : glitter.share.rebateConfig.title;
|
|
40
|
+
const buttonHTML = [
|
|
41
|
+
{
|
|
42
|
+
key: 'account_userinfo',
|
|
43
|
+
title: '個人資料',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: 'voucher-list',
|
|
47
|
+
title: '我的優惠券',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
key: 'rebate',
|
|
51
|
+
title: `我的${glitter.share.rebateConfig.title}`,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
key: 'order_list',
|
|
55
|
+
title: '訂單記錄',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
key: 'wishlist',
|
|
59
|
+
title: '心願單',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
key: 'reset_password',
|
|
63
|
+
title: '重設密碼',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
key: 'logout',
|
|
67
|
+
title: '登出',
|
|
68
|
+
},
|
|
69
|
+
]
|
|
70
|
+
.map((item) => {
|
|
71
|
+
return html `
|
|
72
|
+
<div
|
|
73
|
+
class="option px-2 d-flex justify-content-center um-nav-btn ${vm.pageName === item.key ? 'um-nav-btn-active' : ''}"
|
|
74
|
+
onclick="${gvc.event(() => __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
if (item.key === 'reset_password') {
|
|
76
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
77
|
+
dialog.dataLoading({ visible: true });
|
|
78
|
+
const userData = yield UmClass.getUserData(gvc);
|
|
79
|
+
dialog.dataLoading({ visible: false });
|
|
80
|
+
UmClass.dialog({
|
|
81
|
+
gvc: gvc,
|
|
82
|
+
title: '重設密碼事件',
|
|
83
|
+
tag: '',
|
|
84
|
+
innerHTML: (gvc) => {
|
|
85
|
+
let update_vm = {
|
|
86
|
+
verify_code: '',
|
|
87
|
+
pwd: '',
|
|
88
|
+
};
|
|
89
|
+
let get_verify_timer = 0;
|
|
90
|
+
let repeat_pwd = '';
|
|
91
|
+
return [
|
|
92
|
+
html `<div class="tx_normal fw-normal mb-1" style="">密碼</div>`,
|
|
93
|
+
html `<input
|
|
94
|
+
class="bgw-input "
|
|
95
|
+
style=""
|
|
96
|
+
type="password"
|
|
97
|
+
placeholder="請輸入密碼"
|
|
98
|
+
oninput="${gvc.event((e, event) => {
|
|
99
|
+
update_vm.pwd = e.value;
|
|
100
|
+
})}"
|
|
101
|
+
value="${update_vm.pwd}"
|
|
102
|
+
/>`,
|
|
103
|
+
html `<div class="tx_normal fw-normal mt-2 mb-1" style="">確認密碼</div>`,
|
|
104
|
+
html `<input
|
|
105
|
+
class="bgw-input mb-2"
|
|
106
|
+
style=""
|
|
107
|
+
type="password"
|
|
108
|
+
placeholder="請再次輸入密碼"
|
|
109
|
+
oninput="${gvc.event((e, event) => {
|
|
110
|
+
repeat_pwd = e.value;
|
|
111
|
+
})}"
|
|
112
|
+
value="${repeat_pwd}"
|
|
113
|
+
/>`,
|
|
114
|
+
gvc.bindView(() => {
|
|
115
|
+
const id = gvc.glitter.getUUID();
|
|
116
|
+
return {
|
|
117
|
+
bind: id,
|
|
118
|
+
view: () => {
|
|
119
|
+
return html `重設密碼驗證碼
|
|
120
|
+
${BgWidget.blueNote(get_verify_timer ? `驗證碼已發送至『${userData.userData.email}』` : '點我取得驗證碼', gvc.event(() => {
|
|
121
|
+
if (!get_verify_timer) {
|
|
122
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
123
|
+
dialog.dataLoading({ visible: true });
|
|
124
|
+
ApiUser.emailVerify(userData.userData.email, window.appName).then((r) => __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
dialog.dataLoading({ visible: false });
|
|
126
|
+
get_verify_timer = 60;
|
|
127
|
+
gvc.notifyDataChange(id);
|
|
128
|
+
}));
|
|
129
|
+
}
|
|
130
|
+
}))}`;
|
|
131
|
+
},
|
|
132
|
+
divCreate: {
|
|
133
|
+
class: `d-flex flex-column`,
|
|
134
|
+
style: `gap:3px;`,
|
|
135
|
+
},
|
|
136
|
+
onCreate: () => {
|
|
137
|
+
if (get_verify_timer > 0) {
|
|
138
|
+
get_verify_timer--;
|
|
139
|
+
setTimeout(() => {
|
|
140
|
+
gvc.notifyDataChange(id);
|
|
141
|
+
}, 1000);
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
}),
|
|
146
|
+
html `<input
|
|
147
|
+
class="bgw-input mt-2 mb-4"
|
|
148
|
+
style=""
|
|
149
|
+
type="text"
|
|
150
|
+
placeholder="請輸入驗證碼"
|
|
151
|
+
oninput="${gvc.event((e, event) => {
|
|
152
|
+
update_vm.verify_code = e.value;
|
|
153
|
+
})}"
|
|
154
|
+
value="${update_vm.verify_code}"
|
|
155
|
+
/>`,
|
|
156
|
+
html `<div class="d-flex align-items-center justify-content-end pt-2 border-top mx-n3">
|
|
157
|
+
<div
|
|
158
|
+
class="um-nav-btn um-nav-btn-active d-flex align-items-center justify-content-center"
|
|
159
|
+
style="cursor:pointer;"
|
|
160
|
+
type="button"
|
|
161
|
+
onclick="${gvc.event(() => {
|
|
162
|
+
if (update_vm.pwd.length < 8) {
|
|
163
|
+
dialog.errorMessage({ text: '密碼必須大於8位數' });
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (repeat_pwd !== update_vm.pwd) {
|
|
167
|
+
dialog.errorMessage({ text: '請再次確認密碼' });
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
dialog.dataLoading({ visible: true });
|
|
171
|
+
ApiUser.updateUserData({
|
|
172
|
+
userData: update_vm,
|
|
173
|
+
}).then((res) => {
|
|
174
|
+
dialog.dataLoading({ visible: false });
|
|
175
|
+
if (!res.result && res.response.data.msg === 'email-verify-false') {
|
|
176
|
+
dialog.errorMessage({ text: '信箱驗證碼輸入錯誤' });
|
|
177
|
+
}
|
|
178
|
+
else if (!res.result && res.response.data.msg === 'phone-verify-false') {
|
|
179
|
+
dialog.errorMessage({ text: '簡訊驗證碼輸入錯誤' });
|
|
180
|
+
}
|
|
181
|
+
else if (!res.result && res.response.data.msg === 'phone-exists') {
|
|
182
|
+
dialog.errorMessage({ text: '此電話號碼已存在' });
|
|
183
|
+
}
|
|
184
|
+
else if (!res.result && res.response.data.msg === 'email-exists') {
|
|
185
|
+
dialog.errorMessage({ text: '此信箱已存在' });
|
|
186
|
+
}
|
|
187
|
+
else if (!res.result) {
|
|
188
|
+
dialog.errorMessage({ text: '更新異常' });
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
dialog.successMessage({ text: '更改成功' });
|
|
192
|
+
gvc.closeDialog();
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
})}"
|
|
196
|
+
>
|
|
197
|
+
<span class="tx_700_white">確認重設</span>
|
|
198
|
+
</div>
|
|
199
|
+
</div>`,
|
|
200
|
+
].join('');
|
|
201
|
+
},
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
else if (item.key === 'logout') {
|
|
205
|
+
GlobalUser.token = '';
|
|
206
|
+
changePage('index', 'home', {});
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
changePage(item.key, 'page', {});
|
|
210
|
+
}
|
|
211
|
+
}))}"
|
|
212
|
+
>
|
|
213
|
+
${item.title}
|
|
214
|
+
</div>
|
|
215
|
+
`;
|
|
216
|
+
})
|
|
217
|
+
.join('');
|
|
218
|
+
return html ` <div class="account-section">
|
|
219
|
+
<div class="section-title mb-4 mt-0 pt-lg-3 um-nav-title">我的帳號</div>
|
|
220
|
+
${document.body.clientWidth > 768
|
|
221
|
+
? html ` <div class="mx-auto mt-3 um-nav-container">
|
|
222
|
+
<div class="account-options d-flex gap-3">${buttonHTML}</div>
|
|
223
|
+
</div>`
|
|
224
|
+
: html ` <div class="account-navigation w-100">
|
|
225
|
+
<nav class="nav-links mb-3 mb-md-0">
|
|
226
|
+
<div class="nav-options d-flex flex-wrap justify-content-between um-nav-mobile-tags-container px-2">${buttonHTML}</div>
|
|
227
|
+
</nav>
|
|
228
|
+
</div>`}
|
|
229
|
+
</div>`;
|
|
195
230
|
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
</div>`
|
|
209
|
-
: html ` <div class="account-navigation w-100">
|
|
210
|
-
<nav class="nav-links mb-3 mb-md-0">
|
|
211
|
-
<div class="nav-options d-flex flex-wrap justify-content-between um-nav-mobile-tags-container px-2">${buttonHTML}</div>
|
|
212
|
-
</nav>
|
|
213
|
-
</div>`}
|
|
214
|
-
</div>`;
|
|
231
|
+
},
|
|
232
|
+
divCreate: {},
|
|
233
|
+
onCreate: () => {
|
|
234
|
+
if (vm.loading) {
|
|
235
|
+
UmClass.getRebateInfo().then((data) => {
|
|
236
|
+
glitter.share.rebateConfig = data;
|
|
237
|
+
vm.loading = false;
|
|
238
|
+
gvc.notifyDataChange(vm.id);
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
});
|
|
215
243
|
}
|
|
216
244
|
static spinner(height) {
|
|
217
245
|
return html ` <div class="d-flex align-items-center justify-content-center flex-column w-100 mx-auto" style="height: ${height !== null && height !== void 0 ? height : '100vh'}">
|
|
@@ -247,6 +275,22 @@ export class UmClass {
|
|
|
247
275
|
</div>`;
|
|
248
276
|
}, obj.tag);
|
|
249
277
|
}
|
|
278
|
+
static getRebateInfo() {
|
|
279
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
280
|
+
return new Promise((resolve) => {
|
|
281
|
+
ApiWallet.getRebateConfig({
|
|
282
|
+
type: 'me',
|
|
283
|
+
}).then((res) => __awaiter(this, void 0, void 0, function* () {
|
|
284
|
+
if (res.result && res.response.data) {
|
|
285
|
+
resolve(res.response.data);
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
resolve({});
|
|
289
|
+
}
|
|
290
|
+
}));
|
|
291
|
+
});
|
|
292
|
+
});
|
|
293
|
+
}
|
|
250
294
|
static getUserData(gvc) {
|
|
251
295
|
return __awaiter(this, void 0, void 0, function* () {
|
|
252
296
|
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -283,9 +327,7 @@ export class UmClass {
|
|
|
283
327
|
});
|
|
284
328
|
}
|
|
285
329
|
static addStyle(gvc) {
|
|
286
|
-
|
|
287
|
-
const css = String.raw;
|
|
288
|
-
gvc.addStyle(css `
|
|
330
|
+
gvc.addStyle(`
|
|
289
331
|
.um-nav-title {
|
|
290
332
|
font-weight: 700;
|
|
291
333
|
font-size: 36px;
|
|
@@ -588,7 +630,6 @@ export class UmClass {
|
|
|
588
630
|
}
|
|
589
631
|
}
|
|
590
632
|
`);
|
|
591
|
-
});
|
|
592
633
|
}
|
|
593
634
|
static jumpAlert(obj) {
|
|
594
635
|
var _a, _b;
|