feat: 完成cicd流水线

This commit is contained in:
ccnetcore
2025-06-19 01:02:08 +08:00
parent 890727d495
commit 899bd7e316
5 changed files with 133 additions and 86 deletions

24
Yi.Ai.Vue3/publish.bat Normal file
View File

@@ -0,0 +1,24 @@
@echo on
set SERVER_USER=root
set SERVER_IP=ccnetcore.com
set FILE_PATH=publish_aihub_02.zip
set REMOTE_PATH=/home/yi/build/publish_aihub_02.zip
set REMOTE_COMMAND="cd /home/yi/aihub&&pwd&&unzip -o /home/yi/build/publish_aihub_02.zip -d ./"
set sevenzip_Path="D:\Program Files\7-Zip\7z.exe"
echo start
echo 1-build-start
:: npm run build
echo 1-build-end
echo 2-zip-start
%sevenzip_Path% a ./publish_aihub_02.zip ./dist/*
:: tar -cvf publish_bbs_02.zip -C "dist" "*"
echo 2-zip-end
echo 3-publish-start
scp %FILE_PATH% %SERVER_USER%@%SERVER_IP%:%REMOTE_PATH%
ssh %SERVER_USER%@%SERVER_IP% %REMOTE_COMMAND%
echo 3-publish-end
echo end
pause

View File

@@ -1,5 +1,5 @@
// 创建产品数据
import { Product } from '@/api/products/products'
import type { Product } from '@/api/products/products';
export const products: Product[] = [
{
@@ -12,43 +12,43 @@ export const products: Product[] = [
{
icon: 'MagicStick',
title: '基础模型',
description: '使用我们的基础AI模型完成日常任务'
description: '使用我们的基础AI模型完成日常任务',
},
{
icon: 'Clock',
title: '快速响应',
description: '平均响应时间在2秒以内'
description: '平均响应时间在2秒以内',
},
{
icon: 'Lock',
title: '基础安全',
description: '标准数据加密和保护措施'
}
description: '标准数据加密和保护措施',
},
],
pricing: [
{
name: '月付',
price: 99,
period: '月',
features: ['1000次请求/月', '基础模型访问', '标准支持']
features: ['1000次请求/月', '基础模型访问', '标准支持'],
},
{
name: '年付',
price: 899,
period: '年',
features: ['12000次请求/年', '基础模型访问', '标准支持', '节省15%']
}
features: ['12000次请求/年', '基础模型访问', '标准支持', '节省15%'],
},
],
faqs: [
{
question: '基础版适合哪些用户?',
answer: '适合个人开发者、小型团队或想尝试AI技术的用户。'
answer: '适合个人开发者、小型团队或想尝试AI技术的用户。',
},
{
question: '超出请求次数会怎样?',
answer: '超出后可以按需购买额外请求包或升级到更高版本。'
}
]
answer: '超出后可以按需购买额外请求包或升级到更高版本。',
},
],
},
{
id: 'pro',
@@ -60,44 +60,44 @@ export const products: Product[] = [
{
icon: 'Cpu',
title: '高级模型',
description: '使用我们最先进的AI模型获得更好结果'
description: '使用我们最先进的AI模型获得更好结果',
},
{
icon: 'DataLine',
title: '数据分析',
description: '内置数据分析工具和可视化'
description: '内置数据分析工具和可视化',
},
{
icon: 'User',
title: '优先支持',
description: '专属客户经理和技术支持'
}
description: '专属客户经理和技术支持',
},
],
pricing: [
{
name: '月付',
price: 299,
period: '月',
features: ['5000次请求/月', '高级模型访问', '优先支持', '数据分析工具']
features: ['5000次请求/月', '高级模型访问', '优先支持', '数据分析工具'],
},
{
name: '年付',
price: 2599,
period: '年',
features: ['60000次请求/年', '高级模型访问', '专属客户经理', '节省25%', '数据分析工具'],
isPopular: true
}
isPopular: true,
},
],
faqs: [
{
question: '专业版有什么额外功能?',
answer: '包含高级模型访问、数据分析工具和优先支持服务。'
answer: '包含高级模型访问、数据分析工具和优先支持服务。',
},
{
question: '可以定制请求次数吗?',
answer: '可以联系我们定制适合您业务需求的套餐。'
}
]
answer: '可以联系我们定制适合您业务需求的套餐。',
},
],
},
{
id: 'enterprise',
@@ -109,36 +109,36 @@ export const products: Product[] = [
{
icon: 'Setting',
title: '完全定制',
description: '根据您的需求定制AI模型和工作流'
description: '根据您的需求定制AI模型和工作流',
},
{
icon: 'OfficeBuilding',
title: '专属部署',
description: '支持私有化部署和专属云服务'
description: '支持私有化部署和专属云服务',
},
{
icon: 'Service',
title: '专属团队',
description: '我们的工程师团队为您提供专属支持'
}
description: '我们的工程师团队为您提供专属支持',
},
],
pricing: [
{
name: '定制方案',
price: 0,
period: '',
features: ['无限请求', '完全定制模型', '私有化部署', '专属支持团队', 'SLA保障']
}
features: ['无限请求', '完全定制模型', '私有化部署', '专属支持团队', 'SLA保障'],
},
],
faqs: [
{
question: '企业版如何定价?',
answer: '根据您的具体需求定制价格,请联系我们的销售团队获取报价。'
answer: '根据您的具体需求定制价格,请联系我们的销售团队获取报价。',
},
{
question: '支持私有化部署吗?',
answer: '是的,我们支持完全的私有化部署以满足企业安全需求。'
}
]
}
]
answer: '是的,我们支持完全的私有化部署以满足企业安全需求。',
},
],
},
];

View File

@@ -1,15 +1,48 @@
<script setup lang="ts">
import type { Product } from '@/api/products/products';
import { ArrowDown, CircleCheck } from '@element-plus/icons-vue';
import { computed, ref } from 'vue';
import { products } from '@/data/products';
const productsSection = ref<HTMLElement | null>(null);
function scrollToProducts() {
productsSection.value?.scrollIntoView({ behavior: 'smooth' });
}
function hasPopularPlan(product: Product) {
return product.pricing.some(plan => plan.isPopular);
}
const comparisonData = computed(() => {
return [
{ feature: '基础模型访问', basic: '✓', pro: '✓', enterprise: '✓' },
{ feature: '高级模型访问', basic: '✗', pro: '✓', enterprise: '✓' },
{ feature: '请求次数', basic: '有限', pro: '较多', enterprise: '无限' },
{ feature: '支持响应', basic: '标准', pro: '优先', enterprise: '专属' },
{ feature: '数据分析工具', basic: '✗', pro: '✓', enterprise: '✓' },
{ feature: '定制模型', basic: '✗', pro: '有限', enterprise: '完全' },
{ feature: '部署方式', basic: '公有云', pro: '公有云', enterprise: '私有/公有' },
];
});
</script>
<template>
<div class="products-page">
<!-- Hero Section -->
<section class="hero-section">
<div class="container">
<h1 class="hero-title">AI 订阅服务</h1>
<h1 class="hero-title">
AI 订阅服务
</h1>
<p class="hero-subtitle">
选择适合您需求的AI解决方案释放人工智能的全部潜力
</p>
<el-button type="primary" size="large" round @click="scrollToProducts">
查看产品
<el-icon class="ml-2"><ArrowDown /></el-icon>
<el-icon class="ml-2">
<ArrowDown />
</el-icon>
</el-button>
</div>
</section>
@@ -17,7 +50,9 @@
<!-- Products Comparison -->
<section class="comparison-section">
<div class="container">
<h2 class="section-title">产品对比</h2>
<h2 class="section-title">
产品对比
</h2>
<div class="comparison-table">
<el-table :data="comparisonData" style="width: 100%" border>
<el-table-column prop="feature" label="功能" width="180" />
@@ -30,9 +65,11 @@
</section>
<!-- Products Cards -->
<section class="products-section" ref="productsSection">
<section ref="productsSection" class="products-section">
<div class="container">
<h2 class="section-title">我们的产品</h2>
<h2 class="section-title">
我们的产品
</h2>
<div class="products-grid">
<el-card
v-for="product in products"
@@ -42,21 +79,31 @@
shadow="hover"
>
<div class="product-header">
<div class="product-badge" v-if="hasPopularPlan(product)">
<div v-if="hasPopularPlan(product)" class="product-badge">
最受欢迎
</div>
<h3 class="product-name">{{ product.name }}</h3>
<p class="product-title">{{ product.title }}</p>
<p class="product-description">{{ product.description }}</p>
<h3 class="product-name">
{{ product.name }}
</h3>
<p class="product-title">
{{ product.title }}
</p>
<p class="product-description">
{{ product.description }}
</p>
</div>
<div class="product-highlight">
<el-tag type="info" effect="dark" round>{{ product.highlight }}</el-tag>
<el-tag type="info" effect="dark" round>
{{ product.highlight }}
</el-tag>
</div>
<div class="product-features">
<div v-for="feature in product.features" :key="feature.title" class="feature-item">
<el-icon class="feature-icon"><component :is="feature.icon" /></el-icon>
<el-icon class="feature-icon">
<component :is="feature.icon" />
</el-icon>
<div class="feature-text">
<h4>{{ feature.title }}</h4>
<p>{{ feature.description }}</p>
@@ -73,17 +120,19 @@
>
<div class="plan-header">
<h4>{{ plan.name }}</h4>
<div class="plan-price" v-if="plan.price > 0">
<div v-if="plan.price > 0" class="plan-price">
<span class="price-amount">¥{{ plan.price }}</span>
<span class="price-period">/{{ plan.period }}</span>
</div>
<div class="plan-price" v-else>
<div v-else class="plan-price">
<span class="price-amount">定制价格</span>
</div>
</div>
<ul class="plan-features">
<li v-for="(feature, idx) in plan.features" :key="idx">
<el-icon class="feature-check"><CircleCheck /></el-icon>
<el-icon class="feature-check">
<CircleCheck />
</el-icon>
{{ feature }}
</li>
</ul>
@@ -105,10 +154,12 @@
<!-- FAQ Section -->
<section class="faq-section">
<div class="container">
<h2 class="section-title">常见问题</h2>
<h2 class="section-title">
常见问题
</h2>
<div class="faq-grid">
<el-collapse v-for="product in products" :key="product.id + '-faq'" accordion>
<el-collapse-item :title="product.name + '常见问题'" :name="product.id">
<el-collapse v-for="product in products" :key="`${product.id}-faq`" accordion>
<el-collapse-item :title="`${product.name}常见问题`" :name="product.id">
<div v-for="(faq, idx) in product.faqs" :key="idx" class="faq-item">
<h4>{{ faq.question }}</h4>
<p>{{ faq.answer }}</p>
@@ -121,35 +172,6 @@
</div>
</template>
<script setup lang="ts">
import { ref, computed } from 'vue'
import { ArrowDown, CircleCheck, MagicStick, Clock, Lock, Cpu, DataLine, User, Setting, OfficeBuilding, Service } from '@element-plus/icons-vue'
import { products } from '@/data/products'
import { Product } from '@/api/products/products'
const productsSection = ref<HTMLElement | null>(null)
const scrollToProducts = () => {
productsSection.value?.scrollIntoView({ behavior: 'smooth' })
}
const hasPopularPlan = (product: Product) => {
return product.pricing.some(plan => plan.isPopular)
}
const comparisonData = computed(() => {
return [
{ feature: '基础模型访问', basic: '✓', pro: '✓', enterprise: '✓' },
{ feature: '高级模型访问', basic: '✗', pro: '✓', enterprise: '✓' },
{ feature: '请求次数', basic: '有限', pro: '较多', enterprise: '无限' },
{ feature: '支持响应', basic: '标准', pro: '优先', enterprise: '专属' },
{ feature: '数据分析工具', basic: '✗', pro: '✓', enterprise: '✓' },
{ feature: '定制模型', basic: '✗', pro: '有限', enterprise: '完全' },
{ feature: '部署方式', basic: '公有云', pro: '公有云', enterprise: '私有/公有' }
]
})
</script>
<style scoped lang="scss">
.products-page {
color: #333;

View File

@@ -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[] = [
@@ -34,12 +34,12 @@ export const layoutRouter: RouteRecordRaw[] = [
{
path: '/products',
name: 'products',
component: () => import('@/pages/product/index.vue'), path: '/products',
component: () => import('@/pages/product/index.vue'),
meta: {
title: '产品页面',
keepAlive: true, // 如果需要缓存
isDefaultChat: false // 根据实际情况设置
}
isDefaultChat: false, // 根据实际情况设置
},
},
],
},

View File

@@ -5,6 +5,7 @@ interface ImportMetaEnv {
readonly VITE_WEB_TITLE_EN: string;
readonly VITE_WEB_ENV: string;
readonly VITE_WEB_BASE_API: string;
readonly VITE_BUILD_COMPRESS: string;
readonly VITE_API_URL: string;
}