feat: 产品订阅页面优化
This commit is contained in:
@@ -1,462 +1,217 @@
|
||||
<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';
|
||||
import { useDesignStore } from '@/stores';
|
||||
<script lang="ts" setup>
|
||||
import { CircleCheck } from '@element-plus/icons-vue';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import SupportModelProducts from '@/components/SupportModelProducts/indexl.vue';
|
||||
|
||||
const designStore = useDesignStore();
|
||||
const pricing = [
|
||||
{
|
||||
name: 'VIP',
|
||||
price: 49.9,
|
||||
period: '终身',
|
||||
isPopular: false,
|
||||
features: [
|
||||
'基础+高级模型访问',
|
||||
'AI超级加速',
|
||||
'无限制使用',
|
||||
'售后微信群支持',
|
||||
'可用29.9元优惠券',
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'VIP + 邀请1人',
|
||||
price: 29.9,
|
||||
period: '每人',
|
||||
isPopular: true,
|
||||
features: [
|
||||
'基础+高级模型访问',
|
||||
'AI超级加速',
|
||||
'无限制使用',
|
||||
'售后微信群支持',
|
||||
'不支持优惠券',
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'VIP + 支持站长',
|
||||
price: 69.9,
|
||||
period: '终身',
|
||||
isPopular: false,
|
||||
features: [
|
||||
'基础+高级模型访问',
|
||||
'AI超级加速',
|
||||
'无限制使用',
|
||||
'售后微信群优先处理',
|
||||
'可用49.9元优惠券',
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
onMounted(() => {
|
||||
designStore._setLayout('blankPage');
|
||||
});
|
||||
const productsSection = ref<HTMLElement | null>(null);
|
||||
const faqs = [
|
||||
{
|
||||
question: '意心AI是否真的“无限制”?',
|
||||
answer: '在日常合理使用范围内,我们不做次数限制。但如检测到滥用行为,将封号处理。',
|
||||
},
|
||||
{
|
||||
question: '是否支持退款?',
|
||||
answer: '我们支持良心售后,1天内可申请退款,请联系售后微信群或站长。',
|
||||
},
|
||||
{
|
||||
question: '平台是直连的吗?',
|
||||
answer: '是的,我们不是通过其他平台转发,而是与各大AI服务官方API直接对接。',
|
||||
},
|
||||
];
|
||||
function openContact() {
|
||||
ElMessageBox.alert(
|
||||
`
|
||||
<div class="text-center relative">
|
||||
<h3 class="text-lg font-bold mb-3">请扫码或搜索微信号添加站长微信<br>
|
||||
获取专属客服支持,完成充值</h3>
|
||||
<div class="mb-4 flex items-center justify-center space-x-2">
|
||||
<span class="font-semibold">微信账号:</span>
|
||||
<span class="text-blue-600 font-mono select-text" id="wechat-id">chengzilaoge520</span>
|
||||
<span class="cursor-pointer" onclick="navigator.clipboard.writeText('chengzilaoge520').then(() => { window.parent.ElMessage({
|
||||
message: '微信号已复制到剪贴板',
|
||||
type: 'success',
|
||||
duration: 2000,
|
||||
});})"
|
||||
title="点击复制">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 opacity-70 hover:opacity-100" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v16h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 18H8V7h11v16z"/>
|
||||
</svg>
|
||||
</span>
|
||||
|
||||
function scrollToProducts() {
|
||||
productsSection.value?.scrollIntoView({ behavior: 'smooth' });
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex justify-center mb-4">
|
||||
<img
|
||||
src="/wx_chengzilaoge520.png"
|
||||
class="w-50 h-70 border border-gray-200 rounded-lg shadow-md cursor-pointer hover:shadow-lg transition-transform hover:scale-105"
|
||||
onclick="document.getElementById('wechat-qrcode-fullscreen').style.display = 'flex'"
|
||||
alt="微信二维码"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="text-sm text-gray-600">
|
||||
<p class="mb-1">请备注 <span class="inline-block bg-yellow-100 text-yellow-800 px-2 py-0.5 rounded text-xs">AI</span> 快速通过验证</p>
|
||||
</div>
|
||||
|
||||
<!-- 全屏放大二维码 -->
|
||||
<div
|
||||
id="wechat-qrcode-fullscreen"
|
||||
style="display:none; position:fixed; inset:0; background:rgba(0,0,0,0.8); z-index:9999; justify-content:center; align-items:center;"
|
||||
onclick="this.style.display='none'"
|
||||
>
|
||||
<img
|
||||
src="/wx_chengzilaoge520.png"
|
||||
style="max-width:90%; max-height:90%; border:8px solid white; border-radius:16px; box-shadow:0 0 40px rgba(255,255,255,0.2);"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
`,
|
||||
'联系站长',
|
||||
{
|
||||
confirmButtonText: '我知道了',
|
||||
dangerouslyUseHTMLString: true,
|
||||
customClass: 'wechat-message-box',
|
||||
callback: () => {
|
||||
console.log('用户已查看微信信息');
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
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>
|
||||
<p class="hero-subtitle">
|
||||
选择适合您需求的AI解决方案,释放人工智能的全部潜力
|
||||
</p>
|
||||
<el-button type="primary" size="large" round @click="scrollToProducts">
|
||||
查看产品
|
||||
<el-icon class="ml-2">
|
||||
<ArrowDown />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
</section>
|
||||
<div class="px-6 py-10 max-w-7xl mx-auto">
|
||||
<h1 class="text-4xl font-bold text-center mb-6">
|
||||
意心AI 订阅套餐
|
||||
</h1>
|
||||
<p class="text-center text-lg text-gray-600 mb-10">
|
||||
市面罕见直连站点 · 不限速 · 无套路
|
||||
</p>
|
||||
|
||||
<!-- Products Comparison -->
|
||||
<section class="comparison-section">
|
||||
<div class="container">
|
||||
<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" />
|
||||
<el-table-column prop="basic" label="基础版" />
|
||||
<el-table-column prop="pro" label="专业版" />
|
||||
<el-table-column prop="enterprise" label="企业版" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Products Cards -->
|
||||
<section ref="productsSection" class="products-section">
|
||||
<div class="container">
|
||||
<h2 class="section-title">
|
||||
我们的产品
|
||||
</h2>
|
||||
<div class="products-grid">
|
||||
<el-card
|
||||
v-for="product in products"
|
||||
:key="product.id"
|
||||
class="product-card"
|
||||
:class="{ 'popular-card': hasPopularPlan(product) }"
|
||||
shadow="hover"
|
||||
<div class="grid md:grid-cols-3 gap-6">
|
||||
<el-card
|
||||
v-for="(plan, index) in pricing"
|
||||
:key="index"
|
||||
class="rounded-2xl shadow hover:shadow-lg transition-all" :class="[plan.isPopular ? 'border-2 border-blue-500' : '']"
|
||||
>
|
||||
<div class="flex flex-col items-center text-center">
|
||||
<h2 class="text-2xl font-semibold mb-2">
|
||||
{{ plan.name }}
|
||||
</h2>
|
||||
<p class="text-3xl font-bold text-blue-600 mb-2">
|
||||
¥{{ plan.price }}
|
||||
</p>
|
||||
<p class="text-sm text-gray-500 mb-4">
|
||||
{{ plan.period }}
|
||||
</p>
|
||||
<el-divider />
|
||||
<ul class="text-left space-y-2 w-full">
|
||||
<li v-for="(feature, i) in plan.features" :key="i" class="flex items-start gap-2">
|
||||
<el-icon><CircleCheck /></el-icon>
|
||||
<span>{{ feature }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<el-button
|
||||
class="mt-6 w-full"
|
||||
type="primary"
|
||||
size="large"
|
||||
@click="openContact"
|
||||
>
|
||||
<div class="product-header">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="product-highlight">
|
||||
<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>
|
||||
<div class="feature-text">
|
||||
<h4>{{ feature.title }}</h4>
|
||||
<p>{{ feature.description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pricing-plans">
|
||||
<div
|
||||
v-for="plan in product.pricing"
|
||||
:key="plan.name"
|
||||
class="pricing-plan"
|
||||
:class="{ 'popular-plan': plan.isPopular }"
|
||||
>
|
||||
<div class="plan-header">
|
||||
<h4>{{ plan.name }}</h4>
|
||||
<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 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>
|
||||
{{ feature }}
|
||||
</li>
|
||||
</ul>
|
||||
<el-button
|
||||
type="primary"
|
||||
class="subscribe-btn"
|
||||
:class="{ 'popular-btn': plan.isPopular }"
|
||||
round
|
||||
>
|
||||
立即订阅
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
立即订阅
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<!-- FAQ Section -->
|
||||
<section class="faq-section">
|
||||
<div class="container">
|
||||
<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">
|
||||
<div v-for="(faq, idx) in product.faqs" :key="idx" class="faq-item">
|
||||
<h4>{{ faq.question }}</h4>
|
||||
<p>{{ faq.answer }}</p>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<el-divider class="my-16">
|
||||
充值流程说明
|
||||
</el-divider>
|
||||
<el-card class="max-w-2xl mx-auto shadow-md rounded-2xl">
|
||||
<h3 class="text-xl font-semibold mb-4">
|
||||
如何充值 VIP
|
||||
</h3>
|
||||
<ol class="list-decimal list-inside space-y-2 text-gray-700">
|
||||
<li>注册意社区账号(手机验证码,如收不到可联系站长)</li>
|
||||
<li>添加站长微信,备注“AI”</li>
|
||||
<li>完成充值后,重新登录,即可解锁全部功能</li>
|
||||
</ol>
|
||||
<el-alert
|
||||
class="mt-6"
|
||||
type="warning"
|
||||
title="请勿滥用,勿共享账号,系统将自动检测"
|
||||
show-icon
|
||||
:closable="false"
|
||||
/>
|
||||
</el-card>
|
||||
|
||||
<SupportModelProducts />
|
||||
|
||||
<el-divider class="my-16">
|
||||
常见问题
|
||||
</el-divider>
|
||||
<el-collapse class="max-w-3xl mx-auto" accordion>
|
||||
<el-collapse-item
|
||||
v-for="(faq, index) in faqs"
|
||||
:key="index"
|
||||
:title="faq.question"
|
||||
>
|
||||
<p class="text-gray-700">
|
||||
{{ faq.answer }}
|
||||
</p>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.products-page {
|
||||
height: 100vh;
|
||||
overflow: auto;
|
||||
color: #333;
|
||||
line-height: 1.6;
|
||||
<style scoped>
|
||||
.el-card {
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
text-align: center;
|
||||
font-size: 2rem;
|
||||
margin-bottom: 2.5rem;
|
||||
color: #2c3e50;
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 80px;
|
||||
height: 4px;
|
||||
background: linear-gradient(90deg, #3f87a6, #ebf8e1);
|
||||
margin: 0.5rem auto 0;
|
||||
border-radius: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Hero Section */
|
||||
.hero-section {
|
||||
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
||||
padding: 6rem 0;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
|
||||
.hero-title {
|
||||
font-size: 3rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.hero-subtitle {
|
||||
font-size: 1.25rem;
|
||||
max-width: 700px;
|
||||
margin: 0 auto 2rem;
|
||||
color: #5a6a85;
|
||||
}
|
||||
}
|
||||
|
||||
/* Comparison Section */
|
||||
.comparison-section {
|
||||
padding: 4rem 0;
|
||||
background-color: #fff;
|
||||
|
||||
.comparison-table {
|
||||
margin-top: 2rem;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
/* Products Section */
|
||||
.products-section {
|
||||
padding: 4rem 0;
|
||||
background-color: #f8fafc;
|
||||
|
||||
.products-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||
gap: 2rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.product-card {
|
||||
border-radius: 12px;
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border: none;
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
&.popular-card {
|
||||
border-top: 4px solid #3f87a6;
|
||||
}
|
||||
}
|
||||
|
||||
.product-header {
|
||||
padding: 1.5rem 1.5rem 0;
|
||||
text-align: center;
|
||||
|
||||
.product-badge {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: #3f87a6;
|
||||
color: white;
|
||||
padding: 0.25rem 1rem;
|
||||
border-bottom-left-radius: 8px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.product-name {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 0.5rem;
|
||||
color: #2c3e50;
|
||||
}
|
||||
|
||||
.product-title {
|
||||
font-size: 1.1rem;
|
||||
color: #3f87a6;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.product-description {
|
||||
color: #666;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.product-highlight {
|
||||
text-align: center;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.product-features {
|
||||
padding: 0 1.5rem;
|
||||
|
||||
.feature-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 1.25rem;
|
||||
|
||||
.feature-icon {
|
||||
font-size: 1.5rem;
|
||||
color: #3f87a6;
|
||||
margin-right: 1rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.feature-text {
|
||||
h4 {
|
||||
margin: 0 0 0.25rem;
|
||||
font-size: 1rem;
|
||||
color: #2c3e50;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
color: #666;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pricing-plans {
|
||||
margin-top: 2rem;
|
||||
border-top: 1px solid #eee;
|
||||
padding: 1.5rem;
|
||||
|
||||
.pricing-plan {
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
padding: 1.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||
|
||||
&.popular-plan {
|
||||
border: 2px solid #3f87a6;
|
||||
}
|
||||
|
||||
.plan-header {
|
||||
text-align: center;
|
||||
margin-bottom: 1rem;
|
||||
|
||||
h4 {
|
||||
margin: 0 0 0.5rem;
|
||||
font-size: 1.1rem;
|
||||
color: #2c3e50;
|
||||
}
|
||||
|
||||
.plan-price {
|
||||
.price-amount {
|
||||
font-size: 1.75rem;
|
||||
font-weight: 700;
|
||||
color: #3f87a6;
|
||||
}
|
||||
|
||||
.price-period {
|
||||
font-size: 1rem;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.plan-features {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0 0 1.5rem;
|
||||
|
||||
li {
|
||||
padding: 0.5rem 0;
|
||||
font-size: 0.9rem;
|
||||
color: #555;
|
||||
|
||||
.feature-check {
|
||||
color: #3f87a6;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.subscribe-btn {
|
||||
width: 100%;
|
||||
|
||||
&.popular-btn {
|
||||
background: linear-gradient(90deg, #3f87a6, #5ab1d8);
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* FAQ Section */
|
||||
.faq-section {
|
||||
padding: 4rem 0;
|
||||
background-color: #fff;
|
||||
|
||||
.faq-grid {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
|
||||
.faq-item {
|
||||
padding: 1rem 0;
|
||||
|
||||
h4 {
|
||||
margin: 0 0 0.5rem;
|
||||
color: #2c3e50;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.hero-section {
|
||||
padding: 4rem 0;
|
||||
|
||||
.hero-title {
|
||||
font-size: 2.2rem;
|
||||
}
|
||||
|
||||
.hero-subtitle {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.products-grid {
|
||||
grid-template-columns: 1fr !important;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
.el-card:hover {
|
||||
transform: scale(1.02);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user