初始化2

This commit is contained in:
2026-04-08 17:10:58 +08:00
commit 4986d90eb9
532 changed files with 112617 additions and 0 deletions

100
app/config/admin-nav.ts Normal file
View File

@@ -0,0 +1,100 @@
import type { Component } from 'vue'
import {
AppstoreOutlined,
AuditOutlined,
DashboardOutlined,
TeamOutlined,
SettingOutlined,
FileTextOutlined,
CustomerServiceOutlined,
ShopOutlined,
GitlabOutlined,
} 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-app-review',
label: '应用审核',
icon: AuditOutlined,
badge: 'NEW',
to: '/admin/app-review',
},
{
key: 'admin-git-review',
label: 'Git 审核',
icon: GitlabOutlined,
to: '/admin/git-review',
},
{
key: 'admin-apps',
label: '应用管理',
icon: AppstoreOutlined,
to: '/admin/apps',
},
{
key: 'admin-market',
label: '应用市场',
icon: ShopOutlined,
to: '/admin/market',
},
{
key: 'admin-users',
label: '用户管理',
icon: TeamOutlined,
children: [
{ key: 'admin-users-list', label: '所有用户', icon: TeamOutlined, to: '/admin/users' },
{ key: 'admin-developers', label: '开发者', icon: TeamOutlined, to: '/admin/developers' },
],
},
{
key: 'admin-tickets',
label: '工单处理',
icon: CustomerServiceOutlined,
to: '/admin/tickets',
},
{
key: 'admin-content',
label: '内容管理',
icon: FileTextOutlined,
children: [
{ key: 'admin-articles', label: '文章管理', icon: FileTextOutlined, to: '/admin/articles' },
{ key: 'admin-article-categories', label: '文章分类', icon: FileTextOutlined, to: '/admin/article-categories' },
{ key: 'admin-announcements', label: '公告管理', icon: FileTextOutlined, to: '/admin/announcements' },
],
},
{
key: 'admin-settings',
label: '平台设置',
icon: SettingOutlined,
to: '/admin/settings',
},
]

96
app/config/console-nav.ts Normal file
View File

@@ -0,0 +1,96 @@
import type { Component } from 'vue'
import {
AppstoreOutlined,
BellOutlined,
CustomerServiceOutlined,
FileTextOutlined,
GiftOutlined,
HomeOutlined,
MailOutlined,
ShoppingCartOutlined,
ShoppingOutlined,
UnorderedListOutlined,
} 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-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-tickets',
label: '工单管理',
icon: CustomerServiceOutlined,
badge: 'NEW',
to: '/console/tickets',
},
{
key: 'console-notifications',
label: '消息通知',
icon: BellOutlined,
badge: 'NEW',
to: '/console/notifications',
},
{
key: 'console-invites',
label: '应用邀请',
icon: MailOutlined,
badge: 'NEW',
to: '/console/invites',
},
]

View File

@@ -0,0 +1,51 @@
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: '帮助' },
{ key: 'developer-tickets', label: '工单处理', to: '/developer/tickets', icon: '🎫', group: '帮助', badge: 'NEW' },
]

37
app/config/nav.ts Normal file
View File

@@ -0,0 +1,37 @@
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: 'ai',
label: 'AI智能体',
to: '/ai-agent',
badge: 'HOT',
children: [
{key: 'ai-agent', label: '🤖 AI 智能体', to: '/ai-agent'},
{key: 'openclaw', label: '🦞 OpenClaw 生态', to: '/openclaw'},
{key: 'platform-api', label: '🔑 模型管理平台', to: '', href: 'https://platform.websoft.top'},
]
},
{
key: 'products',
label: '产品',
to: '/products',
children: [
{key: 'website', label: '🌐 云·企业官网', to: '/website'},
{key: 'miniapp', label: '📱 小程序开发', to: '/miniapp'},
{key: 'shop', label: '🛒 小程序商城', to: '/shop'},
{key: 'oa', label: '🏠 葳管家', to: '/oa'},
]
},
{key: 'platform', label: '平台能力', to: '/platform'},
{key: 'market', label: '模板市场', to: '/market'},
{key: 'developer', label: '开发者中心', to: '/developer-center'}
]

10
app/config/oa-nav.ts Normal file
View 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
View 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
View 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'