84 lines
1.4 KiB
Markdown
84 lines
1.4 KiB
Markdown
# 抽奖系统
|
|
|
|
基于 Vue 3 + Vite + TailwindCSS + Element Plus 的前端抽奖系统,后端使用 Python + FastAPI + SQLite 数据库。
|
|
|
|
## 项目结构
|
|
|
|
- `frontend/`: Vue 3 + Vite + TailwindCSS + Element Plus 前端
|
|
- `backend/`: Python + FastAPI + SQLite 后端
|
|
|
|
## 功能特性
|
|
|
|
根据流程图实现的抽奖系统,包含以下功能:
|
|
|
|
1. 主题活动首页
|
|
2. 扫描/小卡参与活动门票抽奖
|
|
3. 抽奖中奖/用户填写个人资料
|
|
4. 抽奖未中奖/可重复扫描步骤
|
|
5. 用户收集一套5张小卡/后台自动判定可获得一份奖品
|
|
6. 用户填写寄送地址/寄送奖品
|
|
|
|
## 技术栈
|
|
|
|
### 前端
|
|
- Vue 3
|
|
- TypeScript
|
|
- Vite
|
|
- TailwindCSS
|
|
- Element Plus UI 组件库
|
|
- Font Awesome 图标
|
|
- Chart.js 图表库
|
|
|
|
### 后端
|
|
- Python
|
|
- FastAPI
|
|
- SQLite 数据库
|
|
- SQLAlchemy ORM
|
|
|
|
## 安装与运行
|
|
|
|
### 前端
|
|
|
|
```bash
|
|
# 进入前端目录
|
|
cd frontend
|
|
|
|
# 安装依赖
|
|
npm install
|
|
|
|
# 启动开发服务器
|
|
npm run dev
|
|
```
|
|
|
|
### 后端
|
|
|
|
```bash
|
|
# 进入后端目录
|
|
cd backend
|
|
|
|
# 创建并激活虚拟环境 (可选)
|
|
python -m venv venv
|
|
# Windows
|
|
venv\Scripts\activate
|
|
# Linux/Mac
|
|
source venv/bin/activate
|
|
|
|
# 安装依赖
|
|
pip install -r requirements.txt
|
|
|
|
# 启动后端服务
|
|
uvicorn main:app --reload
|
|
```
|
|
|
|
## API 文档
|
|
|
|
启动后端服务后,访问 http://localhost:8000/docs 查看 API 文档。
|
|
|
|
## 系统截图
|
|
|
|

|
|
|
|
## 开发者
|
|
|
|
项目开发于 2025 年 4 月
|