diff --git a/Yi.Ai.Vue3/src/api/products/products.ts b/Yi.Ai.Vue3/src/api/products/products.ts new file mode 100644 index 00000000..9ddf7aeb --- /dev/null +++ b/Yi.Ai.Vue3/src/api/products/products.ts @@ -0,0 +1,28 @@ +// 创建产品类型定义 +export interface ProductFeature { + icon: string + title: string + description: string +} + +export interface PricingPlan { + name: string + price: number + period: string + features: string[] + isPopular?: boolean +} + +export interface Product { + id: string + name: string + title: string + description: string + highlight: string + features: ProductFeature[] + pricing: PricingPlan[] + faqs: { + question: string + answer: string + }[] +} diff --git a/Yi.Ai.Vue3/src/config/index.ts b/Yi.Ai.Vue3/src/config/index.ts index e3fecee5..ffe2a5fa 100644 --- a/Yi.Ai.Vue3/src/config/index.ts +++ b/Yi.Ai.Vue3/src/config/index.ts @@ -12,4 +12,4 @@ export const COLLAPSE_THRESHOLD: number = 600; export const SIDE_BAR_WIDTH: number = 280; // 路由白名单地址[本地存在的路由 staticRouter.ts 中] -export const ROUTER_WHITE_LIST: string[] = ['/chat', '/chat/not_login', '/403', '/404']; +export const ROUTER_WHITE_LIST: string[] = ['/chat', '/chat/not_login', '/product', '/403', '/404']; diff --git a/Yi.Ai.Vue3/src/data/products.ts b/Yi.Ai.Vue3/src/data/products.ts new file mode 100644 index 00000000..109b11dc --- /dev/null +++ b/Yi.Ai.Vue3/src/data/products.ts @@ -0,0 +1,144 @@ +// 创建产品数据 +import { Product } from '@/api/products/products' + +export const products: Product[] = [ + { + id: 'basic', + name: '基础版', + title: 'AI基础解决方案', + description: '适合个人用户和小型团队的入门级AI工具', + highlight: '性价比之选', + features: [ + { + icon: 'MagicStick', + title: '基础模型', + description: '使用我们的基础AI模型完成日常任务' + }, + { + icon: 'Clock', + title: '快速响应', + description: '平均响应时间在2秒以内' + }, + { + icon: 'Lock', + title: '基础安全', + description: '标准数据加密和保护措施' + } + ], + pricing: [ + { + name: '月付', + price: 99, + period: '月', + features: ['1000次请求/月', '基础模型访问', '标准支持'] + }, + { + name: '年付', + price: 899, + period: '年', + features: ['12000次请求/年', '基础模型访问', '标准支持', '节省15%'] + } + ], + faqs: [ + { + question: '基础版适合哪些用户?', + answer: '适合个人开发者、小型团队或想尝试AI技术的用户。' + }, + { + question: '超出请求次数会怎样?', + answer: '超出后可以按需购买额外请求包或升级到更高版本。' + } + ] + }, + { + id: 'pro', + name: '专业版', + title: 'AI专业解决方案', + description: '为企业和专业开发者设计的高级AI工具集', + highlight: '最受欢迎', + features: [ + { + icon: 'Cpu', + title: '高级模型', + description: '使用我们最先进的AI模型获得更好结果' + }, + { + icon: 'DataLine', + title: '数据分析', + description: '内置数据分析工具和可视化' + }, + { + icon: 'User', + title: '优先支持', + description: '专属客户经理和技术支持' + } + ], + pricing: [ + { + name: '月付', + price: 299, + period: '月', + features: ['5000次请求/月', '高级模型访问', '优先支持', '数据分析工具'] + }, + { + name: '年付', + price: 2599, + period: '年', + features: ['60000次请求/年', '高级模型访问', '专属客户经理', '节省25%', '数据分析工具'], + isPopular: true + } + ], + faqs: [ + { + question: '专业版有什么额外功能?', + answer: '包含高级模型访问、数据分析工具和优先支持服务。' + }, + { + question: '可以定制请求次数吗?', + answer: '可以联系我们定制适合您业务需求的套餐。' + } + ] + }, + { + id: 'enterprise', + name: '企业版', + title: 'AI企业解决方案', + description: '为大型组织设计的全方位AI平台', + highlight: '全面定制', + features: [ + { + icon: 'Setting', + title: '完全定制', + description: '根据您的需求定制AI模型和工作流' + }, + { + icon: 'OfficeBuilding', + title: '专属部署', + description: '支持私有化部署和专属云服务' + }, + { + icon: 'Service', + title: '专属团队', + description: '我们的工程师团队为您提供专属支持' + } + ], + pricing: [ + { + name: '定制方案', + price: 0, + period: '', + features: ['无限请求', '完全定制模型', '私有化部署', '专属支持团队', 'SLA保障'] + } + ], + faqs: [ + { + question: '企业版如何定价?', + answer: '根据您的具体需求定制价格,请联系我们的销售团队获取报价。' + }, + { + question: '支持私有化部署吗?', + answer: '是的,我们支持完全的私有化部署以满足企业安全需求。' + } + ] + } +] diff --git a/Yi.Ai.Vue3/src/pages/product/index.vue b/Yi.Ai.Vue3/src/pages/product/index.vue new file mode 100644 index 00000000..e41cf847 --- /dev/null +++ b/Yi.Ai.Vue3/src/pages/product/index.vue @@ -0,0 +1,432 @@ + + + + + diff --git a/Yi.Ai.Vue3/src/pages/setup/index.vue b/Yi.Ai.Vue3/src/pages/setup/index.vue new file mode 100644 index 00000000..54b19c16 --- /dev/null +++ b/Yi.Ai.Vue3/src/pages/setup/index.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/Yi.Ai.Vue3/src/routers/index.ts b/Yi.Ai.Vue3/src/routers/index.ts index a40ac019..e2980df8 100644 --- a/Yi.Ai.Vue3/src/routers/index.ts +++ b/Yi.Ai.Vue3/src/routers/index.ts @@ -49,7 +49,7 @@ router.beforeEach( // // resetRouter(); // 预留 // return next(); // } - + console.log(`to---`,to) // 4、判断访问页面是否在路由白名单地址[静态路由]中,如果存在直接放行。 if (ROUTER_WHITE_LIST.includes(to.path)) return next(); diff --git a/Yi.Ai.Vue3/src/routers/modules/staticRouter.ts b/Yi.Ai.Vue3/src/routers/modules/staticRouter.ts index 73b7b2a4..1ba406ee 100644 --- a/Yi.Ai.Vue3/src/routers/modules/staticRouter.ts +++ b/Yi.Ai.Vue3/src/routers/modules/staticRouter.ts @@ -1,5 +1,5 @@ -import type { RouteRecordRaw } from 'vue-router'; -import { HOME_URL } from '@/config'; +import type {RouteRecordRaw} from 'vue-router'; +import {HOME_URL} from '@/config'; // LayoutRouter[布局路由] export const layoutRouter: RouteRecordRaw[] = [ @@ -31,6 +31,16 @@ export const layoutRouter: RouteRecordRaw[] = [ isDefaultChat: false, }, }, + { + path: '/products', + name: 'products', + component: () => import('@/pages/product/index.vue'), path: '/products', + meta: { + title: '产品页面', + keepAlive: true, // 如果需要缓存 + isDefaultChat: false // 根据实际情况设置 + } + }, ], }, ]; diff --git a/Yi.Ai.Vue3/types/components.d.ts b/Yi.Ai.Vue3/types/components.d.ts index eb991f07..ebaa6f6f 100644 --- a/Yi.Ai.Vue3/types/components.d.ts +++ b/Yi.Ai.Vue3/types/components.d.ts @@ -12,6 +12,9 @@ declare module 'vue' { DeepThinking: typeof import('./../src/components/DeepThinking/index.vue')['default'] ElAvatar: typeof import('element-plus/es')['ElAvatar'] ElButton: typeof import('element-plus/es')['ElButton'] + ElCard: typeof import('element-plus/es')['ElCard'] + ElCollapse: typeof import('element-plus/es')['ElCollapse'] + ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] ElContainer: typeof import('element-plus/es')['ElContainer'] ElDivider: typeof import('element-plus/es')['ElDivider'] ElEmpty: typeof import('element-plus/es')['ElEmpty'] @@ -22,6 +25,9 @@ declare module 'vue' { ElImage: typeof import('element-plus/es')['ElImage'] ElInput: typeof import('element-plus/es')['ElInput'] ElMain: typeof import('element-plus/es')['ElMain'] + ElTable: typeof import('element-plus/es')['ElTable'] + ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] + ElTag: typeof import('element-plus/es')['ElTag'] FilesSelect: typeof import('./../src/components/FilesSelect/index.vue')['default'] IconSelect: typeof import('./../src/components/IconSelect/index.vue')['default'] LoginDialog: typeof import('./../src/components/LoginDialog/index.vue')['default']