ts-glitter 21.5.3 → 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/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/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
|
@@ -27,12 +27,11 @@ export class UMWishList {
|
|
|
27
27
|
view: true,
|
|
28
28
|
};
|
|
29
29
|
let changePage = (index, type, subData) => { };
|
|
30
|
-
gvc.glitter.getModule(new URL('./official_event/page/change-page.js', gvc.glitter.root_path).href,
|
|
30
|
+
gvc.glitter.getModule(new URL('./official_event/page/change-page.js', gvc.glitter.root_path).href, cl => {
|
|
31
31
|
changePage = cl.changePage;
|
|
32
32
|
});
|
|
33
33
|
gvc.addMtScript([{ src: `${gvc.glitter.root_path}/jslib/lottie-player.js` }], () => {
|
|
34
34
|
ApiShop.getWishList().then((res) => __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
console.log(res);
|
|
36
35
|
if (res.result && res.response.data) {
|
|
37
36
|
vm.dataList = res.response.data;
|
|
38
37
|
}
|
|
@@ -50,46 +49,54 @@ export class UMWishList {
|
|
|
50
49
|
return UmClass.spinner();
|
|
51
50
|
}
|
|
52
51
|
else {
|
|
53
|
-
const isWebsite = document.body.clientWidth > 768;
|
|
54
52
|
return html `
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
<div class="row mx-auto p-0">
|
|
54
|
+
<div class="w-100 align-items-center d-flex py-3 pb-lg-3 pt-lg-0" style="gap:10px;">
|
|
55
|
+
<div
|
|
56
|
+
class="d-none d-lg-flex"
|
|
57
|
+
style="background: #FF9705;background: #FF9705;width:4px;height: 20px;"
|
|
58
|
+
onclick="${gvc.event(() => {
|
|
59
|
+
gvc.glitter.getModule(new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href, cl => {
|
|
60
60
|
cl.changePage('account_userinfo', 'home', {});
|
|
61
61
|
});
|
|
62
|
-
})}"
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
})}"
|
|
63
|
+
></div>
|
|
64
|
+
<div
|
|
65
|
+
class="d-flex d-lg-none align-items-center justify-content-center"
|
|
66
|
+
style="width:20px;height: 20px;"
|
|
67
|
+
onclick="${gvc.event(() => {
|
|
68
|
+
gvc.glitter.getModule(new URL(gvc.glitter.root_path + 'official_event/page/change-page.js', import.meta.url).href, cl => {
|
|
65
69
|
cl.changePage('account_userinfo', 'home', {});
|
|
66
70
|
});
|
|
67
|
-
})}"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
})}"
|
|
72
|
+
>
|
|
73
|
+
<i class="fa-solid fa-angle-left fs-4"></i>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="um-info-title fw-bold " style="font-size: 24px;">${Language.text('wishlist')}</div>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="col-12" style="min-height: 500px;">
|
|
78
|
+
<div class="mx-auto orderList pt-3 mb-4 row">
|
|
79
|
+
${(() => {
|
|
75
80
|
if (vm.dataList.length === 0) {
|
|
76
|
-
return html `<div
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
return html `<div
|
|
82
|
+
class="d-flex align-items-center justify-content-center flex-column w-100 mx-auto"
|
|
83
|
+
>
|
|
84
|
+
<lottie-player
|
|
85
|
+
style="max-width: 100%;width: 300px;"
|
|
86
|
+
src="https://assets10.lottiefiles.com/packages/lf20_rc6CDU.json"
|
|
87
|
+
speed="1"
|
|
88
|
+
loop="true"
|
|
89
|
+
background="transparent"
|
|
90
|
+
></lottie-player>
|
|
91
|
+
<span class="mb-5 fs-5">${Language.text('no_items_added')}</span>
|
|
92
|
+
</div>`;
|
|
86
93
|
}
|
|
87
94
|
return vm.dataList
|
|
88
95
|
.map((item, index) => {
|
|
89
96
|
return html ` <div
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
class="col-6 col-md-3 px-1 px-md-2"
|
|
98
|
+
gvc-prod-id="${item.id}"
|
|
99
|
+
onclick="${gvc.event(() => {
|
|
93
100
|
let path = '';
|
|
94
101
|
if (!(item.content.seo && item.content.seo.domain)) {
|
|
95
102
|
glitter.setUrlParameter('product_id', subData.id);
|
|
@@ -101,12 +108,12 @@ export class UMWishList {
|
|
|
101
108
|
}
|
|
102
109
|
changePage(path, 'page', {});
|
|
103
110
|
})}"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
>
|
|
112
|
+
<div class="card mb-3" style="cursor: pointer">
|
|
113
|
+
<div class="card-img">
|
|
114
|
+
<div
|
|
115
|
+
class="um-icon-container"
|
|
116
|
+
onclick="${gvc.event((e, event) => {
|
|
110
117
|
event.stopPropagation();
|
|
111
118
|
if (CheckInput.isEmpty(GlobalUser.token)) {
|
|
112
119
|
changePage('login', 'page', {});
|
|
@@ -123,31 +130,31 @@ export class UMWishList {
|
|
|
123
130
|
gvc.notifyDataChange(ids.view);
|
|
124
131
|
}));
|
|
125
132
|
})}"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
133
|
+
>
|
|
134
|
+
<i class="fa-solid fa-xmark"></i>
|
|
135
|
+
</div>
|
|
136
|
+
<div
|
|
137
|
+
class="card-img-top um-img-bgr"
|
|
138
|
+
style="background-image: url('${(() => {
|
|
132
139
|
if (item.content.preview_image[0]) {
|
|
133
140
|
return item.content.preview_image[0];
|
|
134
141
|
}
|
|
135
142
|
return 'https://jmva.or.jp/wp-content/uploads/2018/07/noimage.png';
|
|
136
143
|
})()}');"
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
const minPrice = Math.min(...item.content.variants.map(
|
|
144
|
+
></div>
|
|
145
|
+
</div>
|
|
146
|
+
<div class="card-body text-start p-2">
|
|
147
|
+
<div class="fs-6 um-card-title mb-1">${item.content.title}</div>
|
|
148
|
+
<div class="d-flex align-items-center gap-1">
|
|
149
|
+
<div class="fs-6 fw-500 card-sale-price mb-1">
|
|
150
|
+
${(() => {
|
|
151
|
+
const minPrice = Math.min(...item.content.variants.map(dd => {
|
|
145
152
|
return dd.sale_price;
|
|
146
153
|
}));
|
|
147
154
|
return `NT.$ ${minPrice.toLocaleString()}`;
|
|
148
155
|
})()}
|
|
149
|
-
|
|
150
|
-
|
|
156
|
+
</div>
|
|
157
|
+
${(() => {
|
|
151
158
|
var _a, _b;
|
|
152
159
|
const minPrice = Math.min(...item.content.variants.map((dd) => {
|
|
153
160
|
return dd.sale_price;
|
|
@@ -156,28 +163,25 @@ export class UMWishList {
|
|
|
156
163
|
return dd.sale_price === minPrice;
|
|
157
164
|
})) !== null && _a !== void 0 ? _a : {}).compare_price) !== null && _b !== void 0 ? _b : 0;
|
|
158
165
|
if (comparePrice > 0 && minPrice < comparePrice) {
|
|
159
|
-
return html `<div class="text-decoration-line-through card-cost-price mb-1"
|
|
166
|
+
return html `<div class="text-decoration-line-through card-cost-price mb-1">
|
|
167
|
+
${Currency.convertCurrencyText(comparePrice)}
|
|
168
|
+
</div>`;
|
|
160
169
|
}
|
|
161
170
|
return '';
|
|
162
171
|
})()}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>`;
|
|
167
176
|
})
|
|
168
177
|
.join('');
|
|
169
178
|
})()}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
`;
|
|
174
183
|
}
|
|
175
184
|
},
|
|
176
|
-
divCreate: {
|
|
177
|
-
class: '',
|
|
178
|
-
},
|
|
179
|
-
onCreate: () => {
|
|
180
|
-
},
|
|
181
185
|
});
|
|
182
186
|
}
|
|
183
187
|
}
|