ts-glitter 21.8.3 → 21.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 +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-dialog.js +342 -100
- package/lowcode/backend-manager/bg-dialog.ts +432 -145
- package/lowcode/backend-manager/bg-widget.js +4 -4
- package/lowcode/backend-manager/bg-widget.ts +5 -5
- package/lowcode/cms-plugin/shopping-discount-setting.js +148 -92
- package/lowcode/cms-plugin/shopping-discount-setting.ts +162 -111
- package/lowcode/cms-plugin/shopping-product-stock.js +58 -45
- package/lowcode/cms-plugin/shopping-product-stock.ts +66 -49
- package/lowcode/css/editor.css +8 -9
- package/lowcode/editor/basic-component.js +0 -10
- package/lowcode/editor/basic-component.ts +1 -11
- package/lowcode/glitter-base/route/article.js +50 -51
- package/lowcode/glitter-base/route/article.ts +102 -103
- package/lowcode/glitter-base/route/recommend.js +1 -0
- package/lowcode/glitter-base/route/recommend.ts +141 -123
- package/lowcode/glitterBundle/plugins/html-render.js +2 -0
- package/lowcode/glitterBundle/plugins/html-render.ts +1 -0
- package/lowcode/jspage/function-page/tool-setting.js +0 -1
- package/lowcode/jspage/function-page/tool-setting.ts +0 -1
- package/lowcode/jspage/main.js +6 -1
- package/lowcode/jspage/main.ts +6 -1
- package/lowcode/modules/image-library-clone.ts +2 -0
- package/lowcode/modules/image-library.js +118 -155
- package/lowcode/modules/image-library.ts +134 -197
- package/lowcode/official_view_component/official/component.js +1 -1
- package/lowcode/official_view_component/official/component.ts +1 -1
- package/lowcode/public-components/banner/first-banner.js +85 -50
- package/lowcode/public-components/banner/first-banner.ts +96 -59
- package/lowcode/public-components/layout-plugin/social-links-01.js +23 -44
- package/lowcode/public-components/layout-plugin/social-links-01.ts +23 -48
- package/package.json +1 -1
- package/src/api-public/controllers/article.js +11 -0
- package/src/api-public/controllers/article.js.map +1 -1
- package/src/api-public/controllers/article.ts +13 -0
- package/src/api-public/controllers/recommend.js +1 -0
- package/src/api-public/controllers/recommend.js.map +1 -1
- package/src/api-public/controllers/recommend.ts +99 -89
- package/src/api-public/services/checkout-event.js +4 -3
- package/src/api-public/services/checkout-event.js.map +1 -1
- package/src/api-public/services/checkout-event.ts +11 -7
- package/src/api-public/services/post.js +7 -17
- package/src/api-public/services/post.js.map +1 -1
- package/src/api-public/services/recommend.d.ts +1 -0
- package/src/api-public/services/recommend.js +12 -2
- package/src/api-public/services/recommend.js.map +1 -1
- package/src/api-public/services/recommend.ts +375 -354
- package/src/api-public/services/shopping.d.ts +1 -0
- package/src/api-public/services/shopping.js +4 -2
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +7 -2
|
@@ -14,6 +14,7 @@ export class ApiRecommend {
|
|
|
14
14
|
let par = [`limit=${json.limit}`, `page=${json.page}`];
|
|
15
15
|
json.user_id && par.push(`user_id=${json.user_id}`);
|
|
16
16
|
json.code && par.push(`code=${json.code}`);
|
|
17
|
+
json.id_list && par.push(`id_list=${json.id_list}`);
|
|
17
18
|
return par.join('&');
|
|
18
19
|
})()}`,
|
|
19
20
|
type: 'GET',
|
|
@@ -1,141 +1,159 @@
|
|
|
1
1
|
import { BaseApi } from '../../glitterBundle/api/base.js';
|
|
2
2
|
|
|
3
3
|
function getConfig() {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const saasConfig: { config: any; api: any } = (window.parent as any).saasConfig;
|
|
5
|
+
return saasConfig;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
function getBaseUrl() {
|
|
9
|
-
|
|
9
|
+
return getConfig().config.url;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export class ApiRecommend {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
public static getList(json: {
|
|
14
|
+
data: any;
|
|
15
|
+
limit: number;
|
|
16
|
+
page: number;
|
|
17
|
+
user_id?: number;
|
|
18
|
+
token?: string;
|
|
19
|
+
code?: string;
|
|
20
|
+
id_list?: string;
|
|
21
|
+
}) {
|
|
22
|
+
return BaseApi.create({
|
|
23
|
+
url:
|
|
24
|
+
getBaseUrl() +
|
|
25
|
+
`/api-public/v1/recommend/list?${(() => {
|
|
26
|
+
let par = [`limit=${json.limit}`, `page=${json.page}`];
|
|
27
|
+
json.user_id && par.push(`user_id=${json.user_id}`);
|
|
28
|
+
json.code && par.push(`code=${json.code}`);
|
|
29
|
+
json.id_list && par.push(`id_list=${json.id_list}`);
|
|
30
|
+
return par.join('&');
|
|
31
|
+
})()}`,
|
|
32
|
+
type: 'GET',
|
|
33
|
+
headers: {
|
|
34
|
+
'Content-Type': 'application/json',
|
|
35
|
+
'g-app': getConfig().config.appName,
|
|
36
|
+
Authorization: json.token || getConfig().config.token,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
}
|
|
31
40
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
public static postListData(cf: { data: any; token?: string }) {
|
|
42
|
+
return BaseApi.create({
|
|
43
|
+
url: getBaseUrl() + `/api-public/v1/recommend/list`,
|
|
44
|
+
type: 'POST',
|
|
45
|
+
headers: {
|
|
46
|
+
'Content-Type': 'application/json',
|
|
47
|
+
'g-app': getConfig().config.appName,
|
|
48
|
+
Authorization: cf.token || getConfig().config.token,
|
|
49
|
+
},
|
|
50
|
+
data: JSON.stringify(cf.data),
|
|
51
|
+
});
|
|
52
|
+
}
|
|
44
53
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
public static putListData(cf: { id: number; data: any; token?: string }) {
|
|
55
|
+
return BaseApi.create({
|
|
56
|
+
url: getBaseUrl() + `/api-public/v1/recommend/list/${cf.id}`,
|
|
57
|
+
type: 'PUT',
|
|
58
|
+
headers: {
|
|
59
|
+
'Content-Type': 'application/json',
|
|
60
|
+
'g-app': getConfig().config.appName,
|
|
61
|
+
Authorization: cf.token || getConfig().config.token,
|
|
62
|
+
},
|
|
63
|
+
data: JSON.stringify(cf.data),
|
|
64
|
+
});
|
|
65
|
+
}
|
|
57
66
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
public static toggleListData(cf: { id: number; token?: string }) {
|
|
68
|
+
return BaseApi.create({
|
|
69
|
+
url: getBaseUrl() + `/api-public/v1/recommend/list/toggle/${cf.id}`,
|
|
70
|
+
type: 'POST',
|
|
71
|
+
headers: {
|
|
72
|
+
'Content-Type': 'application/json',
|
|
73
|
+
'g-app': getConfig().config.appName,
|
|
74
|
+
Authorization: cf.token || getConfig().config.token,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
}
|
|
69
78
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
public static deleteLinkData(cf: { data: { id: number[] }; token?: string }) {
|
|
80
|
+
return BaseApi.create({
|
|
81
|
+
url: getBaseUrl() + `/api-public/v1/recommend/list`,
|
|
82
|
+
type: 'DELETE',
|
|
83
|
+
headers: {
|
|
84
|
+
'Content-Type': 'application/json',
|
|
85
|
+
'g-app': getConfig().config.appName,
|
|
86
|
+
Authorization: cf.token || getConfig().config.token,
|
|
87
|
+
},
|
|
88
|
+
data: JSON.stringify(cf.data),
|
|
89
|
+
});
|
|
90
|
+
}
|
|
82
91
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
92
|
+
public static getUsers(json: {
|
|
93
|
+
data: any;
|
|
94
|
+
limit: number;
|
|
95
|
+
page: number;
|
|
96
|
+
type?: string;
|
|
97
|
+
token?: string;
|
|
98
|
+
search?: string;
|
|
99
|
+
searchType?: string;
|
|
100
|
+
orderBy?: string;
|
|
101
|
+
}) {
|
|
102
|
+
return BaseApi.create({
|
|
103
|
+
url:
|
|
104
|
+
getBaseUrl() +
|
|
105
|
+
`/api-public/v1/recommend/user?${(() => {
|
|
106
|
+
let par = [`limit=${json.limit}`, `page=${json.page}`];
|
|
107
|
+
json.search && par.push(`search=${json.search}`);
|
|
108
|
+
json.searchType && par.push(`searchType=${json.searchType}`);
|
|
109
|
+
json.orderBy && par.push(`orderBy=${json.orderBy}`);
|
|
110
|
+
return par.join('&');
|
|
111
|
+
})()}`,
|
|
112
|
+
type: 'GET',
|
|
113
|
+
headers: {
|
|
114
|
+
'Content-Type': 'application/json',
|
|
115
|
+
'g-app': getConfig().config.appName,
|
|
116
|
+
Authorization: json.token || getConfig().config.token,
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
}
|
|
102
120
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
121
|
+
public static postUserData(cf: { data: any; token?: string }) {
|
|
122
|
+
return BaseApi.create({
|
|
123
|
+
url: getBaseUrl() + `/api-public/v1/recommend/user`,
|
|
124
|
+
type: 'POST',
|
|
125
|
+
headers: {
|
|
126
|
+
'Content-Type': 'application/json',
|
|
127
|
+
'g-app': getConfig().config.appName,
|
|
128
|
+
Authorization: cf.token || getConfig().config.token,
|
|
129
|
+
},
|
|
130
|
+
data: JSON.stringify(cf.data),
|
|
131
|
+
});
|
|
132
|
+
}
|
|
115
133
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
134
|
+
public static putUserData(cf: { id: number; data: any; token?: string }) {
|
|
135
|
+
return BaseApi.create({
|
|
136
|
+
url: getBaseUrl() + `/api-public/v1/recommend/user/${cf.id}`,
|
|
137
|
+
type: 'PUT',
|
|
138
|
+
headers: {
|
|
139
|
+
'Content-Type': 'application/json',
|
|
140
|
+
'g-app': getConfig().config.appName,
|
|
141
|
+
Authorization: cf.token || getConfig().config.token,
|
|
142
|
+
},
|
|
143
|
+
data: JSON.stringify(cf.data),
|
|
144
|
+
});
|
|
145
|
+
}
|
|
128
146
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
147
|
+
public static deleteUserData(cf: { data: { id: number[] }; token?: string }) {
|
|
148
|
+
return BaseApi.create({
|
|
149
|
+
url: getBaseUrl() + `/api-public/v1/recommend/user`,
|
|
150
|
+
type: 'DELETE',
|
|
151
|
+
headers: {
|
|
152
|
+
'Content-Type': 'application/json',
|
|
153
|
+
'g-app': getConfig().config.appName,
|
|
154
|
+
Authorization: cf.token || getConfig().config.token,
|
|
155
|
+
},
|
|
156
|
+
data: JSON.stringify(cf.data),
|
|
157
|
+
});
|
|
158
|
+
}
|
|
141
159
|
}
|
|
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { init } from '../GVController.js';
|
|
11
11
|
import { TriggerEvent } from './trigger-event.js';
|
|
12
12
|
import { GlobalUser } from '../../glitter-base/global/global-user.js';
|
|
13
|
+
import { FirstBanner } from '../../public-components/banner/first-banner.js';
|
|
13
14
|
import { Language } from '../../glitter-base/global/language.js';
|
|
14
15
|
import { ApplicationConfig } from '../../application-config.js';
|
|
15
16
|
const html = String.raw;
|
|
@@ -90,6 +91,7 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
90
91
|
return {
|
|
91
92
|
onCreateView: () => {
|
|
92
93
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
94
|
+
FirstBanner.main({ gvc: gvc });
|
|
93
95
|
if (gBundle.page_config.seo && gBundle.page_config.seo.type === 'custom' && gBundle.page_config.seo.title) {
|
|
94
96
|
glitter.setUrlParameter('', undefined, [
|
|
95
97
|
(_a = gBundle.page_config.seo.title_prefix) !== null && _a !== void 0 ? _a : '',
|
|
@@ -76,6 +76,7 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
76
76
|
|
|
77
77
|
return {
|
|
78
78
|
onCreateView: () => {
|
|
79
|
+
FirstBanner.main({ gvc: gvc });
|
|
79
80
|
//定義SEO TITLE
|
|
80
81
|
if (gBundle.page_config.seo && gBundle.page_config.seo.type === 'custom' && gBundle.page_config.seo.title) {
|
|
81
82
|
glitter.setUrlParameter(
|
|
@@ -173,7 +173,6 @@ export class ToolSetting {
|
|
|
173
173
|
const htmlGenerate = new gvc.glitter.htmlGenerate(widget_container, [], {
|
|
174
174
|
editor_updated_callback: (oWidget) => {
|
|
175
175
|
if (dd.tag === '廣告輪播') {
|
|
176
|
-
console.log(`oWidget==>`, oWidget);
|
|
177
176
|
FirstBanner.main({
|
|
178
177
|
gvc: document.querySelector('.iframe_view').contentWindow.glitter.pageConfig[0].gvc,
|
|
179
178
|
ed_widget: oWidget,
|
|
@@ -213,7 +213,6 @@ export class ToolSetting {
|
|
|
213
213
|
{
|
|
214
214
|
editor_updated_callback: (oWidget: any) => {
|
|
215
215
|
if (dd.tag === '廣告輪播') {
|
|
216
|
-
console.log(`oWidget==>`,oWidget)
|
|
217
216
|
FirstBanner.main({
|
|
218
217
|
gvc: (document.querySelector('.iframe_view') as any).contentWindow.glitter.pageConfig[0].gvc,
|
|
219
218
|
ed_widget: oWidget,
|
package/lowcode/jspage/main.js
CHANGED
|
@@ -743,7 +743,12 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
743
743
|
src: `fa-sharp fa-regular fa-globe guide-user-editor-11-icon`,
|
|
744
744
|
index: 'color',
|
|
745
745
|
hint: '全站樣式',
|
|
746
|
-
}
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
src: `fa-regular fa-grid-2 design-guide-1-icon`,
|
|
749
|
+
index: 'widget',
|
|
750
|
+
hint: '設計元件',
|
|
751
|
+
},
|
|
747
752
|
]
|
|
748
753
|
.filter(dd => {
|
|
749
754
|
if (gvc.glitter.getUrlParameter('device') === 'mobile') {
|
package/lowcode/jspage/main.ts
CHANGED
|
@@ -804,7 +804,12 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
804
804
|
src: `fa-sharp fa-regular fa-globe guide-user-editor-11-icon`,
|
|
805
805
|
index: 'color',
|
|
806
806
|
hint: '全站樣式',
|
|
807
|
-
}
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
src: `fa-regular fa-grid-2 design-guide-1-icon`,
|
|
810
|
+
index: 'widget',
|
|
811
|
+
hint: '設計元件',
|
|
812
|
+
},
|
|
808
813
|
]
|
|
809
814
|
.filter(dd => {
|
|
810
815
|
if (gvc.glitter.getUrlParameter('device') === 'mobile') {
|