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
@@ -6,328 +6,342 @@ import { Language } from '../../glitter-base/global/language.js';
6
6
  const html = String.raw;
7
7
 
8
8
  interface ShipmentObject {
9
- type: string;
10
- value: number;
9
+ type: string;
10
+ value: number;
11
11
  }
12
12
 
13
13
  interface LineItem {
14
- id: number;
15
- sku: string;
16
- spec: string[];
17
- count: number;
18
- title: string;
19
- rebate: number;
20
- collection: any[];
21
- sale_price: number;
22
- shipment_obj: ShipmentObject;
23
- preview_image: string;
24
- discount_price: number;
14
+ id: number;
15
+ sku: string;
16
+ spec: string[];
17
+ count: number;
18
+ title: string;
19
+ rebate: number;
20
+ collection: any[];
21
+ sale_price: number;
22
+ shipment_obj: ShipmentObject;
23
+ preview_image: string;
24
+ discount_price: number;
25
25
  }
26
26
 
27
27
  interface UserInfo {
28
- name: string;
29
- email: string;
30
- phone: string;
31
- shipment: string;
32
- send_type: string;
33
- CVSAddress: string;
34
- CVSStoreID: string;
35
- CVSStoreName: string;
36
- CVSTelephone: string;
37
- invoice_type: string;
38
- shipment_info: string;
39
- invoice_method: string;
40
- MerchantTradeNo: string;
41
- LogisticsSubType: string;
28
+ name: string;
29
+ email: string;
30
+ phone: string;
31
+ shipment: string;
32
+ send_type: string;
33
+ CVSAddress: string;
34
+ CVSStoreID: string;
35
+ CVSStoreName: string;
36
+ CVSTelephone: string;
37
+ invoice_type: string;
38
+ shipment_info: string;
39
+ invoice_method: string;
40
+ MerchantTradeNo: string;
41
+ LogisticsSubType: string;
42
42
  }
43
43
 
44
44
  interface PaymentInfoATM {
45
- text: string;
46
- bank_code: string;
47
- bank_name: string;
48
- bank_user: string;
49
- bank_account: string;
45
+ text: string;
46
+ bank_code: string;
47
+ bank_name: string;
48
+ bank_user: string;
49
+ bank_account: string;
50
50
  }
51
51
 
52
52
  interface PaymentInfoLinePay {
53
- text: string;
53
+ text: string;
54
54
  }
55
55
 
56
56
  interface PaymentSetting {
57
- TYPE: string;
57
+ TYPE: string;
58
58
  }
59
59
 
60
60
  interface UseRebateInfo {
61
- point: number;
61
+ point: number;
62
62
  }
63
63
 
64
64
  interface OffLineSupport {
65
- atm: boolean;
66
- line: boolean;
67
- cash_on_delivery: boolean;
65
+ atm: boolean;
66
+ line: boolean;
67
+ cash_on_delivery: boolean;
68
68
  }
69
69
 
70
70
  interface CustomerInfo {
71
- name: string;
72
- email: string;
73
- phone: string;
74
- payment_select: string;
71
+ name: string;
72
+ email: string;
73
+ phone: string;
74
+ payment_select: string;
75
75
  }
76
76
 
77
77
  interface ShipmentSelector {
78
- name: string;
79
- value: string;
78
+ name: string;
79
+ value: string;
80
80
  }
81
81
 
