ts-glitter 18.1.3 → 18.1.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-widget.js +15 -10
- package/lowcode/backend-manager/bg-widget.ts +14 -10
- package/lowcode/cms-plugin/filter-options.js +1 -0
- package/lowcode/cms-plugin/filter-options.ts +1 -0
- package/lowcode/cms-plugin/member-setting.js +39 -32
- package/lowcode/cms-plugin/member-setting.ts +103 -109
- package/lowcode/cms-plugin/module/form-check.js +556 -489
- package/lowcode/cms-plugin/module/form-check.ts +633 -542
- package/lowcode/cms-plugin/module/form-module.js +2 -0
- package/lowcode/cms-plugin/module/form-module.ts +2 -0
- package/lowcode/cms-plugin/module/user-excel.js +100 -0
- package/lowcode/cms-plugin/module/user-excel.ts +144 -0
- package/lowcode/cms-plugin/user-list.js +63 -52
- package/lowcode/cms-plugin/user-list.ts +116 -99
- package/lowcode/glitter-base/route/user.js +72 -89
- package/lowcode/glitter-base/route/user.ts +62 -80
- package/lowcode/public-components/user-manager/um-info.js +32 -12
- package/lowcode/public-components/user-manager/um-info.ts +25 -9
- package/package.json +1 -1
- package/src/api-public/controllers/ai-chat.js.map +1 -1
- package/src/api-public/controllers/app-release.js.map +1 -1
- package/src/api-public/controllers/article.js.map +1 -1
- package/src/api-public/controllers/post.js.map +1 -1
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/services/ai-robot.js.map +1 -1
- package/src/api-public/services/data-analyze.js.map +1 -1
- package/src/api-public/services/delivery.js.map +1 -1
- package/src/api-public/services/fb-api.js.map +1 -1
- package/src/api-public/services/form-check.d.ts +1 -0
- package/src/api-public/services/form-check.js +243 -176
- package/src/api-public/services/form-check.js.map +1 -1
- package/src/api-public/services/form-check.ts +272 -195
- package/src/api-public/services/pos.js.map +1 -1
- package/src/api-public/services/post.js.map +1 -1
- package/src/api-public/services/public-table-check.js.map +1 -1
- package/src/api-public/services/recommend.js.map +1 -1
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/shopee.js.map +1 -1
- package/src/api-public/services/shopping.js +0 -1
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/stock.js.map +1 -1
- package/src/api-public/services/user.js +47 -19
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +70 -23
- package/src/index.js +3 -3
- package/src/index.js.map +1 -1
- package/src/seo-config.js +3 -3
- package/src/seo-config.js.map +1 -1
- package/src/services/template.js.map +1 -5
package/lowcode/Entry.js
CHANGED
|
@@ -90,7 +90,7 @@ export class Entry {
|
|
|
90
90
|
}
|
|
91
91
|
window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : clockF();
|
|
92
92
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
93
|
-
glitter.share.editerVersion = 'V_18.1.
|
|
93
|
+
glitter.share.editerVersion = 'V_18.1.4';
|
|
94
94
|
glitter.share.start = new Date();
|
|
95
95
|
const vm = {
|
|
96
96
|
appConfig: [],
|
package/lowcode/Entry.ts
CHANGED
|
@@ -91,7 +91,7 @@ export class Entry {
|
|
|
91
91
|
}
|
|
92
92
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
93
93
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
94
|
-
glitter.share.editerVersion = 'V_18.1.
|
|
94
|
+
glitter.share.editerVersion = 'V_18.1.4';
|
|
95
95
|
glitter.share.start = new Date();
|
|
96
96
|
const vm: {
|
|
97
97
|
appConfig: any;
|
|
@@ -1472,10 +1472,8 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
1472
1472
|
tableData: [],
|
|
1473
1473
|
originalData: [],
|
|
1474
1474
|
callback: () => {
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
gvc.notifyDataChange(ids.container);
|
|
1478
|
-
}, 50);
|
|
1475
|
+
vm.loading = false;
|
|
1476
|
+
gvc.notifyDataChange(ids.container);
|
|
1479
1477
|
},
|
|
1480
1478
|
};
|
|
1481
1479
|
return {
|
|
@@ -1624,7 +1622,7 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
1624
1622
|
if (div.classList.contains(ids.headerCell)) {
|
|
1625
1623
|
const innerHTML = div.innerHTML.replace(/\n/g, '').trim();
|
|
1626
1624
|
const baseWidth = htmlTags.test(div.innerHTML) ? 0 : Tool.twenLength(innerHTML) * 24;
|
|
1627
|
-
widthList[n] = div.offsetWidth > baseWidth ? div.offsetWidth : baseWidth;
|
|
1625
|
+
widthList[n] = Math.ceil(div.offsetWidth > baseWidth ? div.offsetWidth : baseWidth);
|
|
1628
1626
|
n++;
|
|
1629
1627
|
}
|
|
1630
1628
|
});
|
|
@@ -1660,12 +1658,14 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
1660
1658
|
${dd
|
|
1661
1659
|
.map((d3, tdIndex) => {
|
|
1662
1660
|
const tdClass = Tool.randomString(5);
|
|
1663
|
-
const style = `
|
|
1661
|
+
const style = `
|
|
1662
|
+
border: none;
|
|
1664
1663
|
vertical-align: middle;
|
|
1665
1664
|
width: ${widthList[tdIndex]}px;
|
|
1666
1665
|
${dd.length > 1 && tdIndex === 0 ? 'border-radius: 10px 0 0 10px;' : ''}
|
|
1667
1666
|
${dd.length > 1 && tdIndex === dd.length - 1 ? 'border-radius: 0 10px 10px 0;' : ''}
|
|
1668
|
-
${dd.length === 1 ? 'border-radius: 10px;' : ''}
|
|
1667
|
+
${dd.length === 1 ? 'border-radius: 10px;' : ''}
|
|
1668
|
+
`;
|
|
1669
1669
|
return html ` <td
|
|
1670
1670
|
class="${ids.textClass} ${tdClass} tb_v3 tx_normal"
|
|
1671
1671
|
style="${style}"
|
|
@@ -1695,7 +1695,9 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
1695
1695
|
vm.loading = true;
|
|
1696
1696
|
created.checkbox = false;
|
|
1697
1697
|
obj.tab_click && obj.tab_click(vm);
|
|
1698
|
-
|
|
1698
|
+
if (created.header && created.table) {
|
|
1699
|
+
gvc.notifyDataChange(ids.container);
|
|
1700
|
+
}
|
|
1699
1701
|
}, false)}
|
|
1700
1702
|
</div>`;
|
|
1701
1703
|
}
|
|
@@ -1722,7 +1724,7 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
1722
1724
|
widthList[index] = 60;
|
|
1723
1725
|
}
|
|
1724
1726
|
else {
|
|
1725
|
-
widthList[index] = td.offsetWidth > widthList[index] ? td.offsetWidth : widthList[index];
|
|
1727
|
+
widthList[index] = Math.ceil(td.offsetWidth > widthList[index] ? td.offsetWidth : widthList[index]);
|
|
1726
1728
|
}
|
|
1727
1729
|
defWidth += widthList[index];
|
|
1728
1730
|
});
|
|
@@ -1730,7 +1732,7 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
1730
1732
|
const extraWidth = (fullWidth - defWidth) / (widthList.length - (checkbox ? 1 : 0));
|
|
1731
1733
|
widthList.map((width, index) => {
|
|
1732
1734
|
if (!(checkbox && index === 0)) {
|
|
1733
|
-
widthList[index] = width + extraWidth;
|
|
1735
|
+
widthList[index] = Math.ceil(width + extraWidth);
|
|
1734
1736
|
}
|
|
1735
1737
|
});
|
|
1736
1738
|
defWidth = fullWidth;
|
|
@@ -4084,6 +4086,9 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
|
|
|
4084
4086
|
else if (b.key === 'custom_form_checkout_recipient') {
|
|
4085
4087
|
FormCheck.initialRecipientForm(form_formats[b.key].list);
|
|
4086
4088
|
}
|
|
4089
|
+
else if (b.key === 'customer_form_user_setting') {
|
|
4090
|
+
FormCheck.initialUserForm(form_formats[b.key].list);
|
|
4091
|
+
}
|
|
4087
4092
|
form_formats[b.key].list.map((dd) => {
|
|
4088
4093
|
dd.toggle = false;
|
|
4089
4094
|
});
|
|
@@ -1752,10 +1752,8 @@ ${obj.default ?? ''}</textarea
|
|
|
1752
1752
|
tableData: [],
|
|
1753
1753
|
originalData: [],
|
|
1754
1754
|
callback: () => {
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
gvc.notifyDataChange(ids.container);
|
|
1758
|
-
}, 50);
|
|
1755
|
+
vm.loading = false;
|
|
1756
|
+
gvc.notifyDataChange(ids.container);
|
|
1759
1757
|
},
|
|
1760
1758
|
};
|
|
1761
1759
|
|
|
@@ -1921,7 +1919,7 @@ ${obj.default ?? ''}</textarea
|
|
|
1921
1919
|
if (div.classList.contains(ids.headerCell)) {
|
|
1922
1920
|
const innerHTML = div.innerHTML.replace(/\n/g, '').trim();
|
|
1923
1921
|
const baseWidth = htmlTags.test(div.innerHTML) ? 0 : Tool.twenLength(innerHTML) * 24;
|
|
1924
|
-
widthList[n] = div.offsetWidth > baseWidth ? div.offsetWidth : baseWidth;
|
|
1922
|
+
widthList[n] = Math.ceil(div.offsetWidth > baseWidth ? div.offsetWidth : baseWidth);
|
|
1925
1923
|
n++;
|
|
1926
1924
|
}
|
|
1927
1925
|
});
|
|
@@ -1957,12 +1955,14 @@ ${obj.default ?? ''}</textarea
|
|
|
1957
1955
|
${dd
|
|
1958
1956
|
.map((d3, tdIndex: number) => {
|
|
1959
1957
|
const tdClass = Tool.randomString(5);
|
|
1960
|
-
const style = `
|
|
1958
|
+
const style = `
|
|
1959
|
+
border: none;
|
|
1961
1960
|
vertical-align: middle;
|
|
1962
1961
|
width: ${widthList[tdIndex]}px;
|
|
1963
1962
|
${dd.length > 1 && tdIndex === 0 ? 'border-radius: 10px 0 0 10px;' : ''}
|
|
1964
1963
|
${dd.length > 1 && tdIndex === dd.length - 1 ? 'border-radius: 0 10px 10px 0;' : ''}
|
|
1965
|
-
${dd.length === 1 ? 'border-radius: 10px;' : ''}
|
|
1964
|
+
${dd.length === 1 ? 'border-radius: 10px;' : ''}
|
|
1965
|
+
`;
|
|
1966
1966
|
return html` <td
|
|
1967
1967
|
class="${ids.textClass} ${tdClass} tb_v3 tx_normal"
|
|
1968
1968
|
style="${style}"
|
|
@@ -1995,7 +1995,9 @@ ${obj.default ?? ''}</textarea
|
|
|
1995
1995
|
vm.loading = true;
|
|
1996
1996
|
created.checkbox = false;
|
|
1997
1997
|
obj.tab_click && obj.tab_click!!(vm);
|
|
1998
|
-
|
|
1998
|
+
if (created.header && created.table) {
|
|
1999
|
+
gvc.notifyDataChange(ids.container);
|
|
2000
|
+
}
|
|
1999
2001
|
},
|
|
2000
2002
|
false
|
|
2001
2003
|
)}
|
|
@@ -2022,7 +2024,7 @@ ${obj.default ?? ''}</textarea
|
|
|
2022
2024
|
if (checkbox && index === 0) {
|
|
2023
2025
|
widthList[index] = 60;
|
|
2024
2026
|
} else {
|
|
2025
|
-
widthList[index] = td.offsetWidth > widthList[index] ? td.offsetWidth : widthList[index];
|
|
2027
|
+
widthList[index] = Math.ceil(td.offsetWidth > widthList[index] ? td.offsetWidth : widthList[index]);
|
|
2026
2028
|
}
|
|
2027
2029
|
defWidth += widthList[index];
|
|
2028
2030
|
});
|
|
@@ -2031,7 +2033,7 @@ ${obj.default ?? ''}</textarea
|
|
|
2031
2033
|
const extraWidth = (fullWidth - defWidth) / (widthList.length - (checkbox ? 1 : 0));
|
|
2032
2034
|
widthList.map((width, index) => {
|
|
2033
2035
|
if (!(checkbox && index === 0)) {
|
|
2034
|
-
widthList[index] = width + extraWidth;
|
|
2036
|
+
widthList[index] = Math.ceil(width + extraWidth);
|
|
2035
2037
|
}
|
|
2036
2038
|
});
|
|
2037
2039
|
defWidth = fullWidth;
|
|
@@ -4720,6 +4722,8 @@ ${obj.default ?? ''}</textarea
|
|
|
4720
4722
|
FormCheck.initialCheckOutForm(form_formats[b.key].list);
|
|
4721
4723
|
} else if (b.key === 'custom_form_checkout_recipient') {
|
|
4722
4724
|
FormCheck.initialRecipientForm(form_formats[b.key].list);
|
|
4725
|
+
} else if (b.key === 'customer_form_user_setting') {
|
|
4726
|
+
FormCheck.initialUserForm(form_formats[b.key].list);
|
|
4723
4727
|
}
|
|
4724
4728
|
form_formats[b.key].list.map((dd: any) => {
|
|
4725
4729
|
dd.toggle = false;
|
|
@@ -460,6 +460,7 @@ FilterOptions.emailOptions = [
|
|
|
460
460
|
{ key: 'customers', value: '指定會員' },
|
|
461
461
|
{ key: 'level', value: '會員等級' },
|
|
462
462
|
{ key: 'group', value: '顧客分群' },
|
|
463
|
+
{ key: 'tags', value: '顧客標籤' },
|
|
463
464
|
{ key: 'birth', value: '顧客生日月份' },
|
|
464
465
|
{ key: 'remain', value: '購物金剩餘點數' },
|
|
465
466
|
];
|
|
@@ -500,6 +500,7 @@ export class FilterOptions {
|
|
|
500
500
|
{ key: 'customers', value: '指定會員' },
|
|
501
501
|
{ key: 'level', value: '會員等級' },
|
|
502
502
|
{ key: 'group', value: '顧客分群' },
|
|
503
|
+
{ key: 'tags', value: '顧客標籤' },
|
|
503
504
|
{ key: 'birth', value: '顧客生日月份' },
|
|
504
505
|
// { key: 'expiry', value: '購物金到期日' },
|
|
505
506
|
{ key: 'remain', value: '購物金剩餘點數' },
|
|
@@ -40,15 +40,15 @@ export class MemberSetting {
|
|
|
40
40
|
return ``;
|
|
41
41
|
}
|
|
42
42
|
return BgWidget.container(html `
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
<div class="title-container">
|
|
44
|
+
${BgWidget.title('顧客設定')}
|
|
45
|
+
<div class="flex-fill"></div>
|
|
46
|
+
</div>
|
|
47
|
+
${BgWidget.container([
|
|
48
48
|
BgWidget.mainCard([
|
|
49
49
|
html ` <div class="tx_normal fw-bolder mt-2" style="margin-bottom: 24px;">驗證方式</div>`,
|
|
50
50
|
html ` <div class="d-flex flex-column" style="gap:18px;">
|
|
51
|
-
|
|
51
|
+
${[
|
|
52
52
|
BgWidget.multiCheckboxContainer(gvc, [
|
|
53
53
|
{
|
|
54
54
|
key: 'true',
|
|
@@ -61,20 +61,18 @@ export class MemberSetting {
|
|
|
61
61
|
BgWidget.multiCheckboxContainer(gvc, [
|
|
62
62
|
{
|
|
63
63
|
key: 'true',
|
|
64
|
-
name: `<div class="d-flex flex-column">是否驗證電話
|
|
65
|
-
${BgWidget.grayNote(`電話是否需要驗證才能進行註冊或修改`)}
|
|
66
|
-
</div>`,
|
|
64
|
+
name: html `<div class="d-flex flex-column">是否驗證電話 ${BgWidget.grayNote(`電話是否需要驗證才能進行註冊或修改`)}</div>`,
|
|
67
65
|
},
|
|
68
66
|
], [`${(_b = vm.data.phone_verify) !== null && _b !== void 0 ? _b : ''}` || 'false'], () => {
|
|
69
67
|
vm.data.phone_verify = !vm.data.phone_verify;
|
|
70
68
|
saveEvent();
|
|
71
69
|
}),
|
|
72
70
|
].join('')}
|
|
73
|
-
|
|
71
|
+
</div>`,
|
|
74
72
|
html `
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
<div class="w-100 border-top my-3"></div>
|
|
74
|
+
<div class="tx_normal fw-bolder mt-2" style="margin-bottom: 12px;">商店顯示</div>
|
|
75
|
+
<div class="d-flex align-items-center w-100" style="gap:4px;margin-bottom: 12px;">
|
|
78
76
|
<div class="tx_normal d-flex flex-column">設定商店密碼</div>
|
|
79
77
|
<div class="tx_normal ms-2">${!vm.data.password_to_see ? `關閉` : `開啟`}</div>
|
|
80
78
|
<div class="cursor_pointer form-check form-switch m-0">
|
|
@@ -91,34 +89,43 @@ ${BgWidget.grayNote(`電話是否需要驗證才能進行註冊或修改`)}
|
|
|
91
89
|
</div>
|
|
92
90
|
<div class="flex-fill"></div>
|
|
93
91
|
</div>
|
|
94
|
-
${
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
92
|
+
${vm.data.password_to_see
|
|
93
|
+
? [
|
|
94
|
+
BgWidget.grayNote(`需輸入密碼才可查看商店內容`),
|
|
95
|
+
BgWidget.editeInput({
|
|
96
|
+
gvc: gvc,
|
|
97
|
+
title: '',
|
|
98
|
+
default: (_c = vm.data.shop_pwd) !== null && _c !== void 0 ? _c : '',
|
|
99
|
+
placeHolder: '請輸入商店密碼',
|
|
100
|
+
callback: (text) => {
|
|
101
|
+
vm.data.shop_pwd = text;
|
|
102
|
+
},
|
|
103
|
+
}),
|
|
104
|
+
].join('')
|
|
105
|
+
: ``}
|
|
106
|
+
`,
|
|
107
107
|
].join('')),
|
|
108
108
|
...(() => {
|
|
109
109
|
const form = BgWidget.customForm(gvc, [
|
|
110
110
|
{
|
|
111
111
|
key: 'custom_form_register',
|
|
112
112
|
title: html ` <div class="tx_normal fw-bolder mt-2 d-flex flex-column" style="margin-bottom: 12px;">
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
註冊頁面表單
|
|
114
|
+
<span class="" style="color:#8D8D8D;font-size: 12px;">於註冊頁面中設定顧客必須填寫的資料</span>
|
|
115
|
+
</div>`,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
key: 'customer_form_user_setting',
|
|
119
|
+
title: html ` <div class="tx_normal fw-bolder mt-2 d-flex flex-column" style="margin-bottom: 12px;">
|
|
120
|
+
設定頁面表單
|
|
121
|
+
<span class="" style="color:#8D8D8D;font-size: 12px;">於用戶設定頁面中設定顧客可填寫的額外資料</span>
|
|
122
|
+
</div>`,
|
|
116
123
|
},
|
|
117
124
|
]);
|
|
118
125
|
return [
|
|
119
126
|
form.view,
|
|
120
127
|
html ` <div class="update-bar-container">
|
|
121
|
-
|
|
128
|
+
${BgWidget.save(gvc.event(() => __awaiter(this, void 0, void 0, function* () {
|
|
122
129
|
const dialog = new ShareDialog(gvc.glitter);
|
|
123
130
|
dialog.dataLoading({ visible: true });
|
|
124
131
|
saveEvent();
|
|
@@ -126,12 +133,12 @@ ${BgWidget.grayNote(`電話是否需要驗證才能進行註冊或修改`)}
|
|
|
126
133
|
dialog.dataLoading({ visible: false });
|
|
127
134
|
dialog.successMessage({ text: '設定成功' });
|
|
128
135
|
})))}
|
|
129
|
-
|
|
136
|
+
</div>`,
|
|
130
137
|
];
|
|
131
138
|
})(),
|
|
132
139
|
BgWidget.mbContainer(240),
|
|
133
140
|
].join(BgWidget.mbContainer(24)))}
|
|
134
|
-
|
|
141
|
+
`);
|
|
135
142
|
},
|
|
136
143
|
};
|
|
137
144
|
});
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { GVC } from '../glitterBundle/GVController.js';
|
|
2
|
-
import { EditorElem } from '../glitterBundle/plugins/editor-elem.js';
|
|
3
2
|
import { BgWidget } from '../backend-manager/bg-widget.js';
|
|
4
3
|
import { ApiUser } from '../glitter-base/route/user.js';
|
|
5
4
|
import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
|
|
6
5
|
import { EditorConfig } from '../editor-config.js';
|
|
7
|
-
import { ViewWidget } from './view-widget.js';
|
|
8
|
-
import { FormModule } from './module/form-module.js';
|
|
9
6
|
|
|
10
7
|
export class MemberSetting {
|
|
11
8
|
public static main(gvc: GVC) {
|
|
@@ -40,55 +37,52 @@ export class MemberSetting {
|
|
|
40
37
|
if (vm.loading) {
|
|
41
38
|
return ``;
|
|
42
39
|
}
|
|
43
|
-
return BgWidget.container(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
<div class="w-100 border-top my-3"></div>
|
|
90
|
-
<div class="tx_normal fw-bolder mt-2" style="margin-bottom: 12px;">商店顯示</div>
|
|
91
|
-
<div class="d-flex align-items-center w-100" style="gap:4px;margin-bottom: 12px;">
|
|
40
|
+
return BgWidget.container(html`
|
|
41
|
+
<div class="title-container">
|
|
42
|
+
${BgWidget.title('顧客設定')}
|
|
43
|
+
<div class="flex-fill"></div>
|
|
44
|
+
</div>
|
|
45
|
+
${BgWidget.container(
|
|
46
|
+
[
|
|
47
|
+
BgWidget.mainCard(
|
|
48
|
+
[
|
|
49
|
+
html` <div class="tx_normal fw-bolder mt-2" style="margin-bottom: 24px;">驗證方式</div>`,
|
|
50
|
+
html` <div class="d-flex flex-column" style="gap:18px;">
|
|
51
|
+
${[
|
|
52
|
+
BgWidget.multiCheckboxContainer(
|
|
53
|
+
gvc,
|
|
54
|
+
[
|
|
55
|
+
{
|
|
56
|
+
key: 'true',
|
|
57
|
+
name: html`<div class="d-flex flex-column">是否驗證信箱 ${BgWidget.grayNote(`信箱是否需要驗證才能進行註冊或修改`)}</div>`,
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
[`${vm.data.email_verify ?? ''}` || 'false'],
|
|
61
|
+
() => {
|
|
62
|
+
vm.data.email_verify = !vm.data.email_verify;
|
|
63
|
+
saveEvent();
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
BgWidget.multiCheckboxContainer(
|
|
67
|
+
gvc,
|
|
68
|
+
[
|
|
69
|
+
{
|
|
70
|
+
key: 'true',
|
|
71
|
+
name: html`<div class="d-flex flex-column">是否驗證電話 ${BgWidget.grayNote(`電話是否需要驗證才能進行註冊或修改`)}</div>`,
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
[`${vm.data.phone_verify ?? ''}` || 'false'],
|
|
75
|
+
() => {
|
|
76
|
+
vm.data.phone_verify = !vm.data.phone_verify;
|
|
77
|
+
saveEvent();
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
].join('')}
|
|
81
|
+
</div>`,
|
|
82
|
+
html`
|
|
83
|
+
<div class="w-100 border-top my-3"></div>
|
|
84
|
+
<div class="tx_normal fw-bolder mt-2" style="margin-bottom: 12px;">商店顯示</div>
|
|
85
|
+
<div class="d-flex align-items-center w-100" style="gap:4px;margin-bottom: 12px;">
|
|
92
86
|
<div class="tx_normal d-flex flex-column">設定商店密碼</div>
|
|
93
87
|
<div class="tx_normal ms-2">${!vm.data.password_to_see ? `關閉` : `開啟`}</div>
|
|
94
88
|
<div class="cursor_pointer form-check form-switch m-0">
|
|
@@ -96,69 +90,69 @@ ${BgWidget.grayNote(`電話是否需要驗證才能進行註冊或修改`)}
|
|
|
96
90
|
class="form-check-input"
|
|
97
91
|
type="checkbox"
|
|
98
92
|
onchange="${gvc.event((e, event) => {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
93
|
+
vm.data.password_to_see = !vm.data.password_to_see;
|
|
94
|
+
saveEvent();
|
|
95
|
+
gvc.notifyDataChange(vm.id);
|
|
96
|
+
})}"
|
|
103
97
|
${vm.data.password_to_see ? `checked` : ``}
|
|
104
98
|
/>
|
|
105
99
|
</div>
|
|
106
100
|
<div class="flex-fill"></div>
|
|
107
101
|
</div>
|
|
108
|
-
${
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
]);
|
|
140
|
-
return [
|
|
141
|
-
form.view,
|
|
142
|
-
html` <div class="update-bar-container">
|
|
143
|
-
${BgWidget.save(
|
|
144
|
-
gvc.event(async () => {
|
|
145
|
-
const dialog = new ShareDialog(gvc.glitter);
|
|
146
|
-
dialog.dataLoading({ visible: true });
|
|
147
|
-
saveEvent();
|
|
148
|
-
await form.save();
|
|
149
|
-
dialog.dataLoading({ visible: false });
|
|
150
|
-
|
|
151
|
-
dialog.successMessage({ text: '設定成功' });
|
|
152
|
-
})
|
|
153
|
-
)}
|
|
102
|
+
${vm.data.password_to_see
|
|
103
|
+
? [
|
|
104
|
+
BgWidget.grayNote(`需輸入密碼才可查看商店內容`),
|
|
105
|
+
BgWidget.editeInput({
|
|
106
|
+
gvc: gvc,
|
|
107
|
+
title: '',
|
|
108
|
+
default: vm.data.shop_pwd ?? '',
|
|
109
|
+
placeHolder: '請輸入商店密碼',
|
|
110
|
+
callback: (text) => {
|
|
111
|
+
vm.data.shop_pwd = text;
|
|
112
|
+
},
|
|
113
|
+
}),
|
|
114
|
+
].join('')
|
|
115
|
+
: ``}
|
|
116
|
+
`,
|
|
117
|
+
].join('')
|
|
118
|
+
),
|
|
119
|
+
...(() => {
|
|
120
|
+
const form = BgWidget.customForm(gvc, [
|
|
121
|
+
{
|
|
122
|
+
key: 'custom_form_register',
|
|
123
|
+
title: html` <div class="tx_normal fw-bolder mt-2 d-flex flex-column" style="margin-bottom: 12px;">
|
|
124
|
+
註冊頁面表單
|
|
125
|
+
<span class="" style="color:#8D8D8D;font-size: 12px;">於註冊頁面中設定顧客必須填寫的資料</span>
|
|
126
|
+
</div>`,
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
key: 'customer_form_user_setting',
|
|
130
|
+
title: html` <div class="tx_normal fw-bolder mt-2 d-flex flex-column" style="margin-bottom: 12px;">
|
|
131
|
+
設定頁面表單
|
|
132
|
+
<span class="" style="color:#8D8D8D;font-size: 12px;">於用戶設定頁面中設定顧客可填寫的額外資料</span>
|
|
154
133
|
</div>`,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
134
|
+
},
|
|
135
|
+
]);
|
|
136
|
+
return [
|
|
137
|
+
form.view,
|
|
138
|
+
html` <div class="update-bar-container">
|
|
139
|
+
${BgWidget.save(
|
|
140
|
+
gvc.event(async () => {
|
|
141
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
142
|
+
dialog.dataLoading({ visible: true });
|
|
143
|
+
saveEvent();
|
|
144
|
+
await form.save();
|
|
145
|
+
dialog.dataLoading({ visible: false });
|
|
146
|
+
dialog.successMessage({ text: '設定成功' });
|
|
147
|
+
})
|
|
148
|
+
)}
|
|
149
|
+
</div>`,
|
|
150
|
+
];
|
|
151
|
+
})(),
|
|
152
|
+
BgWidget.mbContainer(240),
|
|
153
|
+
].join(BgWidget.mbContainer(24))
|
|
154
|
+
)}
|
|
155
|
+
`);
|
|
162
156
|
},
|
|
163
157
|
};
|
|
164
158
|
});
|