ts-glitter 21.4.6 → 21.4.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 +2 -1
- package/lowcode/Entry.ts +2 -2
- package/lowcode/api/pageConfig.js +2 -0
- package/lowcode/api/pageConfig.ts +4 -2
- package/lowcode/cms-plugin/menus-setting.js +4 -9
- package/lowcode/cms-plugin/menus-setting.ts +4 -9
- package/lowcode/editor/normal-page-editor.js +2 -2
- package/lowcode/editor/normal-page-editor.ts +2 -2
- package/lowcode/glitter-base/route/api-cart.ts +1 -0
- package/lowcode/glitterBundle/html-component/global-widget.js +78 -2
- package/lowcode/glitterBundle/html-component/global-widget.ts +86 -16
- package/lowcode/jspage/main.js +10 -2
- package/lowcode/jspage/main.ts +14 -2
- package/lowcode/official_view_component/official/component.js +4 -0
- package/lowcode/official_view_component/official/component.ts +4 -1
- package/lowcode/public-components/blogs/blogs-01.js +139 -145
- package/lowcode/public-components/blogs/blogs-01.ts +9 -15
- package/lowcode/public-components/headers/header-class.js +3 -1
- package/lowcode/public-components/headers/header-class.ts +4 -1
- package/lowcode/public-components/headers/sy-02.js +13 -3
- package/lowcode/public-components/headers/sy-02.ts +14 -3
- package/lowcode/public-components/headers/sy-03.js +13 -3
- package/lowcode/public-components/headers/sy-03.ts +13 -3
- package/lowcode/public-components/headers/sy-04.js +13 -3
- package/lowcode/public-components/headers/sy-04.ts +13 -3
- package/lowcode/public-components/headers/sy-05.js +10 -3
- package/lowcode/public-components/headers/sy-05.ts +10 -3
- package/lowcode/public-components/product/pd-card-01.js +11 -1
- package/lowcode/public-components/product/pd-card-01.ts +10 -1
- package/lowcode/public-components/product/pd-card-02.js +13 -1
- package/lowcode/public-components/product/pd-card-02.ts +12 -1
- package/lowcode/public-components/product/pd-card-03.js +13 -1
- package/lowcode/public-components/product/pd-card-03.ts +12 -1
- package/lowcode/public-components/product/pd-class.js +32 -24
- package/lowcode/public-components/product/pd-class.ts +15 -5
- package/package.json +1 -1
- package/src/services/template.js +9 -11
- package/src/services/template.js.map +1 -1
- package/src/services/template.ts +5 -3
|
@@ -28,6 +28,7 @@ export class Blogs01 {
|
|
|
28
28
|
class: `${bid}`,
|
|
29
29
|
},
|
|
30
30
|
onCreate: () => __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
var _a;
|
|
31
32
|
if (!initial) {
|
|
32
33
|
try {
|
|
33
34
|
initial = true;
|
|
@@ -48,149 +49,150 @@ export class Blogs01 {
|
|
|
48
49
|
onCreate: () => { },
|
|
49
50
|
document: document,
|
|
50
51
|
}, {});
|
|
51
|
-
if (subData.content.generator !== 'page_editor') {
|
|
52
|
-
const dd = subData.content;
|
|
53
|
-
document.querySelector(`.${bid}`).outerHTML = [
|
|
54
|
-
ogHeaderView,
|
|
55
|
-
`<div class="container mx-auto fr-view mb-5" style="max-width: 1100px;font-family: 'Source Sans Pro', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'STHeiti', 'WenQuanYi Micro Hei', SimSun, sans-serif;">
|
|
56
|
-
<h1 class="my-5 w-100 text-center p-0" style="color:${subData.content.title};font-size:${document.body.clientWidth > 800 ? `32px` : `24px`};font-weight: 600;">
|
|
57
|
-
${(dd.language_data && dd.language_data[Language.getLanguage()].title) || dd.title}
|
|
58
|
-
</h1>
|
|
59
|
-
${(dd.language_data && dd.language_data[Language.getLanguage()].text) || dd.text}</div>`
|
|
60
|
-
].join('');
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
52
|
console.log(`o_header===>`, o_header);
|
|
64
53
|
console.log(`subData===>`, subData);
|
|
65
|
-
subData.content.config = subData.content.config
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
54
|
+
subData.content.config = (_a = subData.content.config) !== null && _a !== void 0 ? _a : [];
|
|
55
|
+
try {
|
|
56
|
+
subData.content.config = subData.content.config.filter((dd) => dd.data.tag !== 'c_header');
|
|
57
|
+
const view = (() => {
|
|
58
|
+
if (subData.content.generator !== 'page_editor') {
|
|
59
|
+
const dd = subData.content;
|
|
60
|
+
return html ` <div
|
|
70
61
|
class="container mx-auto fr-view mb-5"
|
|
71
62
|
style="max-width: 1100px;font-family: 'Source Sans Pro', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'STHeiti', 'WenQuanYi Micro Hei', SimSun, sans-serif;"
|
|
72
63
|
>
|
|
73
64
|
<h1
|
|
74
65
|
class="my-5 w-100 text-center p-0"
|
|
75
66
|
style="color:${subData.content.title};font-size:${document.body.clientWidth > 800
|
|
76
|
-
|
|
77
|
-
|
|
67
|
+
? `32px`
|
|
68
|
+
: `24px`};font-weight: 600;"
|
|
78
69
|
>
|
|
79
70
|
${(dd.language_data && dd.language_data[Language.getLanguage()].title) || dd.title}
|
|
80
71
|
</h1>
|
|
81
72
|
${(dd.language_data && dd.language_data[Language.getLanguage()].text) || dd.text}
|
|
82
73
|
</div>`;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
});
|
|
97
|
-
if (!line_item) {
|
|
98
|
-
cart.line_items.push({
|
|
99
|
-
id: dd.product_id,
|
|
100
|
-
spec: dd.variant.spec,
|
|
101
|
-
count: 1,
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
function startRender() {
|
|
77
|
+
if (subData.content.relative_data &&
|
|
78
|
+
['shopping', 'hidden'].includes(subData.content.page_type) &&
|
|
79
|
+
localStorage.getItem('block-refresh-cart') !== 'true') {
|
|
80
|
+
const clock = gvc.glitter.ut.clock();
|
|
81
|
+
const interVal = setInterval(() => {
|
|
82
|
+
if (clock.stop() < 2000) {
|
|
83
|
+
new ApiCart(ApiCart.globalCart).setCart(cart => {
|
|
84
|
+
subData.content.relative_data.map((dd) => {
|
|
85
|
+
const line_item = cart.line_items.find((d1) => {
|
|
86
|
+
return (`${d1.id}-${d1.spec.join('-')}` === `${dd.product_id}-${dd.variant.spec.join('-')}`);
|
|
102
87
|
});
|
|
103
|
-
|
|
88
|
+
if (!line_item) {
|
|
89
|
+
cart.line_items.push({
|
|
90
|
+
id: dd.product_id,
|
|
91
|
+
spec: dd.variant.spec,
|
|
92
|
+
count: 1,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
});
|
|
104
96
|
});
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
gvc.notifyDataChange(['js-cart-count']);
|
|
109
|
-
gvc.glitter.share.reloadCartData && gvc.glitter.share.reloadCartData();
|
|
110
|
-
if (document.querySelector('.customer-message')) {
|
|
111
|
-
document.querySelector('.customer-message').remove();
|
|
112
97
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
98
|
+
else {
|
|
99
|
+
gvc.notifyDataChange(['js-cart-count']);
|
|
100
|
+
gvc.glitter.share.reloadCartData && gvc.glitter.share.reloadCartData();
|
|
101
|
+
if (document.querySelector('.customer-message')) {
|
|
102
|
+
document.querySelector('.customer-message').remove();
|
|
103
|
+
}
|
|
104
|
+
clearInterval(interVal);
|
|
105
|
+
}
|
|
106
|
+
}, 300);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
localStorage.setItem('block-refresh-cart', 'false');
|
|
110
|
+
}
|
|
111
|
+
return new gvc.glitter.htmlGenerate(subData.content.config, [], subData.content).render(gvc, {
|
|
112
|
+
class: `w-100`,
|
|
113
|
+
style: `position:relative;`,
|
|
114
|
+
containerID: gvc.glitter.getUUID(),
|
|
115
|
+
tag: gvc.glitter.getUUID(),
|
|
116
|
+
jsFinish: () => { },
|
|
117
|
+
onCreate: () => { },
|
|
118
|
+
document: document,
|
|
119
|
+
}, {});
|
|
133
120
|
}
|
|
134
|
-
|
|
135
|
-
if (
|
|
136
|
-
subData.content.show_auth.value) {
|
|
121
|
+
if (subData.content.page_type === 'hidden') {
|
|
122
|
+
if (subData.content.show_auth.auth === 'all') {
|
|
137
123
|
return startRender();
|
|
138
124
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
text: Language.text('incorrect_website_password'),
|
|
160
|
-
callback: () => {
|
|
161
|
-
gvc.glitter.closeDiaLog();
|
|
162
|
-
checkPwd();
|
|
163
|
-
},
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
checkPwd();
|
|
168
|
-
},
|
|
169
|
-
};
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
else if (subData.content.show_auth.auth === 'member_type') {
|
|
173
|
-
return gvc.bindView(() => {
|
|
174
|
-
const rid = gvc.glitter.getUUID();
|
|
175
|
-
return {
|
|
176
|
-
bind: rid,
|
|
177
|
-
view: () => {
|
|
178
|
-
return ``;
|
|
179
|
-
},
|
|
180
|
-
divCreate: {
|
|
181
|
-
option: [{ key: 'id', value: rid }],
|
|
182
|
-
},
|
|
183
|
-
onCreate: () => {
|
|
184
|
-
const dialog = new ShareDialog(gvc.glitter);
|
|
185
|
-
UmClass.getUserData(gvc).then((resp) => {
|
|
186
|
-
try {
|
|
187
|
-
const mem = resp.member.find((d) => {
|
|
188
|
-
return d.trigger;
|
|
189
|
-
});
|
|
190
|
-
if (subData.content.show_auth.value.includes(mem.id)) {
|
|
125
|
+
else if (subData.content.show_auth.auth === 'password') {
|
|
126
|
+
if (localStorage.getItem('password_to_see_' + subData.content.tag) ===
|
|
127
|
+
subData.content.show_auth.value) {
|
|
128
|
+
return startRender();
|
|
129
|
+
}
|
|
130
|
+
return gvc.bindView(() => {
|
|
131
|
+
const rid = gvc.glitter.getUUID();
|
|
132
|
+
return {
|
|
133
|
+
bind: rid,
|
|
134
|
+
view: () => {
|
|
135
|
+
return ``;
|
|
136
|
+
},
|
|
137
|
+
divCreate: {
|
|
138
|
+
option: [{ key: 'id', value: rid }],
|
|
139
|
+
},
|
|
140
|
+
onCreate: () => {
|
|
141
|
+
function checkPwd() {
|
|
142
|
+
const pwd = window.prompt(Language.text('enter_website_password'), '');
|
|
143
|
+
localStorage.setItem('password_to_see_' + subData.content.tag, pwd !== null && pwd !== void 0 ? pwd : '');
|
|
144
|
+
if (subData.content.show_auth.value === pwd) {
|
|
191
145
|
document.querySelector(`#${rid}`).outerHTML = startRender();
|
|
192
146
|
}
|
|
193
147
|
else {
|
|
148
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
149
|
+
dialog.checkYesOrNot({
|
|
150
|
+
text: Language.text('incorrect_website_password'),
|
|
151
|
+
callback: () => {
|
|
152
|
+
gvc.glitter.closeDiaLog();
|
|
153
|
+
checkPwd();
|
|
154
|
+
},
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
checkPwd();
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
else if (subData.content.show_auth.auth === 'member_type') {
|
|
164
|
+
return gvc.bindView(() => {
|
|
165
|
+
const rid = gvc.glitter.getUUID();
|
|
166
|
+
return {
|
|
167
|
+
bind: rid,
|
|
168
|
+
view: () => {
|
|
169
|
+
return ``;
|
|
170
|
+
},
|
|
171
|
+
divCreate: {
|
|
172
|
+
option: [{ key: 'id', value: rid }],
|
|
173
|
+
},
|
|
174
|
+
onCreate: () => {
|
|
175
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
176
|
+
UmClass.getUserData(gvc).then((resp) => {
|
|
177
|
+
try {
|
|
178
|
+
const mem = resp.member.find((d) => {
|
|
179
|
+
return d.trigger;
|
|
180
|
+
});
|
|
181
|
+
if (subData.content.show_auth.value.includes(mem.id)) {
|
|
182
|
+
document.querySelector(`#${rid}`).outerHTML = startRender();
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
if (GlobalUser.token) {
|
|
186
|
+
dialog.errorMessage({ text: Language.text('no_access_permission') });
|
|
187
|
+
gvc.glitter.href = '/index';
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
GlobalUser.loginRedirect = location.href;
|
|
191
|
+
gvc.glitter.href = '/login';
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
catch (e) {
|
|
194
196
|
if (GlobalUser.token) {
|
|
195
197
|
dialog.errorMessage({ text: Language.text('no_access_permission') });
|
|
196
198
|
gvc.glitter.href = '/index';
|
|
@@ -200,35 +202,27 @@ ${(dd.language_data && dd.language_data[Language.getLanguage()].text) || dd.text
|
|
|
200
202
|
gvc.glitter.href = '/login';
|
|
201
203
|
}
|
|
202
204
|
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
gvc.glitter.href = '/login';
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
});
|
|
215
|
-
},
|
|
216
|
-
};
|
|
217
|
-
});
|
|
205
|
+
});
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
return startRender();
|
|
212
|
+
}
|
|
218
213
|
}
|
|
219
214
|
else {
|
|
220
215
|
return startRender();
|
|
221
216
|
}
|
|
222
217
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
].join('');
|
|
218
|
+
})();
|
|
219
|
+
document.querySelector(`.${bid}`).outerHTML = [
|
|
220
|
+
ogHeaderView,
|
|
221
|
+
view
|
|
222
|
+
].join('');
|
|
223
|
+
}
|
|
224
|
+
catch (e) {
|
|
225
|
+
}
|
|
232
226
|
initial = true;
|
|
233
227
|
}
|
|
234
228
|
catch (e) {
|
|
@@ -51,21 +51,12 @@ export class Blogs01 {
|
|
|
51
51
|
},
|
|
52
52
|
{}
|
|
53
53
|
);
|
|
54
|
-
|
|
55
|
-
const dd = subData.content;
|
|
56
|
-
document.querySelector(`.${bid}`)!.outerHTML = [
|
|
57
|
-
ogHeaderView,
|
|
58
|
-
`<div class="container mx-auto fr-view mb-5" style="max-width: 1100px;font-family: 'Source Sans Pro', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'STHeiti', 'WenQuanYi Micro Hei', SimSun, sans-serif;">
|
|
59
|
-
<h1 class="my-5 w-100 text-center p-0" style="color:${subData.content.title};font-size:${document.body.clientWidth > 800 ? `32px` : `24px`};font-weight: 600;">
|
|
60
|
-
${(dd.language_data && dd.language_data[Language.getLanguage()].title) || dd.title}
|
|
61
|
-
</h1>
|
|
62
|
-
${(dd.language_data && dd.language_data[Language.getLanguage()].text) || dd.text}</div>`
|
|
63
|
-
].join('');
|
|
64
|
-
return
|
|
65
|
-
}
|
|
54
|
+
|
|
66
55
|
console.log(`o_header===>`,o_header)
|
|
67
56
|
console.log(`subData===>`,subData)
|
|
68
|
-
subData.content.config=subData.content.config
|
|
57
|
+
subData.content.config=subData.content.config??[]
|
|
58
|
+
try {
|
|
59
|
+
subData.content.config=subData.content.config.filter((dd:any)=> dd.data.tag!=='c_header')
|
|
69
60
|
//pages的自訂View
|
|
70
61
|
const view = (() => {
|
|
71
62
|
if (subData.content.generator !== 'page_editor') {
|
|
@@ -77,8 +68,8 @@ ${(dd.language_data && dd.language_data[Language.getLanguage()].text) || dd.text
|
|
|
77
68
|
<h1
|
|
78
69
|
class="my-5 w-100 text-center p-0"
|
|
79
70
|
style="color:${subData.content.title};font-size:${document.body.clientWidth > 800
|
|
80
|
-
|
|
81
|
-
|
|
71
|
+
? `32px`
|
|
72
|
+
: `24px`};font-weight: 600;"
|
|
82
73
|
>
|
|
83
74
|
${(dd.language_data && dd.language_data[Language.getLanguage()].title) || dd.title}
|
|
84
75
|
</h1>
|
|
@@ -251,6 +242,9 @@ ${(dd.language_data && dd.language_data[Language.getLanguage()].text) || dd.text
|
|
|
251
242
|
ogHeaderView,
|
|
252
243
|
view
|
|
253
244
|
].join('');
|
|
245
|
+
}catch (e) {
|
|
246
|
+
|
|
247
|
+
}
|
|
254
248
|
initial = true;
|
|
255
249
|
} catch (e) {
|
|
256
250
|
console.log(e)
|
|
@@ -162,7 +162,9 @@ export class HeaderClass {
|
|
|
162
162
|
type="button"
|
|
163
163
|
onclick="${gvc.event(() => {
|
|
164
164
|
window.drawer.close();
|
|
165
|
-
|
|
165
|
+
setTimeout(() => {
|
|
166
|
+
document.querySelector('.check_out_cart_data').scrollIntoView();
|
|
167
|
+
}, 100);
|
|
166
168
|
})}"
|
|
167
169
|
>
|
|
168
170
|
${Language.text('proceed_to_checkout')}
|
|
@@ -189,7 +189,10 @@ export class HeaderClass {
|
|
|
189
189
|
type="button"
|
|
190
190
|
onclick="${gvc.event(() => {
|
|
191
191
|
(window as any).drawer.close();
|
|
192
|
-
|
|
192
|
+
setTimeout(()=>{
|
|
193
|
+
document.querySelector('.check_out_cart_data')!!.scrollIntoView()
|
|
194
|
+
},100)
|
|
195
|
+
// ApiCart.toCheckOutPage(id);
|
|
193
196
|
})}"
|
|
194
197
|
>
|
|
195
198
|
${Language.text('proceed_to_checkout')}
|
|
@@ -8,6 +8,7 @@ import { LanguageView } from '../public/language-view.js';
|
|
|
8
8
|
import { HeaderClass } from './header-class.js';
|
|
9
9
|
import { HeadInitial } from './head-initial.js';
|
|
10
10
|
import { HeaderMobile } from './header-mobile.js';
|
|
11
|
+
import { PdClass } from '../product/pd-class.js';
|
|
11
12
|
const html = String.raw;
|
|
12
13
|
export class Sy02 {
|
|
13
14
|
static main(gvc, widget, subData) {
|
|
@@ -37,7 +38,7 @@ export class Sy02 {
|
|
|
37
38
|
<div class="d-flex align-items-center justify-content-center h-100 w-100 gap-2">
|
|
38
39
|
<!--手機版選單-->
|
|
39
40
|
<div
|
|
40
|
-
class="d-flex align-items-center justify-content-center"
|
|
41
|
+
class="${PdClass.isShoppingPage() ? `d-none` : `d-flex d-lg-none`} align-items-center justify-content-center"
|
|
41
42
|
style="width:40px !important;height:40px !important;"
|
|
42
43
|
onclick="${gvc.event(() => {
|
|
43
44
|
gvc.glitter.setDrawer(gvc.bindView(() => {
|
|
@@ -111,7 +112,7 @@ export class Sy02 {
|
|
|
111
112
|
const vm = {
|
|
112
113
|
data: [],
|
|
113
114
|
};
|
|
114
|
-
ApiUser.getPublicConfig('menu-setting', 'manager', window.appName).then(res => {
|
|
115
|
+
ApiUser.getPublicConfig(widget.formData.menu_refer || 'menu-setting', 'manager', window.appName).then(res => {
|
|
115
116
|
vm.data = res.response.value[Language.getLanguage()];
|
|
116
117
|
gvc.notifyDataChange(id);
|
|
117
118
|
});
|
|
@@ -129,6 +130,9 @@ export class Sy02 {
|
|
|
129
130
|
loop(vm.data);
|
|
130
131
|
}
|
|
131
132
|
function loopItems(data, show_border) {
|
|
133
|
+
if (PdClass.isShoppingPage()) {
|
|
134
|
+
return ``;
|
|
135
|
+
}
|
|
132
136
|
return data
|
|
133
137
|
.map((dd) => {
|
|
134
138
|
var _a, _b, _c, _d, _e;
|
|
@@ -245,7 +249,7 @@ background: ${(_a = colors.bgr) !== null && _a !== void 0 ? _a : '#000'};overflo
|
|
|
245
249
|
const vm = {
|
|
246
250
|
data: [],
|
|
247
251
|
};
|
|
248
|
-
ApiUser.getPublicConfig('menu-setting', 'manager', window.appName).then(res => {
|
|
252
|
+
ApiUser.getPublicConfig(widget.formData.menu_refer || 'menu-setting', 'manager', window.appName).then(res => {
|
|
249
253
|
vm.data = res.response.value[Language.getLanguage()];
|
|
250
254
|
gvc.notifyDataChange(id);
|
|
251
255
|
});
|
|
@@ -253,6 +257,9 @@ background: ${(_a = colors.bgr) !== null && _a !== void 0 ? _a : '#000'};overflo
|
|
|
253
257
|
bind: id,
|
|
254
258
|
view: () => {
|
|
255
259
|
function loopItems(data) {
|
|
260
|
+
if (PdClass.isShoppingPage()) {
|
|
261
|
+
return ``;
|
|
262
|
+
}
|
|
256
263
|
return data
|
|
257
264
|
.map((dd) => {
|
|
258
265
|
var _a, _b;
|
|
@@ -351,6 +358,9 @@ padding-bottom: 2px;
|
|
|
351
358
|
bind: vm.id,
|
|
352
359
|
view: () => {
|
|
353
360
|
var _a, _b;
|
|
361
|
+
if (PdClass.isShoppingPage()) {
|
|
362
|
+
return ``;
|
|
363
|
+
}
|
|
354
364
|
if (!vm.toggle) {
|
|
355
365
|
return html `<i
|
|
356
366
|
class="fa-regular fa-magnifying-glass"
|
|
@@ -9,6 +9,7 @@ import { LanguageView } from '../public/language-view.js';
|
|
|
9
9
|
import { HeaderClass } from './header-class.js';
|
|
10
10
|
import { HeadInitial } from './head-initial.js';
|
|
11
11
|
import { HeaderMobile } from './header-mobile.js';
|
|
12
|
+
import { PdClass } from '../product/pd-class.js';
|
|
12
13
|
|
|
13
14
|
const html = String.raw;
|
|
14
15
|
|
|
@@ -41,7 +42,7 @@ export class Sy02 {
|
|
|
41
42
|
<div class="d-flex align-items-center justify-content-center h-100 w-100 gap-2">
|
|
42
43
|
<!--手機版選單-->
|
|
43
44
|
<div
|
|
44
|
-
class="d-flex align-items-center justify-content-center"
|
|
45
|
+
class="${PdClass.isShoppingPage() ? `d-none`:`d-flex d-lg-none`} align-items-center justify-content-center"
|
|
45
46
|
style="width:40px !important;height:40px !important;"
|
|
46
47
|
onclick="${gvc.event(() => {
|
|
47
48
|
gvc.glitter.setDrawer(
|
|
@@ -114,8 +115,9 @@ export class Sy02 {
|
|
|
114
115
|
const vm = {
|
|
115
116
|
data: [],
|
|
116
117
|
};
|
|
118
|
+
|
|
117
119
|
ApiUser.getPublicConfig(
|
|
118
|
-
'menu-setting',
|
|
120
|
+
widget.formData.menu_refer || 'menu-setting',
|
|
119
121
|
'manager',
|
|
120
122
|
(window as any).appName
|
|
121
123
|
).then(res => {
|
|
@@ -137,6 +139,9 @@ export class Sy02 {
|
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
function loopItems(data: any, show_border: boolean) {
|
|
142
|
+
if(PdClass.isShoppingPage()){
|
|
143
|
+
return ``
|
|
144
|
+
}
|
|
140
145
|
return data
|
|
141
146
|
.map((dd: any) => {
|
|
142
147
|
return html`
|
|
@@ -260,7 +265,7 @@ background: ${colors.bgr ?? '#000'};overflow-x: hidden;`,
|
|
|
260
265
|
const vm = {
|
|
261
266
|
data: [],
|
|
262
267
|
};
|
|
263
|
-
ApiUser.getPublicConfig('menu-setting', 'manager', (window as any).appName).then(res => {
|
|
268
|
+
ApiUser.getPublicConfig(widget.formData.menu_refer || 'menu-setting', 'manager', (window as any).appName).then(res => {
|
|
264
269
|
vm.data = res.response.value[Language.getLanguage()];
|
|
265
270
|
gvc.notifyDataChange(id);
|
|
266
271
|
});
|
|
@@ -268,6 +273,9 @@ background: ${colors.bgr ?? '#000'};overflow-x: hidden;`,
|
|
|
268
273
|
bind: id,
|
|
269
274
|
view: () => {
|
|
270
275
|
function loopItems(data: any) {
|
|
276
|
+
if(PdClass.isShoppingPage()){
|
|
277
|
+
return ``
|
|
278
|
+
}
|
|
271
279
|
return data
|
|
272
280
|
.map((dd: any) => {
|
|
273
281
|
return html` <li class="nav-item dropdown">
|
|
@@ -368,6 +376,9 @@ padding-bottom: 2px;
|
|
|
368
376
|
return {
|
|
369
377
|
bind: vm.id,
|
|
370
378
|
view: () => {
|
|
379
|
+
if(PdClass.isShoppingPage()){
|
|
380
|
+
return ``
|
|
381
|
+
}
|
|
371
382
|
if (!vm.toggle) {
|
|
372
383
|
return html`<i
|
|
373
384
|
class="fa-regular fa-magnifying-glass"
|
|
@@ -8,6 +8,7 @@ import { LanguageView } from '../public/language-view.js';
|
|
|
8
8
|
import { HeaderClass } from './header-class.js';
|
|
9
9
|
import { HeadInitial } from './head-initial.js';
|
|
10
10
|
import { HeaderMobile } from './header-mobile.js';
|
|
11
|
+
import { PdClass } from '../product/pd-class.js';
|
|
11
12
|
const html = String.raw;
|
|
12
13
|
export class Sy03 {
|
|
13
14
|
static main(gvc, widget, subData) {
|
|
@@ -37,7 +38,7 @@ export class Sy03 {
|
|
|
37
38
|
>
|
|
38
39
|
<!--手機版選單-->
|
|
39
40
|
<div
|
|
40
|
-
class="
|
|
41
|
+
class=" align-items-center justify-content-center ${PdClass.isShoppingPage() ? `d-none` : `d-flex d-lg-none`} "
|
|
41
42
|
style="width:45px !important;height:40px !important;"
|
|
42
43
|
onclick="${gvc.event(() => {
|
|
43
44
|
gvc.glitter.setDrawer(gvc.bindView(() => {
|
|
@@ -100,7 +101,7 @@ export class Sy03 {
|
|
|
100
101
|
const vm = {
|
|
101
102
|
data: [],
|
|
102
103
|
};
|
|
103
|
-
ApiUser.getPublicConfig('menu-setting', 'manager', window.appName).then(res => {
|
|
104
|
+
ApiUser.getPublicConfig(widget.formData.menu_refer || 'menu-setting', 'manager', window.appName).then(res => {
|
|
104
105
|
vm.data = res.response.value[Language.getLanguage()];
|
|
105
106
|
gvc.notifyDataChange(id);
|
|
106
107
|
});
|
|
@@ -118,6 +119,9 @@ export class Sy03 {
|
|
|
118
119
|
loop(vm.data);
|
|
119
120
|
}
|
|
120
121
|
function loopItems(data, show_border) {
|
|
122
|
+
if (PdClass.isShoppingPage()) {
|
|
123
|
+
return ``;
|
|
124
|
+
}
|
|
121
125
|
return data
|
|
122
126
|
.map((dd) => {
|
|
123
127
|
var _a, _b, _c, _d, _e;
|
|
@@ -234,7 +238,7 @@ background: ${(_a = colors.bgr) !== null && _a !== void 0 ? _a : '#000'};overflo
|
|
|
234
238
|
const vm = {
|
|
235
239
|
data: [],
|
|
236
240
|
};
|
|
237
|
-
ApiUser.getPublicConfig('menu-setting', 'manager', window.appName).then(res => {
|
|
241
|
+
ApiUser.getPublicConfig(widget.formData.menu_refer || 'menu-setting', 'manager', window.appName).then(res => {
|
|
238
242
|
vm.data = res.response.value[Language.getLanguage()];
|
|
239
243
|
gvc.notifyDataChange(id);
|
|
240
244
|
});
|
|
@@ -242,6 +246,9 @@ background: ${(_a = colors.bgr) !== null && _a !== void 0 ? _a : '#000'};overflo
|
|
|
242
246
|
bind: id,
|
|
243
247
|
view: () => {
|
|
244
248
|
function loopItems(data) {
|
|
249
|
+
if (PdClass.isShoppingPage()) {
|
|
250
|
+
return ``;
|
|
251
|
+
}
|
|
245
252
|
return data
|
|
246
253
|
.map((dd) => {
|
|
247
254
|
var _a, _b;
|
|
@@ -337,6 +344,9 @@ padding-bottom: 2px;
|
|
|
337
344
|
bind: vm.id,
|
|
338
345
|
view: () => {
|
|
339
346
|
var _a, _b;
|
|
347
|
+
if (PdClass.isShoppingPage()) {
|
|
348
|
+
return ``;
|
|
349
|
+
}
|
|
340
350
|
if (!vm.toggle) {
|
|
341
351
|
return html `<i
|
|
342
352
|
class="fa-regular fa-magnifying-glass"
|