Skip to content

Commit 1fdd2c7

Browse files
committed
update docs
1 parent 887dffe commit 1fdd2c7

File tree

4 files changed

+24
-20
lines changed

4 files changed

+24
-20
lines changed

docs/.vuepress/navbar.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const myNavbar = defineNavbarConfig([
109109
link: '/plugin/before'
110110
},
111111
{
112-
text: '购买授权',
112+
text: '购买特权',
113113
icon: 'fluent:person-key-20-filled',
114114
link: '/pricing'
115115
},
@@ -121,7 +121,7 @@ export const myNavbar = defineNavbarConfig([
121121
{
122122
text: '互动',
123123
icon: 'game-icons:talk',
124-
badge: { text: 'HOT', type: 'danger' },
124+
badge: { text: 'HOT', type: 'warning' },
125125
link: '/group'
126126
},
127127
{

docs/.vuepress/sidebar.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,20 @@ export const mySidebar: ThemeSidebarMulti = {
3434
{ text: 'CRUD', link: 'CRUD' },
3535
{ text: '接口响应', link: 'response' },
3636
{ text: '分页', link: 'pagination' },
37-
{ text: '自定义异常', link: '/planet' },
37+
{ text: '自定义异常', link: '/planet', badge: { text: '专业版', type: 'warning' } },
3838
{ text: '节流', link: 'limit' },
3939
{ text: '切换数据库', link: 'db' },
4040
{ text: 'JWT', link: 'jwt' },
4141
{ text: 'RBAC', link: 'RBAC' },
4242
{ text: 'OAuth 2.0', link: 'oauth2' },
43-
{ text: '数据权限', link: '/planet' },
43+
{ text: '数据权限', link: '/planet', badge: { text: '专业版', type: 'warning' } },
4444
{ text: '代码生成', link: 'code-generation' },
4545
{ text: '跨域', link: 'CORS' },
4646
{ text: '事务', link: 'transaction' },
47-
{ text: 'Celery', link: '/planet' },
47+
{ text: 'Celery', link: '/planet', badge: { text: '专业版', type: 'warning' } },
4848
{ text: 'APScheduler', link: 'apscheduler' },
49-
// {text: '日志分析', link: '/planet'},
50-
{ text: 'SocketIo', link: '/planet' },
49+
// {text: '日志分析', link: '/planet', badge: { text: '专业版', type: 'warning' } },
50+
{ text: 'SocketIo', link: '/planet', badge: { text: '专业版', type: 'warning' } },
5151
{ text: 'SSO', link: 'sso' },
5252
]
5353
},
@@ -57,7 +57,7 @@ export const mySidebar: ThemeSidebarMulti = {
5757
prefix: 'deploy/',
5858
items: [
5959
{ text: 'Docker', link: 'Docker' },
60-
{ text: '传统', link: 'legacy', icon: 'fluent-color:video-16' },
60+
{ text: '传统', link: 'legacy' },
6161
]
6262
},
6363
],

docs/backend/reference/CORS.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: 跨域
99

1010
```py
1111
CORS_ALLOWED_ORIGINS: list[str] = [
12-
'http://localhost:5173', # 前端访问地址,末尾不要带 '/'
12+
'http://localhost:5173', # 前端访问地址,末尾不带 '/'
1313
]
1414
```
1515

@@ -21,7 +21,7 @@ CORS_ALLOWED_ORIGINS: list[str] = [
2121
```py
2222
# [!code word:http]
2323
CORS_ALLOWED_ORIGINS: list[str] = [
24-
'http://服务器ip:端口号', # 前端访问地址,末尾不要带 '/'
24+
'http://服务器ip:端口号', # 前端访问地址,末尾不带 '/',当端口号为 80 时,不要添加端口号
2525
]
2626
```
2727

@@ -30,14 +30,26 @@ CORS_ALLOWED_ORIGINS: list[str] = [
3030
```py
3131
# [!code word:https]
3232
CORS_ALLOWED_ORIGINS: list[str] = [
33-
'https://域名', # 前端访问地址,末尾不要带 '/'
33+
'https://域名', # 前端访问地址,末尾不带 '/'
3434
]
3535
```
3636

37+
:::
38+
3739
## 局域网
3840

39-
此方式取决于前端项目是否配置局域网服务
41+
此方式取决于前端项目是否配置了局域网服务
4042

4143
```py
4244
CORS_ALLOWED_ORIGINS: list[str] = ['*']
4345
```
46+
47+
## 温馨提示
48+
49+
当将 `CORS_ALLOWED_ORIGINS` 配置为 `['*']` 时,socketio 将无法正常工作,这是由于它们的配置方式不同所导致的
50+
51+
这里有一个相关 PR: [python-engineio/pull/410](https://github.com/miguelgrinberg/python-engineio/pull/410)
52+
53+
如果此 PR 不被接受,请在 `backend/common/socketio/server.py` 文件中修改以下内容:
54+
55+
`cors_allowed_origins=settings.CORS_ALLOWED_ORIGINS` -> `cors_allowed_origins='*'`

docs/plugin/market.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@ title: 插件市场
33
aside: false
44
---
55

6-
::: details 标签说明
7-
8-
| <Badge text="MySQL" color="#006484" bg-color="rgba(0, 100, 132, 0.1)" border-color="rgba(0, 100, 132, 0.2)" /> | <Badge text="PostgreSQL" color="#336699" bg-color="rgba(51, 102, 153, 0.1)" border-color="rgba(51, 102, 153, 0.2)" /> | <Badge text="后端" color="#009485" bg-color="rgba(0,148,133,0.1)" border-color="rgba(0,148,133,0.2)" /> | <Badge text="前端" color="#a855f7" bg-color="rgba(168, 85, 247, 0.1)" border-color="rgba(168, 85, 247, 0.2)" /> |
9-
|----------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|
10-
| 支持 MySQL 数据库 | 支持 PostgreSQL 数据库 | 包含后端代码插件 | 包含前端 [Vben Admin Antd](https://github.com/fastapi-practices/fastapi_best_architecture_ui) 代码插件 |
11-
12-
:::
13-
146
<PluginMarket :items="pluginItems" />
157

168
<script setup lang="ts">

0 commit comments

Comments
 (0)