refactor: switch to fastapi backend

This commit is contained in:
2026-07-18 14:48:45 +08:00
parent 9fd47e01f5
commit 613452b7fe
22 changed files with 701 additions and 1342 deletions
+21 -3
View File
@@ -1,5 +1,23 @@
# Vue 3 + TypeScript + Vite
# OpenCloud 前端
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
Vue 3 + TypeScript + Vite 前端,通过 FastAPI 提供认证、云图、图鉴、个人主页和管理后台数据。
Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
## 本地开发
1. 在相邻的 `opencloud-backend` 项目中启动 FastAPI 服务。
2. 复制 `.env.example` 为 `.env`,配置高德地图 Key;如果后端不在默认地址,修改 `VITE_API_URL`。
3. 安装依赖并启动前端:
```bash
npm install
npm run dev
```
默认后端地址为 `http://localhost:8000/api/v1`。
## 检查与构建
```bash
npx vue-tsc -b
npm run build
```