Skip to content

Commit 197279c

Browse files
committed
update docs
1 parent 7818322 commit 197279c

File tree

12 files changed

+302
-20
lines changed

12 files changed

+302
-20
lines changed

docs/.vuepress/client.ts

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import SponsorSidebar from './components/SponsorSidebar.vue';
1010
import BannerTop from './components/BannerTop.vue';
1111
import { NotFound } from 'vuepress-theme-plume/client';
1212
import { h } from 'vue';
13+
import Price from "./components/Price.vue";
1314

1415
export default defineClientConfig({
1516
enhance({ app }) {
@@ -19,6 +20,7 @@ export default defineClientConfig({
1920
app.component('SponsorHome', SponsorHome)
2021
app.component('SponsorSidebar', SponsorSidebar)
2122
app.component('BannerTop', BannerTop)
23+
app.component('Price', Price)
2224
},
2325
layouts: {
2426
Layout,

docs/.vuepress/components/Price.vue

+210
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
<template>
2+
<div class="pricing-container">
3+
<h1 class="pricing-title">选择适合您的版本</h1>
4+
<div class="pricing-cards">
5+
<!-- 开源版 -->
6+
<div class="pricing-card">
7+
<div class="card-content">
8+
<div class="card-header">
9+
<h2>{{ plans.openSource.title }}</h2>
10+
<p class="card-description">{{ plans.openSource.description }}</p>
11+
</div>
12+
<div class="price-section">
13+
<div class="current-price">{{ plans.openSource.price.current }}</div>
14+
<div v-if="plans.openSource.price.original" class="original-price">
15+
<del>{{ plans.openSource.price.original }}</del>
16+
</div>
17+
</div>
18+
<ul class="features-list">
19+
<li v-for="(feature, index) in plans.openSource.features" :key="index">
20+
<span class="feature-icon">✓</span>
21+
{{ feature }}
22+
</li>
23+
</ul>
24+
</div>
25+
<button class="cta-button">立即使用</button>
26+
</div>
27+
28+
<!-- 专业版 -->
29+
<div class="pricing-card highlighted">
30+
<div class="popular-tag">最受欢迎</div>
31+
<div class="card-content">
32+
<div class="card-header">
33+
<h2>{{ plans.professional.title }}</h2>
34+
<p class="card-description">{{ plans.professional.description }}</p>
35+
</div>
36+
<div class="price-section">
37+
<div class="current-price">{{ plans.professional.price.current }} <span class="billing-cycle">/ 年</span></div>
38+
<div v-if="plans.professional.price.original" class="original-price">
39+
<del>{{ plans.professional.price.original }}</del>
40+
</div>
41+
</div>
42+
<ul class="features-list">
43+
<li v-for="(feature, index) in plans.professional.features" :key="index">
44+
<span class="feature-icon">✓</span>
45+
{{ feature }}
46+
</li>
47+
</ul>
48+
</div>
49+
<button class="cta-button primary" @click="goSponsor">立即购买</button>
50+
</div>
51+
52+
<!-- 企业版 -->
53+
<div class="pricing-card">
54+
<div class="card-content">
55+
<div class="card-header">
56+
<h2>{{ plans.enterprise.title }}</h2>
57+
<p class="card-description">{{ plans.enterprise.description }}</p>
58+
</div>
59+
<div class="price-section">
60+
<div class="current-price">{{ plans.enterprise.price.current }} <span class="billing-cycle">/ 年</span></div>
61+
<div v-if="plans.enterprise.price.original" class="original-price">
62+
<del>{{ plans.enterprise.price.original }}</del>
63+
</div>
64+
</div>
65+
<ul class="features-list">
66+
<li v-for="(feature, index) in plans.enterprise.features" :key="index">
67+
<span class="feature-icon">✓</span>
68+
{{ feature }}
69+
</li>
70+
</ul>
71+
</div>
72+
<button class="cta-button" @click="goSponsor">立即购买</button>
73+
</div>
74+
</div>
75+
</div>
76+
</template>
77+
78+
<script setup>
79+
import { plans } from "../data/price";
80+
import { openSponsorLink, sponsorUrl } from "../data/sponsors";
81+
82+
const goSponsor = () => {
83+
openSponsorLink(sponsorUrl + '#有偿赞助')
84+
}
85+
</script>
86+
87+
<style scoped>
88+
.pricing-container {
89+
max-width: 1200px;
90+
margin: 0 auto;
91+
padding: 2rem 0;
92+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
93+
}
94+
95+
.pricing-title {
96+
text-align: center;
97+
margin-bottom: 3rem;
98+
}
99+
100+
.pricing-cards {
101+
display: grid;
102+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
103+
gap: 2rem;
104+
}
105+
106+
.pricing-card {
107+
position: relative;
108+
border: 1px solid var(--vp-c-border);
109+
border-radius: 8px;
110+
padding: 2rem;
111+
display: flex;
112+
flex-direction: column;
113+
height: 100%;
114+
}
115+
116+
.pricing-card.highlighted {
117+
border: 2px solid var(--vp-c-brand-1);
118+
}
119+
120+
.popular-tag {
121+
position: absolute;
122+
top: -18px;
123+
right: 20px;
124+
background-color: var(--vp-c-brand-1);
125+
color: white;
126+
padding: 0.25rem 1rem;
127+
border-radius: 20px;
128+
font-size: 0.8rem;
129+
font-weight: bold;
130+
}
131+
132+
.card-content {
133+
flex: 1;
134+
}
135+
136+
.card-header {
137+
margin-bottom: 1.5rem;
138+
text-align: center;
139+
}
140+
141+
.card-header h2 {
142+
font-size: 1.5rem;
143+
margin-bottom: 0.5rem;
144+
}
145+
146+
.card-description {
147+
font-size: 0.9rem;
148+
color: var(--vp-c-text-2);
149+
}
150+
151+
.price-section {
152+
text-align: center;
153+
margin-bottom: 1.5rem;
154+
}
155+
156+
.current-price {
157+
font-size: 2rem;
158+
font-weight: bold;
159+
color: var(--vp-c-brand-1);
160+
margin-bottom: 0.25rem;
161+
}
162+
163+
.billing-cycle {
164+
font-size: 1rem;
165+
color: var(--vp-c-text-3);
166+
}
167+
168+
.original-price {
169+
color: var(--vp-c-text-3);
170+
font-size: 1rem;
171+
}
172+
173+
.features-list {
174+
list-style: none;
175+
padding: 0;
176+
margin-bottom: 1.5rem;
177+
}
178+
179+
.features-list li {
180+
padding: 0.5rem 0;
181+
display: flex;
182+
align-items: center;
183+
}
184+
185+
.feature-icon {
186+
color: var(--vp-c-brand-1);
187+
margin-right: 0.5rem;
188+
font-weight: bold;
189+
}
190+
191+
.cta-button {
192+
width: 100%;
193+
padding: 0.75rem;
194+
border: 2px solid var(--vp-c-brand-1);
195+
border-radius: 5px;
196+
font-weight: bold;
197+
cursor: pointer;
198+
transition: all 0.2s ease;
199+
}
200+
201+
.cta-button:hover {
202+
background-color: var(--vp-c-brand-1);
203+
color: white;
204+
}
205+
206+
.cta-button.primary {
207+
background-color: var(--vp-c-brand-1);
208+
color: white;
209+
}
210+
</style>

docs/.vuepress/data/price.ts

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
export const plans = {
3+
openSource: {
4+
title: '开源版',
5+
description: '适合个人开发者和小型项目',
6+
price: {
7+
current: '免费',
8+
original: ''
9+
},
10+
features: [
11+
'全量架构源码',
12+
'社区支持',
13+
'MIT许可证',
14+
'剔除版权标识',
15+
'自主部署',
16+
'部分文档访问',
17+
'部分插件'
18+
]
19+
},
20+
professional: {
21+
title: '专业版',
22+
description: '适合中小企业和专业开发者',
23+
price: {
24+
current: '¥99',
25+
original: '¥1999'
26+
},
27+
features: [
28+
'所有开源版功能',
29+
'优先支持',
30+
'所有文档',
31+
'所有官方插件',
32+
'一对一指导',
33+
'远程支持'
34+
]
35+
},
36+
enterprise: {
37+
title: '企业版',
38+
description: '适合大型企业和关键业务',
39+
price: {
40+
current: '¥99',
41+
original: '¥8888'
42+
},
43+
features: [
44+
'所有专业版功能',
45+
]
46+
}
47+
}

docs/.vuepress/data/sponsors.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const goldSponsors: Sponsor[] = [
2828
link: 'https://img14.360buyimg.com/ddimg/jfs/t1/284966/5/22913/37242/68023351Faddd8304/6337ad52ea02ad10.jpg',
2929
href: 'https://share.302.ai/LJojhb',
3030
alt: '302.AI',
31-
expiryTime: '2025-05-18T16:35:00',
31+
expiryTime: '2025-06-18T16:35:00',
3232
},
3333
{ ...defaultSponsor }
3434
]

docs/.vuepress/navbar.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const myNavbar = defineNavbarConfig([
112112
{
113113
text: '购买授权',
114114
icon: 'fluent:person-key-20-filled',
115-
link: '/backend/summary/why.md#承诺'
115+
link: '/price'
116116
},
117117
{
118118
text: '赞助',

docs/.vuepress/sidebar.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const mySidebar: ThemeSidebarMulti = {
7272
},
7373
{
7474
text: '开发',
75-
collapsed: true,
75+
collapsed: false,
7676
items: [
7777
{ text: '插件开发', link: 'dev' },
7878
{ text: '插件发布', link: 'publish' },

docs/backend/deploy/legacy.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ title: 传统部署
77
:::
88

99
::: tip
10-
由于传统部署方案涉及修改的地方较多且较为复杂,因此无法提供此部署教程,但您可以选择 [知识星球](../../planet.md)
11-
,我们可以为您提供一对一专属指导和远程支持
10+
由于传统部署方案涉及修改的地方较多且较为复杂,因此无法提供此部署教程。查看我们的 [授权方案](../../price.md),获取一对一指导和远程支持
1211
:::
1312

1413
::: note

docs/backend/summary/why.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@ import NpmBadge from 'vuepress-theme-plume/features/NpmBadge.vue'
2121

2222
## 承诺
2323

24-
<div style="text-align: center">
25-
<h1>「永久免授权」</h1>
26-
<p>如果可以,请您给此项目一个 <NpmBadge repo="fastapi-practices/fastapi_best_architecture" type="stars" />,此仓库作为模板库公开,任何个人或企业均可免费使用!</p>
27-
<p style="float: right">--- <a href="https://github.com/fastapi-practices">fastapi-practices</a>对此拥有所有解释权</p>
28-
<br>
29-
</div>
24+
此仓库作为模板库公开,任何个人或企业均可免费使用!您可以通过 [购买授权](../../price.md) 查看我们的授权方案
3025

3126
## 架构
3227

docs/planet.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: 知识星球
3+
aside: false
34
---
45

56
<div align="center">
67

78
星球内容为非公开内容,扫码加入知识星球,即可获取独家内容
89

9-
附:星球用于 [有偿赞助](../../sponsors.md#有偿赞助),加入 Discord
10-
社区,即可 [领取免费体验资格](https://discord.gg/Sdg6dT5kjz)
10+
加入 Discord 社区,即可 [领取免费体验资格](https://discord.gg/Sdg6dT5kjz)
1111

1212
</div>
1313

docs/plugin/market.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: 插件市场
3+
aside: false
34
---
45

56
::: info 标签说明

docs/price.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: 购买授权
3+
aside: false
4+
editLink: false
5+
---
6+
7+
<Price />
8+
9+
<style setup>
10+
.vp-doc-meta {
11+
display: none !important;
12+
}
13+
14+
@media (min-width: 1440px) {
15+
.vp-doc-container:not(.has-sidebar) .content {
16+
max-width: unset !important;
17+
}
18+
}
19+
20+
@media (min-width: 960px) {
21+
.vp-doc-container:not(.has-sidebar) .content {
22+
max-width: unset !important;
23+
}
24+
}
25+
</style>

0 commit comments

Comments
 (0)