ts-glitter 13.8.1 → 13.8.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 +59 -51
- package/lowcode/Entry.ts +85 -80
- package/lowcode/backend-manager/bg-guide.js +209 -170
- package/lowcode/backend-manager/bg-guide.ts +281 -216
- package/lowcode/backend-manager/bg-widget.js +953 -691
- package/lowcode/backend-manager/bg-widget.ts +1739 -1378
- package/lowcode/cms-plugin/ai-message.js +243 -195
- package/lowcode/cms-plugin/ai-message.ts +399 -342
- package/lowcode/cms-plugin/shopping-finance-setting.js +196 -151
- package/lowcode/cms-plugin/shopping-finance-setting.ts +836 -779
- package/lowcode/cms-plugin/shopping-product-text.js +700 -73
- package/lowcode/cms-plugin/shopping-product-text.ts +721 -56
- package/lowcode/cms-plugin/shopping-shipment-setting.js +15 -9
- package/lowcode/cms-plugin/shopping-shipment-setting.ts +15 -9
- package/lowcode/css/editor.css +25 -0
- package/lowcode/dialog/image-preview.js +7 -5
- package/lowcode/dialog/image-preview.ts +16 -8
- package/lowcode/glitter-base/route/shopping.js +28 -0
- package/lowcode/glitter-base/route/shopping.ts +28 -0
- package/lowcode/glitterBundle/Glitter.js +1 -0
- package/lowcode/glitterBundle/Glitter.ts +1 -0
- package/lowcode/glitterBundle/dialog/dialog.js +1 -1
- package/lowcode/glitterBundle/dialog/dialog.ts +1 -1
- package/lowcode/glitterBundle/module/html-generate.js +178 -175
- package/lowcode/glitterBundle/module/html-generate.ts +856 -899
- package/lowcode/jspage/editor.js +50 -40
- package/lowcode/jspage/editor.ts +598 -545
- package/lowcode/jspage/function-page/setting_editor.js +214 -225
- package/lowcode/jspage/function-page/setting_editor.ts +222 -239
- package/lowcode/jspage/main.js +8 -6
- package/lowcode/jspage/main.ts +9 -8
- package/lowcode/official_view_component/official/component.js +2 -2
- package/lowcode/official_view_component/official/component.ts +2 -2
- package/lowcode/public-components/product/product-list.js +651 -0
- package/lowcode/public-components/product/product-list.ts +709 -0
- package/lowcode/view-model/saas-view-model.js +1 -1
- package/lowcode/view-model/saas-view-model.ts +1 -1
- package/package.json +1 -1
- package/src/api-public/controllers/ai-chat.js +15 -1
- package/src/api-public/controllers/ai-chat.js.map +1 -1
- package/src/api-public/controllers/ai-chat.ts +15 -2
- package/src/api-public/controllers/chat.js.map +1 -1
- package/src/api-public/services/ai-robot.d.ts +25 -0
- package/src/api-public/services/ai-robot.js +233 -23
- package/src/api-public/services/ai-robot.js.map +1 -1
- package/src/api-public/services/ai-robot.ts +258 -51
- package/src/api-public/services/chat.js +25 -23
- package/src/api-public/services/chat.js.map +1 -1
- package/src/api-public/services/chat.ts +26 -23
- package/src/api-public/services/fake-data-model/fake-order.js.map +1 -1
- package/src/api-public/services/fb-message.js.map +1 -1
- package/src/api-public/services/notify.js +8 -0
- package/src/api-public/services/notify.js.map +1 -1
- package/src/api-public/services/notify.ts +8 -0
- package/src/controllers/ai.js.map +1 -1
- package/src/helper/glitter-util.d.ts +1 -0
- package/src/helper/glitter-util.js.map +1 -1
- package/src/modules/database.d.ts +0 -1
- package/src/modules/database.js.map +1 -1
- package/src/services/template.js.map +1 -1
- package/src/update-script.js.map +1 -1
- package/w6ppvcb8yb.json +1 -0
package/lowcode/Entry.js
CHANGED
|
@@ -13,7 +13,7 @@ import { ApiPageConfig } from './api/pageConfig.js';
|
|
|
13
13
|
import { BaseApi } from './glitterBundle/api/base.js';
|
|
14
14
|
import { GlobalUser } from './glitter-base/global/global-user.js';
|
|
15
15
|
import { EditorConfig } from './editor-config.js';
|
|
16
|
-
import { ShareDialog } from
|
|
16
|
+
import { ShareDialog } from './glitterBundle/dialog/ShareDialog.js';
|
|
17
17
|
export class Entry {
|
|
18
18
|
static onCreate(glitter) {
|
|
19
19
|
var _a;
|
|
@@ -49,9 +49,18 @@ export class Entry {
|
|
|
49
49
|
scroll-behavior: auto !important;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
<<<<<<< HEAD
|
|
53
|
+
.hide-elem {
|
|
54
|
+
display: none !important;
|
|
55
|
+
}
|
|
56
|
+
=======
|
|
52
57
|
.hide-elem {
|
|
53
58
|
display: none !important;
|
|
54
59
|
}
|
|
60
|
+
.hy-drawer-left {
|
|
61
|
+
left:-1000px !important;
|
|
62
|
+
}
|
|
63
|
+
>>>>>>> d311c294 (update glitter version)
|
|
55
64
|
`);
|
|
56
65
|
if (glitter.getUrlParameter('appName')) {
|
|
57
66
|
window.appName = glitter.getUrlParameter('appName');
|
|
@@ -59,8 +68,8 @@ export class Entry {
|
|
|
59
68
|
}
|
|
60
69
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
61
70
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
62
|
-
glitter.share.editerVersion =
|
|
63
|
-
glitter.share.start =
|
|
71
|
+
glitter.share.editerVersion = 'V_13.8.4';
|
|
72
|
+
glitter.share.start = new Date();
|
|
64
73
|
const vm = {
|
|
65
74
|
appConfig: [],
|
|
66
75
|
};
|
|
@@ -72,12 +81,14 @@ export class Entry {
|
|
|
72
81
|
config.token = GlobalUser.saas_token;
|
|
73
82
|
Entry.resourceInitial(glitter, vm, (dd) => __awaiter(this, void 0, void 0, function* () {
|
|
74
83
|
glitter.addStyle(`
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
84
|
+
${parseInt(window.parent.glitter.share.bottom_inset, 10)
|
|
85
|
+
? `
|
|
86
|
+
.update-bar-container {
|
|
87
|
+
padding-bottom: ${window.parent.glitter.share.bottom_inset}px !important;
|
|
88
|
+
}
|
|
89
|
+
`
|
|
90
|
+
: ``}
|
|
91
|
+
|
|
81
92
|
.editorParent .editorChild {
|
|
82
93
|
display: none;
|
|
83
94
|
}
|
|
@@ -102,11 +113,9 @@ export class Entry {
|
|
|
102
113
|
width: 100%;
|
|
103
114
|
height: 100%;
|
|
104
115
|
pointer-events: none;
|
|
105
|
-
|
|
106
116
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
117
|
+
.editor_item.active {
|
|
118
|
+
background: #ddd;
|
|
110
119
|
}
|
|
111
120
|
.editorItemActive {
|
|
112
121
|
display: block !important;
|
|
@@ -117,7 +126,6 @@ export class Entry {
|
|
|
117
126
|
width: 100%;
|
|
118
127
|
height: 100%;
|
|
119
128
|
position: absolute;
|
|
120
|
-
|
|
121
129
|
}
|
|
122
130
|
|
|
123
131
|
.editorItemActive > .badge_it {
|
|
@@ -140,29 +148,26 @@ export class Entry {
|
|
|
140
148
|
position: relative;
|
|
141
149
|
}
|
|
142
150
|
.sel_normal {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
151
|
+
cursor: pointer;
|
|
152
|
+
border-radius: 7px;
|
|
153
|
+
border: 1px solid #ddd;
|
|
154
|
+
padding: 2px 14px;
|
|
155
|
+
background: #fff;
|
|
156
|
+
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
|
|
157
|
+
}
|
|
150
158
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
+
ul {
|
|
160
|
+
list-style: none;
|
|
161
|
+
}
|
|
162
|
+
li {
|
|
163
|
+
list-style: none;
|
|
164
|
+
}
|
|
159
165
|
`);
|
|
160
166
|
yield Entry.globalStyle(glitter, dd);
|
|
161
167
|
if (glitter.getUrlParameter('type') === 'editor') {
|
|
162
168
|
const dialog = new ShareDialog(glitter);
|
|
163
169
|
dialog.dataLoading({ visible: true, text: '後台載入中' });
|
|
164
|
-
Entry.toBackendEditor(glitter, () => {
|
|
165
|
-
});
|
|
170
|
+
Entry.toBackendEditor(glitter, () => { });
|
|
166
171
|
}
|
|
167
172
|
else if (glitter.getUrlParameter('type') === 'htmlEditor') {
|
|
168
173
|
Entry.toHtmlEditor(glitter, vm, () => {
|
|
@@ -217,9 +222,14 @@ export class Entry {
|
|
|
217
222
|
glitter.share.evalPlace = (evals) => eval(evals);
|
|
218
223
|
function running() {
|
|
219
224
|
return __awaiter(this, void 0, void 0, function* () {
|
|
220
|
-
glitter.addStyleLink([
|
|
225
|
+
glitter.addStyleLink([
|
|
226
|
+
'assets/vendor/boxicons/css/boxicons.min.css',
|
|
227
|
+
'assets/css/theme.css',
|
|
228
|
+
'css/editor.css',
|
|
229
|
+
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/classic.min.css',
|
|
221
230
|
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/monolith.min.css',
|
|
222
|
-
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/nano.min.css'
|
|
231
|
+
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/nano.min.css',
|
|
232
|
+
]);
|
|
223
233
|
yield new Promise((resolve, reject) => {
|
|
224
234
|
glitter.addMtScript([
|
|
225
235
|
'jslib/pickr.min.js',
|
|
@@ -250,7 +260,7 @@ export class Entry {
|
|
|
250
260
|
appName: config.appName,
|
|
251
261
|
tag: glitter.getUrlParameter('page'),
|
|
252
262
|
});
|
|
253
|
-
if (data.response.result.length === 0 &&
|
|
263
|
+
if (data.response.result.length === 0 && glitter.getUrlParameter('page') !== 'cms') {
|
|
254
264
|
glitter.setUrlParameter('page', data.response.redirect);
|
|
255
265
|
}
|
|
256
266
|
glitter.setHome('jspage/main.js', glitter.getUrlParameter('page'), {
|
|
@@ -287,9 +297,7 @@ export class Entry {
|
|
|
287
297
|
{
|
|
288
298
|
src: 'https://kit.fontawesome.com/cccedec0f8.js',
|
|
289
299
|
},
|
|
290
|
-
], () => {
|
|
291
|
-
}, () => {
|
|
292
|
-
});
|
|
300
|
+
], () => { }, () => { });
|
|
293
301
|
glitter.addStyle(`
|
|
294
302
|
@media (prefers-reduced-motion: no-preference) {
|
|
295
303
|
:root {
|
|
@@ -323,9 +331,7 @@ export class Entry {
|
|
|
323
331
|
src: `${glitter.htmlGenerate.configureCDN(glitter.htmlGenerate.resourceHook(dd.js))}`,
|
|
324
332
|
type: 'module',
|
|
325
333
|
};
|
|
326
|
-
}), () => {
|
|
327
|
-
}, () => {
|
|
328
|
-
}, [{ key: 'async', value: 'true' }]);
|
|
334
|
+
}), () => { }, () => { }, [{ key: 'async', value: 'true' }]);
|
|
329
335
|
glitter.htmlGenerate.loadScript(glitter, window.parent.editerData.setting
|
|
330
336
|
.filter((dd) => {
|
|
331
337
|
return ['widget', 'container', 'code'].indexOf(dd.type) === -1;
|
|
@@ -389,8 +395,7 @@ export class Entry {
|
|
|
389
395
|
.map((dd) => {
|
|
390
396
|
return {
|
|
391
397
|
src: `${glitter.htmlGenerate.configureCDN(glitter.htmlGenerate.resourceHook(dd.js))}`,
|
|
392
|
-
callback: () => {
|
|
393
|
-
},
|
|
398
|
+
callback: () => { },
|
|
394
399
|
};
|
|
395
400
|
}));
|
|
396
401
|
function authPass() {
|
|
@@ -446,17 +451,20 @@ export class Entry {
|
|
|
446
451
|
glitter.share.initial_fonts = [];
|
|
447
452
|
if (glitter.share.font_theme[0]) {
|
|
448
453
|
glitter.addStyle(`
|
|
449
|
-
@charset "UTF-8";
|
|
450
|
-
${glitter.share.font_theme
|
|
454
|
+
@charset "UTF-8";
|
|
455
|
+
${glitter.share.font_theme
|
|
456
|
+
.map((dd) => {
|
|
451
457
|
glitter.share.initial_fonts.push(dd.value);
|
|
452
458
|
return `@import url('https://fonts.googleapis.com/css2?family=${dd.value}&display=swap');`;
|
|
453
|
-
})
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
459
|
+
})
|
|
460
|
+
.join('\n')}
|
|
461
|
+
body {
|
|
462
|
+
font-family: '${glitter.share.font_theme[0].value}' !important;
|
|
463
|
+
font-optical-sizing: auto;
|
|
464
|
+
font-style: normal;
|
|
465
|
+
color: #393939;
|
|
466
|
+
}
|
|
467
|
+
`);
|
|
460
468
|
}
|
|
461
469
|
function loopCheckGlobalValue(array, tag) {
|
|
462
470
|
try {
|
package/lowcode/Entry.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import {Glitter} from './glitterBundle/Glitter.js';
|
|
3
|
-
import {config} from './config.js';
|
|
4
|
-
import {ApiPageConfig} from './api/pageConfig.js';
|
|
5
|
-
import {BaseApi} from './glitterBundle/api/base.js';
|
|
6
|
-
import {GlobalUser} from './glitter-base/global/global-user.js';
|
|
7
|
-
import {EditorConfig} from './editor-config.js';
|
|
8
|
-
import {ShareDialog} from
|
|
2
|
+
import { Glitter } from './glitterBundle/Glitter.js';
|
|
3
|
+
import { config } from './config.js';
|
|
4
|
+
import { ApiPageConfig } from './api/pageConfig.js';
|
|
5
|
+
import { BaseApi } from './glitterBundle/api/base.js';
|
|
6
|
+
import { GlobalUser } from './glitter-base/global/global-user.js';
|
|
7
|
+
import { EditorConfig } from './editor-config.js';
|
|
8
|
+
import { ShareDialog } from './glitterBundle/dialog/ShareDialog.js';
|
|
9
9
|
|
|
10
10
|
export class Entry {
|
|
11
11
|
public static onCreate(glitter: Glitter) {
|
|
12
|
-
|
|
13
|
-
glitter.share.
|
|
14
|
-
glitter.share.bottom_inset = 0
|
|
12
|
+
glitter.share.top_inset = 0;
|
|
13
|
+
glitter.share.bottom_inset = 0;
|
|
15
14
|
glitter.share.reload_code_hash = function () {
|
|
16
15
|
const hashCode = (window as any).preloadData.eval_code_hash || {};
|
|
17
16
|
Object.keys(hashCode).map((dd, index) => {
|
|
@@ -50,9 +49,18 @@ export class Entry {
|
|
|
50
49
|
scroll-behavior: auto !important;
|
|
51
50
|
}
|
|
52
51
|
}
|
|
52
|
+
<<<<<<< HEAD
|
|
53
|
+
.hide-elem {
|
|
54
|
+
display: none !important;
|
|
55
|
+
}
|
|
56
|
+
=======
|
|
53
57
|
.hide-elem {
|
|
54
58
|
display: none !important;
|
|
55
59
|
}
|
|
60
|
+
.hy-drawer-left {
|
|
61
|
+
left:-1000px !important;
|
|
62
|
+
}
|
|
63
|
+
>>>>>>> d311c294 (update glitter version)
|
|
56
64
|
`);
|
|
57
65
|
if (glitter.getUrlParameter('appName')) {
|
|
58
66
|
(window as any).appName = glitter.getUrlParameter('appName');
|
|
@@ -60,8 +68,8 @@ export class Entry {
|
|
|
60
68
|
}
|
|
61
69
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
62
70
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
63
|
-
glitter.share.editerVersion =
|
|
64
|
-
glitter.share.start =
|
|
71
|
+
glitter.share.editerVersion = 'V_13.8.4';
|
|
72
|
+
glitter.share.start = new Date();
|
|
65
73
|
const vm: {
|
|
66
74
|
appConfig: any;
|
|
67
75
|
} = {
|
|
@@ -78,12 +86,16 @@ export class Entry {
|
|
|
78
86
|
// 資源初始化
|
|
79
87
|
Entry.resourceInitial(glitter, vm, async (dd) => {
|
|
80
88
|
glitter.addStyle(`
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
89
|
+
${
|
|
90
|
+
parseInt((window.parent as any).glitter.share.bottom_inset, 10)
|
|
91
|
+
? `
|
|
92
|
+
.update-bar-container {
|
|
93
|
+
padding-bottom: ${(window.parent as any).glitter.share.bottom_inset}px !important;
|
|
94
|
+
}
|
|
95
|
+
`
|
|
96
|
+
: ``
|
|
97
|
+
}
|
|
98
|
+
|
|
87
99
|
.editorParent .editorChild {
|
|
88
100
|
display: none;
|
|
89
101
|
}
|
|
@@ -108,11 +120,9 @@ export class Entry {
|
|
|
108
120
|
width: 100%;
|
|
109
121
|
height: 100%;
|
|
110
122
|
pointer-events: none;
|
|
111
|
-
|
|
112
123
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
124
|
+
.editor_item.active {
|
|
125
|
+
background: #ddd;
|
|
116
126
|
}
|
|
117
127
|
.editorItemActive {
|
|
118
128
|
display: block !important;
|
|
@@ -123,7 +133,6 @@ export class Entry {
|
|
|
123
133
|
width: 100%;
|
|
124
134
|
height: 100%;
|
|
125
135
|
position: absolute;
|
|
126
|
-
|
|
127
136
|
}
|
|
128
137
|
|
|
129
138
|
.editorItemActive > .badge_it {
|
|
@@ -146,32 +155,29 @@ export class Entry {
|
|
|
146
155
|
position: relative;
|
|
147
156
|
}
|
|
148
157
|
.sel_normal {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
border-radius: 7px;
|
|
160
|
+
border: 1px solid #ddd;
|
|
161
|
+
padding: 2px 14px;
|
|
162
|
+
background: #fff;
|
|
163
|
+
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
|
|
164
|
+
}
|
|
156
165
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
166
|
+
ul {
|
|
167
|
+
list-style: none;
|
|
168
|
+
}
|
|
169
|
+
li {
|
|
170
|
+
list-style: none;
|
|
171
|
+
}
|
|
165
172
|
`);
|
|
166
173
|
|
|
167
174
|
// 載入全域資源
|
|
168
175
|
await Entry.globalStyle(glitter, dd);
|
|
169
176
|
if (glitter.getUrlParameter('type') === 'editor') {
|
|
170
|
-
const dialog = new ShareDialog(glitter)
|
|
171
|
-
dialog.dataLoading({visible: true, text: '後台載入中'})
|
|
177
|
+
const dialog = new ShareDialog(glitter);
|
|
178
|
+
dialog.dataLoading({ visible: true, text: '後台載入中' });
|
|
172
179
|
// 頁面編輯器
|
|
173
|
-
Entry.toBackendEditor(glitter, () => {
|
|
174
|
-
});
|
|
180
|
+
Entry.toBackendEditor(glitter, () => {});
|
|
175
181
|
} else if (glitter.getUrlParameter('type') === 'htmlEditor') {
|
|
176
182
|
// Iframe預覽區塊
|
|
177
183
|
Entry.toHtmlEditor(glitter, vm, () => {
|
|
@@ -213,7 +219,6 @@ export class Entry {
|
|
|
213
219
|
|
|
214
220
|
// 跳轉至頁面編輯器
|
|
215
221
|
public static toBackendEditor(glitter: Glitter, callback: () => void) {
|
|
216
|
-
|
|
217
222
|
glitter.addStyle(`
|
|
218
223
|
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100..900&family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');
|
|
219
224
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -229,11 +234,15 @@ export class Entry {
|
|
|
229
234
|
glitter.share.EditorMode = true;
|
|
230
235
|
glitter.share.evalPlace = (evals: string) => eval(evals);
|
|
231
236
|
|
|
232
|
-
|
|
233
237
|
async function running() {
|
|
234
|
-
glitter.addStyleLink([
|
|
238
|
+
glitter.addStyleLink([
|
|
239
|
+
'assets/vendor/boxicons/css/boxicons.min.css',
|
|
240
|
+
'assets/css/theme.css',
|
|
241
|
+
'css/editor.css',
|
|
242
|
+
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/classic.min.css',
|
|
235
243
|
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/monolith.min.css',
|
|
236
|
-
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/nano.min.css'
|
|
244
|
+
'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/nano.min.css',
|
|
245
|
+
]);
|
|
237
246
|
await new Promise((resolve, reject) => {
|
|
238
247
|
glitter.addMtScript(
|
|
239
248
|
[
|
|
@@ -261,7 +270,6 @@ export class Entry {
|
|
|
261
270
|
(window as any).root.classList.add('light-mode');
|
|
262
271
|
|
|
263
272
|
function toNext() {
|
|
264
|
-
|
|
265
273
|
console.log(`to-next-time:`, (window as any).renderClock.stop());
|
|
266
274
|
running().then(async () => {
|
|
267
275
|
{
|
|
@@ -271,7 +279,7 @@ export class Entry {
|
|
|
271
279
|
tag: glitter.getUrlParameter('page'),
|
|
272
280
|
});
|
|
273
281
|
// console.log(`data===>`,data)
|
|
274
|
-
if (data.response.result.length === 0 &&
|
|
282
|
+
if (data.response.result.length === 0 && glitter.getUrlParameter('page') !== 'cms') {
|
|
275
283
|
glitter.setUrlParameter('page', data.response.redirect);
|
|
276
284
|
}
|
|
277
285
|
|
|
@@ -317,10 +325,8 @@ export class Entry {
|
|
|
317
325
|
src: 'https://kit.fontawesome.com/cccedec0f8.js',
|
|
318
326
|
},
|
|
319
327
|
],
|
|
320
|
-
() => {
|
|
321
|
-
}
|
|
322
|
-
() => {
|
|
323
|
-
}
|
|
328
|
+
() => {},
|
|
329
|
+
() => {}
|
|
324
330
|
);
|
|
325
331
|
glitter.addStyle(`
|
|
326
332
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -361,11 +367,9 @@ export class Entry {
|
|
|
361
367
|
type: 'module',
|
|
362
368
|
};
|
|
363
369
|
}),
|
|
364
|
-
() => {
|
|
365
|
-
},
|
|
366
|
-
|
|
367
|
-
},
|
|
368
|
-
[{key: 'async', value: 'true'}]
|
|
370
|
+
() => {},
|
|
371
|
+
() => {},
|
|
372
|
+
[{ key: 'async', value: 'true' }]
|
|
369
373
|
);
|
|
370
374
|
|
|
371
375
|
// Preload page script
|
|
@@ -386,22 +390,21 @@ export class Entry {
|
|
|
386
390
|
return eval(evals);
|
|
387
391
|
};
|
|
388
392
|
setTimeout(() => {
|
|
389
|
-
(window.parent as any).glitter.share.loading_dialog.dataLoading({text: '', visible: false})
|
|
390
|
-
}, 2000)
|
|
393
|
+
(window.parent as any).glitter.share.loading_dialog.dataLoading({ text: '', visible: false });
|
|
394
|
+
}, 2000);
|
|
391
395
|
glitter.htmlGenerate.setHome({
|
|
392
396
|
app_config: vm.appConfig,
|
|
393
397
|
page_config: (window.parent as any).page_config ?? {},
|
|
394
398
|
get config() {
|
|
395
|
-
return (window.parent as any).editerData.setting
|
|
399
|
+
return (window.parent as any).editerData.setting;
|
|
396
400
|
},
|
|
397
401
|
get editMode() {
|
|
398
|
-
return (window.parent as any).editerData
|
|
402
|
+
return (window.parent as any).editerData;
|
|
399
403
|
},
|
|
400
404
|
data: {},
|
|
401
405
|
tag: (window.parent as any).glitter.getUrlParameter('page'),
|
|
402
406
|
});
|
|
403
407
|
|
|
404
|
-
|
|
405
408
|
callback();
|
|
406
409
|
}
|
|
407
410
|
|
|
@@ -442,8 +445,7 @@ export class Entry {
|
|
|
442
445
|
.map((dd: any) => {
|
|
443
446
|
return {
|
|
444
447
|
src: `${glitter.htmlGenerate.configureCDN(glitter.htmlGenerate.resourceHook(dd.js))}`,
|
|
445
|
-
callback: () => {
|
|
446
|
-
},
|
|
448
|
+
callback: () => {},
|
|
447
449
|
};
|
|
448
450
|
})
|
|
449
451
|
);
|
|
@@ -494,8 +496,8 @@ export class Entry {
|
|
|
494
496
|
glitter.share.globalStyle = {};
|
|
495
497
|
const config = glitter.share.appConfigresponse.response.data;
|
|
496
498
|
config.color_theme = config.color_theme ?? [];
|
|
497
|
-
config.container_theme = config.container_theme ?? []
|
|
498
|
-
config.font_theme = config.font_theme ?? []
|
|
499
|
+
config.container_theme = config.container_theme ?? [];
|
|
500
|
+
config.font_theme = config.font_theme ?? [];
|
|
499
501
|
config.globalValue = config.globalValue ?? [];
|
|
500
502
|
config.globalStyleTag = config.globalStyleTag ?? [];
|
|
501
503
|
config.color_theme.map((dd: any, index: number) => {
|
|
@@ -503,22 +505,25 @@ export class Entry {
|
|
|
503
505
|
glitter.share.globalValue[`theme_color.${index}.${d2.key}`] = dd[d2.key];
|
|
504
506
|
});
|
|
505
507
|
});
|
|
506
|
-
glitter.share.font_theme = config.font_theme
|
|
507
|
-
glitter.share.global_container_theme = config.container_theme
|
|
508
|
-
glitter.share.initial_fonts = []
|
|
508
|
+
glitter.share.font_theme = config.font_theme;
|
|
509
|
+
glitter.share.global_container_theme = config.container_theme;
|
|
510
|
+
glitter.share.initial_fonts = [];
|
|
509
511
|
if (glitter.share.font_theme[0]) {
|
|
510
512
|
glitter.addStyle(`
|
|
511
|
-
@charset "UTF-8";
|
|
512
|
-
${glitter.share.font_theme
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
513
|
+
@charset "UTF-8";
|
|
514
|
+
${glitter.share.font_theme
|
|
515
|
+
.map((dd: any) => {
|
|
516
|
+
glitter.share.initial_fonts.push(dd.value);
|
|
517
|
+
return `@import url('https://fonts.googleapis.com/css2?family=${dd.value}&display=swap');`;
|
|
518
|
+
})
|
|
519
|
+
.join('\n')}
|
|
520
|
+
body {
|
|
521
|
+
font-family: '${glitter.share.font_theme[0].value}' !important;
|
|
522
|
+
font-optical-sizing: auto;
|
|
523
|
+
font-style: normal;
|
|
524
|
+
color: #393939;
|
|
525
|
+
}
|
|
526
|
+
`);
|
|
522
527
|
}
|
|
523
528
|
|
|
524
529
|
function loopCheckGlobalValue(array: any, tag: string) {
|