ts-glitter 13.4.8 → 13.5.0
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 -2
- package/lowcode/backend-manager/bg-blog.js +691 -761
- package/lowcode/backend-manager/bg-blog.ts +956 -1041
- package/lowcode/backend-manager/bg-graph-api.js +3 -3
- package/lowcode/backend-manager/bg-graph-api.ts +3 -5
- package/lowcode/backend-manager/bg-guide.js +69 -24
- package/lowcode/backend-manager/bg-guide.ts +82 -27
- package/lowcode/backend-manager/bg-line.js +18 -18
- package/lowcode/backend-manager/bg-line.ts +18 -35
- package/lowcode/backend-manager/bg-notify.js +18 -18
- package/lowcode/backend-manager/bg-notify.ts +18 -34
- package/lowcode/backend-manager/bg-project.js +11 -11
- package/lowcode/backend-manager/bg-project.ts +11 -20
- package/lowcode/backend-manager/bg-recommend.js +656 -652
- package/lowcode/backend-manager/bg-recommend.ts +31 -40
- package/lowcode/backend-manager/bg-seo.js +25 -20
- package/lowcode/backend-manager/bg-seo.ts +121 -105
- package/lowcode/backend-manager/bg-shopping.js +14 -14
- package/lowcode/backend-manager/bg-shopping.ts +14 -25
- package/lowcode/backend-manager/bg-sns.js +18 -18
- package/lowcode/backend-manager/bg-sns.ts +18 -34
- package/lowcode/backend-manager/bg-wallet.js +5 -5
- package/lowcode/backend-manager/bg-wallet.ts +5 -7
- package/lowcode/backend-manager/bg-widget.js +25 -14
- package/lowcode/backend-manager/bg-widget.ts +43 -17
- package/lowcode/cms-plugin/ai-points-list.js +54 -57
- package/lowcode/cms-plugin/ai-points-list.ts +55 -63
- package/lowcode/cms-plugin/ai-points.js +2 -2
- package/lowcode/cms-plugin/ai-points.ts +2 -4
- package/lowcode/cms-plugin/app-release.js +45 -46
- package/lowcode/cms-plugin/app-release.ts +221 -209
- package/lowcode/cms-plugin/auto-reply.js +3 -3
- package/lowcode/cms-plugin/auto-reply.ts +3 -5
- package/lowcode/cms-plugin/form-setting.js +6 -6
- package/lowcode/cms-plugin/form-setting.ts +6 -10
- package/lowcode/cms-plugin/line-auto-reply.js +3 -3
- package/lowcode/cms-plugin/line-auto-reply.ts +3 -5
- package/lowcode/cms-plugin/member-group-list.js +2 -2
- package/lowcode/cms-plugin/member-group-list.ts +2 -3
- package/lowcode/cms-plugin/member-setting.js +75 -88
- package/lowcode/cms-plugin/member-setting.ts +143 -157
- package/lowcode/cms-plugin/member-type-list.js +243 -240
- package/lowcode/cms-plugin/member-type-list.ts +14 -19
- package/lowcode/cms-plugin/menus-setting.js +2 -2
- package/lowcode/cms-plugin/menus-setting.ts +2 -4
- package/lowcode/cms-plugin/permission-setting.js +17 -18
- package/lowcode/cms-plugin/permission-setting.ts +145 -147
- package/lowcode/cms-plugin/pos-checkout-setting.js +7 -10
- package/lowcode/cms-plugin/pos-checkout-setting.ts +174 -179
- package/lowcode/cms-plugin/shopping-collections.js +224 -218
- package/lowcode/cms-plugin/shopping-collections.ts +152 -153
- package/lowcode/cms-plugin/shopping-discount-setting.js +855 -852
- package/lowcode/cms-plugin/shopping-discount-setting.ts +14 -18
- package/lowcode/cms-plugin/shopping-finance-setting.js +259 -265
- package/lowcode/cms-plugin/shopping-finance-setting.ts +273 -284
- package/lowcode/cms-plugin/shopping-order-manager.js +520 -497
- package/lowcode/cms-plugin/shopping-order-manager.ts +347 -325
- package/lowcode/cms-plugin/shopping-order-return.js +10 -9
- package/lowcode/cms-plugin/shopping-order-return.ts +23 -27
- package/lowcode/cms-plugin/shopping-product-setting.js +1079 -1055
- package/lowcode/cms-plugin/shopping-product-setting.ts +348 -337
- package/lowcode/cms-plugin/shopping-product-stock.js +2 -2
- package/lowcode/cms-plugin/shopping-product-stock.ts +2 -3
- package/lowcode/cms-plugin/shopping-product-text.js +32 -36
- package/lowcode/cms-plugin/shopping-product-text.ts +78 -81
- package/lowcode/cms-plugin/shopping-rebate-setting.js +321 -316
- package/lowcode/cms-plugin/shopping-rebate-setting.ts +15 -17
- package/lowcode/cms-plugin/shopping-rebate.js +102 -59
- package/lowcode/cms-plugin/shopping-rebate.ts +110 -71
- package/lowcode/cms-plugin/shopping-shipment-setting.js +382 -426
- package/lowcode/cms-plugin/shopping-shipment-setting.ts +489 -531
- package/lowcode/cms-plugin/sms-points.js +2 -2
- package/lowcode/cms-plugin/sms-points.ts +2 -4
- package/lowcode/cms-plugin/sns-auto-reply.js +3 -3
- package/lowcode/cms-plugin/sns-auto-reply.ts +3 -5
- package/lowcode/cms-plugin/third-party-apple.js +22 -28
- package/lowcode/cms-plugin/third-party-apple.ts +189 -191
- package/lowcode/cms-plugin/third-party-facebook.js +31 -32
- package/lowcode/cms-plugin/third-party-facebook.ts +240 -234
- package/lowcode/cms-plugin/third-party-google.js +33 -29
- package/lowcode/cms-plugin/third-party-google.ts +216 -202
- package/lowcode/cms-plugin/third-party-line.js +19 -22
- package/lowcode/cms-plugin/third-party-line.ts +166 -162
- package/lowcode/cms-plugin/user-list.js +449 -441
- package/lowcode/cms-plugin/user-list.ts +63 -65
- package/lowcode/cms-plugin/user-login-setting.js +2 -2
- package/lowcode/cms-plugin/user-login-setting.ts +2 -5
- package/lowcode/cms-plugin/wallet-list.js +5 -5
- package/lowcode/cms-plugin/wallet-list.ts +5 -7
- package/lowcode/cms-plugin/web-config-setting.js +5 -5
- package/lowcode/cms-plugin/web-config-setting.ts +5 -8
- package/lowcode/cms-plugin/widget-manager.js +1 -1
- package/lowcode/cms-plugin/widget-manager.ts +1 -2
- package/lowcode/css/editor.css +12 -1
- package/lowcode/glitter-base/route/shopping.js +17 -0
- package/lowcode/glitter-base/route/shopping.ts +17 -0
- package/lowcode/glitter-base/route/user.js +2 -2
- package/lowcode/glitter-base/route/user.ts +26 -27
- package/lowcode/glitterBundle/Glitter.js +1 -1
- package/lowcode/glitterBundle/Glitter.ts +1 -1
- package/lowcode/jspage/editor.js +1 -1
- package/lowcode/jspage/editor.ts +1 -1
- package/lowcode/jspage/function-page/server-editor/router/api-manager.js +4 -4
- package/lowcode/jspage/function-page/server-editor/router/api-manager.ts +4 -6
- package/lowcode/jspage/function-page/server-editor/router/database.js +8 -8
- package/lowcode/jspage/function-page/server-editor/router/database.ts +53 -48
- package/lowcode/jspage/function-page/server-editor/router/domain-manager.js +2 -2
- package/lowcode/jspage/function-page/server-editor/router/domain-manager.ts +2 -3
- package/lowcode/jspage/function-page/server-editor/router/server-status.js +50 -38
- package/lowcode/jspage/function-page/server-editor/router/server-status.ts +93 -76
- package/lowcode/jspage/main.js +9 -5
- package/lowcode/jspage/main.ts +9 -7
- package/lowcode/view-model/saas-view-model.js +454 -285
- package/lowcode/view-model/saas-view-model.ts +917 -722
- package/package.json +1 -1
- package/src/api-public/controllers/ai-points.js.map +1 -1
- package/src/api-public/controllers/chat.js.map +1 -1
- package/src/api-public/controllers/delivery.js.map +1 -1
- package/src/api-public/controllers/fb-message.js.map +1 -1
- package/src/api-public/controllers/index.js.map +1 -1
- package/src/api-public/controllers/invoice.js.map +1 -1
- package/src/api-public/controllers/line-message.js.map +1 -1
- package/src/api-public/controllers/oauth.js.map +1 -1
- package/src/api-public/controllers/rebate.js.map +1 -1
- package/src/api-public/controllers/recommend.js.map +1 -1
- package/src/api-public/controllers/sms-points.js.map +1 -1
- package/src/api-public/controllers/wallet.js.map +1 -1
- package/src/api-public/services/EcInvoice.js.map +1 -1
- package/src/api-public/services/ai-pointes.js.map +1 -1
- package/src/api-public/services/article.js.map +1 -1
- package/src/api-public/services/auto-send-email.js.map +1 -1
- package/src/api-public/services/delivery.js.map +1 -1
- package/src/api-public/services/ezpay/tool.d.ts +0 -1
- package/src/api-public/services/ezpay/tool.js.map +1 -1
- package/src/api-public/services/fake-data-model/fake-product.js.map +1 -1
- package/src/api-public/services/fb-message.js.map +1 -5
- package/src/api-public/services/filter-protect-data.js.map +1 -1
- package/src/api-public/services/financial-service.js.map +1 -1
- package/src/api-public/services/graph-api.js.map +1 -1
- package/src/api-public/services/invoice.js.map +1 -1
- package/src/api-public/services/monitor.d.ts +0 -1
- package/src/api-public/services/monitor.js.map +1 -1
- package/src/api-public/services/public-table-check.js.map +1 -1
- package/src/api-public/services/rebate.js.map +1 -1
- package/src/api-public/services/recommend.js.map +1 -1
- package/src/api-public/services/share-permission.js.map +1 -1
- package/src/api-public/services/shopping.d.ts +1 -1
- package/src/api-public/services/shopping.js +44 -36
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +184 -183
- package/src/api-public/services/sms-pointes.js.map +1 -1
- package/src/api-public/services/sms.js.map +1 -1
- package/src/api-public/services/wallet.js.map +1 -1
- package/src/api-public/services/workers.d.ts +1 -1
- package/src/api-public/utils/ut-database.js.map +1 -1
- package/src/app-project/serverless/src/controllers/index.js.map +1 -1
- package/src/app-project/serverless/src/controllers/sample.js.map +1 -1
- package/src/app-project/serverless/src/modules/database.d.ts +1 -2
- package/src/app-project/serverless/src/modules/database.js.map +1 -1
- package/src/app-project/serverless/src/modules/exception.js.map +1 -1
- package/src/app-project/serverless/src/modules/hooks.js.map +1 -1
- package/src/app-project/serverless/src/modules/logger.js.map +1 -1
- package/src/app-project/serverless/src/modules/redis.d.ts +1 -1
- package/src/app-project/serverless/src/modules/redis.js.map +1 -1
- package/src/app-project/serverless/src/modules/response.js.map +1 -1
- package/src/app-project/serverless/src/modules/ssh.js.map +1 -1
- package/src/config.js.map +1 -5
- package/src/controllers/ai.js.map +1 -1
- package/src/controllers/global-event.js.map +1 -1
- package/src/controllers/page.js.map +1 -1
- package/src/controllers/private_config.js.map +1 -1
- package/src/export/export-test.js.map +1 -1
- package/src/firebase/message.js +1 -2
- package/src/firebase/message.js.map +1 -1
- package/src/helper/app_creater.js +1 -2
- package/src/helper/app_creater.js.map +1 -1
- package/src/helper/glitter-util.d.ts +0 -1
- package/src/helper/glitter-util.js.map +1 -1
- package/src/lambda/interface.d.ts +1 -1
- package/src/lambda/interface.js +2 -2
- package/src/lambda/interface.js.map +1 -1
- package/src/modules/exception.js.map +1 -1
- package/src/modules/hooks.js.map +1 -1
- package/src/modules/response.js.map +1 -1
- package/src/modules/ssh.js.map +1 -1
- package/src/services/ses.js +1 -2
- package/src/services/ses.js.map +1 -1
- package/src/services/system-schedule.js.map +1 -1
- package/g1b90plcfb.csv +0 -1289
|
@@ -88,7 +88,7 @@ export class BgRecommend {
|
|
|
88
88
|
if (vm.type === 'list') {
|
|
89
89
|
return BgWidget.container(
|
|
90
90
|
html`
|
|
91
|
-
<div class="
|
|
91
|
+
<div class="title-container">
|
|
92
92
|
${BgWidget.title('分銷連結')}
|
|
93
93
|
<div class="flex-fill"></div>
|
|
94
94
|
${BgWidget.darkButton(
|
|
@@ -111,8 +111,7 @@ export class BgRecommend {
|
|
|
111
111
|
})
|
|
112
112
|
)
|
|
113
113
|
)}
|
|
114
|
-
|
|
115
|
-
BgWidget.getContainerWidth()
|
|
114
|
+
`
|
|
116
115
|
);
|
|
117
116
|
} else if (vm.type === 'add') {
|
|
118
117
|
return this.editorLink({
|
|
@@ -394,7 +393,7 @@ export class BgRecommend {
|
|
|
394
393
|
if (vm.type === 'list') {
|
|
395
394
|
return BgWidget.container(
|
|
396
395
|
html`
|
|
397
|
-
<div class="
|
|
396
|
+
<div class="title-container">
|
|
398
397
|
${BgWidget.title('推薦人列表')}
|
|
399
398
|
<div class="flex-fill"></div>
|
|
400
399
|
${BgWidget.darkButton(
|
|
@@ -532,8 +531,7 @@ export class BgRecommend {
|
|
|
532
531
|
].join('')
|
|
533
532
|
)
|
|
534
533
|
)}
|
|
535
|
-
|
|
536
|
-
BgWidget.getContainerWidth()
|
|
534
|
+
`
|
|
537
535
|
);
|
|
538
536
|
} else if (vm.type === 'add') {
|
|
539
537
|
return this.editorUser({
|
|
@@ -629,7 +627,7 @@ export class BgRecommend {
|
|
|
629
627
|
}
|
|
630
628
|
return BgWidget.container(
|
|
631
629
|
[
|
|
632
|
-
html` <div class="
|
|
630
|
+
html` <div class="title-container">
|
|
633
631
|
${BgWidget.goBack(
|
|
634
632
|
gvc.event(() => {
|
|
635
633
|
cf.callback();
|
|
@@ -638,9 +636,9 @@ export class BgRecommend {
|
|
|
638
636
|
${BgWidget.title(vm.data.title || '新增分銷連結')}
|
|
639
637
|
<div class="flex-fill"></div>
|
|
640
638
|
</div>`,
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
gvc.bindView(() => {
|
|
639
|
+
BgWidget.container1x2(
|
|
640
|
+
{
|
|
641
|
+
html: gvc.bindView(() => {
|
|
644
642
|
const id = glitter.getUUID();
|
|
645
643
|
return {
|
|
646
644
|
bind: id,
|
|
@@ -689,7 +687,9 @@ export class BgRecommend {
|
|
|
689
687
|
: 'flex-direction: column; gap: 0px; '}"
|
|
690
688
|
class="w-100"
|
|
691
689
|
>
|
|
692
|
-
<div
|
|
690
|
+
<div
|
|
691
|
+
style="width:100%;padding: 9px 18px;background: #EAEAEA; justify-content: flex-start; align-items: center; gap: 5px; display: flex"
|
|
692
|
+
>
|
|
693
693
|
<div
|
|
694
694
|
style="text-align: right; color: #393939; font-size: 16px; font-family: Noto Sans; font-weight: 400; word-wrap: break-word"
|
|
695
695
|
>
|
|
@@ -1391,11 +1391,10 @@ export class BgRecommend {
|
|
|
1391
1391
|
divCreate: { class: 'p-0' },
|
|
1392
1392
|
};
|
|
1393
1393
|
}),
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
gvc.bindView(() => {
|
|
1394
|
+
ratio: 65,
|
|
1395
|
+
},
|
|
1396
|
+
{
|
|
1397
|
+
html: gvc.bindView(() => {
|
|
1399
1398
|
return {
|
|
1400
1399
|
bind: vm.noteId,
|
|
1401
1400
|
dataList: [
|
|
@@ -1461,10 +1460,9 @@ export class BgRecommend {
|
|
|
1461
1460
|
divCreate: { class: 'summary-card p-0' },
|
|
1462
1461
|
};
|
|
1463
1462
|
}),
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
</div>`,
|
|
1463
|
+
ratio: 35,
|
|
1464
|
+
}
|
|
1465
|
+
),
|
|
1468
1466
|
BgWidget.mbContainer(240),
|
|
1469
1467
|
html` <div class="update-bar-container">
|
|
1470
1468
|
${cf.data.id
|
|
@@ -1566,9 +1564,7 @@ export class BgRecommend {
|
|
|
1566
1564
|
})
|
|
1567
1565
|
)}
|
|
1568
1566
|
</div>`,
|
|
1569
|
-
].join('<div class="my-2"></div>')
|
|
1570
|
-
BgWidget.getContainerWidth(),
|
|
1571
|
-
'position: relative'
|
|
1567
|
+
].join('<div class="my-2"></div>')
|
|
1572
1568
|
);
|
|
1573
1569
|
},
|
|
1574
1570
|
onCreate: () => {
|
|
@@ -1663,18 +1659,17 @@ export class BgRecommend {
|
|
|
1663
1659
|
if (vm.type === 'user') {
|
|
1664
1660
|
return BgWidget.container(
|
|
1665
1661
|
[
|
|
1666
|
-
html` <div class="
|
|
1667
|
-
<div class="
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
${BgWidget.title(vm.data.name || '新增推薦人')}
|
|
1662
|
+
html` <div class="title-container">
|
|
1663
|
+
<div class="mt-1">
|
|
1664
|
+
${BgWidget.goBack(
|
|
1665
|
+
gvc.event(() => {
|
|
1666
|
+
cf.callback();
|
|
1667
|
+
})
|
|
1668
|
+
)}
|
|
1669
|
+
</div>
|
|
1670
|
+
<div>
|
|
1671
|
+
${BgWidget.title(vm.data.name || '新增推薦人')}${cf.data.id ? BgWidget.grayNote(`建立時間: ${Tool.convertDateTimeFormat(cf.data.created_time)}`) : ''}
|
|
1676
1672
|
</div>
|
|
1677
|
-
<div class="ms-3 mb-2">${cf.data.id ? BgWidget.grayNote(`建立時間: ${Tool.convertDateTimeFormat(cf.data.created_time)}`) : ''}</div>
|
|
1678
1673
|
</div>
|
|
1679
1674
|
<div class="flex-fill"></div>`,
|
|
1680
1675
|
html`<div class="d-flex justify-content-center ${document.body.clientWidth < 768 ? 'flex-column' : ''}" style="gap: 24px">
|
|
@@ -1765,9 +1760,7 @@ export class BgRecommend {
|
|
|
1765
1760
|
},
|
|
1766
1761
|
divCreate: { class: 'p-0' },
|
|
1767
1762
|
};
|
|
1768
|
-
})
|
|
1769
|
-
BgWidget.getContainerWidth(),
|
|
1770
|
-
'padding: 0; margin: 0 !important;'
|
|
1763
|
+
})
|
|
1771
1764
|
)}
|
|
1772
1765
|
</div>`,
|
|
1773
1766
|
BgWidget.mbContainer(240),
|
|
@@ -1847,9 +1840,7 @@ export class BgRecommend {
|
|
|
1847
1840
|
})
|
|
1848
1841
|
)}
|
|
1849
1842
|
</div>`,
|
|
1850
|
-
].join('<div class="my-2"></div>')
|
|
1851
|
-
BgWidget.getContainerWidth(),
|
|
1852
|
-
'position: relative'
|
|
1843
|
+
].join('<div class="my-2"></div>')
|
|
1853
1844
|
);
|
|
1854
1845
|
}
|
|
1855
1846
|
if (vm.type === 'link') {
|
|
@@ -7,26 +7,30 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { BgWidget } from
|
|
11
|
-
import { PageEditor } from
|
|
12
|
-
import { ApiPageConfig } from
|
|
13
|
-
import { ShareDialog } from
|
|
14
|
-
import { StoreHelper } from
|
|
10
|
+
import { BgWidget } from './bg-widget.js';
|
|
11
|
+
import { PageEditor } from '../editor/page-editor.js';
|
|
12
|
+
import { ApiPageConfig } from '../api/pageConfig.js';
|
|
13
|
+
import { ShareDialog } from '../dialog/ShareDialog.js';
|
|
14
|
+
import { StoreHelper } from '../helper/store-helper.js';
|
|
15
15
|
const html = String.raw;
|
|
16
16
|
export class BgSeo {
|
|
17
17
|
static mainPage(gvc) {
|
|
18
18
|
let selectTag = gvc.glitter.getUrlParameter('page');
|
|
19
19
|
const leftID = gvc.glitter.getUUID();
|
|
20
20
|
const rightID = gvc.glitter.getUUID();
|
|
21
|
-
let saveEvent = () => {
|
|
22
|
-
};
|
|
21
|
+
let saveEvent = () => { };
|
|
23
22
|
return BgWidget.container(html `
|
|
24
23
|
<div class="d-flex w-100 align-items-center pb-3 mb-2 border-bottom">
|
|
25
24
|
${BgWidget.title(`SEO管理`)}
|
|
26
25
|
<div class="flex-fill"></div>
|
|
27
|
-
<button
|
|
26
|
+
<button
|
|
27
|
+
class="btn btn-primary-c"
|
|
28
|
+
style="height:38px;font-size: 14px;"
|
|
29
|
+
onclick="${gvc.event(() => {
|
|
28
30
|
saveEvent();
|
|
29
|
-
})}"
|
|
31
|
+
})}"
|
|
32
|
+
>
|
|
33
|
+
儲存SEO設定
|
|
30
34
|
</button>
|
|
31
35
|
</div>
|
|
32
36
|
<div class="d-flex" style="gap:10px;">
|
|
@@ -42,15 +46,16 @@ export class BgSeo {
|
|
|
42
46
|
}, {
|
|
43
47
|
checkSelect: (data) => {
|
|
44
48
|
return data.tag === selectTag;
|
|
45
|
-
}
|
|
49
|
+
},
|
|
46
50
|
}).then((data) => {
|
|
47
51
|
resolve(data.left);
|
|
48
52
|
});
|
|
49
53
|
});
|
|
50
54
|
},
|
|
51
55
|
divCreate: {
|
|
52
|
-
class: `mx-n3 my-n2`,
|
|
53
|
-
|
|
56
|
+
class: `mx-n3 my-n2`,
|
|
57
|
+
style: `max-height:calc(100vh - 200px);overflow-y:auto;`,
|
|
58
|
+
},
|
|
54
59
|
};
|
|
55
60
|
}))}
|
|
56
61
|
</div>
|
|
@@ -64,7 +69,7 @@ export class BgSeo {
|
|
|
64
69
|
dialog.dataLoading({ visible: true });
|
|
65
70
|
const selectItem = (yield ApiPageConfig.getPage({
|
|
66
71
|
appName: window.appName,
|
|
67
|
-
tag: selectTag
|
|
72
|
+
tag: selectTag,
|
|
68
73
|
})).response.result[0];
|
|
69
74
|
dialog.dataLoading({ visible: false });
|
|
70
75
|
saveEvent = () => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -76,7 +81,7 @@ export class BgSeo {
|
|
|
76
81
|
name: selectItem.name,
|
|
77
82
|
config: selectItem.config,
|
|
78
83
|
group: selectItem.group,
|
|
79
|
-
page_config: selectItem.page_config
|
|
84
|
+
page_config: selectItem.page_config,
|
|
80
85
|
});
|
|
81
86
|
const viewModel = gvc.glitter.share.editorViewModel;
|
|
82
87
|
viewModel.appConfig.homePage = viewModel.homePage;
|
|
@@ -106,23 +111,23 @@ export class BgSeo {
|
|
|
106
111
|
},
|
|
107
112
|
get dataList() {
|
|
108
113
|
return gvc.glitter.share.editorViewModel.dataList;
|
|
109
|
-
}
|
|
114
|
+
},
|
|
110
115
|
},
|
|
111
116
|
style: {
|
|
112
117
|
style: `width:100%;`,
|
|
113
|
-
class:
|
|
118
|
+
class: ``,
|
|
114
119
|
},
|
|
115
|
-
hiddenDelete: true
|
|
120
|
+
hiddenDelete: true,
|
|
116
121
|
}));
|
|
117
122
|
}));
|
|
118
123
|
},
|
|
119
124
|
divCreate: {
|
|
120
|
-
style: `max-height:calc(100vh - 200px);overflow-y:auto
|
|
121
|
-
}
|
|
125
|
+
style: `max-height:calc(100vh - 200px);overflow-y:auto;`,
|
|
126
|
+
},
|
|
122
127
|
};
|
|
123
128
|
}), 'p-0 bg-white border rounded-3 shadow')}
|
|
124
129
|
</div>
|
|
125
130
|
</div>
|
|
126
|
-
|
|
131
|
+
`);
|
|
127
132
|
}
|
|
128
133
|
}
|
|
@@ -1,123 +1,139 @@
|
|
|
1
|
-
import {BgWidget} from
|
|
2
|
-
import {GVC} from
|
|
3
|
-
import {PageEditor} from
|
|
4
|
-
import {ApiPageConfig} from
|
|
5
|
-
import {ShareDialog} from
|
|
6
|
-
import {StoreHelper} from
|
|
1
|
+
import { BgWidget } from './bg-widget.js';
|
|
2
|
+
import { GVC } from '../glitterBundle/GVController.js';
|
|
3
|
+
import { PageEditor } from '../editor/page-editor.js';
|
|
4
|
+
import { ApiPageConfig } from '../api/pageConfig.js';
|
|
5
|
+
import { ShareDialog } from '../dialog/ShareDialog.js';
|
|
6
|
+
import { StoreHelper } from '../helper/store-helper.js';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
const html = String.raw
|
|
8
|
+
const html = String.raw;
|
|
10
9
|
|
|
11
10
|
export class BgSeo {
|
|
12
11
|
public static mainPage(gvc: GVC) {
|
|
13
|
-
let selectTag = gvc.glitter.getUrlParameter('page')
|
|
14
|
-
const leftID = gvc.glitter.getUUID()
|
|
15
|
-
const rightID = gvc.glitter.getUUID()
|
|
16
|
-
let saveEvent = () => {
|
|
17
|
-
|
|
18
|
-
}
|
|
12
|
+
let selectTag = gvc.glitter.getUrlParameter('page');
|
|
13
|
+
const leftID = gvc.glitter.getUUID();
|
|
14
|
+
const rightID = gvc.glitter.getUUID();
|
|
15
|
+
let saveEvent = () => {};
|
|
19
16
|
return BgWidget.container(html`
|
|
20
17
|
<div class="d-flex w-100 align-items-center pb-3 mb-2 border-bottom">
|
|
21
18
|
${BgWidget.title(`SEO管理`)}
|
|
22
19
|
<div class="flex-fill"></div>
|
|
23
|
-
<button
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
<button
|
|
21
|
+
class="btn btn-primary-c"
|
|
22
|
+
style="height:38px;font-size: 14px;"
|
|
23
|
+
onclick="${gvc.event(() => {
|
|
24
|
+
saveEvent();
|
|
25
|
+
})}"
|
|
26
|
+
>
|
|
27
|
+
儲存SEO設定
|
|
26
28
|
</button>
|
|
27
29
|
</div>
|
|
28
30
|
<div class="d-flex" style="gap:10px;">
|
|
29
31
|
<div style="width:300px;" class="">
|
|
30
|
-
${BgWidget.card(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
32
|
+
${BgWidget.card(
|
|
33
|
+
gvc.bindView(() => {
|
|
34
|
+
return {
|
|
35
|
+
bind: leftID,
|
|
36
|
+
view: () => {
|
|
37
|
+
return new Promise((resolve, reject) => {
|
|
38
|
+
PageEditor.pageSelctor(
|
|
39
|
+
gvc,
|
|
40
|
+
(d3: any) => {
|
|
41
|
+
selectTag = d3.tag;
|
|
42
|
+
gvc.notifyDataChange([leftID, rightID]);
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
checkSelect: (data: any) => {
|
|
46
|
+
return data.tag === selectTag;
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
).then((data) => {
|
|
50
|
+
resolve(data.left);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
divCreate: {
|
|
55
|
+
class: `mx-n3 my-n2`,
|
|
56
|
+
style: `max-height:calc(100vh - 200px);overflow-y:auto;`,
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
})
|
|
60
|
+
)}
|
|
52
61
|
</div>
|
|
53
62
|
<div class="flex-fill">
|
|
54
|
-
${BgWidget.card(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
gvc: gvc,
|
|
96
|
-
id: gvc.glitter.getUUID(),
|
|
97
|
-
vid: '',
|
|
98
|
-
viewModel: {
|
|
99
|
-
get selectItem() {
|
|
100
|
-
return selectItem
|
|
101
|
-
},
|
|
102
|
-
get dataList() {
|
|
103
|
-
return gvc.glitter.share.editorViewModel.dataList
|
|
63
|
+
${BgWidget.card(
|
|
64
|
+
gvc.bindView(() => {
|
|
65
|
+
return {
|
|
66
|
+
bind: rightID,
|
|
67
|
+
view: () => {
|
|
68
|
+
return new Promise(async (resolve, reject) => {
|
|
69
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
70
|
+
dialog.dataLoading({ visible: true });
|
|
71
|
+
const selectItem = (
|
|
72
|
+
await ApiPageConfig.getPage({
|
|
73
|
+
appName: (window as any).appName,
|
|
74
|
+
tag: selectTag,
|
|
75
|
+
})
|
|
76
|
+
).response.result[0];
|
|
77
|
+
dialog.dataLoading({ visible: false });
|
|
78
|
+
saveEvent = async () => {
|
|
79
|
+
dialog.dataLoading({ visible: true });
|
|
80
|
+
const savePage = await ApiPageConfig.setPage({
|
|
81
|
+
id: selectItem.id,
|
|
82
|
+
appName: (window as any).appName,
|
|
83
|
+
tag: selectItem.tag,
|
|
84
|
+
name: selectItem.name,
|
|
85
|
+
config: selectItem.config,
|
|
86
|
+
group: selectItem.group,
|
|
87
|
+
page_config: selectItem.page_config,
|
|
88
|
+
});
|
|
89
|
+
const viewModel = gvc.glitter.share.editorViewModel;
|
|
90
|
+
viewModel.appConfig.homePage = viewModel.homePage;
|
|
91
|
+
viewModel.appConfig.globalStyle = viewModel.globalStyle;
|
|
92
|
+
viewModel.appConfig.globalScript = viewModel.globalScript;
|
|
93
|
+
viewModel.appConfig.globalValue = viewModel.globalValue;
|
|
94
|
+
viewModel.appConfig.globalStyleTag = viewModel.globalStyleTag;
|
|
95
|
+
const savePlugin = await StoreHelper.setPlugin(viewModel.originalConfig, viewModel.appConfig);
|
|
96
|
+
dialog.dataLoading({ visible: false });
|
|
97
|
+
if (savePage.result && savePlugin) {
|
|
98
|
+
dialog.successMessage({ text: '儲存成功' });
|
|
99
|
+
} else {
|
|
100
|
+
dialog.errorMessage({ text: '發生異常' });
|
|
101
|
+
}
|
|
102
|
+
if (gvc.glitter.getUrlParameter('page') === selectTag) {
|
|
103
|
+
gvc.glitter.share.reloadEditor();
|
|
104
104
|
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
105
|
+
};
|
|
106
|
+
resolve(
|
|
107
|
+
PageEditor.pageEditorView({
|
|
108
|
+
gvc: gvc,
|
|
109
|
+
id: gvc.glitter.getUUID(),
|
|
110
|
+
vid: '',
|
|
111
|
+
viewModel: {
|
|
112
|
+
get selectItem() {
|
|
113
|
+
return selectItem;
|
|
114
|
+
},
|
|
115
|
+
get dataList() {
|
|
116
|
+
return gvc.glitter.share.editorViewModel.dataList;
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
style: {
|
|
120
|
+
style: `width:100%;`,
|
|
121
|
+
class: ``,
|
|
122
|
+
},
|
|
123
|
+
hiddenDelete: true,
|
|
124
|
+
})
|
|
125
|
+
);
|
|
126
|
+
});
|
|
127
|
+
},
|
|
128
|
+
divCreate: {
|
|
129
|
+
style: `max-height:calc(100vh - 200px);overflow-y:auto;`,
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
}),
|
|
133
|
+
'p-0 bg-white border rounded-3 shadow'
|
|
134
|
+
)}
|
|
119
135
|
</div>
|
|
120
136
|
</div>
|
|
121
|
-
|
|
137
|
+
`);
|
|
122
138
|
}
|
|
123
|
-
}
|
|
139
|
+
}
|
|
@@ -283,7 +283,7 @@ export class BgShopping {
|
|
|
283
283
|
};
|
|
284
284
|
return BgWidget.container(html `
|
|
285
285
|
<div class="d-flex">
|
|
286
|
-
${BgWidget.container(html `<div class="
|
|
286
|
+
${BgWidget.container(html `<div class="title-container">
|
|
287
287
|
${BgWidget.goBack(gvc.event(() => {
|
|
288
288
|
vm.type = 'list';
|
|
289
289
|
}))}
|
|
@@ -649,9 +649,9 @@ export class BgShopping {
|
|
|
649
649
|
</div>
|
|
650
650
|
`)}
|
|
651
651
|
</div>
|
|
652
|
-
</div>
|
|
652
|
+
</div> `)}
|
|
653
653
|
</div>
|
|
654
|
-
|
|
654
|
+
`);
|
|
655
655
|
}
|
|
656
656
|
else {
|
|
657
657
|
return ``;
|
|
@@ -882,7 +882,7 @@ export class BgShopping {
|
|
|
882
882
|
}
|
|
883
883
|
`);
|
|
884
884
|
return BgWidget.container(html `
|
|
885
|
-
<div class="
|
|
885
|
+
<div class="title-container">
|
|
886
886
|
${BgWidget.goBack(gvc.event(() => {
|
|
887
887
|
vm.type = 'list';
|
|
888
888
|
}))}
|
|
@@ -1499,7 +1499,7 @@ ${EditorElem.editeInput({
|
|
|
1499
1499
|
</div>
|
|
1500
1500
|
`
|
|
1501
1501
|
: ``}
|
|
1502
|
-
|
|
1502
|
+
`);
|
|
1503
1503
|
}
|
|
1504
1504
|
static productManager(gvc) {
|
|
1505
1505
|
const glitter = gvc.glitter;
|
|
@@ -1822,7 +1822,7 @@ ${EditorElem.editeInput({
|
|
|
1822
1822
|
},
|
|
1823
1823
|
divCreate: {},
|
|
1824
1824
|
};
|
|
1825
|
-
})
|
|
1825
|
+
}))}`;
|
|
1826
1826
|
}
|
|
1827
1827
|
static showListManager(obj) {
|
|
1828
1828
|
let array = [];
|
|
@@ -2036,7 +2036,7 @@ ${EditorElem.editeInput({
|
|
|
2036
2036
|
},
|
|
2037
2037
|
divCreate: {},
|
|
2038
2038
|
};
|
|
2039
|
-
})
|
|
2039
|
+
}))}`;
|
|
2040
2040
|
}
|
|
2041
2041
|
static editProduct(obj) {
|
|
2042
2042
|
let postMD = {
|
|
@@ -2060,7 +2060,7 @@ ${EditorElem.editeInput({
|
|
|
2060
2060
|
const gvc = obj.gvc;
|
|
2061
2061
|
const seoID = gvc.glitter.getUUID();
|
|
2062
2062
|
return html ` <div class="d-flex">
|
|
2063
|
-
${BgWidget.container(html `<div class="
|
|
2063
|
+
${BgWidget.container(html `<div class="title-container">
|
|
2064
2064
|
${BgWidget.goBack(obj.gvc.event(() => {
|
|
2065
2065
|
obj.vm.status = 'list';
|
|
2066
2066
|
}))}
|
|
@@ -2596,7 +2596,7 @@ ${EditorElem.editeInput({
|
|
|
2596
2596
|
return url.href;
|
|
2597
2597
|
})();
|
|
2598
2598
|
return BgWidget.greenNote(href, gvc.event(() => {
|
|
2599
|
-
|
|
2599
|
+
gvc.glitter.openNewTab(href);
|
|
2600
2600
|
}));
|
|
2601
2601
|
})(),
|
|
2602
2602
|
html `<div class="fs-sm fw-500" style="color:#545454;white-space: normal;">${postMD.seo.content || '尚未設定'}</div>`,
|
|
@@ -2807,7 +2807,7 @@ ${EditorElem.editeInput({
|
|
|
2807
2807
|
</div>
|
|
2808
2808
|
</div>
|
|
2809
2809
|
<div></div>
|
|
2810
|
-
</div>
|
|
2810
|
+
</div> `)}
|
|
2811
2811
|
</div>`;
|
|
2812
2812
|
}
|
|
2813
2813
|
static postEvent(postMD, gvc, vm) {
|
|
@@ -3008,7 +3008,7 @@ ${EditorElem.editeInput({
|
|
|
3008
3008
|
divCreate: { class: `d-flex flex-column flex-column-reverse flex-md-row`, style: `gap:10px;` },
|
|
3009
3009
|
};
|
|
3010
3010
|
})}
|
|
3011
|
-
|
|
3011
|
+
`);
|
|
3012
3012
|
}
|
|
3013
3013
|
static invoice_setting(gvc) {
|
|
3014
3014
|
const saasConfig = window.saasConfig;
|
|
@@ -3155,7 +3155,7 @@ ${EditorElem.editeInput({
|
|
|
3155
3155
|
})(),
|
|
3156
3156
|
]);
|
|
3157
3157
|
})()}`)}
|
|
3158
|
-
|
|
3158
|
+
`);
|
|
3159
3159
|
},
|
|
3160
3160
|
divCreate: {
|
|
3161
3161
|
class: `d-flex justify-content-center w-100 flex-column align-items-center `,
|
|
@@ -3257,7 +3257,7 @@ ${EditorElem.editeInput({
|
|
|
3257
3257
|
};
|
|
3258
3258
|
});
|
|
3259
3259
|
})()}`)}
|
|
3260
|
-
|
|
3260
|
+
`);
|
|
3261
3261
|
},
|
|
3262
3262
|
divCreate: {
|
|
3263
3263
|
class: `d-flex justify-content-center w-100 flex-column align-items-center `,
|
|
@@ -3342,7 +3342,7 @@ ${EditorElem.editeInput({
|
|
|
3342
3342
|
divCreate: { class: `d-flex flex-column flex-column-reverse flex-md-row`, style: `gap:10px;` },
|
|
3343
3343
|
};
|
|
3344
3344
|
})}
|
|
3345
|
-
|
|
3345
|
+
`);
|
|
3346
3346
|
}
|
|
3347
3347
|
}
|
|
3348
3348
|
window.glitter.setModule(import.meta.url, BgShopping);
|