ts-glitter 21.9.6 → 21.9.8
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/backend-manager/bg-blog.js +2 -0
- package/lowcode/backend-manager/bg-blog.ts +4 -0
- package/lowcode/backend-manager/bg-product.js +3 -3
- package/lowcode/backend-manager/bg-product.ts +3 -3
- package/lowcode/backend-manager/bg-widget.js +15 -11
- package/lowcode/backend-manager/bg-widget.ts +30 -21
- package/lowcode/cms-plugin/menus-setting.js +389 -141
- package/lowcode/cms-plugin/menus-setting.ts +519 -228
- package/lowcode/cms-plugin/shopping-collections.js +5 -38
- package/lowcode/cms-plugin/shopping-collections.ts +5 -47
- package/lowcode/jspage/function-page/setting_editor.js +0 -27
- package/lowcode/jspage/function-page/setting_editor.ts +27 -27
- package/lowcode/public-components/footer/footer-01.js +183 -158
- package/lowcode/public-components/footer/footer-01.ts +275 -256
- package/lowcode/public-components/footer/footer-02.js +83 -63
- package/lowcode/public-components/footer/footer-02.ts +160 -145
- package/lowcode/public-components/footer/footer-03.js +78 -60
- package/lowcode/public-components/footer/footer-03.ts +149 -137
- package/lowcode/public-components/headers/sy-02.js +17 -2
- package/lowcode/public-components/headers/sy-02.ts +18 -6
- package/lowcode/public-components/headers/sy-03.js +18 -4
- package/lowcode/public-components/headers/sy-03.ts +26 -15
- package/lowcode/public-components/headers/sy-04.js +18 -4
- package/lowcode/public-components/headers/sy-04.ts +26 -15
- package/lowcode/public-components/headers/sy-05.js +93 -68
- package/lowcode/public-components/headers/sy-05.ts +174 -151
- package/lowcode/public-components/product/pd-class.js +27 -8
- package/lowcode/public-components/product/pd-class.ts +60 -35
- package/package.json +1 -1
- package/src/api-public/services/shopee.js +17 -7
- package/src/api-public/services/user.js +17 -7
- package/src/index.js +17 -7
- package/src/services/app.js +17 -7
- package/src/services/app.js.map +1 -1
- package/src/services/backend-service.js +17 -7
- package/src/services/backend-service.js.map +1 -1
|
@@ -1,9 +1,19 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import { Color } from '../public/color.js';
|
|
2
11
|
import { ApiUser } from '../../glitter-base/route/user.js';
|
|
3
12
|
import { Language } from '../../glitter-base/global/language.js';
|
|
4
13
|
import { LanguageView } from '../public/language-view.js';
|
|
5
14
|
import { FooterInitial } from './footer-initial.js';
|
|
6
15
|
import { Footer } from '../../app-component/footer.js';
|
|
16
|
+
import { PdClass } from '../product/pd-class.js';
|
|
7
17
|
const html = String.raw;
|
|
8
18
|
export class Footer02 {
|
|
9
19
|
static main(gvc, widget, subData) {
|
|
@@ -85,36 +95,37 @@ export class Footer02 {
|
|
|
85
95
|
margin: 0 auto;
|
|
86
96
|
}
|
|
87
97
|
`);
|
|
88
|
-
return html `
|
|
89
|
-
<
|
|
90
|
-
<div class="
|
|
91
|
-
<div class="
|
|
92
|
-
<div>
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
return html ` <!-- Footer 03 -->
|
|
99
|
+
<footer class="f-bgr border-top">
|
|
100
|
+
<div class="border-gray-700 f-padding-top">
|
|
101
|
+
<div class="container my-5">
|
|
102
|
+
<div class="d-flex flex-column align-items-center justify-content-center gap-2 mb-3">
|
|
103
|
+
<div>
|
|
104
|
+
<img src="${(_a = formData.logo) !== null && _a !== void 0 ? _a : ''}" style="min-height: 40px; max-height: 60px;" />
|
|
105
|
+
</div>
|
|
106
|
+
<div>
|
|
107
|
+
<h4 class="f-content">${formData.intro ? formData.intro.replace(/\n/g, '<br/>') : ''}</h4>
|
|
108
|
+
</div>
|
|
109
|
+
${window.store_info.language_setting.support.length > 1 ||
|
|
99
110
|
window.store_info.multi_currency
|
|
100
111
|
? html ` <div class="col-12 d-flex justify-content-center mb-3">
|
|
101
|
-
|
|
102
|
-
|
|
112
|
+
${LanguageView.selectLanguage(gvc, colors)}
|
|
113
|
+
</div>`
|
|
103
114
|
: ``}
|
|
104
|
-
|
|
105
|
-
|
|
115
|
+
<div class="d-flex justify-content-center gap-2 p-0 pb-3">
|
|
116
|
+
${(() => {
|
|
106
117
|
try {
|
|
107
118
|
return formData.kkk.link
|
|
108
119
|
.map((item) => {
|
|
109
120
|
return html ` <div class="f-icon-div">
|
|
110
|
-
|
|
111
|
-
|
|
121
|
+
<div
|
|
122
|
+
onclick="${gvc.event(() => {
|
|
112
123
|
gvc.glitter.href = item.link;
|
|
113
124
|
})}"
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
125
|
+
>
|
|
126
|
+
<img
|
|
127
|
+
class="f-icon-image"
|
|
128
|
+
src="${(() => {
|
|
118
129
|
switch (item.type) {
|
|
119
130
|
case 'fb':
|
|
120
131
|
return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847285395-img_facebook.svg';
|
|
@@ -130,9 +141,9 @@ export class Footer02 {
|
|
|
130
141
|
return '';
|
|
131
142
|
}
|
|
132
143
|
})()}"
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
144
|
+
/>
|
|
145
|
+
</div>
|
|
146
|
+
</div>`;
|
|
136
147
|
})
|
|
137
148
|
.join('');
|
|
138
149
|
}
|
|
@@ -140,64 +151,71 @@ export class Footer02 {
|
|
|
140
151
|
return '';
|
|
141
152
|
}
|
|
142
153
|
})()}
|
|
154
|
+
</div>
|
|
143
155
|
</div>
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
${(() => {
|
|
156
|
+
<div class="row f-row">
|
|
157
|
+
${(() => {
|
|
147
158
|
try {
|
|
148
159
|
return gvc.bindView((() => {
|
|
149
160
|
const id = gvc.glitter.getUUID();
|
|
150
161
|
let loading = true;
|
|
151
162
|
return {
|
|
152
163
|
bind: id,
|
|
153
|
-
view: () => {
|
|
164
|
+
view: () => __awaiter(this, void 0, void 0, function* () {
|
|
154
165
|
if (loading) {
|
|
155
166
|
return '';
|
|
156
167
|
}
|
|
157
168
|
else {
|
|
169
|
+
const userData = yield ApiUser.getUserData(gvc.glitter.share.GlobalUser.token, 'me');
|
|
158
170
|
return footer.list
|
|
159
171
|
.map((data) => {
|
|
172
|
+
if (!PdClass.menuVisibleVerify(userData, data)) {
|
|
173
|
+
return '';
|
|
174
|
+
}
|
|
160
175
|
return html ` <div class="f-ul-div col-12 col-md-3 col-lg-4 mt-2">
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
176
|
+
<h6
|
|
177
|
+
class="heading-xxs mb-3 f-title"
|
|
178
|
+
onclick="${gvc.event(() => {
|
|
164
179
|
if (data.link) {
|
|
165
180
|
gvc.glitter.href = data.link;
|
|
166
181
|
}
|
|
167
182
|
})}"
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
183
|
+
>
|
|
184
|
+
${data.title}
|
|
185
|
+
</h6>
|
|
186
|
+
<ul class="list-unstyled mb-7 f-ul">
|
|
187
|
+
${data.items
|
|
173
188
|
.map(chi => {
|
|
189
|
+
if (!PdClass.menuVisibleVerify(userData, chi)) {
|
|
190
|
+
return '';
|
|
191
|
+
}
|
|
174
192
|
return html ` <li
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
193
|
+
class="f-li"
|
|
194
|
+
style="${chi.link ? 'cursor: pointer;' : ''}"
|
|
195
|
+
onclick="${gvc.event(() => {
|
|
178
196
|
if (chi.link) {
|
|
179
197
|
gvc.glitter.href = chi.link;
|
|
180
198
|
}
|
|
181
199
|
})}"
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
200
|
+
>
|
|
201
|
+
<a
|
|
202
|
+
class="f-aclass"
|
|
203
|
+
title="${chi.title}"
|
|
204
|
+
onclick="${gvc.event((e, event) => {
|
|
187
205
|
event.preventDefault();
|
|
188
206
|
})}"
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
207
|
+
href="${chi.link}"
|
|
208
|
+
>${chi.title}</a
|
|
209
|
+
>
|
|
210
|
+
</li>`;
|
|
193
211
|
})
|
|
194
212
|
.join('')}
|
|
195
|
-
|
|
196
|
-
|
|
213
|
+
</ul>
|
|
214
|
+
</div>`;
|
|
197
215
|
})
|
|
198
216
|
.join('');
|
|
199
217
|
}
|
|
200
|
-
},
|
|
218
|
+
}),
|
|
201
219
|
divCreate: {
|
|
202
220
|
class: document.body.clientWidth > 768 ? 'd-flex justify-content-center gap-2' : '',
|
|
203
221
|
},
|
|
@@ -219,19 +237,19 @@ export class Footer02 {
|
|
|
219
237
|
return '';
|
|
220
238
|
}
|
|
221
239
|
})()}
|
|
240
|
+
</div>
|
|
222
241
|
</div>
|
|
223
242
|
</div>
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
243
|
+
<div class="py-6">
|
|
244
|
+
<div class="container">
|
|
245
|
+
<div class="row">
|
|
246
|
+
<div class="col text-center">
|
|
247
|
+
<p class="my-2 f-copyright">${(_b = formData.note) !== null && _b !== void 0 ? _b : ''}</p>
|
|
248
|
+
</div>
|
|
230
249
|
</div>
|
|
231
250
|
</div>
|
|
232
251
|
</div>
|
|
233
|
-
</
|
|
234
|
-
</footer>`;
|
|
252
|
+
</footer>`;
|
|
235
253
|
},
|
|
236
254
|
mobile: () => {
|
|
237
255
|
return Footer.main({
|
|
@@ -239,7 +257,7 @@ export class Footer02 {
|
|
|
239
257
|
formData: {},
|
|
240
258
|
key: '',
|
|
241
259
|
widget: widget,
|
|
242
|
-
callback: () => { }
|
|
260
|
+
callback: () => { },
|
|
243
261
|
});
|
|
244
262
|
},
|
|
245
263
|
gvc: gvc,
|
|
@@ -5,6 +5,7 @@ import { Language } from '../../glitter-base/global/language.js';
|
|
|
5
5
|
import { LanguageView } from '../public/language-view.js';
|
|
6
6
|
import { FooterInitial } from './footer-initial.js';
|
|
7
7
|
import { Footer } from '../../app-component/footer.js';
|
|
8
|
+
import { PdClass } from '../product/pd-class.js';
|
|
8
9
|
|
|
9
10
|
const html = String.raw;
|
|
10
11
|
|
|
@@ -100,161 +101,172 @@ export class Footer02 {
|
|
|
100
101
|
}
|
|
101
102
|
`);
|
|
102
103
|
|
|
103
|
-
return html`
|
|
104
|
-
<
|
|
105
|
-
<div class="
|
|
106
|
-
<div class="
|
|
107
|
-
<div>
|
|
108
|
-
<
|
|
104
|
+
return html` <!-- Footer 03 -->
|
|
105
|
+
<footer class="f-bgr border-top">
|
|
106
|
+
<div class="border-gray-700 f-padding-top">
|
|
107
|
+
<div class="container my-5">
|
|
108
|
+
<div class="d-flex flex-column align-items-center justify-content-center gap-2 mb-3">
|
|
109
|
+
<div>
|
|
110
|
+
<img src="${formData.logo ?? ''}" style="min-height: 40px; max-height: 60px;" />
|
|
111
|
+
</div>
|
|
112
|
+
<div>
|
|
113
|
+
<h4 class="f-content">${formData.intro ? formData.intro.replace(/\n/g, '<br/>') : ''}</h4>
|
|
114
|
+
</div>
|
|
115
|
+
${(window as any).store_info.language_setting.support.length > 1 ||
|
|
116
|
+
(window as any).store_info.multi_currency
|
|
117
|
+
? html` <div class="col-12 d-flex justify-content-center mb-3">
|
|
118
|
+
${LanguageView.selectLanguage(gvc, colors)}
|
|
119
|
+
</div>`
|
|
120
|
+
: ``}
|
|
121
|
+
<div class="d-flex justify-content-center gap-2 p-0 pb-3">
|
|
122
|
+
${(() => {
|
|
123
|
+
try {
|
|
124
|
+
return formData.kkk.link
|
|
125
|
+
.map((item: { link: string; type: string }) => {
|
|
126
|
+
return html` <div class="f-icon-div">
|
|
127
|
+
<div
|
|
128
|
+
onclick="${gvc.event(() => {
|
|
129
|
+
gvc.glitter.href = item.link;
|
|
130
|
+
})}"
|
|
131
|
+
>
|
|
132
|
+
<img
|
|
133
|
+
class="f-icon-image"
|
|
134
|
+
src="${(() => {
|
|
135
|
+
switch (item.type) {
|
|
136
|
+
case 'fb':
|
|
137
|
+
return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847285395-img_facebook.svg';
|
|
138
|
+
case 'youtube':
|
|
139
|
+
return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847654029-771382_channel_circle_logo_media_social_icon.png';
|
|
140
|
+
case 'twitter':
|
|
141
|
+
return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847853494-m2i8K9K9N4b1G6H7.png';
|
|
142
|
+
case 'ig':
|
|
143
|
+
return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847430108-social.png';
|
|
144
|
+
case 'line':
|
|
145
|
+
return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847342584-img_line.svg';
|
|
146
|
+
default:
|
|
147
|
+
return '';
|
|
148
|
+
}
|
|
149
|
+
})()}"
|
|
150
|
+
/>
|
|
151
|
+
</div>
|
|
152
|
+
</div>`;
|
|
153
|
+
})
|
|
154
|
+
.join('');
|
|
155
|
+
} catch (error) {
|
|
156
|
+
return '';
|
|
157
|
+
}
|
|
158
|
+
})()}
|
|
159
|
+
</div>
|
|
109
160
|
</div>
|
|
110
|
-
<div>
|
|
111
|
-
<h4 class="f-content">${formData.intro ? formData.intro.replace(/\n/g, '<br/>') : ''}</h4>
|
|
112
|
-
</div>
|
|
113
|
-
${(window as any).store_info.language_setting.support.length > 1 ||
|
|
114
|
-
(window as any).store_info.multi_currency
|
|
115
|
-
? html` <div class="col-12 d-flex justify-content-center mb-3">
|
|
116
|
-
${LanguageView.selectLanguage(gvc, colors)}
|
|
117
|
-
</div>`
|
|
118
|
-
: ``}
|
|
119
|
-
<div class="d-flex justify-content-center gap-2 p-0 pb-3">
|
|
161
|
+
<div class="row f-row">
|
|
120
162
|
${(() => {
|
|
121
163
|
try {
|
|
122
|
-
return
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847654029-771382_channel_circle_logo_media_social_icon.png';
|
|
138
|
-
case 'twitter':
|
|
139
|
-
return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847853494-m2i8K9K9N4b1G6H7.png';
|
|
140
|
-
case 'ig':
|
|
141
|
-
return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847430108-social.png';
|
|
142
|
-
case 'line':
|
|
143
|
-
return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847342584-img_line.svg';
|
|
144
|
-
default:
|
|
164
|
+
return gvc.bindView(
|
|
165
|
+
(() => {
|
|
166
|
+
const id = gvc.glitter.getUUID();
|
|
167
|
+
let loading = true;
|
|
168
|
+
return {
|
|
169
|
+
bind: id,
|
|
170
|
+
view: async () => {
|
|
171
|
+
if (loading) {
|
|
172
|
+
return '';
|
|
173
|
+
} else {
|
|
174
|
+
const userData = await ApiUser.getUserData(gvc.glitter.share.GlobalUser.token, 'me');
|
|
175
|
+
|
|
176
|
+
return footer.list
|
|
177
|
+
.map((data: FooterItem) => {
|
|
178
|
+
if (!PdClass.menuVisibleVerify(userData, data)) {
|
|
145
179
|
return '';
|
|
180
|
+
}
|
|
181
|
+
return html` <div class="f-ul-div col-12 col-md-3 col-lg-4 mt-2">
|
|
182
|
+
<h6
|
|
183
|
+
class="heading-xxs mb-3 f-title"
|
|
184
|
+
onclick="${gvc.event(() => {
|
|
185
|
+
if (data.link) {
|
|
186
|
+
gvc.glitter.href = data.link;
|
|
187
|
+
}
|
|
188
|
+
})}"
|
|
189
|
+
>
|
|
190
|
+
${data.title}
|
|
191
|
+
</h6>
|
|
192
|
+
<ul class="list-unstyled mb-7 f-ul">
|
|
193
|
+
${data.items
|
|
194
|
+
.map(chi => {
|
|
195
|
+
if (!PdClass.menuVisibleVerify(userData, chi)) {
|
|
196
|
+
return '';
|
|
197
|
+
}
|
|
198
|
+
return html` <li
|
|
199
|
+
class="f-li"
|
|
200
|
+
style="${chi.link ? 'cursor: pointer;' : ''}"
|
|
201
|
+
onclick="${gvc.event(() => {
|
|
202
|
+
if (chi.link) {
|
|
203
|
+
gvc.glitter.href = chi.link;
|
|
204
|
+
}
|
|
205
|
+
})}"
|
|
206
|
+
>
|
|
207
|
+
<a
|
|
208
|
+
class="f-aclass"
|
|
209
|
+
title="${chi.title}"
|
|
210
|
+
onclick="${gvc.event((e, event) => {
|
|
211
|
+
event.preventDefault();
|
|
212
|
+
})}"
|
|
213
|
+
href="${chi.link}"
|
|
214
|
+
>${chi.title}</a
|
|
215
|
+
>
|
|
216
|
+
</li>`;
|
|
217
|
+
})
|
|
218
|
+
.join('')}
|
|
219
|
+
</ul>
|
|
220
|
+
</div>`;
|
|
221
|
+
})
|
|
222
|
+
.join('');
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
divCreate: {
|
|
226
|
+
class: document.body.clientWidth > 768 ? 'd-flex justify-content-center gap-2' : '',
|
|
227
|
+
},
|
|
228
|
+
onCreate: () => {
|
|
229
|
+
if (loading) {
|
|
230
|
+
ApiUser.getPublicConfig(widget.formData.menu_refer || 'footer-setting', 'manager').then(
|
|
231
|
+
data => {
|
|
232
|
+
if (data.result && data.response.value) {
|
|
233
|
+
footer.list = data.response.value[Language.getLanguage()];
|
|
234
|
+
}
|
|
235
|
+
loading = false;
|
|
236
|
+
gvc.notifyDataChange(id);
|
|
146
237
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
})
|
|
152
|
-
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
};
|
|
242
|
+
})()
|
|
243
|
+
);
|
|
153
244
|
} catch (error) {
|
|
154
245
|
return '';
|
|
155
246
|
}
|
|
156
247
|
})()}
|
|
157
248
|
</div>
|
|
158
249
|
</div>
|
|
159
|
-
<div class="row f-row">
|
|
160
|
-
${(() => {
|
|
161
|
-
try {
|
|
162
|
-
return gvc.bindView(
|
|
163
|
-
(() => {
|
|
164
|
-
const id = gvc.glitter.getUUID();
|
|
165
|
-
let loading = true;
|
|
166
|
-
return {
|
|
167
|
-
bind: id,
|
|
168
|
-
view: () => {
|
|
169
|
-
if (loading) {
|
|
170
|
-
return '';
|
|
171
|
-
} else {
|
|
172
|
-
return footer.list
|
|
173
|
-
.map((data: FooterItem) => {
|
|
174
|
-
return html` <div class="f-ul-div col-12 col-md-3 col-lg-4 mt-2">
|
|
175
|
-
<h6
|
|
176
|
-
class="heading-xxs mb-3 f-title"
|
|
177
|
-
onclick="${gvc.event(() => {
|
|
178
|
-
if (data.link) {
|
|
179
|
-
gvc.glitter.href = data.link;
|
|
180
|
-
}
|
|
181
|
-
})}"
|
|
182
|
-
>
|
|
183
|
-
${data.title}
|
|
184
|
-
</h6>
|
|
185
|
-
<ul class="list-unstyled mb-7 f-ul">
|
|
186
|
-
${data.items
|
|
187
|
-
.map(chi => {
|
|
188
|
-
return html` <li
|
|
189
|
-
class="f-li"
|
|
190
|
-
style="${chi.link ? 'cursor: pointer;' : ''}"
|
|
191
|
-
onclick="${gvc.event(() => {
|
|
192
|
-
if (chi.link) {
|
|
193
|
-
gvc.glitter.href = chi.link;
|
|
194
|
-
}
|
|
195
|
-
})}"
|
|
196
|
-
>
|
|
197
|
-
<a
|
|
198
|
-
class="f-aclass"
|
|
199
|
-
title="${chi.title}"
|
|
200
|
-
onclick="${gvc.event((e, event) => {
|
|
201
|
-
event.preventDefault();
|
|
202
|
-
})}"
|
|
203
|
-
href="${chi.link}"
|
|
204
|
-
>${chi.title}</a
|
|
205
|
-
>
|
|
206
|
-
</li>`;
|
|
207
|
-
})
|
|
208
|
-
.join('')}
|
|
209
|
-
</ul>
|
|
210
|
-
</div>`;
|
|
211
|
-
})
|
|
212
|
-
.join('');
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
|
-
divCreate: {
|
|
216
|
-
class: document.body.clientWidth > 768 ? 'd-flex justify-content-center gap-2' : '',
|
|
217
|
-
},
|
|
218
|
-
onCreate: () => {
|
|
219
|
-
if (loading) {
|
|
220
|
-
ApiUser.getPublicConfig(widget.formData.menu_refer || 'footer-setting', 'manager').then(data => {
|
|
221
|
-
if (data.result && data.response.value) {
|
|
222
|
-
footer.list = data.response.value[Language.getLanguage()];
|
|
223
|
-
}
|
|
224
|
-
loading = false;
|
|
225
|
-
gvc.notifyDataChange(id);
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
},
|
|
229
|
-
};
|
|
230
|
-
})()
|
|
231
|
-
);
|
|
232
|
-
} catch (error) {
|
|
233
|
-
return '';
|
|
234
|
-
}
|
|
235
|
-
})()}
|
|
236
|
-
</div>
|
|
237
250
|
</div>
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
251
|
+
<div class="py-6">
|
|
252
|
+
<div class="container">
|
|
253
|
+
<div class="row">
|
|
254
|
+
<div class="col text-center">
|
|
255
|
+
<p class="my-2 f-copyright">${formData.note ?? ''}</p>
|
|
256
|
+
</div>
|
|
244
257
|
</div>
|
|
245
258
|
</div>
|
|
246
259
|
</div>
|
|
247
|
-
</
|
|
248
|
-
</footer>`;
|
|
260
|
+
</footer>`;
|
|
249
261
|
},
|
|
250
262
|
mobile: () => {
|
|
251
263
|
return Footer.main({
|
|
252
|
-
gvc:gvc,
|
|
253
|
-
formData:{},
|
|
254
|
-
key:'',
|
|
255
|
-
widget:widget,
|
|
256
|
-
callback:()=>{}
|
|
257
|
-
})
|
|
264
|
+
gvc: gvc,
|
|
265
|
+
formData: {},
|
|
266
|
+
key: '',
|
|
267
|
+
widget: widget,
|
|
268
|
+
callback: () => {},
|
|
269
|
+
});
|
|
258
270
|
},
|
|
259
271
|
gvc: gvc,
|
|
260
272
|
});
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import { ApiUser } from '../../glitter-base/route/user.js';
|
|
2
11
|
import { getCheckoutCount } from '../../official_event/e-commerce/get-count.js';
|
|
3
12
|
import { GlobalUser } from '../../glitter-base/global/global-user.js';
|
|
@@ -22,6 +31,7 @@ export class Sy02 {
|
|
|
22
31
|
});
|
|
23
32
|
const colors = Color.getTheme(gvc, widget.formData);
|
|
24
33
|
return html `
|
|
34
|
+
<!--Header Sy02-->
|
|
25
35
|
<div style="height: 76px;"></div>
|
|
26
36
|
<nav
|
|
27
37
|
class="navbar navbar-expand-lg vw-100 header header-place shadow position-fixed top-0 left-0 py-0"
|
|
@@ -252,11 +262,15 @@ background: ${(_a = colors.bgr) !== null && _a !== void 0 ? _a : '#000'};overflo
|
|
|
252
262
|
});
|
|
253
263
|
return {
|
|
254
264
|
bind: id,
|
|
255
|
-
view: () => {
|
|
265
|
+
view: () => __awaiter(this, void 0, void 0, function* () {
|
|
266
|
+
const userData = yield ApiUser.getUserData(gvc.glitter.share.GlobalUser.token, 'me');
|
|
256
267
|
function loopItems(data) {
|
|
257
268
|
return data
|
|
258
269
|
.map((dd) => {
|
|
259
270
|
var _a, _b;
|
|
271
|
+
if (!PdClass.menuVisibleVerify(userData, dd)) {
|
|
272
|
+
return '';
|
|
273
|
+
}
|
|
260
274
|
return html ` <li class="nav-item dropdown">
|
|
261
275
|
<a
|
|
262
276
|
class="nav-link header-link "
|
|
@@ -281,10 +295,11 @@ background: ${(_a = colors.bgr) !== null && _a !== void 0 ? _a : '#000'};overflo
|
|
|
281
295
|
: ``}
|
|
282
296
|
</li>`;
|
|
283
297
|
})
|
|
298
|
+
.filter(Boolean)
|
|
284
299
|
.join('');
|
|
285
300
|
}
|
|
286
301
|
return loopItems(vm.data);
|
|
287
|
-
},
|
|
302
|
+
}),
|
|
288
303
|
divCreate: {
|
|
289
304
|
class: `navbar-nav ms-3 me-auto`,
|
|
290
305
|
style: `flex-direction: row; gap: 15px;`,
|