新版官网模板
This commit is contained in:
119
app/config/admin-nav.ts
Normal file
119
app/config/admin-nav.ts
Normal file
@@ -0,0 +1,119 @@
|
||||
import type { Component } from 'vue'
|
||||
import {
|
||||
DashboardOutlined,
|
||||
FileTextOutlined,
|
||||
TeamOutlined,
|
||||
SettingOutlined,
|
||||
AuditOutlined,
|
||||
MessageOutlined,
|
||||
UserOutlined,
|
||||
SolutionOutlined,
|
||||
BankOutlined,
|
||||
NotificationOutlined,
|
||||
FolderOutlined,
|
||||
BookOutlined,
|
||||
StarOutlined,
|
||||
FormOutlined,
|
||||
} from '@ant-design/icons-vue'
|
||||
|
||||
export type AdminNavItem = {
|
||||
key: string
|
||||
label: string
|
||||
icon?: Component
|
||||
to: string
|
||||
}
|
||||
|
||||
export type AdminNavGroup = {
|
||||
key: string
|
||||
label: string
|
||||
icon?: Component
|
||||
iconColor?: string
|
||||
badge?: string
|
||||
disabled?: boolean
|
||||
children: AdminNavItem[]
|
||||
}
|
||||
|
||||
export type AdminNavLink = Omit<AdminNavGroup, 'children'> & {
|
||||
to: string
|
||||
}
|
||||
|
||||
export type AdminNavEntry = AdminNavGroup | AdminNavLink
|
||||
|
||||
export const adminNav: AdminNavEntry[] = [
|
||||
{
|
||||
key: 'admin-home',
|
||||
label: '管理首页',
|
||||
icon: DashboardOutlined,
|
||||
to: '/admin',
|
||||
},
|
||||
// ── 内容管理 ──
|
||||
{
|
||||
key: 'admin-content',
|
||||
label: '内容管理',
|
||||
icon: FileTextOutlined,
|
||||
children: [
|
||||
{ key: 'admin-articles', label: '文章管理', icon: FileTextOutlined, to: '/admin/articles' },
|
||||
{ key: 'admin-categories', label: '栏目管理', icon: FolderOutlined, to: '/admin/categories' },
|
||||
{ key: 'admin-announcements', label: '公告管理', icon: NotificationOutlined, to: '/admin/announcements' },
|
||||
],
|
||||
},
|
||||
// ── 专家管理 ──
|
||||
{
|
||||
key: 'admin-experts',
|
||||
label: '专家管理',
|
||||
icon: StarOutlined,
|
||||
children: [
|
||||
{ key: 'admin-experts-list', label: '专家列表', icon: SolutionOutlined, to: '/admin/experts' },
|
||||
{ key: 'admin-experts-review', label: '专家审核', icon: AuditOutlined, to: '/admin/experts/review', },
|
||||
],
|
||||
},
|
||||
// ── 会员管理 ──
|
||||
{
|
||||
key: 'admin-members',
|
||||
label: '会员管理',
|
||||
icon: BankOutlined,
|
||||
children: [
|
||||
{ key: 'admin-members-list', label: '会员列表', icon: TeamOutlined, to: '/admin/members' },
|
||||
{ key: 'admin-members-review', label: '会员审核', icon: AuditOutlined, to: '/admin/members/review' },
|
||||
],
|
||||
},
|
||||
// ── 建言献策 ──
|
||||
{
|
||||
key: 'admin-suggestions',
|
||||
label: '建言献策',
|
||||
icon: MessageOutlined,
|
||||
to: '/admin/suggestions',
|
||||
badge: 'NEW',
|
||||
},
|
||||
// ── 用户管理 ──
|
||||
{
|
||||
key: 'admin-users',
|
||||
label: '用户管理',
|
||||
icon: UserOutlined,
|
||||
to: '/admin/users',
|
||||
},
|
||||
// ── 资料下载 ──
|
||||
{
|
||||
key: 'admin-downloads',
|
||||
label: '资料下载管理',
|
||||
icon: BookOutlined,
|
||||
to: '/admin/downloads',
|
||||
},
|
||||
// ── 申请管理 ──
|
||||
{
|
||||
key: 'admin-applications',
|
||||
label: '申请管理',
|
||||
icon: FormOutlined,
|
||||
children: [
|
||||
{ key: 'admin-expert-applications', label: '专家申请', icon: SolutionOutlined, to: '/admin/applications/expert' },
|
||||
{ key: 'admin-member-applications', label: '会员申请', icon: TeamOutlined, to: '/admin/applications/member' },
|
||||
],
|
||||
},
|
||||
// ── 系统设置 ──
|
||||
{
|
||||
key: 'admin-settings',
|
||||
label: '系统设置',
|
||||
icon: SettingOutlined,
|
||||
to: '/admin/settings',
|
||||
},
|
||||
]
|
||||
102
app/config/console-nav.ts
Normal file
102
app/config/console-nav.ts
Normal file
@@ -0,0 +1,102 @@
|
||||
import type { Component } from 'vue'
|
||||
import {
|
||||
AppstoreOutlined,
|
||||
BellOutlined,
|
||||
CustomerServiceOutlined,
|
||||
FileTextOutlined,
|
||||
GiftOutlined,
|
||||
HomeOutlined,
|
||||
MailOutlined,
|
||||
ShoppingCartOutlined,
|
||||
ShoppingOutlined,
|
||||
UnorderedListOutlined,
|
||||
ProfileOutlined,
|
||||
WalletOutlined,
|
||||
StarOutlined,
|
||||
} from '@ant-design/icons-vue'
|
||||
|
||||
export type ConsoleNavItem = {
|
||||
key: string
|
||||
label: string
|
||||
icon?: Component
|
||||
to: string
|
||||
}
|
||||
|
||||
export type ConsoleNavGroup = {
|
||||
key: string
|
||||
label: string
|
||||
icon?: Component
|
||||
iconColor?: string
|
||||
badge?: string
|
||||
disabled?: boolean
|
||||
children: ConsoleNavItem[]
|
||||
}
|
||||
|
||||
export type ConsoleNavLink = Omit<ConsoleNavGroup, 'children'> & {
|
||||
to: string
|
||||
}
|
||||
|
||||
export type ConsoleNavEntry = ConsoleNavGroup | ConsoleNavLink
|
||||
|
||||
export const consoleNav: ConsoleNavEntry[] = [
|
||||
{
|
||||
key: 'console-home',
|
||||
label: '控制台',
|
||||
icon: HomeOutlined,
|
||||
to: '/console',
|
||||
},
|
||||
{
|
||||
key: 'console-apps',
|
||||
label: '应用中心',
|
||||
icon: AppstoreOutlined,
|
||||
to: '/console/apps',
|
||||
},
|
||||
// {
|
||||
// key: 'console-store',
|
||||
// label: '应用商店',
|
||||
// icon: ShoppingOutlined,
|
||||
// to: '/market',
|
||||
// },
|
||||
{
|
||||
key: 'console-products',
|
||||
label: '我的产品',
|
||||
icon: ShoppingOutlined,
|
||||
children: [
|
||||
{ key: 'console-products-list', label: '已购产品', icon: ShoppingOutlined, to: '/console/products' },
|
||||
{ key: 'console-products-coupons', label: '优惠券', icon: GiftOutlined, to: '/console/coupons' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'console-account-finance',
|
||||
label: '账户资产',
|
||||
icon: WalletOutlined,
|
||||
children: [
|
||||
{ key: 'console-recharge', label: '充值余额', icon: WalletOutlined, to: '/console/recharge' },
|
||||
{ key: 'console-points', label: '积分明细', icon: StarOutlined, to: '/console/points' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'console-orders',
|
||||
label: '订单与账单',
|
||||
icon: ShoppingCartOutlined,
|
||||
children: [
|
||||
{ key: 'console-orders-list', label: '订单记录', icon: UnorderedListOutlined, to: '/console/orders' },
|
||||
{ key: 'console-orders-invoices', label: '发票记录', icon: FileTextOutlined, to: '/console/invoices' },
|
||||
{ key: 'console-contracts', label: '合同管理', icon: ProfileOutlined, to: '/console/contracts' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'console-notifications',
|
||||
label: '消息通知',
|
||||
icon: BellOutlined,
|
||||
badge: 'NEW',
|
||||
to: '/console/notifications',
|
||||
},
|
||||
// {
|
||||
// key: 'console-invites',
|
||||
// label: '应用邀请',
|
||||
// icon: MailOutlined,
|
||||
// badge: 'NEW',
|
||||
// to: '/console/invites',
|
||||
// },
|
||||
]
|
||||
50
app/config/developer-nav.ts
Normal file
50
app/config/developer-nav.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
import type { Component } from 'vue'
|
||||
|
||||
export type DeveloperNavItem = {
|
||||
key: string
|
||||
label: string
|
||||
to: string
|
||||
icon?: string // emoji icon
|
||||
badge?: string // NEW / BETA 等标签
|
||||
divider?: boolean // 分组分割线
|
||||
group?: string // 分组名称
|
||||
}
|
||||
|
||||
export const developerNav: DeveloperNavItem[] = [
|
||||
// 概览
|
||||
{ key: 'developer-home', label: '概览', to: '/developer', icon: '🏠', group: '' },
|
||||
|
||||
// CI/CD 与部署
|
||||
{ key: 'developer-build', label: '构建任务', to: '/developer/build', icon: '🔨', group: 'CI/CD 与部署', badge: 'NEW' },
|
||||
{ key: 'developer-pipeline', label: '流水线管理', to: '/developer/pipeline', icon: '⚙️', group: 'CI/CD 与部署', badge: 'NEW' },
|
||||
{ key: 'developer-publish', label: '发布管理', to: '/developer/publish', icon: '🚀', group: 'CI/CD 与部署' },
|
||||
{ key: 'developer-versions', label: '版本管理', to: '/developer/versions', icon: '🏷️', group: 'CI/CD 与部署' },
|
||||
|
||||
// 开发资源
|
||||
{ key: 'developer-apps', label: '应用中心', to: '/developer/apps', icon: '📦', group: '开发资源' },
|
||||
{ key: 'developer-apikeys', label: 'API Key 管理', to: '/developer/apikeys', icon: '🔑', group: '开发资源', badge: 'NEW' },
|
||||
{ key: 'developer-cloud-credentials', label: '云账号凭证', to: '/developer/cloudCredentials', icon: '☁️', group: '开发资源', badge: 'NEW' },
|
||||
{ key: 'developer-source', label: '源码与仓库', to: '/developer/source', icon: '💻', group: '开发资源' },
|
||||
|
||||
// 资源中心
|
||||
{ key: 'developer-resources', label: '资源总览', to: '/developer/resources', icon: '🗂️', group: '资源中心' },
|
||||
{ key: 'developer-servers', label: '服务器', to: '/developer/resources/servers', icon: '🖥️', group: '资源中心' },
|
||||
{ key: 'developer-databases', label: '数据库', to: '/developer/resources/databases', icon: '🗄️', group: '资源中心' },
|
||||
{ key: 'developer-storage', label: '云存储', to: '/developer/resources/storage', icon: '☁️', group: '资源中心' },
|
||||
{ key: 'developer-domains', label: '域名管理', to: '/developer/resources/domains', icon: '🌐', group: '资源中心' },
|
||||
{ key: 'developer-ssl', label: 'SSL 证书', to: '/developer/resources/ssl', icon: '🔒', group: '资源中心' },
|
||||
{ key: 'developer-git-repos', label: '代码仓库', to: '/developer/resources/git', icon: '🐙', group: '资源中心' },
|
||||
|
||||
// 数据
|
||||
{ key: 'developer-analytics', label: '数据统计', to: '/developer/analytics', icon: '📊', group: '数据', badge: 'NEW' },
|
||||
|
||||
// 学习与文档
|
||||
{ key: 'developer-docs', label: '开发文档', to: '/developer/docs', icon: '📚', group: '学习与文档' },
|
||||
|
||||
// 账号与权限
|
||||
{ key: 'developer-git', label: 'Git 账号绑定', to: '/developer/git', icon: '🐙', group: '账号与权限' },
|
||||
{ key: 'developer-requests', label: '权限申请记录', to: '/developer/requests', icon: '📋', group: '账号与权限' },
|
||||
|
||||
// 帮助
|
||||
{ key: 'developer-support', label: '支持与反馈', to: '/developer/support', icon: '💬', group: '帮助' },
|
||||
]
|
||||
92
app/config/nav.ts
Normal file
92
app/config/nav.ts
Normal file
@@ -0,0 +1,92 @@
|
||||
export type NavItem = {
|
||||
key: string
|
||||
label: string
|
||||
to: string
|
||||
href?: string // 外链,设置后在新标签页打开
|
||||
children?: NavItem[]
|
||||
badge?: string // 用于显示 NEW/HOT 等标签
|
||||
}
|
||||
|
||||
export const mainNav: NavItem[] = [
|
||||
{key: 'home', label: '首页', to: '/'},
|
||||
{
|
||||
key: 'news',
|
||||
label: '政策要闻',
|
||||
to: '/news',
|
||||
children: [
|
||||
{key: 'news-central', label: '党中央国务院', to: '/news?type=central'},
|
||||
{key: 'news-region', label: '自治区党委政府', to: '/news?type=region'},
|
||||
{key: 'news-department', label: '其他厅委办', to: '/news?type=department'},
|
||||
{key: 'news-latest', label: '最新发布', to: '/news?type=latest'},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: 'consultation',
|
||||
label: '决策咨询',
|
||||
to: '/consultation',
|
||||
children: [
|
||||
{key: 'consult-city', label: '市县决策', to: '/consultation?type=city'},
|
||||
{key: 'consult-frontier', label: '前沿观察', to: '/consultation?type=frontier'},
|
||||
{key: 'consult-industry', label: '行业资讯', to: '/consultation?type=industry'},
|
||||
{key: 'consult-enterprise', label: '企业动态', to: '/consultation?type=enterprise'},
|
||||
{key: 'consult-research', label: '研究热点', to: '/consultation?type=research'},
|
||||
{key: 'consult-academic', label: '学术活动', to: '/consultation?type=academic'},
|
||||
{key: 'consult-other', label: '其他汇编', to: '/consultation?type=other'},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: 'reference',
|
||||
label: '决策参考',
|
||||
to: '/reference',
|
||||
children: [
|
||||
{key: 'ref-policy', label: '政策原文', to: '/reference?type=policy'},
|
||||
{key: 'ref-analysis', label: '深度解读', to: '/reference?type=analysis'},
|
||||
{key: 'ref-research', label: '研究成果', to: '/reference?type=research'},
|
||||
{key: 'ref-special', label: '专题研究', to: '/reference?type=special'},
|
||||
{key: 'ref-asean', label: '东盟研究', to: '/reference?type=asean'},
|
||||
{key: 'ref-data', label: '数据服务', to: '/reference?type=data', badge: 'VIP'},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: 'expert',
|
||||
label: '专家资讯',
|
||||
to: '/expert',
|
||||
children: [
|
||||
{key: 'expert-view', label: '专家视点', to: '/expert?type=view'},
|
||||
{key: 'expert-dynamic', label: '专家动态', to: '/expert?type=dynamic'},
|
||||
{key: 'expert-apply', label: '专家申请', to: '/expert/apply'},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: 'thinktank',
|
||||
label: '智库观察',
|
||||
to: '/think-tank',
|
||||
children: [
|
||||
{key: 'thinktank-intro', label: '智库介绍', to: '/think-tank?type=intro'},
|
||||
{key: 'thinktank-view', label: '智库视角', to: '/think-tank?type=view'},
|
||||
]
|
||||
},
|
||||
{key: 'suggestions', label: '建言献策', to: '/suggestions'},
|
||||
{
|
||||
key: 'membership',
|
||||
label: '会员服务',
|
||||
to: '/membership',
|
||||
children: [
|
||||
{key: 'member-consult', label: '企业咨询', to: '/membership?type=consult'},
|
||||
{key: 'member-service', label: '专项服务', to: '/membership?type=service'},
|
||||
]
|
||||
},
|
||||
{key: 'hanmo', label: '翰墨文谈', to: '/hanmo'},
|
||||
{
|
||||
key: 'about',
|
||||
label: '关于我们',
|
||||
to: '/about',
|
||||
children: [
|
||||
{key: 'about-intro', label: '学会简介', to: '/about'},
|
||||
{key: 'about-org', label: '组织机构', to: '/about/organization'},
|
||||
{key: 'about-charter', label: '学会章程', to: '/about/charter'},
|
||||
{key: 'about-consult', label: '咨询服务', to: '/about/consultation'},
|
||||
{key: 'about-join', label: '加入我们', to: '/about/join'},
|
||||
]
|
||||
},
|
||||
]
|
||||
10
app/config/oa-nav.ts
Normal file
10
app/config/oa-nav.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export type OaNavItem = {
|
||||
key: string
|
||||
label: string
|
||||
to: string
|
||||
}
|
||||
|
||||
export const oaNav: OaNavItem[] = [
|
||||
{ key: 'oa-home', label: '概览', to: '/oa' }
|
||||
]
|
||||
|
||||
59
app/config/products.ts
Normal file
59
app/config/products.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
export type ProductMatrixItem = {
|
||||
title: string
|
||||
recommend?: boolean
|
||||
desc: string
|
||||
tags: string[]
|
||||
domain: string
|
||||
adminUrl: string
|
||||
}
|
||||
|
||||
export const productMatrix: ProductMatrixItem[] = [
|
||||
{
|
||||
title: '企业官网',
|
||||
recommend: true,
|
||||
desc: '品牌展示与获客转化,支持多模板、多语言、SEO 与可视化配置。',
|
||||
tags: ['模板', 'SEO', '多语言', '私有化'],
|
||||
domain: 'site.websoft.top',
|
||||
adminUrl: 'https://site.websoft.top'
|
||||
},
|
||||
{
|
||||
title: '小程序/公众号',
|
||||
recommend: true,
|
||||
desc: '多端渠道接入与统一管理,适配常见内容与电商场景。',
|
||||
tags: ['多端', '渠道', '可扩展'],
|
||||
domain: 'mp.websoft.top',
|
||||
adminUrl: 'https://mp.websoft.top'
|
||||
},
|
||||
{
|
||||
title: '电商系统',
|
||||
recommend: true,
|
||||
desc: '商品/订单/支付/营销基础能力,插件化扩展,支持多端触达。',
|
||||
tags: ['支付', '插件', '营销', '多租户'],
|
||||
domain: 'shop.websoft.top',
|
||||
adminUrl: 'https://shop.websoft.top'
|
||||
},
|
||||
{
|
||||
title: '管理后台',
|
||||
recommend: false,
|
||||
desc: '多租户管理、角色权限、组织架构与可扩展菜单体系。',
|
||||
tags: ['权限', '多租户', '审计'],
|
||||
domain: 'oa.websoft.top',
|
||||
adminUrl: 'https://oa.websoft.top'
|
||||
},
|
||||
{
|
||||
title: '开发者中心',
|
||||
recommend: false,
|
||||
desc: '应用开发与交付入口:应用中心、源码仓库、Git 账号绑定、权限申请与教程文档。',
|
||||
tags: ['应用', '源码', 'Git', '教程'],
|
||||
domain: '/developer',
|
||||
adminUrl: '/developer'
|
||||
},
|
||||
{
|
||||
title: '模板/插件市场',
|
||||
recommend: false,
|
||||
desc: '支持模板与插件购买、授权与更新,形成生态与增值体系。',
|
||||
tags: ['市场', '授权', '更新', '变现'],
|
||||
domain: '/market',
|
||||
adminUrl: '/market'
|
||||
}
|
||||
]
|
||||
51
app/config/setting.ts
Normal file
51
app/config/setting.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
// 环境配置
|
||||
export const ENV_CONFIG = {
|
||||
dev: {
|
||||
name: '开发环境',
|
||||
serverUrl: 'http://127.0.0.1:9500',
|
||||
},
|
||||
prod: {
|
||||
name: '生产环境',
|
||||
serverUrl: 'https://websopy-api.websoft.top',
|
||||
},
|
||||
} as const
|
||||
|
||||
export type EnvKey = keyof typeof ENV_CONFIG
|
||||
|
||||
const STORAGE_KEY = 'websopy_api_env'
|
||||
|
||||
// 客户端检测
|
||||
function isClient(): boolean {
|
||||
return typeof window !== 'undefined'
|
||||
}
|
||||
|
||||
// 从 localStorage 读取保存的环境,默认生产环境
|
||||
export function getCurrentEnv(): EnvKey {
|
||||
if (!isClient()) return 'prod'
|
||||
const saved = localStorage.getItem(STORAGE_KEY)
|
||||
if (saved && saved in ENV_CONFIG) {
|
||||
return saved as EnvKey
|
||||
}
|
||||
return 'prod'
|
||||
}
|
||||
|
||||
export function setCurrentEnv(env: EnvKey) {
|
||||
if (!isClient()) return
|
||||
localStorage.setItem(STORAGE_KEY, env)
|
||||
}
|
||||
|
||||
export function getApiBaseUrl(): string {
|
||||
return ENV_CONFIG[getCurrentEnv()].serverUrl
|
||||
}
|
||||
|
||||
// 动态 API URL(根据当前环境)
|
||||
const BASE_URL = getApiBaseUrl()
|
||||
|
||||
export const SERVER_API_URL = '/api/_server'
|
||||
export const MODULES_API_URL = '/api/_modules'
|
||||
// App 模块:相对路径,走 /api/_app proxy → websopy-api.websoft.top/api/app/*
|
||||
export const APP_API_URL = '/api/app'
|
||||
export const FILE_SERVER = '/api/_file'
|
||||
|
||||
// Some endpoints use this as a special TenantId override (defaults to current tenant)
|
||||
export const TEMPLATE_ID = '5'
|
||||
Reference in New Issue
Block a user