Private
Public Access
1
0
Files
u-desk/README.md

118 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# U-Desk
基于 Wails 的桌面应用程序,用于测试验证技术栈。
## 技术栈
- Go v1.25.4
- Wails v2
- Vue 3
- Arco Design Vue
- MySQL (lab_dev)
## 项目结构
```
go-desk/
├── app.go # 应用逻辑,暴露给前端的方法
├── main.go # 程序入口
├── wails.json # Wails 配置
├── go.mod # Go 模块依赖
├── internal/
│ ├── database/ # 数据库连接
│ │ └── db.go
│ └── model/ # 数据模型
│ └── member_info.go
└── web/ # 前端代码
├── package.json
├── vite.config.js
├── index.html
└── src/
├── main.js
├── App.vue
└── style.css
```
## 开发
### 1. 安装依赖
```bash
# Go 依赖
go mod tidy
# 前端依赖
cd web
npm install
```
### 2. 构建前端(必须)
```bash
cd web
npm run build
```
**重要**每次修改前端代码后都需要重新构建Wails 使用 `web/dist` 目录中的构建产物。
### 3. 开发模式运行
```bash
# 在项目根目录
wails dev
```
**注意**:如果 `wails` 命令找不到,使用完整路径:
```bash
# 获取 GOPATH
go env GOPATH
# 使用完整路径(根据你的 GOPATH 调整)
D:\Go\go-workspace\bin\wails.exe dev
```
### 4. 构建应用
```bash
# 确保前端已构建
cd web
npm run build
cd ..
# 构建当前平台
wails build
# 构建 Windows明确指定平台
wails build -platform windows/amd64
```
**构建产物位置**`build/bin/go-desk.exe`
**注意**
- 构建前确保前端已构建(`web/dist` 目录存在)
- 构建产物是独立的可执行文件,包含前端资源
- 首次运行需要确保 MySQL 数据库可访问
## 数据库配置
- 数据库MySQL lab_dev
- 测试服连接39.99.243.191:3306, root/Lake@2019
-member_info
## 功能
- [x] 用户查询展示
- [x] 关键字搜索
- [x] 状态筛选
- [x] 分页显示
- [ ] 角色筛选(待完善)
- [ ] 机构筛选(待完善)
- [ ] 关联查询机构名称和角色名称
## 注意事项
1. 首次运行前需要先构建前端:`cd web && npm run build`
2. 确保 MySQL 数据库 lab_dev 已启动
3. 确保 member_info 表存在