82
82
  interface OrderData {
83
- email: string;
84
- total: number;
85
- method: string;
86
- rebate: number;
87
- orderID: string;
88
- discount: number;
89
- progress: string;
90
- give_away: any[];
91
- lineItems: LineItem[];
92
- user_info: UserInfo;
93
- code_array: any[];
94
- use_rebate: number;
95
- use_wallet: number;
96
- user_email: string;
97
- orderSource: string;
98
- voucherList: any[];
99
- orderStatus: string;
100
- shipment_fee: number;
101
- customer_info: CustomerInfo;
102
- shipment_info: string;
103
- useRebateInfo: UseRebateInfo;
104
- payment_setting: PaymentSetting;
105
- user_rebate_sum: number;
106
- custom_form_data: any;
107
- off_line_support: OffLineSupport;
108
- payment_info_atm: PaymentInfoATM;
109
- shipment_support: string[];
110
- shipment_selector: ShipmentSelector[];
111
- custom_form_format: any[];
112
- payment_info_line_pay: PaymentInfoLinePay;
113
- proof_purchase?: string;
83
+ email: string;
84
+ total: number;
85
+ method: string;
86
+ rebate: number;
87
+ orderID: string;
88
+ discount: number;
89
+ progress: string;
90
+ give_away: any[];
91
+ lineItems: LineItem[];
92
+ user_info: UserInfo;
93
+ code_array: any[];
94
+ use_rebate: number;
95
+ use_wallet: number;
96
+ user_email: string;
97
+ orderSource: string;
98
+ voucherList: any[];
99
+ orderStatus: string;
100
+ shipment_fee: number;
101
+ customer_info: CustomerInfo;
102
+ shipment_info: string;
103
+ useRebateInfo: UseRebateInfo;
104
+ payment_setting: PaymentSetting;
105
+ user_rebate_sum: number;
106
+ custom_form_data: any;
107
+ off_line_support: OffLineSupport;
108
+ payment_info_atm: PaymentInfoATM;
109
+ shipment_support: string[];
110
+ shipment_selector: ShipmentSelector[];
111
+ custom_form_format: any[];
112
+ payment_info_line_pay: PaymentInfoLinePay;
113
+ proof_purchase?: string;
114
114
  }
115
115
 
116
116
  interface CartOrder {
117
- id: number;
118
- cart_token: string;
119
- status: number;
120
- email: string;
121
- orderData: OrderData;
122
- created_time: string;
123
- index: number;
117
+ id: number;
118
+ cart_token: string;
119
+ status: number;
120
+ email: string;
121
+ orderData: OrderData;
122
+ created_time: string;
123
+ index: number;
124
124
  }
125
125
 
