feat: remove forum feature (Phase 1)
This commit is contained in:
1 parent
f3e4cdd9cf
commit
2bbd7c01a3
173 files changed
+51
-27360
No files matched your search
@@ -372,7 +372,6 @@ const typeOptions = [
|
||||
{ label: '主题切换', value: 'theme_mode' },
|
||||
{ label: '页面二维码', value: 'qrcode' },
|
||||
{ label: '发布入口', value: 'add' },
|
||||
{ label: '购物车', value: 'shop_cart' },
|
||||
{ label: 'QQ 客服', value: 'service_qq' },
|
||||
{ label: '微信客服', value: 'service_wechat' },
|
||||
{ label: '会员入口', value: 'pay_vip' },
|
||||
@@ -397,7 +396,7 @@ const addPresetOptions = computed(() => {
|
||||
})
|
||||
|
||||
// pay_vip always opens the site VIP modal on the front-end — no link required.
|
||||
const needsLink = computed(() => ['custom', 'add', 'shop_cart'].includes(editingItem.type) && !editingItem.hover)
|
||||
const needsLink = computed(() => ['custom', 'add'].includes(editingItem.type) && !editingItem.hover)
|
||||
// Custom hover HTML only; VIP uses modal, not free-form hover content.
|
||||
const supportsHover = computed(() => editingItem.type === 'custom')
|
||||
const supportsActionMode = computed(() => ['service_qq', 'service_wechat'].includes(editingItem.type))
|
||||
@@ -444,7 +443,6 @@ function applyTypeDefaults(type) {
|
||||
service_wechat: { icon: 'fab fa-weixin', icon_dark: '', icon_light: '', text: '微信', desc: '扫码添加微信', link: '', hover: '', action_mode: 'link', qr_size: 120 },
|
||||
pay_vip: { icon: 'fas fa-gem', icon_dark: '', icon_light: '', text: '会员', desc: '开通/升级会员弹窗', link: '', hover: '', action_mode: 'link', qr_size: 120 },
|
||||
add: { icon: 'fas fa-plus', icon_dark: '', icon_light: '', text: '发布', desc: '发布内容', link: '', hover: '', action_mode: 'link', qr_size: 120 },
|
||||
shop_cart: { icon: 'fas fa-shopping-cart', icon_dark: '', icon_light: '', text: '购物车', desc: '购物车入口', link: '', hover: '', action_mode: 'link', qr_size: 120 },
|
||||
}
|
||||
return map[type] || map.custom
|
||||
}
|
||||
|
||||
@@ -186,8 +186,8 @@
|
||||
</n-radio-group>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item v-if="['link', 'msg', 'pay_vip', 'shop_cart'].includes(editingItem.type)" label="链接地址">
|
||||
<n-input v-model:value="editingItem.link" :placeholder="editingItem.type === 'msg' ? '留空使用默认消息中心地址' : editingItem.type === 'pay_vip' ? '留空使用默认会员页地址' : editingItem.type === 'shop_cart' ? '留空使用默认购物车地址' : 'https:// 或 /path'" />
|
||||
<n-form-item v-if="['link', 'msg', 'pay_vip'].includes(editingItem.type)" label="链接地址">
|
||||
<n-input v-model:value="editingItem.link" :placeholder="editingItem.type === 'msg' ? '留空使用默认消息中心地址' : editingItem.type === 'pay_vip' ? '留空使用默认会员页地址' : 'https:// 或 /path'" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item v-if="editingItem.type === 'link'" label="新窗口打开">
|
||||
@@ -312,7 +312,6 @@ const typeOptions = [
|
||||
{ label: '搜索', value: 'search' },
|
||||
{ label: '消息中心', value: 'msg' },
|
||||
{ label: '开通会员', value: 'pay_vip' },
|
||||
{ label: '购物车', value: 'shop_cart' },
|
||||
]
|
||||
|
||||
const typeLabelMap = {
|
||||
@@ -325,7 +324,6 @@ const typeLabelMap = {
|
||||
search: '搜索',
|
||||
msg: '消息中心',
|
||||
pay_vip: '开通会员',
|
||||
shop_cart: '购物车',
|
||||
}
|
||||
|
||||
const typeDefaults = {
|
||||
@@ -338,7 +336,6 @@ const typeDefaults = {
|
||||
search: { icon: 'fas fa-search', text: '搜索' },
|
||||
msg: { icon: 'fas fa-bell', text: '消息' },
|
||||
pay_vip: { icon: 'fas fa-crown', text: '会员' },
|
||||
shop_cart: { icon: 'fas fa-shopping-cart', text: '购物车' },
|
||||
}
|
||||
|
||||
const enabledPreviewItems = computed(() => form.items.filter((item) => item.enabled))
|
||||
@@ -360,7 +357,6 @@ function getItemSummary(item) {
|
||||
if (item.type === 'auth') return '登录用户显示我的,游客显示登录'
|
||||
if (item.type === 'msg') return '跳转到消息中心页面'
|
||||
if (item.type === 'pay_vip') return item.link || '跳转到会员开通页'
|
||||
if (item.type === 'shop_cart') return item.link || '跳转到购物车页面'
|
||||
return item.link || '自定义链接按钮'
|
||||
}
|
||||
|
||||
@@ -405,7 +401,7 @@ function applyTypeDefaults(type, force = false) {
|
||||
const preset = typeDefaults[type] || typeDefaults.link
|
||||
if (force || !editingItem.icon) editingItem.icon = preset.icon
|
||||
if (force || !editingItem.text) editingItem.text = preset.text
|
||||
if (!['link', 'msg', 'pay_vip', 'shop_cart'].includes(type)) editingItem.link = ''
|
||||
if (!['link', 'msg', 'pay_vip'].includes(type)) editingItem.link = ''
|
||||
if (type !== 'category') editingItem.category_id = null
|
||||
if (type !== 'search') editingItem.search_default_type = 'post'
|
||||
if (type !== 'add') editingItem.add_items = []
|
||||
@@ -483,7 +479,7 @@ function saveItem() {
|
||||
type: editingItem.type,
|
||||
icon: editingItem.icon,
|
||||
text: editingItem.text,
|
||||
link: ['link', 'msg', 'pay_vip', 'shop_cart'].includes(editingItem.type) ? editingItem.link : '',
|
||||
link: ['link', 'msg', 'pay_vip'].includes(editingItem.type) ? editingItem.link : '',
|
||||
badge: (editingItem.badge || '').trim(),
|
||||
badge_mode: editingItem.badge_mode,
|
||||
category_id: editingItem.type === 'category' ? (editingItem.category_id || 0) : 0,
|
||||
|
||||
Reference in new issue
Block a user