mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-20 20:39:55 +00:00
docs: 更新文档内容和技术栈信息
更新项目文档中的技术栈信息,添加移动端相关技术(Uni App/Wot Design Uni)和截图展示 修复请求拦截器中token过期判断字段从status_code改为code 同步更新中英文文档内容
This commit is contained in:
+20
-11
@@ -71,17 +71,17 @@ fastapi_vue3_admin
|
|||||||
## 🛠️ Technology Stack Overview
|
## 🛠️ Technology Stack Overview
|
||||||
|
|
||||||
| Type | Technology Selection | Description |
|
| Type | Technology Selection | Description |
|
||||||
|----------|---------------------------------|---------------------------------|
|
|----------|---------------------------------|-------------|
|
||||||
| Backend Framework | FastAPI / Uvicorn / Pydantic 2.0 / Alembic | A modern, high-performance asynchronous framework with enforced type constraints and data migration capabilities. |
|
| Backend Framework | FastAPI / Uvicorn / Pydantic 2.0 / Alembic | A modern, high-performance asynchronous framework with强制类型约束 (mandatory type constraints) and data migration capabilities. |
|
||||||
| ORM | SQLAlchemy 2.0 | A powerful ORM library. |
|
| ORM | SQLAlchemy 2.0 | A powerful ORM library. |
|
||||||
| Scheduled Tasks | APScheduler | Easily implement scheduled tasks. |
|
| Scheduled Tasks | APScheduler | Easily implement scheduled tasks. |
|
||||||
| Authentication | PyJWT | Implement JWT authentication. |
|
| Permission Authentication | PyJWT | Implement JWT authentication. |
|
||||||
| Frontend Framework | Vue3 / Vite5 / Pinia / TypeScript | Quickly develop Vue3 applications. |
|
| Frontend Framework | Uni App / Vue3 / Vite5 / Pinia / TypeScript | Rapidly develop Vue3 applications. |
|
||||||
| UI Library | ElementPlus | Quickly develop beautiful UI components. |
|
| UI Library | ElementPlus / Wot Design Uni | Quickly develop beautiful UI components. |
|
||||||
| Database | MySQL / MongoDB | Powerful databases. |
|
| Database | MySQL / MongoDB | Powerful databases. |
|
||||||
| Cache | Redis | A powerful caching database. |
|
| Cache | Redis | A powerful cache database. |
|
||||||
| Documentation | Swagger / Redoc | Automatically generate API documentation. |
|
| Documentation | Swagger / Redoc | Automatically generate API documentation. |
|
||||||
| Deployment | Docker / Nginx / Docker Compose | Quickly deploy projects. |
|
| Deployment | Docker / Nginx / Docker Compose | Rapidly deploy projects. |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -117,6 +117,9 @@ fastapi_vue3_admin
|
|||||||
| Frontend | Node.js | >= 20.0 (It is recommended to use the latest version.) |
|
| Frontend | Node.js | >= 20.0 (It is recommended to use the latest version.) |
|
||||||
| Frontend | npm | 16.14 |
|
| Frontend | npm | 16.14 |
|
||||||
| Frontend | Vue3 | 3.3 |
|
| Frontend | Vue3 | 3.3 |
|
||||||
|
| Web UI | ElementPlus | 2.10.4 |
|
||||||
|
| Mobile | Uni App | 3.0.0 |
|
||||||
|
| App UI | Wot Design Uni | 1.9.1 |
|
||||||
| Database | MySQL | 8.0 (It is recommended to use the latest version.) |
|
| Database | MySQL | 8.0 (It is recommended to use the latest version.) |
|
||||||
| Middleware | Redis | 7.0 (It is recommended to use the latest version.) |
|
| Middleware | Redis | 7.0 (It is recommended to use the latest version.) |
|
||||||
|
|
||||||
@@ -267,10 +270,10 @@ fastapi_vue3_admin/devops/devops/nginx/nginx.conf
|
|||||||
|
|
||||||
### 移动端
|
### 移动端
|
||||||
|
|
||||||
| Module Name | Screenshot |
|
| Module { width="80" }| Details | Module { width="80" }| Details | Module { width="80" }| Details |
|
||||||
|----------|------|
|
|----------|------|----------|------|----------|------|
|
||||||
| Login | Under development... (To be completed) |
|
| Login |  | Home |  | Profile |  |
|
||||||
|
| Personal |  | Settings |  | Workbench |  |
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🛠️ Secondary Development Tutorial
|
## 🛠️ Secondary Development Tutorial
|
||||||
@@ -293,6 +296,12 @@ fastapi_vue3_admin/devops/devops/nginx/nginx.conf
|
|||||||
1. **Configure the Frontend to Access the Backend Interface Address**: Configure it in `frontend/src/api/demo/example.ts`.
|
1. **Configure the Frontend to Access the Backend Interface Address**: Configure it in `frontend/src/api/demo/example.ts`.
|
||||||
2. **Write the Frontend Page**: Write it in `frontend/src/views/demo/example/index.vue`.
|
2. **Write the Frontend Page**: Write it in `frontend/src/views/demo/example/index.vue`.
|
||||||
|
|
||||||
|
### Mobile Part
|
||||||
|
|
||||||
|
1. **Configure the mobile access address for backend interfaces**: Write the code in `fastapp/src/api`.
|
||||||
|
2. **Write mobile pages**: Write the code in `fastapp/src/pages`.
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🙏 Thanks
|
## 🙏 Thanks
|
||||||
|
|||||||
@@ -78,8 +78,8 @@ fastapi_vue3_admin
|
|||||||
| ORM | SQLAlchemy 2.0 | 强大的 ORM 库。 |
|
| ORM | SQLAlchemy 2.0 | 强大的 ORM 库。 |
|
||||||
| 定时任务 | APScheduler | 轻松实现定时任务。 |
|
| 定时任务 | APScheduler | 轻松实现定时任务。 |
|
||||||
| 权限认证 | PyJWT | 实现 JWT 认证。 |
|
| 权限认证 | PyJWT | 实现 JWT 认证。 |
|
||||||
| 前端框架 | Vue3 / Vite5 / Pinia / TypeScript | 快速开发 Vue3 应用。 |
|
| 前端框架 | Uni App / Vue3 / Vite5 / Pinia / TypeScript | 快速开发 Vue3 应用。 |
|
||||||
| UI 库 | ElementPlus | 快速开发美观的 UI 组件。 |
|
| UI 库 | ElementPlus / Wot Design Uni | 快速开发美观的 UI 组件。 |
|
||||||
| 数据库 | MySQL / MongoDB | 强大的数据库。 |
|
| 数据库 | MySQL / MongoDB | 强大的数据库。 |
|
||||||
| 缓存 | Redis | 强大的缓存数据库。 |
|
| 缓存 | Redis | 强大的缓存数据库。 |
|
||||||
| 文档 | Swagger / Redoc | 自动生成 API 文档。 |
|
| 文档 | Swagger / Redoc | 自动生成 API 文档。 |
|
||||||
@@ -114,13 +114,16 @@ fastapi_vue3_admin
|
|||||||
|
|
||||||
| 类型 | 技术栈 | 版本 |
|
| 类型 | 技术栈 | 版本 |
|
||||||
|----------|------------|------------|
|
|----------|------------|------------|
|
||||||
| 后端 | Python | >=3.100 |
|
| 后端 | Python | >=3.10 |
|
||||||
| 后端 | FastAPI | 0.109 |
|
| 后端 | FastAPI | 0.109 |
|
||||||
| 前端 | Node.js | >= 20.0(推荐使用最新版)|
|
| 前端 | Node.js | >= 20.0(推荐使用最新版)|
|
||||||
| 前端 | npm | 16.14 |
|
| 前端 | npm | 16.14 |
|
||||||
| 前端 | Vue3 | 3.3 |
|
| 前端 | Vue3 | 3.3 |
|
||||||
| 数据库 | MySQL | 8.0 (推荐使用最新版)|
|
| Web UI | ElementPlus | 2.10.4 |
|
||||||
| 中间件 | Redis | 7.0 (推荐使用最新版)|
|
| 移动端 | Uni App | 3.0.0 |
|
||||||
|
| App UI | Wot Design Uni | 1.9.1 |
|
||||||
|
| 数据库 | MySQL | 8.0 (推荐使用最新版)|
|
||||||
|
| 中间件 | Redis | 7.0 (推荐使用最新版)|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -271,9 +274,10 @@ fastapi_vue3_amdin/devops/devops/nginx/nginx.conf
|
|||||||
|
|
||||||
### 移动端
|
### 移动端
|
||||||
|
|
||||||
| 模块名 | 截图 |
|
| 模块 { width="80" }| 详情 | 模块 { width="80" }| 详情 | 模块 { width="80" }| 详情 |
|
||||||
|----------|------|
|
|----------|------|----------|------|----------|------|
|
||||||
| 登录 | 开发中... (待完成) |
|
| 登录 |  | 首页 |  | 我的 |  |
|
||||||
|
| 个人 |  | 设置 |  | 工作台 |  |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -297,6 +301,11 @@ fastapi_vue3_amdin/devops/devops/nginx/nginx.conf
|
|||||||
1. **前端接入后端接口地址**:在 `frontend/src/api/demo/example.ts` 中配置
|
1. **前端接入后端接口地址**:在 `frontend/src/api/demo/example.ts` 中配置
|
||||||
2. **编写前端页面**:在 `frontend/src/views/demo/example/index.vue` 中编写
|
2. **编写前端页面**:在 `frontend/src/views/demo/example/index.vue` 中编写
|
||||||
|
|
||||||
|
### 移动端部分
|
||||||
|
|
||||||
|
1. **移动端接入后端接口地址**:在 `fastapp/src/api` 中编写
|
||||||
|
2. **编写移动端页面**:在 `fastapp/src/pages` 中编写
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🙏 特别鸣谢
|
## 🙏 特别鸣谢
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ outline: "deep"
|
|||||||
> **设计初心**: 以模块化、松耦合为核心,追求丰富的功能模块、简洁易用的接口、详尽的开发文档和便捷的维护方式。通过统一框架和组件,降低技术选型成本,遵循开发规范和设计模式,构建强大的代码分层模型,搭配完善的本地中文化支持,专为团队和企业开发场景量身定制。
|
> **设计初心**: 以模块化、松耦合为核心,追求丰富的功能模块、简洁易用的接口、详尽的开发文档和便捷的维护方式。通过统一框架和组件,降低技术选型成本,遵循开发规范和设计模式,构建强大的代码分层模型,搭配完善的本地中文化支持,专为团队和企业开发场景量身定制。
|
||||||
|
|
||||||
## 📦工程结构概览
|
## 📦工程结构概览
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
fastapi_vue3_admin
|
fastapi_vue3_admin
|
||||||
├─ backend # 后端工程
|
├─ backend # 后端工程
|
||||||
@@ -61,8 +62,8 @@ fastapi_vue3_admin
|
|||||||
| ORM | SQLAlchemy 2.0 | 强大的 ORM 库。 |
|
| ORM | SQLAlchemy 2.0 | 强大的 ORM 库。 |
|
||||||
| 定时任务 | APScheduler | 轻松实现定时任务。 |
|
| 定时任务 | APScheduler | 轻松实现定时任务。 |
|
||||||
| 权限认证 | PyJWT | 实现 JWT 认证。 |
|
| 权限认证 | PyJWT | 实现 JWT 认证。 |
|
||||||
| 前端框架 | Vue3 / Vite5 / Pinia / TypeScript | 快速开发 Vue3 应用。 |
|
| 前端框架 | Uni App / Vue3 / Vite5 / Pinia / TypeScript | 快速开发 Vue3 应用。 |
|
||||||
| UI 库 | ElementPlus | 快速开发美观的 UI 组件。 |
|
| UI 库 | ElementPlus / Wot Design Uni | 快速开发美观的 UI 组件。 |
|
||||||
| 数据库 | MySQL / MongoDB | 强大的数据库。 |
|
| 数据库 | MySQL / MongoDB | 强大的数据库。 |
|
||||||
| 缓存 | Redis | 强大的缓存数据库。 |
|
| 缓存 | Redis | 强大的缓存数据库。 |
|
||||||
| 文档 | Swagger / Redoc | 自动生成 API 文档。 |
|
| 文档 | Swagger / Redoc | 自动生成 API 文档。 |
|
||||||
|
|||||||
+19
-10
@@ -17,13 +17,16 @@ title: 快速开始
|
|||||||
|
|
||||||
| 类型 | 技术栈 | 版本 |
|
| 类型 | 技术栈 | 版本 |
|
||||||
|----------|------------|------------|
|
|----------|------------|------------|
|
||||||
| 后端 | Python | >=3.10 |
|
| 后端 | Python | >=3.10 |
|
||||||
| 后端 | FastAPI | 0.109 |
|
| 后端 | FastAPI | 0.109 |
|
||||||
| 前端 | Node.js | >= 20.0(推荐使用最新版)|
|
| 前端 | Node.js | >= 20.0(推荐使用最新版)|
|
||||||
| 前端 | npm | 16.14 |
|
| 前端 | npm | 16.14 |
|
||||||
| 前端 | Vue3 | 3.3 |
|
| 前端 | Vue3 | 3.3 |
|
||||||
| 数据库 | MySQL | 8.0 (推荐使用最新版)|
|
| Web UI | ElementPlus | 2.10.4 |
|
||||||
| 中间件 | Redis | 7.0 (推荐使用最新版)|
|
| 移动端 | Uni App | 3.0.0 |
|
||||||
|
| App UI | Wot Design Uni | 1.9.1 |
|
||||||
|
| 数据库 | MySQL | 8.0 (推荐使用最新版)|
|
||||||
|
| 中间件 | Redis | 7.0 (推荐使用最新版)|
|
||||||
|
|
||||||
### 获取代码
|
### 获取代码
|
||||||
|
|
||||||
@@ -163,9 +166,10 @@ fastapi_vue3_admin/devops/devops/nginx/nginx.conf
|
|||||||
|
|
||||||
### 移动端
|
### 移动端
|
||||||
|
|
||||||
| 模块名 | 截图 |
|
| 模块 { width="80" }| 详情 | 模块 { width="80" }| 详情 | 模块 { width="80" }| 详情 |
|
||||||
|----------|------|
|
|----------|------|----------|------|----------|------|
|
||||||
| 登录 | 开发中... (待完成) |
|
| 登录 |  | 首页 |  | 我的 |  |
|
||||||
|
| 个人 |  | 设置 |  | 工作台 |  |
|
||||||
|
|
||||||
## 🚀二开教程
|
## 🚀二开教程
|
||||||
|
|
||||||
@@ -186,3 +190,8 @@ fastapi_vue3_admin/devops/devops/nginx/nginx.conf
|
|||||||
|
|
||||||
1. **前端接入后端接口地址**:在 `frontend/src/api/demo/example.ts` 中配置
|
1. **前端接入后端接口地址**:在 `frontend/src/api/demo/example.ts` 中配置
|
||||||
2. **编写前端页面**:在 `frontend/src/views/demo/example/index.vue` 中编写
|
2. **编写前端页面**:在 `frontend/src/views/demo/example/index.vue` 中编写
|
||||||
|
|
||||||
|
### 移动端部分
|
||||||
|
|
||||||
|
1. **移动端接入后端接口地址**:在 `fastapp/src/api` 中编写
|
||||||
|
2. **编写移动端页面**:在 `fastapp/src/pages` 中编写
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ httpRequest.interceptors.response.use((response: AxiosResponse<ApiResponse>) =>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data?.status_code === ResultEnum.TOKEN_EXPIRED) {
|
if (data?.code === ResultEnum.TOKEN_EXPIRED) {
|
||||||
await redirectToLogin("登录已过期,请重新登录");
|
await redirectToLogin("登录已过期,请重新登录");
|
||||||
return Promise.reject(new Error(data.msg));
|
return Promise.reject(new Error(data.msg));
|
||||||
} else if (data?.code === ResultEnum.ERROR) {
|
} else if (data?.code === ResultEnum.ERROR) {
|
||||||
|
|||||||
Reference in New Issue
Block a user