126
126
  export class UMOrderList {
127
- static main(gvc: GVC, widget: any, subData: any) {
127
+ static main(gvc: GVC, widget: any, subData: any) {
128
+ const glitter = gvc.glitter;
129
+ const vm = {
130
+ dataList: [] as CartOrder[],
131
+ amount: 0,
132
+ oldestText: '',
133
+ };
134
+ const ids = {
135
+ view: glitter.getUUID(),
136
+ };
137
+ const loadings = {
138
+ view: true,
139
+ };
128
140
 
129
- const glitter = gvc.glitter;
130
- const vm = {
131
- dataList: [] as CartOrder[],
132
- amount: 0,
133
- oldestText: '',
134
- };
135
- const ids = {
136
- view: glitter.getUUID(),
137
- };
138
- const loadings = {
139
- view: true,
140
- };
141
+ let changePage = (index: string, type: 'page' | 'home', subData: any) => {};
142
+ gvc.glitter.getModule(new URL('./official_event/page/change-page.js', gvc.glitter.root_path).href, cl => {
143
+ changePage = cl.changePage;
144
+ });
141
145
 
142
- let changePage = (index: string, type: 'page' | 'home', subData: any) => {};
143
- gvc.glitter.getModule(new URL('./official_event/page/change-page.js', gvc.glitter.root_path).href, (cl) => {
144
- changePage = cl.changePage;
145
- });
146
+ return gvc.bindView({
147
+ bind: ids.view,
148
+ view: () => {
149
+ if (loadings.view) {
150
+ return UmClass.spinner();
151
+ } else {
152
+ const isWebsite = document.body.clientWidth > 768;
153
+ return html`
154
+ <div class="row mx-auto">
155
+ <div class="col-12">
156
+ <div class="w-100 align-items-center d-flex py-3 pb-lg-3 pt-lg-0" style="gap:10px;">
157
+ <div
158
+ class="d-none d-lg-flex"
159
+ style="background: #FF9705;background: #FF9705;width:4px;height: 20px;"
160
+ onclick="${gvc.event(() => {
161
+ gvc.glitter.getModule(
162
+ new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href,
163
+ cl => {
164
+ cl.changePage('account_userinfo', 'home', {});
165
+ }
166
+ );
167
+ })}"
168
+ ></div>
169
+ <div
170
+ class="d-flex d-lg-none align-items-center justify-content-center"
171
+ style="width:20px;height: 20px;"
172
+ onclick="${gvc.event(() => {
173
+ gvc.glitter.getModule(
174
+ new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href,
175
+ cl => {
176
+ cl.changePage('account_userinfo', 'home', {});
177
+ }
178
+ );
179
+ })}"
180
+ >
181
+ <i class="fa-solid fa-angle-left fs-4"></i>
182
+ </div>
183
+ <div class="um-info-title fw-bold " style="font-size: 24px;">${Language.text('order_history')}</div>
184
+ </div>
185
+ </div>
186
+ <div class="col-12" style="min-height: 500px;">
187
+ <div class="mx-auto orderList">
188
+ ${(() => {
189
+ if (vm.dataList.length === 0) {
190
+ return html`<div
191
+ class="d-flex align-items-center justify-content-center flex-column w-100 mx-auto"
192
+ >
193
+ <lottie-player
194
+ style="max-width: 100%;width: 300px;"
195
+ src="https://assets10.lottiefiles.com/packages/lf20_rc6CDU.json"
196
+ speed="1"
197
+ loop="true"
198
+ background="transparent"
199
+ ></lottie-player>
200
+ <span class="mb-5 fs-5">${Language.text('no_current_orders')}</span>
201
+ </div>`;
202
+ }
146
203
 
147
- return gvc.bindView({
148
- bind: ids.view,
149
- view: () => {
150
- if (loadings.view) {
151
- return UmClass.spinner();
152
- } else {
153
- const isWebsite = document.body.clientWidth > 768;
154
- return html`
155
- <div class="row mx-auto">
156
- <div class="col-12">
157
- <div class="w-100 align-items-center d-flex py-3 pb-lg-3 pt-lg-0" style="gap:10px;">
158
-
159
- <div class="d-none d-lg-flex" style="background: #FF9705;background: #FF9705;width:4px;height: 20px;" onclick="${gvc.event(()=>{
160
- gvc.glitter.getModule(new URL(gvc.glitter.root_path+'official_event/page/change-page.js', import.meta.url).href, (cl) => {
161
- cl.changePage('account_userinfo', 'home', {})
162
- })
163
- })}"></div>
164
- <div class="d-flex d-lg-none align-items-center justify-content-center" style="width:20px;height: 20px;" onclick="${gvc.event(()=>{
165
- gvc.glitter.getModule(new URL(gvc.glitter.root_path+'official_event/page/change-page.js', import.meta.url).href, (cl) => {
166
- cl.changePage('account_userinfo', 'home', {})
167
- })
168
- })}">
169
- <i class="fa-solid fa-angle-left fs-4"></i>
170
- </div>
171
- <div class="um-info-title fw-bold " style="font-size: 24px;">${Language.text('order_history')}</div>
172
- </div>
173
- </div>
174
- <div class="col-12 " style="min-height: 500px;">
175
- <div class="mx-auto orderList">
176
- ${(() => {
177
- if (vm.dataList.length === 0) {
178
- return html`<div class="d-flex align-items-center justify-content-center flex-column w-100 mx-auto">
179
- <lottie-player
180
- style="max-width: 100%;width: 300px;"
181
- src="https://assets10.lottiefiles.com/packages/lf20_rc6CDU.json"
182
- speed="1"
183
- loop="true"
184
- background="transparent"
185
- ></lottie-player>
186
- <span class="mb-5 fs-5">${Language.text('no_current_orders')}</span>
187
- </div>`;
188
- }
189
-
190
- const header = [
191
- {
192
- title: Language.text('order_number'),
193
- },
194
- {
195
- title: Language.text('order_date'),
196
- },
197
- {
198
- title: Language.text('order_amount'),
199
- },
200
- {
201
- title: Language.text('order_status'),
202
- },
203
- {
204
- title: '',
205
- },
206
- ];
204
+ const header = [
205
+ {
206
+ title: Language.text('order_number'),
207
+ },
208
+ {
209
+ title: Language.text('order_date'),
210
+ },
211
+ {
212
+ title: Language.text('order_amount'),
213
+ },
214
+ {
215
+ title: Language.text('order_status'),
216
+ },
217
+ {
218
+ title: '',
219
+ },
220
+ ];
207
221
 
208
- function formatText(item: CartOrder) {
209
- return [
210
- item.cart_token ?? Language.text('no_number_order'),
211
- glitter.ut.dateFormat(new Date(item.created_time), 'yyyy/MM/dd'),
212
- (item.orderData.total ?? 0).toLocaleString(),
213
- (() => {
214
- // 狀態: 已取消, 已完成
215
- if (item.orderData.orderStatus === '-1') {
216
- return Language.text('cancelled');
217
- } else if (item.orderData.orderStatus === '1') {
218
- return Language.text('completed');
219
- }
222
+ function formatText(item: CartOrder) {
223
+ return [
224
+ item.cart_token ?? Language.text('no_number_order'),
225
+ glitter.ut.dateFormat(new Date(item.created_time), 'yyyy/MM/dd'),
226
+ (item.orderData.total ?? 0).toLocaleString(),
227
+ (() => {
228
+ // 狀態: 已取消, 已完成
229
+ if (item.orderData.orderStatus === '-1') {
230
+ return Language.text('cancelled');
231
+ } else if (item.orderData.orderStatus === '1') {
232
+ return Language.text('completed');
233
+ }
220
234
 
221
- // 付款: 待核款, 已付款, 已退款
222
- if (item.status === 0) {
223
- if (item.orderData.proof_purchase) {
224
- return Language.text('awaiting_verification');
225
- }
226
- return Language.text('unpaid');
227
- } else if (item.status === -2) {
228
- return Language.text('refunded');
229
- }
235
+ // 付款: 待核款, 已付款, 已退款
236
+ if (item.status === 0) {
237
+ if (item.orderData.proof_purchase) {
238
+ return Language.text('awaiting_verification');
239
+ }
240
+ return Language.text('unpaid');
241
+ } else if (item.status === -2) {
242
+ return Language.text('refunded');
243
+ }
230
244
 
231
- // 配送: 揀貨中, 配送中, 配送完成
232
- switch (item.orderData.progress) {
233
- case 'shipping':
234
- return Language.text('shipping');
235
- case 'finish':
236
- return Language.text('delivered');
237
- default:
238
- return Language.text('preparing');
239
- }
240
- })(),
241
- html`<div
242
- class="option px-4 d-flex justify-content-center um-nav-btn um-nav-btn-active"
243
- onclick="${gvc.event(() => {
244
- gvc.glitter.setUrlParameter('cart_token', item.cart_token);
245
- changePage('order_detail', 'page', {});
246
- })}"
247
- >
248
- ${Language.text('view')}
249
- </div>`,
250
- ];
251
- }
245
+ // 配送: 揀貨中, 配送中, 配送完成
246
+ switch (item.orderData.progress) {
247
+ case 'shipping':
248
+ return Language.text('shipping');
249
+ case 'finish':
250
+ return Language.text('delivered');
251
+ default:
252
+ return Language.text('preparing');
253
+ }
254
+ })(),
255
+ html`<div
256
+ class="option px-4 d-flex justify-content-center um-nav-btn um-nav-btn-active"
257
+ onclick="${gvc.event(() => {
258
+ gvc.glitter.setUrlParameter('cart_token', item.cart_token);
259
+ changePage('order_detail', 'page', {});
260
+ })}"
261
+ >
262
+ ${Language.text('view')}
263
+ </div>`,
264
+ ];
265
+ }
252
266
 
253
- if (isWebsite) {
254
- const flexList = [1, 1, 1, 1, 1];
255
- return html`
256
- <div class="w-100 d-sm-flex py-4 um-th-bar">
257
- ${header
258
- .map((item, index) => {
259
- return html`<div class="um-th" style="flex: ${flexList[index]};">${item.title}</div>`;
260
- })
261
- .join('')}
262
- </div>
263
- ${vm.dataList
264
- .map((item) => {
265
- return html`<div class="w-100 d-sm-flex py-5 um-td-bar">
266
- ${formatText(item)
267
- .map((dd, index) => {
268
- return html`<div class="um-td" style="flex: ${flexList[index]}">${dd}</div>`;
269
- })
270
- .join('')}
271
- </div>`;
272
- })
273
- .join('')}
274
- `;
275
- }
276
-
277
- return html`<div class="w-100 d-sm-none mb-3 s162413">
278
- ${vm.dataList
279
- .map((item) => {
280
- return html`<div class="um-mobile-area">
281
- ${formatText(item)
282
- .map((dd, index) => {
283
- if (header[index].title === '') {
284
- return dd;
285
- }
286
- return html`<div class="um-mobile-text">${header[index].title}: ${dd}</div>`;
287
- })
288
- .join('')}
289
- </div>`;
290
- })
291
- .join('')}
292
- </div> `;
293
- })()}
294
- </div>
295
- </div>
267
+ if (isWebsite) {
268
+ const flexList = [1, 1, 1, 1, 1];
269
+ return html`
270
+ <div class="w-100 d-sm-flex py-4 um-th-bar">
271
+ ${header
272
+ .map((item, index) => {
273
+ return html`<div class="um-th" style="flex: ${flexList[index]};">${item.title}</div>`;
274
+ })
275
+ .join('')}
296
276
  </div>
297
- `;
298
- }
299
- },
300
- divCreate: {
301
- class: '',
302
- },
303
- onCreate: () => {
304
- if (loadings.view) {
305
- gvc.addMtScript(
306
- [{ src: `${ gvc.glitter.root_path}/jslib/lottie-player.js` }],
307
- () => {
308
- ApiShop.getOrder({
309
- limit: 50,
310
- page: 0,
311
- data_from: 'user',
312
- }).then((res: any) => {
313
- if (res.result && res.response.data) {
314
- vm.dataList = res.response.data.map((dd: any, index: number) => {
315
- dd.index = index;
316
- return dd;
317
- });
318
- } else {
319
- vm.dataList = [];
277
+ ${vm.dataList
278
+ .map(item => {
279
+ return html`<div class="w-100 d-sm-flex py-5 um-td-bar">
280
+ ${formatText(item)
281
+ .map((dd, index) => {
282
+ return html`<div class="um-td" style="flex: ${flexList[index]}">${dd}</div>`;
283
+ })
284
+ .join('')}
285
+ </div>`;
286
+ })
287
+ .join('')}
288
+ `;
289
+ }
290
+
291
+ return html`<div class="w-100 d-sm-none mb-3 s162413">
292
+ ${vm.dataList
293
+ .map(item => {
294
+ return html`<div class="um-mobile-area">
295
+ ${formatText(item)
296
+ .map((dd, index) => {
297
+ if (header[index].title === '') {
298
+ return dd;
320
299
  }
321
- loadings.view = false;
322
- gvc.notifyDataChange(ids.view);
323
- });
324
- },
325
- () => {}
326
- );
300
+ return html`<div class="um-mobile-text">${header[index].title}: ${dd}</div>`;
301
+ })
302
+ .join('')}
303
+ </div>`;
304
+ })
305
+ .join('')}
306
+ </div> `;
307
+ })()}
308
+ </div>
309
+ </div>
310
+ </div>
311
+ `;
312
+ }
313
+ },
314
+ divCreate: {
315
+ class: '',
316
+ },
317
+ onCreate: () => {
318
+ if (loadings.view) {
319
+ gvc.addMtScript(
320
+ [{ src: `${gvc.glitter.root_path}/jslib/lottie-player.js` }],
321
+ () => {
322
+ ApiShop.getOrder({
323
+ limit: 50,
324
+ page: 0,
325
+ data_from: 'user',
326
+ }).then((res: any) => {
327
+ if (res.result && res.response.data) {
328
+ vm.dataList = res.response.data.map((dd: any, index: number) => {
329
+ dd.index = index;
330
+ return dd;
331
+ });
332
+ } else {
333
+ vm.dataList = [];
327
334
  }
335
+ loadings.view = false;
336
+ gvc.notifyDataChange(ids.view);
337
+ });
328
338
  },
329
- });
330
- }
339
+ () => {}
340
+ );
341
+ }
342
+ },
343
+ });
344
+ }
331
345
  }
332
346
 
333
347
  (window as any).glitter.setModule(import.meta.url, UMOrderList);