ts-glitter 13.8.55 → 13.8.56
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 +59 -106
- package/lowcode/backend-manager/bg-blog.ts +38 -84
- package/lowcode/backend-manager/bg-product.js +5 -5
- package/lowcode/backend-manager/bg-product.ts +6 -6
- package/lowcode/cms-plugin/ai-message.js +1 -1
- package/lowcode/cms-plugin/ai-message.ts +1 -1
- package/lowcode/cms-plugin/shopping-product-setting.js +1 -1
- package/lowcode/cms-plugin/shopping-product-setting.ts +1 -1
- package/lowcode/cms-plugin/shopping-product-stock.js +3 -2
- package/lowcode/cms-plugin/shopping-product-stock.ts +4 -2
- package/lowcode/glitter-base/route/shopping.js +1 -0
- package/lowcode/glitter-base/route/shopping.ts +2 -0
- package/package.json +1 -1
- package/src/api-public/controllers/shop.js +1 -0
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +1 -0
- package/src/api-public/services/shopping.d.ts +1 -0
- package/src/api-public/services/shopping.js +8 -0
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +9 -0
package/lowcode/Entry.js
CHANGED
|
@@ -64,7 +64,7 @@ export class Entry {
|
|
|
64
64
|
}
|
|
65
65
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
66
66
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
67
|
-
glitter.share.editerVersion = 'V_13.8.
|
|
67
|
+
glitter.share.editerVersion = 'V_13.8.56';
|
|
68
68
|
glitter.share.start = new Date();
|
|
69
69
|
const vm = {
|
|
70
70
|
appConfig: [],
|
package/lowcode/Entry.ts
CHANGED
|
@@ -64,7 +64,7 @@ export class Entry {
|
|
|
64
64
|
}
|
|
65
65
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
66
66
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
67
|
-
glitter.share.editerVersion = 'V_13.8.
|
|
67
|
+
glitter.share.editerVersion = 'V_13.8.56';
|
|
68
68
|
glitter.share.start = new Date();
|
|
69
69
|
const vm: {
|
|
70
70
|
appConfig: any;
|
|
@@ -11,7 +11,6 @@ import { EditorElem } from '../glitterBundle/plugins/editor-elem.js';
|
|
|
11
11
|
import { BgWidget } from './bg-widget.js';
|
|
12
12
|
import { ApiUser } from '../glitter-base/route/user.js';
|
|
13
13
|
import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
|
|
14
|
-
import { ApiPageConfig } from '../api/pageConfig.js';
|
|
15
14
|
import { Article } from '../glitter-base/route/article.js';
|
|
16
15
|
import { MenusSetting } from '../cms-plugin/menus-setting.js';
|
|
17
16
|
import { BaseApi } from '../glitterBundle/api/base.js';
|
|
@@ -278,115 +277,69 @@ export class BgBlog {
|
|
|
278
277
|
return gvc.bindView(() => {
|
|
279
278
|
let data = undefined;
|
|
280
279
|
const id = gvc.glitter.getUUID();
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
preview_image: null,
|
|
307
|
-
appName: 'shop_template_black_style',
|
|
308
|
-
template_type: 2,
|
|
309
|
-
template_config: {
|
|
310
|
-
tag: ['頁面範例'],
|
|
311
|
-
desc: '',
|
|
312
|
-
name: '空白內容',
|
|
313
|
-
image: ['https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1709282671899-BLANK PAGE.jpg'],
|
|
314
|
-
status: 'wait',
|
|
315
|
-
post_to: 'all',
|
|
316
|
-
version: '1.0',
|
|
317
|
-
created_by: 'liondesign.io',
|
|
318
|
-
preview_img: '',
|
|
319
|
-
},
|
|
320
|
-
},
|
|
321
|
-
].concat(data.response.result.data);
|
|
322
|
-
gvc.notifyDataChange(id);
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
else {
|
|
326
|
-
Article.get({
|
|
327
|
-
page: 0,
|
|
328
|
-
limit: 20,
|
|
329
|
-
search: ``,
|
|
330
|
-
for_index: `false`,
|
|
331
|
-
status: '0,1',
|
|
332
|
-
page_type: page_tab,
|
|
333
|
-
app_name: 't_1726217714800',
|
|
334
|
-
}).then((dd) => {
|
|
335
|
-
data = {
|
|
336
|
-
response: {
|
|
337
|
-
result: {
|
|
338
|
-
data: [
|
|
339
|
-
{
|
|
340
|
-
id: 20739,
|
|
341
|
-
userID: '234285319',
|
|
342
|
-
tag: 'empty',
|
|
280
|
+
Article.get({
|
|
281
|
+
page: 0,
|
|
282
|
+
limit: 20,
|
|
283
|
+
search: ``,
|
|
284
|
+
for_index: `false`,
|
|
285
|
+
status: '0,1',
|
|
286
|
+
page_type: page_tab,
|
|
287
|
+
app_name: 't_1726217714800',
|
|
288
|
+
}).then((dd) => {
|
|
289
|
+
data = {
|
|
290
|
+
response: {
|
|
291
|
+
result: {
|
|
292
|
+
data: [
|
|
293
|
+
{
|
|
294
|
+
id: 20739,
|
|
295
|
+
userID: '234285319',
|
|
296
|
+
tag: 'empty',
|
|
297
|
+
name: '空白內容',
|
|
298
|
+
page_type: 'page',
|
|
299
|
+
preview_image: null,
|
|
300
|
+
appName: 'shop_template_black_style',
|
|
301
|
+
template_type: 2,
|
|
302
|
+
template_config: {
|
|
303
|
+
tag: ['頁面範例'],
|
|
304
|
+
desc: '',
|
|
343
305
|
name: '空白內容',
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
desc: '',
|
|
351
|
-
name: '空白內容',
|
|
352
|
-
image: ['https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1709282671899-BLANK PAGE.jpg'],
|
|
353
|
-
status: 'wait',
|
|
354
|
-
post_to: 'all',
|
|
355
|
-
version: '1.0',
|
|
356
|
-
created_by: 'liondesign.io',
|
|
357
|
-
preview_img: '',
|
|
358
|
-
},
|
|
306
|
+
image: ['https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1709282671899-BLANK PAGE.jpg'],
|
|
307
|
+
status: 'wait',
|
|
308
|
+
post_to: 'all',
|
|
309
|
+
version: '1.0',
|
|
310
|
+
created_by: 'liondesign.io',
|
|
311
|
+
preview_img: '',
|
|
359
312
|
},
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
313
|
+
},
|
|
314
|
+
].concat(dd.response.data.map((dd) => {
|
|
315
|
+
return {
|
|
316
|
+
id: 20739,
|
|
317
|
+
userID: '234285319',
|
|
318
|
+
tag: dd.content.tag,
|
|
319
|
+
name: dd.content.name,
|
|
320
|
+
page_type: 'page',
|
|
321
|
+
preview_image: null,
|
|
322
|
+
_config: dd.content.config,
|
|
323
|
+
appName: 't_1726217714800',
|
|
324
|
+
template_type: 2,
|
|
325
|
+
template_config: {
|
|
326
|
+
tag: [],
|
|
327
|
+
desc: '',
|
|
365
328
|
name: dd.content.name,
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
image: [dd.content.seo.image],
|
|
376
|
-
status: 'wait',
|
|
377
|
-
post_to: 'all',
|
|
378
|
-
version: '1.0',
|
|
379
|
-
created_by: 'liondesign.io',
|
|
380
|
-
preview_img: '',
|
|
381
|
-
},
|
|
382
|
-
};
|
|
383
|
-
})),
|
|
384
|
-
},
|
|
329
|
+
image: [dd.content.seo.image],
|
|
330
|
+
status: 'wait',
|
|
331
|
+
post_to: 'all',
|
|
332
|
+
version: '1.0',
|
|
333
|
+
created_by: 'liondesign.io',
|
|
334
|
+
preview_img: '',
|
|
335
|
+
},
|
|
336
|
+
};
|
|
337
|
+
})),
|
|
385
338
|
},
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
}
|
|
339
|
+
},
|
|
340
|
+
};
|
|
341
|
+
gvc.notifyDataChange(id);
|
|
342
|
+
});
|
|
390
343
|
return {
|
|
391
344
|
bind: id,
|
|
392
345
|
view: () => {
|
|
@@ -315,85 +315,41 @@ export class BgBlog {
|
|
|
315
315
|
return gvc.bindView(() => {
|
|
316
316
|
let data: any = undefined;
|
|
317
317
|
const id = gvc.glitter.getUUID();
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
preview_image: null,
|
|
344
|
-
appName: 'shop_template_black_style',
|
|
345
|
-
template_type: 2,
|
|
346
|
-
template_config: {
|
|
347
|
-
tag: ['頁面範例'],
|
|
348
|
-
desc: '',
|
|
349
|
-
name: '空白內容',
|
|
350
|
-
image: ['https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1709282671899-BLANK PAGE.jpg'],
|
|
351
|
-
status: 'wait',
|
|
352
|
-
post_to: 'all',
|
|
353
|
-
version: '1.0',
|
|
354
|
-
created_by: 'liondesign.io',
|
|
355
|
-
preview_img: '',
|
|
356
|
-
},
|
|
357
|
-
},
|
|
358
|
-
].concat(data.response.result.data);
|
|
359
|
-
gvc.notifyDataChange(id);
|
|
360
|
-
});
|
|
361
|
-
} else {
|
|
362
|
-
Article.get({
|
|
363
|
-
page: 0,
|
|
364
|
-
limit: 20,
|
|
365
|
-
search: ``,
|
|
366
|
-
for_index: `false`,
|
|
367
|
-
status: '0,1',
|
|
368
|
-
page_type: page_tab,
|
|
369
|
-
app_name: 't_1726217714800',
|
|
370
|
-
}).then((dd) => {
|
|
371
|
-
data = {
|
|
372
|
-
response: {
|
|
373
|
-
result: {
|
|
374
|
-
data: [
|
|
375
|
-
{
|
|
376
|
-
id: 20739,
|
|
377
|
-
userID: '234285319',
|
|
378
|
-
tag: 'empty',
|
|
318
|
+
Article.get({
|
|
319
|
+
page: 0,
|
|
320
|
+
limit: 20,
|
|
321
|
+
search: ``,
|
|
322
|
+
for_index: `false`,
|
|
323
|
+
status: '0,1',
|
|
324
|
+
page_type: page_tab,
|
|
325
|
+
app_name: 't_1726217714800',
|
|
326
|
+
}).then((dd) => {
|
|
327
|
+
data = {
|
|
328
|
+
response: {
|
|
329
|
+
result: {
|
|
330
|
+
data: [
|
|
331
|
+
{
|
|
332
|
+
id: 20739,
|
|
333
|
+
userID: '234285319',
|
|
334
|
+
tag: 'empty',
|
|
335
|
+
name: '空白內容',
|
|
336
|
+
page_type: 'page',
|
|
337
|
+
preview_image: null,
|
|
338
|
+
appName: 'shop_template_black_style',
|
|
339
|
+
template_type: 2,
|
|
340
|
+
template_config: {
|
|
341
|
+
tag: ['頁面範例'],
|
|
342
|
+
desc: '',
|
|
379
343
|
name: '空白內容',
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
desc: '',
|
|
387
|
-
name: '空白內容',
|
|
388
|
-
image: ['https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1709282671899-BLANK PAGE.jpg'],
|
|
389
|
-
status: 'wait',
|
|
390
|
-
post_to: 'all',
|
|
391
|
-
version: '1.0',
|
|
392
|
-
created_by: 'liondesign.io',
|
|
393
|
-
preview_img: '',
|
|
394
|
-
},
|
|
344
|
+
image: ['https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1709282671899-BLANK PAGE.jpg'],
|
|
345
|
+
status: 'wait',
|
|
346
|
+
post_to: 'all',
|
|
347
|
+
version: '1.0',
|
|
348
|
+
created_by: 'liondesign.io',
|
|
349
|
+
preview_img: '',
|
|
395
350
|
},
|
|
396
|
-
|
|
351
|
+
},
|
|
352
|
+
].concat(
|
|
397
353
|
dd.response.data.map((dd: any) => {
|
|
398
354
|
return {
|
|
399
355
|
id: 20739,
|
|
@@ -418,14 +374,12 @@ export class BgBlog {
|
|
|
418
374
|
},
|
|
419
375
|
};
|
|
420
376
|
})
|
|
421
|
-
|
|
422
|
-
},
|
|
377
|
+
),
|
|
423
378
|
},
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
}
|
|
379
|
+
},
|
|
380
|
+
};
|
|
381
|
+
gvc.notifyDataChange(id);
|
|
382
|
+
});
|
|
429
383
|
|
|
430
384
|
return {
|
|
431
385
|
bind: id,
|
|
@@ -6,7 +6,7 @@ const html = String.raw;
|
|
|
6
6
|
export class BgProduct {
|
|
7
7
|
static variantsSelector(obj) {
|
|
8
8
|
let add_items = [];
|
|
9
|
-
return
|
|
9
|
+
return window.parent.glitter.innerDialog((gvc) => {
|
|
10
10
|
return html `
|
|
11
11
|
<div class="bg-white shadow rounded-3 ">
|
|
12
12
|
<div class="px-3" style="max-height: calc(100vh - 100px);overflow-y: auto;">
|
|
@@ -14,14 +14,14 @@ export class BgProduct {
|
|
|
14
14
|
title: '選擇商品',
|
|
15
15
|
select_data: add_items,
|
|
16
16
|
select_mode: true,
|
|
17
|
-
filter_variants: obj.filter_variants
|
|
18
|
-
})}
|
|
17
|
+
filter_variants: obj.filter_variants
|
|
18
|
+
}, 'hidden')}
|
|
19
19
|
</div>
|
|
20
20
|
<div class="c_dialog_bar">
|
|
21
|
-
${BgWidget.cancel(
|
|
21
|
+
${BgWidget.cancel(gvc.event(() => {
|
|
22
22
|
gvc.closeDialog();
|
|
23
23
|
}))}
|
|
24
|
-
${BgWidget.save(
|
|
24
|
+
${BgWidget.save(gvc.event(() => {
|
|
25
25
|
obj.callback(add_items);
|
|
26
26
|
gvc.closeDialog();
|
|
27
27
|
}), '確認')}
|
|
@@ -19,9 +19,9 @@ type CollectionItem = {
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export class BgProduct {
|
|
22
|
-
static variantsSelector(obj: { gvc: GVC; title?: string; filter_variants: string[]; callback: (value: any) => void }) {
|
|
22
|
+
static variantsSelector(obj: { gvc: GVC; title?: string; filter_variants: string[]; callback: (value: any) => void,show_mode:'hidden'|'all' }) {
|
|
23
23
|
let add_items: any = [];
|
|
24
|
-
return
|
|
24
|
+
return (window.parent as any).glitter.innerDialog((gvc: GVC) => {
|
|
25
25
|
return html`
|
|
26
26
|
<div class="bg-white shadow rounded-3 ">
|
|
27
27
|
<div class="px-3" style="max-height: calc(100vh - 100px);overflow-y: auto;">
|
|
@@ -29,17 +29,17 @@ export class BgProduct {
|
|
|
29
29
|
title: '選擇商品',
|
|
30
30
|
select_data: add_items,
|
|
31
31
|
select_mode: true,
|
|
32
|
-
filter_variants: obj.filter_variants
|
|
33
|
-
})}
|
|
32
|
+
filter_variants: obj.filter_variants
|
|
33
|
+
},'hidden')}
|
|
34
34
|
</div>
|
|
35
35
|
<div class="c_dialog_bar">
|
|
36
36
|
${BgWidget.cancel(
|
|
37
|
-
|
|
37
|
+
gvc.event(() => {
|
|
38
38
|
gvc.closeDialog();
|
|
39
39
|
})
|
|
40
40
|
)}
|
|
41
41
|
${BgWidget.save(
|
|
42
|
-
|
|
42
|
+
gvc.event(() => {
|
|
43
43
|
obj.callback(add_items);
|
|
44
44
|
gvc.closeDialog();
|
|
45
45
|
}),
|
|
@@ -97,7 +97,7 @@ export class AiMessage {
|
|
|
97
97
|
|
|
98
98
|
|
|
99
99
|
public static toggle() {
|
|
100
|
-
(window as any).glitter.
|
|
100
|
+
AiMessage.setDrawer((window.parent as any).glitter.pageConfig[(window.parent as any).glitter.pageConfig.length-1].gvc);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
public static detail(cf: {
|
|
@@ -12,8 +12,8 @@ export class StockList {
|
|
|
12
12
|
title: '庫存管理',
|
|
13
13
|
select_data: [],
|
|
14
14
|
select_mode: false,
|
|
15
|
-
filter_variants: []
|
|
16
|
-
}) {
|
|
15
|
+
filter_variants: []
|
|
16
|
+
}, productType) {
|
|
17
17
|
const glitter = gvc.glitter;
|
|
18
18
|
const vm = {
|
|
19
19
|
id: glitter.getUUID(),
|
|
@@ -231,6 +231,7 @@ export class StockList {
|
|
|
231
231
|
collection: vm.filter.collection,
|
|
232
232
|
stockCount: vm.filter.count,
|
|
233
233
|
accurate_search_collection: true,
|
|
234
|
+
productType: productType
|
|
234
235
|
}).then((data) => {
|
|
235
236
|
vm.dataList = data.response.data;
|
|
236
237
|
vmi.pageSize = Math.ceil(data.response.total / limit);
|
|
@@ -40,8 +40,9 @@ export class StockList {
|
|
|
40
40
|
title: '庫存管理',
|
|
41
41
|
select_data: [],
|
|
42
42
|
select_mode: false,
|
|
43
|
-
filter_variants: []
|
|
44
|
-
}
|
|
43
|
+
filter_variants: []
|
|
44
|
+
},
|
|
45
|
+
productType:'product' | 'addProduct' | 'giveaway' | 'hidden'
|
|
45
46
|
) {
|
|
46
47
|
const glitter = gvc.glitter;
|
|
47
48
|
|
|
@@ -285,6 +286,7 @@ export class StockList {
|
|
|
285
286
|
collection: vm.filter.collection,
|
|
286
287
|
stockCount: vm.filter.count,
|
|
287
288
|
accurate_search_collection: true,
|
|
289
|
+
productType:productType
|
|
288
290
|
}).then((data) => {
|
|
289
291
|
vm.dataList = data.response.data;
|
|
290
292
|
vmi.pageSize = Math.ceil(data.response.total / limit);
|
|
@@ -738,6 +738,7 @@ export class ApiShop {
|
|
|
738
738
|
json.orderBy && par.push(`order_by=${json.orderBy}`);
|
|
739
739
|
json.id_list && par.push(`id_list=${json.id_list}`);
|
|
740
740
|
json.searchType && par.push(`searchType=${json.searchType}`);
|
|
741
|
+
json.productType && par.push(`productType=${json.productType}`);
|
|
741
742
|
if (json.stockCount && json.stockCount.key !== '') {
|
|
742
743
|
par.push(`stockCount=${json.stockCount.key},${json.stockCount.value}`);
|
|
743
744
|
}
|
|
@@ -945,6 +945,7 @@ export class ApiShop {
|
|
|
945
945
|
orderBy?: string;
|
|
946
946
|
status?: string;
|
|
947
947
|
stockCount?: { key: string; value: string };
|
|
948
|
+
productType?:'product' | 'addProduct' | 'giveaway' | 'hidden'
|
|
948
949
|
}) {
|
|
949
950
|
return BaseApi.create({
|
|
950
951
|
url:
|
|
@@ -959,6 +960,7 @@ export class ApiShop {
|
|
|
959
960
|
json.orderBy && par.push(`order_by=${json.orderBy}`);
|
|
960
961
|
json.id_list && par.push(`id_list=${json.id_list}`);
|
|
961
962
|
json.searchType && par.push(`searchType=${json.searchType}`);
|
|
963
|
+
json.productType && par.push(`productType=${json.productType}`);
|
|
962
964
|
if (json.stockCount && json.stockCount.key !== '') {
|
|
963
965
|
par.push(`stockCount=${json.stockCount.key},${json.stockCount.value}`);
|
|
964
966
|
}
|
package/package.json
CHANGED
|
@@ -771,6 +771,7 @@ router.get('/product/variants', async (req, resp) => {
|
|
|
771
771
|
id_list: req.query.id_list,
|
|
772
772
|
order_by: req.query.order_by,
|
|
773
773
|
stockCount: req.query.stockCount,
|
|
774
|
+
productType: req.query.productType
|
|
774
775
|
});
|
|
775
776
|
return response_1.default.succ(resp, shopping);
|
|
776
777
|
}
|