ts-glitter 21.5.2 → 21.5.4
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/account-info.js +79 -67
- package/lowcode/cms-plugin/account-info.ts +327 -311
- package/lowcode/cms-plugin/information/information-module.ts +3 -1
- package/lowcode/cms-plugin/list-header-option.js +1 -0
- package/lowcode/cms-plugin/list-header-option.ts +1 -0
- package/lowcode/cms-plugin/shopping-information.js +468 -0
- package/lowcode/cms-plugin/shopping-information.ts +557 -0
- package/lowcode/cms-plugin/shopping-market-shopee.js +283 -231
- package/lowcode/cms-plugin/shopping-market-shopee.ts +401 -361
- package/lowcode/cms-plugin/shopping-order-manager.js +16 -4
- package/lowcode/cms-plugin/shopping-order-manager.ts +18 -3
- package/lowcode/glitter-base/global/language.js +4 -1
- package/lowcode/glitter-base/global/language.ts +4 -2
- package/lowcode/glitter-base/route/shopee.js +48 -11
- package/lowcode/glitter-base/route/shopee.ts +119 -80
- package/lowcode/glitterBundle/plugins/html-render.js +121 -90
- package/lowcode/glitterBundle/plugins/html-render.ts +367 -318
- package/lowcode/modules/image-library.js +2 -3
- package/lowcode/modules/image-library.ts +21 -7
- package/lowcode/public-components/checkout/index.js +90 -41
- package/lowcode/public-components/checkout/index.ts +101 -49
- package/lowcode/public-components/footer/footer-initial.js +11 -2
- package/lowcode/public-components/footer/footer-initial.ts +29 -18
- package/lowcode/public-components/headers/header-class.js +47 -35
- package/lowcode/public-components/headers/header-class.ts +54 -38
- package/lowcode/public-components/headers/sy-02.js +1 -1
- package/lowcode/public-components/headers/sy-02.ts +1 -1
- package/lowcode/public-components/headers/sy-03.js +1 -1
- package/lowcode/public-components/headers/sy-03.ts +1 -1
- package/lowcode/public-components/headers/sy-04.js +1 -1
- package/lowcode/public-components/headers/sy-04.ts +1 -1
- package/lowcode/public-components/headers/sy-05.js +1 -2
- package/lowcode/public-components/headers/sy-05.ts +1 -1
- package/lowcode/public-components/layout-plugin/social-links-01.js +122 -3
- package/lowcode/public-components/layout-plugin/social-links-01.ts +135 -10
- package/lowcode/public-components/product/pd-card-01.js +23 -14
- package/lowcode/public-components/product/pd-card-01.ts +25 -14
- package/lowcode/public-components/product/pd-card-02.js +23 -16
- package/lowcode/public-components/product/pd-card-02.ts +25 -16
- package/lowcode/public-components/product/pd-card-03.js +25 -16
- package/lowcode/public-components/product/pd-card-03.ts +27 -16
- package/lowcode/public-components/product/pd-class.js +1 -1
- package/lowcode/public-components/product/pd-class.ts +1 -1
- package/lowcode/public-components/terms-related/index.js +13 -2
- package/lowcode/public-components/terms-related/index.ts +15 -2
- package/lowcode/public-components/user-manager/um-class.js +490 -501
- package/lowcode/public-components/user-manager/um-class.ts +872 -882
- package/lowcode/public-components/user-manager/um-info.js +41 -40
- package/lowcode/public-components/user-manager/um-info.ts +54 -56
- package/lowcode/public-components/user-manager/um-login.js +10 -13
- package/lowcode/public-components/user-manager/um-login.ts +15 -23
- package/lowcode/public-components/user-manager/um-orderlist.js +60 -51
- package/lowcode/public-components/user-manager/um-orderlist.ts +289 -275
- package/lowcode/public-components/user-manager/um-rebate.js +104 -82
- package/lowcode/public-components/user-manager/um-rebate.ts +294 -267
- package/lowcode/public-components/user-manager/um-receive.js +582 -0
- package/lowcode/public-components/user-manager/um-receive.ts +599 -0
- package/lowcode/public-components/user-manager/um-wishlist.js +72 -68
- package/lowcode/public-components/user-manager/um-wishlist.ts +240 -230
- package/package.json +1 -1
- package/src/api-public/controllers/shopee.js +17 -0
- package/src/api-public/controllers/shopee.js.map +1 -1
- package/src/api-public/controllers/shopee.ts +32 -0
- package/src/api-public/services/monitor.d.ts +1 -0
- package/src/api-public/services/post.js +17 -7
- package/src/api-public/services/post.js.map +1 -1
- package/src/api-public/services/rebate.js +2 -11
- package/src/api-public/services/rebate.js.map +1 -1
- package/src/api-public/services/rebate.ts +5 -12
- package/src/api-public/services/shopee.d.ts +23 -2
- package/src/api-public/services/shopee.js +230 -111
- package/src/api-public/services/shopee.js.map +1 -1
- package/src/api-public/services/shopee.ts +1012 -838
- package/src/api-public/services/user.js +2 -2
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +3 -3
- package/src/index.js +17 -7
- package/src/index.js.map +1 -1
- package/src/modules/tool.d.ts +4 -4
- package/src/modules/tool.js +2 -1
- package/src/modules/tool.js.map +1 -1
- package/src/services/backend-service.js +17 -7
- package/src/services/backend-service.js.map +1 -1
- package/src/services/template.d.ts +1 -1
- package/src/services/template.js +24 -18
- package/src/services/template.js.map +1 -1
- package/src/services/template.ts +34 -37
|
@@ -33,7 +33,7 @@ export class UMRebate {
|
|
|
33
33
|
view: true,
|
|
34
34
|
};
|
|
35
35
|
let changePage = (index, type, subData) => { };
|
|
36
|
-
gvc.glitter.getModule(new URL('./official_event/page/change-page.js', gvc.glitter.root_path).href,
|
|
36
|
+
gvc.glitter.getModule(new URL('./official_event/page/change-page.js', gvc.glitter.root_path).href, cl => {
|
|
37
37
|
changePage = cl.changePage;
|
|
38
38
|
});
|
|
39
39
|
return gvc.bindView({
|
|
@@ -44,51 +44,66 @@ export class UMRebate {
|
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
const isWebsite = document.body.clientWidth > 768;
|
|
47
|
-
vm.rebateConfig.title = CheckInput.isEmpty(vm.rebateConfig.title)
|
|
47
|
+
vm.rebateConfig.title = CheckInput.isEmpty(vm.rebateConfig.title)
|
|
48
|
+
? Language.text('shopping_credit')
|
|
49
|
+
: vm.rebateConfig.title;
|
|
48
50
|
return html `
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
<div class="mx-auto p-0">
|
|
52
|
+
<div class="w-100 align-items-center d-flex py-3 pb-lg-3 pt-lg-0" style="gap:10px;">
|
|
53
|
+
<div
|
|
54
|
+
class="d-none d-lg-flex"
|
|
55
|
+
style="background: #FF9705;background: #FF9705;width:4px;height: 20px;"
|
|
56
|
+
onclick="${gvc.event(() => {
|
|
57
|
+
gvc.glitter.getModule(new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href, cl => {
|
|
54
58
|
cl.changePage('account_userinfo', 'home', {});
|
|
55
59
|
});
|
|
56
|
-
})}"
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
})}"
|
|
61
|
+
></div>
|
|
62
|
+
<div
|
|
63
|
+
class="d-flex d-lg-none align-items-center justify-content-center"
|
|
64
|
+
style="width:20px;height: 20px;"
|
|
65
|
+
onclick="${gvc.event(() => {
|
|
66
|
+
gvc.glitter.getModule(new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href, cl => {
|
|
59
67
|
cl.changePage('account_userinfo', 'home', {});
|
|
60
68
|
});
|
|
61
|
-
})}"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
69
|
+
})}"
|
|
70
|
+
>
|
|
71
|
+
<i class="fa-solid fa-angle-left fs-4"></i>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="um-info-title fw-bold " style="font-size: 24px;">
|
|
74
|
+
${`${Language.text('my')}${glitter.share.rebateConfig.title || Language.text('shopping_credit')}`}
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="col-12 p-4 px-lg-5 mx-auto d-flex um-rb-bgr ${isWebsite ? '' : 'flex-column'}">
|
|
78
|
+
<div class="d-flex ${isWebsite ? 'gap-4' : 'gap-3'}">
|
|
79
|
+
<div class="fa-duotone fa-coins fs-1 d-flex align-items-center justify-content-center"></div>
|
|
80
|
+
<div class="${isWebsite ? '' : 'd-flex align-items-center gap-2'}">
|
|
81
|
+
<div class="fw-500 fs-6">${vm.rebateConfig.title}</div>
|
|
82
|
+
<div class="fw-bold mt-0 mt-md-1 mb-1 um-rb-amount">${vm.amount.toLocaleString()}</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
<div class="d-flex align-items-center">
|
|
86
|
+
<div class="d-flex align-items-center gap-3">
|
|
87
|
+
${vm.oldestText.replace(`@{{rebate_title}}`, vm.rebateConfig.title)}
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="col-12 mt-2" style="min-height: 500px;">
|
|
92
|
+
<div class="mx-auto orderList pt-md-3 mb-4">
|
|
93
|
+
${(() => {
|
|
81
94
|
if (vm.dataList.length === 0) {
|
|
82
|
-
return html `<div
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
95
|
+
return html `<div
|
|
96
|
+
class="d-flex align-items-center justify-content-center flex-column w-100 mx-auto"
|
|
97
|
+
>
|
|
98
|
+
<lottie-player
|
|
99
|
+
style="max-width: 100%;width: 300px;"
|
|
100
|
+
src="https://assets10.lottiefiles.com/packages/lf20_rc6CDU.json"
|
|
101
|
+
speed="1"
|
|
102
|
+
loop="true"
|
|
103
|
+
background="transparent"
|
|
104
|
+
></lottie-player>
|
|
105
|
+
<span class="mb-5 fs-5">${Language.text('no_current_obtain')} ${vm.rebateConfig.title}</span>
|
|
106
|
+
</div>`;
|
|
92
107
|
}
|
|
93
108
|
const header = [
|
|
94
109
|
{
|
|
@@ -119,88 +134,95 @@ export class UMRebate {
|
|
|
119
134
|
glitter.ut.dateFormat(new Date(item.created_time), 'yyyy/MM/dd hh:mm'),
|
|
120
135
|
(() => {
|
|
121
136
|
if (item.money <= 0) {
|
|
122
|
-
return
|
|
137
|
+
return '-';
|
|
123
138
|
}
|
|
124
139
|
else if (item.deadline.includes('2999')) {
|
|
125
140
|
return Language.text('no_expiry');
|
|
126
141
|
}
|
|
127
142
|
else {
|
|
128
143
|
return html `${glitter.ut.dateFormat(new Date(item.deadline), 'yyyy/MM/dd hh:mm')}
|
|
129
|
-
|
|
130
|
-
? html `<span class="badge bg-faded-danger text-danger ms-1"
|
|
144
|
+
${threeDayLater(item.deadline) && item.remain && item.remain > 0
|
|
145
|
+
? html `<span class="badge bg-faded-danger text-danger ms-1"
|
|
146
|
+
>${Language.text('about_to_expire')}</span
|
|
147
|
+
>`
|
|
131
148
|
: ''}`;
|
|
132
149
|
}
|
|
133
150
|
})(),
|
|
134
151
|
(() => {
|
|
135
|
-
if (item.orderID) {
|
|
136
|
-
|
|
137
|
-
gvc.glitter.setUrlParameter('cart_token', item.orderID);
|
|
138
|
-
changePage('order_detail', 'page', {});
|
|
139
|
-
}), 'font-size: 16px;');
|
|
140
|
-
const moneyText = item.money > 0 ? Language.text('obtain') : Language.text('use');
|
|
141
|
-
return `${Language.text('order')}『 ${orderLink} 』${moneyText} ${vm.rebateConfig.title}`;
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
return (item.note ||
|
|
145
|
-
`${Language.text('manual_adjustment')} ${vm.rebateConfig.title}`);
|
|
152
|
+
if (!item.orderID) {
|
|
153
|
+
return item.note || `${Language.text('manual_adjustment')} ${vm.rebateConfig.title}`;
|
|
146
154
|
}
|
|
155
|
+
const orderLink = UmClass.style_components.blueNote(`#${item.orderID}`, gvc.event(() => {
|
|
156
|
+
gvc.glitter.setUrlParameter('cart_token', item.orderID);
|
|
157
|
+
changePage('order_detail', 'page', {});
|
|
158
|
+
}), 'font-size: 16px;');
|
|
159
|
+
const moneyText = item.money > 0 ? Language.text('obtain') : Language.text('use');
|
|
160
|
+
return `${Language.text('order')}「${orderLink}」${moneyText} ${vm.rebateConfig.title}`;
|
|
147
161
|
})(),
|
|
148
|
-
item.money
|
|
149
|
-
|
|
162
|
+
html `<span class="fw-bold ${item.money > 0 ? 'text-success' : 'text-danger'}"
|
|
163
|
+
>${item.money.toLocaleString()}</span
|
|
164
|
+
>`,
|
|
165
|
+
item.money > 0
|
|
166
|
+
? html `<span class="fw-bold ${item.remain > 0 ? 'text-success' : ''}"
|
|
167
|
+
>${item.remain.toLocaleString()}</span
|
|
168
|
+
>`
|
|
169
|
+
: '-',
|
|
150
170
|
];
|
|
151
171
|
}
|
|
152
172
|
if (isWebsite) {
|
|
153
|
-
const flexList = [
|
|
173
|
+
const flexList = [0.8, 0.8, 1.8, 0.6, 0.4];
|
|
154
174
|
return html `
|
|
155
|
-
|
|
156
|
-
|
|
175
|
+
<div class="w-100 d-sm-flex py-4 um-th-bar">
|
|
176
|
+
${header
|
|
157
177
|
.map((item, index) => {
|
|
158
178
|
return html `<div class="um-th" style="flex: ${flexList[index]};">${item.title}</div>`;
|
|
159
179
|
})
|
|
160
180
|
.join('')}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
.map(
|
|
181
|
+
</div>
|
|
182
|
+
${vm.dataList
|
|
183
|
+
.map(item => {
|
|
164
184
|
return html `<div class="w-100 d-sm-flex py-5 um-td-bar">
|
|
165
|
-
|
|
185
|
+
${formatText(item)
|
|
166
186
|
.map((dd, index) => {
|
|
167
|
-
return html `<div
|
|
187
|
+
return html `<div
|
|
188
|
+
class="um-td"
|
|
189
|
+
style="flex: ${flexList[index]};font-size:16px;word-break: break-word;"
|
|
190
|
+
>
|
|
191
|
+
${dd}
|
|
192
|
+
</div>`;
|
|
168
193
|
})
|
|
169
194
|
.join('')}
|
|
170
|
-
|
|
195
|
+
</div>`;
|
|
171
196
|
})
|
|
172
197
|
.join('')}
|
|
173
|
-
|
|
198
|
+
`;
|
|
174
199
|
}
|
|
175
200
|
return html `<div class="w-100 d-sm-none mb-3 s162413">
|
|
176
|
-
|
|
177
|
-
.map(
|
|
201
|
+
${vm.dataList
|
|
202
|
+
.map(item => {
|
|
178
203
|
return html `<div class="um-mobile-area">
|
|
179
|
-
|
|
204
|
+
${formatText(item)
|
|
180
205
|
.map((dd, index) => {
|
|
181
206
|
return html `<div class="um-mobile-text">${header[index].title}: ${dd}</div>`;
|
|
182
207
|
})
|
|
183
208
|
.join('')}
|
|
184
|
-
|
|
209
|
+
</div>`;
|
|
185
210
|
})
|
|
186
211
|
.join('')}
|
|
187
|
-
|
|
212
|
+
</div> `;
|
|
188
213
|
})()}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
`;
|
|
193
218
|
}
|
|
194
219
|
},
|
|
195
|
-
divCreate: {
|
|
196
|
-
class: '',
|
|
197
|
-
},
|
|
198
220
|
onCreate: () => {
|
|
199
221
|
if (loadings.view) {
|
|
200
222
|
gvc.addMtScript([{ src: `${gvc.glitter.root_path}/jslib/lottie-player.js` }], () => {
|
|
201
223
|
Promise.all([
|
|
202
224
|
UmClass.getRebateInfo(),
|
|
203
|
-
new Promise(
|
|
225
|
+
new Promise(resolve => {
|
|
204
226
|
ApiShop.getRebate({}).then((res) => __awaiter(this, void 0, void 0, function* () {
|
|
205
227
|
if (res.result && res.response.sum) {
|
|
206
228
|
resolve(res.response.sum);
|
|
@@ -210,7 +232,7 @@ export class UMRebate {
|
|
|
210
232
|
}
|
|
211
233
|
}));
|
|
212
234
|
}),
|
|
213
|
-
new Promise(
|
|
235
|
+
new Promise(resolve => {
|
|
214
236
|
ApiWallet.getRebate({
|
|
215
237
|
type: 'me',
|
|
216
238
|
limit: 10000,
|
|
@@ -233,7 +255,7 @@ export class UMRebate {
|
|
|
233
255
|
resolve(text[Language.getLanguage()]);
|
|
234
256
|
}));
|
|
235
257
|
}),
|
|
236
|
-
new Promise(
|
|
258
|
+
new Promise(resolve => {
|
|
237
259
|
ApiWallet.getRebate({
|
|
238
260
|
type: 'me',
|
|
239
261
|
limit: 10000,
|
|
@@ -247,7 +269,7 @@ export class UMRebate {
|
|
|
247
269
|
}
|
|
248
270
|
}));
|
|
249
271
|
}),
|
|
250
|
-
]).then(
|
|
272
|
+
]).then(dataList => {
|
|
251
273
|
vm.rebateConfig = dataList[0];
|
|
252
274
|
vm.amount = dataList[1];
|
|
253
275
|
vm.oldestText = dataList[2];
|