ts-glitter 14.0.5 → 14.0.7
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-product.js +4 -1
- package/lowcode/backend-manager/bg-product.ts +5 -2
- package/lowcode/cms-plugin/product-config.js +17 -0
- package/lowcode/cms-plugin/product-config.ts +14 -0
- package/lowcode/cms-plugin/shopping-market-america.js +83 -11
- package/lowcode/cms-plugin/shopping-market-america.ts +107 -33
- package/lowcode/cms-plugin/shopping-product-setting.js +11 -5
- package/lowcode/cms-plugin/shopping-product-setting.ts +76 -70
- package/lowcode/glitter-base/route/shopping.d.ts +65 -0
- package/lowcode/glitter-base/route/shopping.js.map +1 -1
- package/lowcode/glitter-base/route/user.d.ts +24 -4
- package/lowcode/glitter-base/route/user.js.map +1 -1
- package/lowcode/glitterBundle/api/base.js.map +1 -1
- package/lowcode/public-components/footer/footer-01.js +1 -1
- package/lowcode/public-components/footer/footer-01.ts +1 -1
- package/lowcode/public-components/footer/footer-02.js +2 -2
- package/lowcode/public-components/footer/footer-02.ts +2 -2
- package/lowcode/public-components/footer/footer-03.js +2 -2
- package/lowcode/public-components/footer/footer-03.ts +2 -2
- package/lowcode/public-components/headers/sy-02.js +117 -114
- package/lowcode/public-components/headers/sy-02.ts +239 -234
- package/lowcode/public-components/headers/sy-03.js +10 -9
- package/lowcode/public-components/headers/sy-03.ts +22 -21
- package/lowcode/public-components/headers/sy-04.js +11 -10
- package/lowcode/public-components/headers/sy-04.ts +23 -22
- package/lowcode/public-components/product/pd-card-01.js +5 -3
- package/lowcode/public-components/product/pd-card-01.ts +5 -3
- package/lowcode/public-components/product/pd-card-02.js +4 -2
- package/lowcode/public-components/product/pd-card-02.ts +4 -2
- package/lowcode/public-components/product/pd-card-03.js +4 -2
- package/lowcode/public-components/product/pd-card-03.ts +4 -2
- package/lowcode/public-components/product/pd-class.js +8 -2
- package/lowcode/public-components/product/pd-class.ts +10 -2
- package/lowcode/public-components/product/product-detail.js +116 -117
- package/lowcode/public-components/product/product-detail.ts +234 -228
- package/lowcode/public-components/product/product-list.js +16 -5
- package/lowcode/public-components/product/product-list.ts +19 -8
- package/package.json +1 -1
- package/src/api-public/services/auto-send-email.js.map +1 -1
- package/src/api-public/services/shopping.ts +1 -1
- package/src/api-public/services/sms.js.map +1 -1
- package/src/api-public/services/user.js.map +1 -1
- package/src/helper/glitter-util.d.ts +1 -1
- package/src/helper/glitter-util.js +5 -5
- package/src/helper/glitter-util.js.map +1 -1
- package/src/helper/glitter-util.ts +7 -7
- package/src/index.js +93 -52
- package/src/index.js.map +1 -1
- package/src/index.ts +158 -116
package/lowcode/Entry.js
CHANGED
|
@@ -70,7 +70,7 @@ export class Entry {
|
|
|
70
70
|
}
|
|
71
71
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
72
72
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
73
|
-
glitter.share.editerVersion = 'V_14.0.
|
|
73
|
+
glitter.share.editerVersion = 'V_14.0.7';
|
|
74
74
|
glitter.share.start = new Date();
|
|
75
75
|
const vm = {
|
|
76
76
|
appConfig: [],
|
package/lowcode/Entry.ts
CHANGED
|
@@ -72,7 +72,7 @@ export class Entry {
|
|
|
72
72
|
}
|
|
73
73
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
74
74
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
75
|
-
glitter.share.editerVersion = 'V_14.0.
|
|
75
|
+
glitter.share.editerVersion = 'V_14.0.7';
|
|
76
76
|
glitter.share.start = new Date();
|
|
77
77
|
const vm: {
|
|
78
78
|
appConfig: any;
|
|
@@ -2,6 +2,7 @@ import { BgWidget } from './bg-widget.js';
|
|
|
2
2
|
import { ApiShop } from '../glitter-base/route/shopping.js';
|
|
3
3
|
import { FilterOptions } from '../cms-plugin/filter-options.js';
|
|
4
4
|
import { StockList } from '../cms-plugin/shopping-product-stock.js';
|
|
5
|
+
import { ProductConfig } from "../cms-plugin/product-config.js";
|
|
5
6
|
const html = String.raw;
|
|
6
7
|
export class BgProduct {
|
|
7
8
|
static variantsSelector(obj) {
|
|
@@ -140,7 +141,8 @@ export class BgProduct {
|
|
|
140
141
|
image: opt.image,
|
|
141
142
|
width: 40,
|
|
142
143
|
})}
|
|
143
|
-
<div class="tx_normal ${opt.note ? 'mb-1' : ''}"
|
|
144
|
+
<div class="tx_normal ${opt.note ? 'mb-1' : ''} d-flex flex-column" style="gap:5px;">
|
|
145
|
+
${(obj.show_product_type) ? BgWidget.infoInsignia(`來源:${ProductConfig.getName(opt.content)}`) : ''}${opt.value}</div>
|
|
144
146
|
${opt.note ? html ` <div class="tx_gray_12">${opt.note}</div> ` : ''}
|
|
145
147
|
</div>`;
|
|
146
148
|
},
|
|
@@ -196,6 +198,7 @@ export class BgProduct {
|
|
|
196
198
|
return {
|
|
197
199
|
key: product.content.id,
|
|
198
200
|
value: product.content.title,
|
|
201
|
+
content: product.content,
|
|
199
202
|
image: (_a = product.content.preview_image[0]) !== null && _a !== void 0 ? _a : BgWidget.noImageURL,
|
|
200
203
|
};
|
|
201
204
|
});
|
|
@@ -3,6 +3,7 @@ import { BgWidget } from './bg-widget.js';
|
|
|
3
3
|
import { ApiShop } from '../glitter-base/route/shopping.js';
|
|
4
4
|
import { FilterOptions } from '../cms-plugin/filter-options.js';
|
|
5
5
|
import { StockList } from '../cms-plugin/shopping-product-stock.js';
|
|
6
|
+
import {ProductConfig} from "../cms-plugin/product-config.js";
|
|
6
7
|
|
|
7
8
|
const html = String.raw;
|
|
8
9
|
|
|
@@ -55,7 +56,7 @@ export class BgProduct {
|
|
|
55
56
|
}, 'variantsSelector');
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
static productsDialog(obj: { gvc:GVC, title?: string; default: (number | string)[]; callback: (value: any) => void; filter?: (data: any) => boolean; productType?: string; single?: boolean;filter_visible?:string }) {
|
|
59
|
+
static productsDialog(obj: { gvc:GVC, title?: string; default: (number | string)[]; callback: (value: any) => void; filter?: (data: any) => boolean; productType?: string; single?: boolean;filter_visible?:string,show_product_type?:boolean }) {
|
|
59
60
|
const glitter=(window.parent as any).glitter
|
|
60
61
|
return (window.parent as any).glitter.innerDialog((gvc: GVC) => {
|
|
61
62
|
const vm = {
|
|
@@ -170,7 +171,8 @@ export class BgProduct {
|
|
|
170
171
|
image: opt.image,
|
|
171
172
|
width: 40,
|
|
172
173
|
})}
|
|
173
|
-
<div class="tx_normal ${opt.note ? 'mb-1' : ''}"
|
|
174
|
+
<div class="tx_normal ${opt.note ? 'mb-1' : ''} d-flex flex-column" style="gap:5px;">
|
|
175
|
+
${(obj.show_product_type) ? BgWidget.infoInsignia(`來源:${ProductConfig.getName((opt as any).content as any)}`):''}${opt.value}</div>
|
|
174
176
|
${opt.note ? html` <div class="tx_gray_12">${opt.note}</div> ` : ''}
|
|
175
177
|
</div>`;
|
|
176
178
|
},
|
|
@@ -236,6 +238,7 @@ export class BgProduct {
|
|
|
236
238
|
return {
|
|
237
239
|
key: product.content.id,
|
|
238
240
|
value: product.content.title,
|
|
241
|
+
content:product.content,
|
|
239
242
|
image: product.content.preview_image[0] ?? BgWidget.noImageURL,
|
|
240
243
|
};
|
|
241
244
|
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export class ProductConfig {
|
|
2
|
+
static getName(data) {
|
|
3
|
+
if (`${data.visible}` === `false`) {
|
|
4
|
+
return `隱形商品`;
|
|
5
|
+
}
|
|
6
|
+
else if (data.productType.giveaway) {
|
|
7
|
+
return `贈品`;
|
|
8
|
+
}
|
|
9
|
+
else if (data.productType.addProduct) {
|
|
10
|
+
return `加購品`;
|
|
11
|
+
}
|
|
12
|
+
else if (data.productType.product) {
|
|
13
|
+
return `前台商品`;
|
|
14
|
+
}
|
|
15
|
+
return `前台商品`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class ProductConfig {
|
|
2
|
+
public static getName(data:any){
|
|
3
|
+
if(`${data.visible}`===`false`){
|
|
4
|
+
return `隱形商品`
|
|
5
|
+
}else if(data.productType.giveaway){
|
|
6
|
+
return `贈品`
|
|
7
|
+
}else if(data.productType.addProduct){
|
|
8
|
+
return `加購品`
|
|
9
|
+
}else if(data.productType.product){
|
|
10
|
+
return `前台商品`
|
|
11
|
+
}
|
|
12
|
+
return `前台商品`
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { BgWidget } from '../backend-manager/bg-widget.js';
|
|
11
11
|
import { ApiUser } from '../glitter-base/route/user.js';
|
|
12
12
|
import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
|
|
13
|
+
import { ApiShop } from "../glitter-base/route/shopping.js";
|
|
13
14
|
export class MarketAmerica {
|
|
14
15
|
static main(gvc) {
|
|
15
16
|
return (BgWidget.container(gvc.bindView(() => {
|
|
@@ -36,10 +37,11 @@ export class MarketAmerica {
|
|
|
36
37
|
}
|
|
37
38
|
const html = String.raw;
|
|
38
39
|
return [
|
|
39
|
-
html
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
html `
|
|
41
|
+
<div class="title-container">
|
|
42
|
+
${BgWidget.title('美安串接')}
|
|
43
|
+
<div class="flex-fill"></div>
|
|
44
|
+
</div>`,
|
|
43
45
|
BgWidget.mbContainer(18),
|
|
44
46
|
BgWidget.mainCard(html `
|
|
45
47
|
<div class="d-flex flex-column" style="gap:12px;">
|
|
@@ -49,10 +51,13 @@ export class MarketAmerica {
|
|
|
49
51
|
`),
|
|
50
52
|
BgWidget.mbContainer(18),
|
|
51
53
|
BgWidget.container(BgWidget.mainCard([
|
|
52
|
-
html
|
|
54
|
+
html `
|
|
55
|
+
<div class="tx_700">串接綁定</div>`,
|
|
53
56
|
BgWidget.editeInput({
|
|
54
57
|
gvc: gvc,
|
|
55
|
-
title: html
|
|
58
|
+
title: html `
|
|
59
|
+
<div class="d-flex align-items-center" style="gap:10px;">Offer ID
|
|
60
|
+
</div>`,
|
|
56
61
|
default: vm.data.offer_ID,
|
|
57
62
|
placeHolder: '請填入Offer ID',
|
|
58
63
|
callback: (text) => {
|
|
@@ -61,7 +66,10 @@ export class MarketAmerica {
|
|
|
61
66
|
}),
|
|
62
67
|
BgWidget.editeInput({
|
|
63
68
|
gvc: gvc,
|
|
64
|
-
title: html
|
|
69
|
+
title: html `
|
|
70
|
+
<div class="d-flex align-items-center" style="gap:10px;">Advertiser
|
|
71
|
+
ID
|
|
72
|
+
</div>`,
|
|
65
73
|
default: vm.data.advertiser_ID,
|
|
66
74
|
placeHolder: '請填入Advertiser ID',
|
|
67
75
|
callback: (text) => {
|
|
@@ -70,7 +78,70 @@ export class MarketAmerica {
|
|
|
70
78
|
}),
|
|
71
79
|
BgWidget.editeInput({
|
|
72
80
|
gvc: gvc,
|
|
73
|
-
title: html
|
|
81
|
+
title: html `
|
|
82
|
+
<div class="d-flex align-items-center" style="gap:10px;">佣金%數
|
|
83
|
+
</div>`,
|
|
84
|
+
default: vm.data.commission,
|
|
85
|
+
type: 'number',
|
|
86
|
+
placeHolder: '請填入佣金%數',
|
|
87
|
+
callback: (text) => {
|
|
88
|
+
vm.data.commission = text;
|
|
89
|
+
},
|
|
90
|
+
}),
|
|
91
|
+
html `
|
|
92
|
+
<div
|
|
93
|
+
onclick="${gvc.event(() => __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
95
|
+
const appData = (yield ApiUser.getPublicConfig('store-information', 'manager')).response.value;
|
|
96
|
+
ApiShop.getProduct({
|
|
97
|
+
page: 0,
|
|
98
|
+
limit: 1000,
|
|
99
|
+
search: '',
|
|
100
|
+
}).then((data) => {
|
|
101
|
+
let printData = data.response.data.map((product) => {
|
|
102
|
+
return product.content.variants.map((variant) => {
|
|
103
|
+
var _a, _b;
|
|
104
|
+
return html `
|
|
105
|
+
<Product>
|
|
106
|
+
<SKU>${variant.sku}</SKU>
|
|
107
|
+
<Name>${product.content.title}</Name>
|
|
108
|
+
<Description>${appData.shop_name} - ${product.content.title}</Description>
|
|
109
|
+
<URL>
|
|
110
|
+
${`https://` + window.parent.glitter.share.editorViewModel.domain + '/products/' + product.content.title}
|
|
111
|
+
</URL>
|
|
112
|
+
<Price>${(_a = variant.compare_price) !== null && _a !== void 0 ? _a : variant.sale_price}</Price>
|
|
113
|
+
<LargeImage>
|
|
114
|
+
${(_b = variant.preview_image) !== null && _b !== void 0 ? _b : ""}
|
|
115
|
+
</LargeImage>
|
|
116
|
+
<SalePrice>${variant.sale_price}</SalePrice>
|
|
117
|
+
<Category>${product.content.collection.join('')}</Category>
|
|
118
|
+
</Product>
|
|
119
|
+
`;
|
|
120
|
+
}).join('');
|
|
121
|
+
}).join('');
|
|
122
|
+
console.log("printData -- ", printData);
|
|
123
|
+
});
|
|
124
|
+
}))}"
|
|
125
|
+
>
|
|
126
|
+
${BgWidget.editeInput({
|
|
127
|
+
readonly: true,
|
|
128
|
+
gvc: gvc,
|
|
129
|
+
title: html `
|
|
130
|
+
<div class="d-flex flex-column" style="gap:5px;">
|
|
131
|
+
產品資料XML
|
|
132
|
+
</div>`,
|
|
133
|
+
default: `https://` + window.parent.glitter.share.editorViewModel.domain + '/tw_shop',
|
|
134
|
+
placeHolder: '',
|
|
135
|
+
callback: (text) => {
|
|
136
|
+
},
|
|
137
|
+
})}
|
|
138
|
+
</div>`,
|
|
139
|
+
BgWidget.editeInput({
|
|
140
|
+
gvc: gvc,
|
|
141
|
+
title: html `
|
|
142
|
+
<div class="d-flex align-items-center" style="gap:10px;">
|
|
143
|
+
產品資料xml
|
|
144
|
+
</div>`,
|
|
74
145
|
default: vm.data.commission,
|
|
75
146
|
type: 'number',
|
|
76
147
|
placeHolder: '請填入佣金%數',
|
|
@@ -79,8 +150,9 @@ export class MarketAmerica {
|
|
|
79
150
|
},
|
|
80
151
|
}),
|
|
81
152
|
].join(BgWidget.mbContainer(12)))),
|
|
82
|
-
html
|
|
83
|
-
|
|
153
|
+
html `
|
|
154
|
+
<div class="update-bar-container">
|
|
155
|
+
${BgWidget.save(gvc.event(() => __awaiter(this, void 0, void 0, function* () {
|
|
84
156
|
const dialog = new ShareDialog(gvc.glitter);
|
|
85
157
|
dialog.dataLoading({ visible: true });
|
|
86
158
|
ApiUser.setPublicConfig({
|
|
@@ -93,7 +165,7 @@ export class MarketAmerica {
|
|
|
93
165
|
gvc.closeDialog();
|
|
94
166
|
});
|
|
95
167
|
})))}
|
|
96
|
-
|
|
168
|
+
</div>`,
|
|
97
169
|
].join('');
|
|
98
170
|
},
|
|
99
171
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import {GVC} from '../glitterBundle/GVController.js';
|
|
2
|
+
import {BgWidget} from '../backend-manager/bg-widget.js';
|
|
3
|
+
import {ApiUser} from '../glitter-base/route/user.js';
|
|
4
|
+
import {ShareDialog} from '../glitterBundle/dialog/ShareDialog.js';
|
|
5
|
+
import {ApiShop} from "../glitter-base/route/shopping.js";
|
|
5
6
|
|
|
6
7
|
export class MarketAmerica {
|
|
7
8
|
public static main(gvc: GVC) {
|
|
@@ -13,9 +14,9 @@ export class MarketAmerica {
|
|
|
13
14
|
const vm: {
|
|
14
15
|
loading: boolean;
|
|
15
16
|
data: {
|
|
16
|
-
offer_ID:string,
|
|
17
|
-
advertiser_ID:string,
|
|
18
|
-
commission:string,
|
|
17
|
+
offer_ID: string,
|
|
18
|
+
advertiser_ID: string,
|
|
19
|
+
commission: string,
|
|
19
20
|
};
|
|
20
21
|
} = {
|
|
21
22
|
loading: true,
|
|
@@ -40,10 +41,11 @@ export class MarketAmerica {
|
|
|
40
41
|
}
|
|
41
42
|
const html = String.raw;
|
|
42
43
|
return [
|
|
43
|
-
html
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
html`
|
|
45
|
+
<div class="title-container">
|
|
46
|
+
${BgWidget.title('美安串接')}
|
|
47
|
+
<div class="flex-fill"></div>
|
|
48
|
+
</div>`,
|
|
47
49
|
BgWidget.mbContainer(18),
|
|
48
50
|
BgWidget.mainCard(html`
|
|
49
51
|
<div class="d-flex flex-column" style="gap:12px;">
|
|
@@ -55,10 +57,13 @@ export class MarketAmerica {
|
|
|
55
57
|
BgWidget.container(
|
|
56
58
|
BgWidget.mainCard(
|
|
57
59
|
[
|
|
58
|
-
html
|
|
60
|
+
html`
|
|
61
|
+
<div class="tx_700">串接綁定</div>`,
|
|
59
62
|
BgWidget.editeInput({
|
|
60
63
|
gvc: gvc,
|
|
61
|
-
title: html
|
|
64
|
+
title: html`
|
|
65
|
+
<div class="d-flex align-items-center" style="gap:10px;">Offer ID
|
|
66
|
+
</div>`,
|
|
62
67
|
default: vm.data.offer_ID,
|
|
63
68
|
placeHolder: '請填入Offer ID',
|
|
64
69
|
callback: (text) => {
|
|
@@ -67,7 +72,10 @@ export class MarketAmerica {
|
|
|
67
72
|
}),
|
|
68
73
|
BgWidget.editeInput({
|
|
69
74
|
gvc: gvc,
|
|
70
|
-
title: html
|
|
75
|
+
title: html`
|
|
76
|
+
<div class="d-flex align-items-center" style="gap:10px;">Advertiser
|
|
77
|
+
ID
|
|
78
|
+
</div>`,
|
|
71
79
|
default: vm.data.advertiser_ID,
|
|
72
80
|
placeHolder: '請填入Advertiser ID',
|
|
73
81
|
callback: (text) => {
|
|
@@ -76,7 +84,72 @@ export class MarketAmerica {
|
|
|
76
84
|
}),
|
|
77
85
|
BgWidget.editeInput({
|
|
78
86
|
gvc: gvc,
|
|
79
|
-
title: html
|
|
87
|
+
title: html`
|
|
88
|
+
<div class="d-flex align-items-center" style="gap:10px;">佣金%數
|
|
89
|
+
</div>`,
|
|
90
|
+
default: vm.data.commission,
|
|
91
|
+
type: 'number',
|
|
92
|
+
placeHolder: '請填入佣金%數',
|
|
93
|
+
callback: (text) => {
|
|
94
|
+
vm.data.commission = text;
|
|
95
|
+
},
|
|
96
|
+
}),
|
|
97
|
+
html`
|
|
98
|
+
<div
|
|
99
|
+
onclick="${gvc.event(async () => {
|
|
100
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
101
|
+
const appData = (await ApiUser.getPublicConfig('store-information', 'manager')).response.value;
|
|
102
|
+
ApiShop.getProduct({
|
|
103
|
+
page: 0,
|
|
104
|
+
limit: 1000,
|
|
105
|
+
search: '',
|
|
106
|
+
}).then((data) => {
|
|
107
|
+
let printData = data.response.data.map((product: any) => {
|
|
108
|
+
return product.content.variants.map((variant: any) => {
|
|
109
|
+
return html`
|
|
110
|
+
<Product>
|
|
111
|
+
<SKU>${variant.sku}</SKU>
|
|
112
|
+
<Name>${product.content.title}</Name>
|
|
113
|
+
<Description>${appData.shop_name} - ${product.content.title}</Description>
|
|
114
|
+
<URL>
|
|
115
|
+
${`https://` + (window.parent as any).glitter.share.editorViewModel.domain + '/products/' + product.content.title}
|
|
116
|
+
</URL>
|
|
117
|
+
<Price>${variant.compare_price??variant.sale_price}</Price>
|
|
118
|
+
<LargeImage>
|
|
119
|
+
${variant.preview_image??""}
|
|
120
|
+
</LargeImage>
|
|
121
|
+
<SalePrice>${variant.sale_price}</SalePrice>
|
|
122
|
+
<Category>${product.content.collection.join('')}</Category>
|
|
123
|
+
</Product>
|
|
124
|
+
`
|
|
125
|
+
}).join('');
|
|
126
|
+
}).join('')
|
|
127
|
+
console.log("printData -- " , printData)
|
|
128
|
+
});
|
|
129
|
+
// navigator.clipboard.writeText(`https://` + (window.parent as any).glitter.share.editorViewModel.domain + '/tw_shop');
|
|
130
|
+
// dialog.successMessage({ text: '已複製至剪貼簿' });
|
|
131
|
+
})}"
|
|
132
|
+
>
|
|
133
|
+
${BgWidget.editeInput({
|
|
134
|
+
readonly: true,
|
|
135
|
+
gvc: gvc,
|
|
136
|
+
title: html`
|
|
137
|
+
<div class="d-flex flex-column" style="gap:5px;">
|
|
138
|
+
產品資料XML
|
|
139
|
+
</div>`,
|
|
140
|
+
default: `https://` + (window.parent as any).glitter.share.editorViewModel.domain + '/tw_shop',
|
|
141
|
+
placeHolder: '',
|
|
142
|
+
callback: (text) => {
|
|
143
|
+
},
|
|
144
|
+
})}
|
|
145
|
+
</div>`
|
|
146
|
+
,
|
|
147
|
+
BgWidget.editeInput({
|
|
148
|
+
gvc: gvc,
|
|
149
|
+
title: html`
|
|
150
|
+
<div class="d-flex align-items-center" style="gap:10px;">
|
|
151
|
+
產品資料xml
|
|
152
|
+
</div>`,
|
|
80
153
|
default: vm.data.commission,
|
|
81
154
|
type: 'number',
|
|
82
155
|
placeHolder: '請填入佣金%數',
|
|
@@ -87,24 +160,25 @@ export class MarketAmerica {
|
|
|
87
160
|
].join(BgWidget.mbContainer(12))
|
|
88
161
|
)
|
|
89
162
|
),
|
|
90
|
-
html
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
163
|
+
html`
|
|
164
|
+
<div class="update-bar-container">
|
|
165
|
+
${BgWidget.save(
|
|
166
|
+
gvc.event(async () => {
|
|
167
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
168
|
+
dialog.dataLoading({visible: true});
|
|
169
|
+
|
|
170
|
+
ApiUser.setPublicConfig({
|
|
171
|
+
key: key,
|
|
172
|
+
value: vm.data,
|
|
173
|
+
user_id: 'manager',
|
|
174
|
+
}).then(() => {
|
|
175
|
+
dialog.dataLoading({visible: false});
|
|
176
|
+
dialog.successMessage({text: '設定成功'});
|
|
177
|
+
gvc.closeDialog();
|
|
178
|
+
});
|
|
179
|
+
})
|
|
180
|
+
)}
|
|
181
|
+
</div>`,
|
|
108
182
|
].join('');
|
|
109
183
|
},
|
|
110
184
|
};
|
|
@@ -2045,8 +2045,9 @@ export class ShoppingProductSetting {
|
|
|
2045
2045
|
var _a;
|
|
2046
2046
|
return [
|
|
2047
2047
|
BgWidget.container(html `
|
|
2048
|
-
<div class="title-container">
|
|
2049
|
-
|
|
2048
|
+
<div class="title-container flex-column" style="gap:10px;">
|
|
2049
|
+
<div class="d-flex align-items-center w-100">
|
|
2050
|
+
${BgWidget.goBack(obj.gvc.event(() => {
|
|
2050
2051
|
if (window.parent.glitter.share.checkData && !window.parent.glitter.share.checkData()) {
|
|
2051
2052
|
const dialog = new ShareDialog(gvc.glitter);
|
|
2052
2053
|
dialog.checkYesOrNot({
|
|
@@ -2065,9 +2066,12 @@ export class ShoppingProductSetting {
|
|
|
2065
2066
|
obj.vm.type = 'list';
|
|
2066
2067
|
}
|
|
2067
2068
|
}))}
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2069
|
+
<h3 class="mb-0 me-3 tx_title">${obj.type === 'replace' ? postMD.title || '編輯商品' : `新增商品`}</h3>
|
|
2070
|
+
<div class="flex-fill"></div>
|
|
2071
|
+
</div>
|
|
2072
|
+
<div class="d-flex w-100">
|
|
2073
|
+
<div class="flex-fill"></div>
|
|
2074
|
+
${[
|
|
2071
2075
|
BgWidget.grayButton('複製現有商品', gvc.event(() => {
|
|
2072
2076
|
BgProduct.productsDialog({
|
|
2073
2077
|
gvc: gvc,
|
|
@@ -2090,6 +2094,7 @@ export class ShoppingProductSetting {
|
|
|
2090
2094
|
}
|
|
2091
2095
|
});
|
|
2092
2096
|
},
|
|
2097
|
+
show_product_type: true
|
|
2093
2098
|
});
|
|
2094
2099
|
}), {}),
|
|
2095
2100
|
BgWidget.grayButton('AI 生成', gvc.event(() => {
|
|
@@ -2102,6 +2107,7 @@ export class ShoppingProductSetting {
|
|
|
2102
2107
|
window.parent.glitter.openNewTab(href);
|
|
2103
2108
|
}), { icon: document.body.clientWidth > 768 ? 'fa-regular fa-eye' : undefined }),
|
|
2104
2109
|
].join(html `<div class="mx-1"></div>`)}
|
|
2110
|
+
</div>
|
|
2105
2111
|
</div>
|
|
2106
2112
|
${BgWidget.container1x2({
|
|
2107
2113
|
html: [
|