feat: 优化

This commit is contained in:
2026-03-28 17:26:49 +08:00
parent b6747b1c44
commit 671112aed2
4 changed files with 103 additions and 787 deletions

103
CLAUDE.md Normal file
View File

@@ -0,0 +1,103 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## 项目概述
模拟所 (Monisuo) — 虚拟货币模拟交易平台。全栈 monorepo三个子系统共用一个 MySQL 数据库。
## 构建与运行命令
### Java 后端 (Maven, Java 8, Spring Boot 2.2.4)
```bash
mvn spring-boot:run # 开发服务,端口 5010
mvn compile # 仅编译
mvn test # 运行测试
mvn clean package -DskipTests # 打包 JAR → target/monisuo-1.0.jar
```
### Flutter 移动端/Web (`flutter_monisuo/`)
```bash
cd flutter_monisuo
flutter pub get # 安装依赖
flutter run -d chrome # 开发 (Web)
flutter run -d android # 开发 (Android)
flutter analyze # 代码检查
flutter test # 运行测试
flutter build web --release --dart-define=ENV=prod # 生产 Web 构建 → build/web/
flutter build apk --release --dart-define=ENV=prod # 生产 APK 构建 → build/app/outputs/
```
通过 `--dart-define=ENV=prod|dev` 切换环境API 地址自动切换。
### Vue 管理后台 (`monisuo-admin/`)
```bash
cd monisuo-admin
pnpm install # 安装依赖(需 pnpm >=10, node >=22.15
pnpm dev # Vite 开发服务
pnpm build # 生产构建vue-tsc + vite→ dist/
pnpm lint / pnpm lint:fix # 代码检查,使用 @antfu/eslint-config
```
### 部署
```bash
deploy/build_local.sh # 本地构建 Flutter + Admin
deploy/deploy_server.sh # 完整服务器部署(前端同步 + Maven 构建 + JAR 重启)
deploy/deploy_server.sh frontend # 仅部署前端
deploy/deploy_server.sh backend # 仅部署后端
```
服务器:`8.155.172.147`,后端端口 `5010`。Flutter Web → `/www/wwwroot/monisuo-h5/`,管理后台 → `/www/wwwroot/monisuo-admin/`
## 架构
### 后端 (`src/main/java/com/it/rattan/`)
分层架构:**Controller → Service → Mapper → Entity**。
- JWT 认证:`TokenFilter` + `UserContext`ThreadLocal。接口前缀`/api/`(用户端)、`/admin/`(管理端)。
- 统一响应封装:`Result<T>`code/msg/data`PageResult` 分页。
- `GlobalExceptionHandler` 全局异常处理BCrypt 密码加密。
- `bean-searcher` 动态查询构建,用于管理端列表接口。
- 数据库MySQL`monisuo`ORM 用 MyBatis-Plus。建表脚本 `sql/init.sql`11 张表)。
### Flutter 应用 (`flutter_monisuo/lib/`)
- **状态管理**ProviderChangeNotifier`providers/` 消费 `data/services/`,底层调用 `core/network/DioClient`
- **UI**shadcn_ui + 自定义主题系统(`core/theme/`)。深色主题为主,颜色集中管理在 `AppColorScheme`
- **数据流**`data/services/`API 调用)→ `providers/`(状态)→ `ui/pages/`(视图)。
- 页面auth、home、market、trade、asset、mine、orders、onboarding。
### Vue 管理后台 (`monisuo-admin/src/`)
- **路由**:基于文件系统的路由,`unplugin-vue-router``pages/` 目录)。路由层有鉴权守卫。
- **状态管理**Piniaauth、theme+ TanStack Vue Query服务端状态
- **HTTP**Axixos 通过 `composables/use-axios.ts` 封装。Vite 代理 `/api``localhost:5010`(去除前缀)。
- **UI**shadcn-vue 组件在 `components/ui/`(自动注册,已排除 tsconfig
- **自动导入**Vue composables、stores、constants 通过 `unplugin-auto-import` 自动导入。
- **代码检查**ESLint 9 flat config + `@antfu/eslint-config`。Pre-commit 钩子通过 `simple-git-hooks` + `lint-staged`
### 核心业务领域
双账户体系:
- **资金账户** (`account_fund`):与用户 1:1USDT 余额,用于充提。充值需管理员审批。
- **交易账户** (`account_trade`):与用户 1:N每币种一个持有币种数量和加权平均成本价。
- 资金流转:充值 → 资金账户 → 划转至交易账户(USDT) → 买卖币种。所有操作记录在 `account_flow`
- 盈亏计算:`(持仓数量 × 当前价格) - (持仓数量 × 平均成本价)`
- 详细流程图见 `ACCOUNT_SYSTEM_DESIGN.md`
### 数据库核心表
`sys_user``sys_admin``coin``price_type`: 1=实时, 2=管理定价)、`account_fund``account_trade`(唯一索引 `user_id+coin_code`)、`order_trade``order_fund`(充提订单,状态驱动的审批流)、`account_flow``sys_config``user_favorite``cold_wallet`
## 代码规范
### Git 提交
Conventional Commits 格式:`feat(module): 描述``fix(module): 描述``chore(scope): 描述`。提交正文可用中文。
### Flutter 代码规范
- 遵循 Effective Dart 规范,提交前运行 `flutter analyze`
- 使用 `AppSpacing``AppRadius``AppColorScheme` 主题常量,禁止硬编码颜色。
- 修改主题/UI 时不要改动业务逻辑/API/Provider 层。
### Java 代码规范
- 使用 Lombok 简化代码MyBatis-Plus `LambdaUpdateWrapper` 做更新操作。
- 所有涉及资金变动的方法必须加 `@Transactional(rollbackFor = Exception.class)`
- RESTful API 设计Swagger 文档springfox 2.9.2)。
### 管理后台代码规范
- TypeScript strict 模式lint 规则强制 `<script lang="ts">`
- shadcn-vue 组件自动管理,不要手动编辑 `components/ui/`
- 用 TanStack Vue Query 做数据请求Pinia 仅用于客户端状态。

View File

@@ -1,140 +0,0 @@
#!/bin/bash
# ============================================
# Monisuo CI/CD 部署脚本 - 宝塔 Webhook
# ============================================
# ============ 环境配置 ============
# JDK 路径(根据实际修改)
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
export PATH=$JAVA_HOME/bin:$PATH
# Maven 路径(如果手动安装)
export MAVEN_HOME=/opt/maven
export PATH=$MAVEN_HOME/bin:$PATH
# ============ 项目配置 ============
PROJECT_PATH="/opt/monisuo"
GIT_REPO="http://sion:woshisaw.@8.155.172.147:3001/sion/monisuo.git"
JAR_NAME="monisuo-1.0.jar"
LOG_FILE="/opt/monisuo/deploy.log"
WEBHOOK_SECRET=""
# ============ 日志函数 ============
log() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" >> $LOG_FILE
}
# ============ 错误处理 ============
error_exit() {
log "❌ 错误: $1"
echo "Error: $1"
exit 1
}
# ============ 主流程 ============
log "=========================================="
log "🚀 开始 CI/CD 部署"
log "=========================================="
# 记录环境信息
log "Java 版本: $(java -version 2>&1 | head -1)"
log "Maven 版本: $(mvn -version 2>&1 | head -1)"
log "当前目录: $(pwd)"
# 1. 检查/克隆项目
if [ ! -d "$PROJECT_PATH/.git" ]; then
log "📥 首次部署,克隆项目..."
mkdir -p $PROJECT_PATH
git clone $GIT_REPO $PROJECT_PATH >> $LOG_FILE 2>&1 || error_exit "Git 克隆失败"
fi
cd $PROJECT_PATH || error_exit "无法进入项目目录"
# 2. 拉取最新代码
log "📥 拉取最新代码..."
git fetch origin >> $LOG_FILE 2>&1
git reset --hard origin/main >> $LOG_FILE 2>&1 || error_exit "Git 拉取失败"
# 获取提交信息
COMMIT_HASH=$(git rev-parse --short HEAD)
COMMIT_MSG=$(git log -1 --pretty=%s)
log "📝 最新提交: $COMMIT_HASH - $COMMIT_MSG"
# 3. 检查文件变更
CHANGED_FILES=$(git diff --name-only HEAD~1 HEAD 2>/dev/null)
log "📁 变更文件: $CHANGED_FILES"
# 4. 后端构建和部署
if echo "$CHANGED_FILES" | grep -qE "^src/|^pom.xml"; then
log "🔨 检测到后端代码变更,开始构建..."
cd $PROJECT_PATH
mvn clean package -DskipTests >> $LOG_FILE 2>&1
if [ $? -ne 0 ]; then
error_exit "Maven 构建失败"
fi
log "✅ Maven 构建成功"
else
log "⏭️ 后端代码无变更,跳过构建"
fi
# 5. 停止旧服务
log "🛑 停止旧服务..."
pkill -f $JAR_NAME 2>/dev/null
sleep 3
# 检查是否停止成功
if pgrep -f $JAR_NAME > /dev/null; then
log "⚠️ 进程未停止,强制终止..."
pkill -9 -f $JAR_NAME 2>/dev/null
sleep 2
fi
# 6. 启动新服务
log "🚀 启动新服务..."
cd $PROJECT_PATH
nohup java -jar \
-Xms256m \
-Xmx512m \
-XX:+UseG1GC \
target/$JAR_NAME \
--spring.profiles.active=dev \
> $PROJECT_PATH/app.log 2>&1 &
# 7. 检查服务状态
sleep 5
if pgrep -f $JAR_NAME > /dev/null; then
PID=$(pgrep -f $JAR_NAME)
log "✅ 服务启动成功 (PID: $PID)"
else
log "❌ 服务启动失败,查看日志:"
tail -50 $PROJECT_PATH/app.log >> $LOG_FILE
error_exit "服务启动失败"
fi
# 8. 健康检查
log "🔍 健康检查..."
sleep 5
HEALTH_CHECK=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:5010/ 2>/dev/null || echo "000")
if [ "$HEALTH_CHECK" = "200" ] || [ "$HEALTH_CHECK" = "404" ]; then
log "✅ 健康检查通过 (HTTP $HEALTH_CHECK)"
else
log "⚠️ 健康检查异常 (HTTP $HEALTH_CHECK)"
fi
# 9. 清理旧日志
log "🧹 清理旧日志..."
find $PROJECT_PATH -name "*.log" -mtime +7 -delete 2>/dev/null
# 10. 完成
log "=========================================="
log "✅ CI/CD 部署完成"
log " 提交: $COMMIT_HASH"
log " 时间: $(date '+%Y-%m-%d %H:%M:%S')"
log "=========================================="
echo "Deploy Success! Commit: $COMMIT_HASH"

View File

@@ -1,477 +0,0 @@
# Changelog
## v0.7.7
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.7.6...v0.7.7)
### 🩹 Fixes
- Unify routing metadata format and adjust YAML indentation ([#59](https://github.com/Whbbit1999/shadcn-vue-admin/pull/59))
- Update VSCode extensions and settings for improved spell checking and add package manager version update ([86188e7](https://github.com/Whbbit1999/shadcn-vue-admin/commit/86188e7))
- Update environment error handling and toast notification delay; remove markdown support from Vite config ([9071161](https://github.com/Whbbit1999/shadcn-vue-admin/commit/9071161))
### 💅 Refactors
- Refactor layout components and improve sidebar navigation ([#60](https://github.com/Whbbit1999/shadcn-vue-admin/pull/60))
### 🏡 Chore
- **release:** V0.7.6 ([e5a53ce](https://github.com/Whbbit1999/shadcn-vue-admin/commit/e5a53ce))
### ❤️ Contributors
- Whbbit1999 ([@Whbbit1999](https://github.com/Whbbit1999))
## v0.7.6
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.7.5...v0.7.6)
### 🚀 Enhancements
- Enhance authentication flow with redirect handling ([#54](https://github.com/Whbbit1999/shadcn-vue-admin/pull/54))
- Add pagination constants and integrate into data table components ([#56](https://github.com/Whbbit1999/shadcn-vue-admin/pull/56))
- Enhance talk footer with dropdown menu and improved input group layout ([b29a41a](https://github.com/Whbbit1999/shadcn-vue-admin/commit/b29a41a))
### 🩹 Fixes
- When the sidebar is collapsed, the user is redirected to another page, and the collapsed state is lost. #57 ([#58](https://github.com/Whbbit1999/shadcn-vue-admin/pull/58), [#57](https://github.com/Whbbit1999/shadcn-vue-admin/issues/57))
- Update pagination handling for server-side pagination support ([d190ae0](https://github.com/Whbbit1999/shadcn-vue-admin/commit/d190ae0))
### 💅 Refactors
- Pressing command + k or ctrl + k brings up the command-menu-panel for faster and more intuitive operation. ([#53](https://github.com/Whbbit1999/shadcn-vue-admin/pull/53))
### 🏡 Chore
- **release:** V0.7.5 ([38fb489](https://github.com/Whbbit1999/shadcn-vue-admin/commit/38fb489))
### ❤️ Contributors
- Whbbit1999 ([@Whbbit1999](https://github.com/Whbbit1999))
## v0.7.5
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.7.4...v0.7.5)
### 🚀 Enhancements
- Add InlineTip component and integrate into SVA Components page ([#51](https://github.com/Whbbit1999/shadcn-vue-admin/pull/51))
### 💅 Refactors
- Remove unused styles and improve component structure ([#52](https://github.com/Whbbit1999/shadcn-vue-admin/pull/52))
### 📦 Build
- Update shadcn-vue components ([#50](https://github.com/Whbbit1999/shadcn-vue-admin/pull/50))
### 🏡 Chore
- **release:** V0.7.4 ([1d7f3e2](https://github.com/Whbbit1999/shadcn-vue-admin/commit/1d7f3e2))
### ❤️ Contributors
- Whbbit1999 ([@Whbbit1999](https://github.com/Whbbit1999))
## v0.7.4
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.7.3...v0.7.4)
### 🚀 Enhancements
- Add server pagination support to data table components ([#46](https://github.com/Whbbit1999/shadcn-vue-admin/pull/46))
- Implement task management API functions and response types ([#47](https://github.com/Whbbit1999/shadcn-vue-admin/pull/47))
- Use shadcn-vue chart,remove vue-charts ([#49](https://github.com/Whbbit1999/shadcn-vue-admin/pull/49))
### 🩹 Fixes
- Typo Update README.md ([#48](https://github.com/Whbbit1999/shadcn-vue-admin/pull/48))
### 🏡 Chore
- **release:** V0.7.3 ([1808df2](https://github.com/Whbbit1999/shadcn-vue-admin/commit/1808df2))
### ❤️ Contributors
- Whbbit1999 ([@Whbbit1999](https://github.com/Whbbit1999))
- WuMingDao ([@WuMingDao](https://github.com/WuMingDao))
## v0.7.3
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.7.2...v0.7.3)
### 🩹 Fixes
- The issue with no dynamic updates when deleting multiple rows in a batch demo task or when selecting multiple rows. ([435b0aa](https://github.com/Whbbit1999/shadcn-vue-admin/commit/435b0aa))
### 💅 Refactors
- Update CHANGELOG.md ([b4eb09b](https://github.com/Whbbit1999/shadcn-vue-admin/commit/b4eb09b))
- Reorganize plugin setup and improve imports ([b5cd1be](https://github.com/Whbbit1999/shadcn-vue-admin/commit/b5cd1be))
### ❤️ Contributors
- Whbbit1999 <luckyboy_dong@sina.com>
## v0.7.2
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.7.1...v0.7.2)
### ❤️ Contributors
- Whbbit1999 ([@Whbbit1999](https://github.com/Whbbit1999))
## v0.7.1
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.7.0...v0.7.1)
### 🚀 Enhancements
- Add TwoLayout in global layouts, example in settings/components… ([#38](https://github.com/Whbbit1999/shadcn-vue-admin/pull/38))
### ❤️ Contributors
- Whbbit1999 ([@Whbbit1999](https://github.com/Whbbit1999))
## v0.7.0
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.6.1...v0.7.0)
### 🚀 Enhancements
- StatusBadge component And Copy component #25,#26 ([#29](https://github.com/Whbbit1999/shadcn-vue-admin/pull/29), [#25](https://github.com/Whbbit1999/shadcn-vue-admin/issues/25), [#26](https://github.com/Whbbit1999/shadcn-vue-admin/issues/26))
- Table bulk-actions #27 ([#36](https://github.com/Whbbit1999/shadcn-vue-admin/pull/36), [#27](https://github.com/Whbbit1999/shadcn-vue-admin/issues/27))
### 🩹 Fixes
- The pinia plugin persistedstate plugin is invalid ([#35](https://github.com/Whbbit1999/shadcn-vue-admin/pull/35))
- Pinia register in router guard ([fb95179](https://github.com/Whbbit1999/shadcn-vue-admin/commit/fb95179))
### 🏡 Chore
- **release:** V0.6.1 ([f9bfce8](https://github.com/Whbbit1999/shadcn-vue-admin/commit/f9bfce8))
### ❤️ Contributors
- Whbbit1999 ([@Whbbit1999](https://github.com/Whbbit1999))
## v0.6.1
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.6.0...v0.6.1)
### 🏡 Chore
- Release v0.6.0 ([9122d34](https://github.com/Whbbit1999/shadcn-vue-admin/commit/9122d34))
### ❤️ Contributors
- Whbbit1999 <luckyboy_dong@sina.com>
## v0.5.1
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.5.0...v0.5.1)
### 🚀 Enhancements
- Toggle content layout block #22 ([#23](https://github.com/Whbbit1999/shadcn-vue-admin/pull/23), [#22](https://github.com/Whbbit1999/shadcn-vue-admin/issues/22))
- **command-menu-panel:** Use button in mobile ([47cb816](https://github.com/Whbbit1999/shadcn-vue-admin/commit/47cb816))
### 🏡 Chore
- **release:** V0.5.0 ([32d2939](https://github.com/Whbbit1999/shadcn-vue-admin/commit/32d2939))
### 🎨 Styles
- Add a border to the sidebar after it is selected ([#24](https://github.com/Whbbit1999/shadcn-vue-admin/pull/24))
### ❤️ Contributors
- Whbbit1999 ([@Whbbit1999](https://github.com/Whbbit1999))
## v0.5.0
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.4.1...v0.5.0)
### 🚀 Enhancements
- **view-options.vue:** Add table toggle columns status reset action ([#20](https://github.com/Whbbit1999/shadcn-vue-admin/pull/20))
- **data-table:** Now we can use this component to quickly generate a… ([#21](https://github.com/Whbbit1999/shadcn-vue-admin/pull/21))
### 🏡 Chore
- **release:** V0.4.1 ([83c9078](https://github.com/Whbbit1999/shadcn-vue-admin/commit/83c9078))
### 🎨 Styles
- Remove basic-header component shadow-sm and padding-x style ([13c6ecf](https://github.com/Whbbit1999/shadcn-vue-admin/commit/13c6ecf))
### ❤️ Contributors
- Whbbit1999 ([@Whbbit1999](https://github.com/Whbbit1999))
## v0.4.1
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.4.0...v0.4.1)
### 🩹 Fixes
- Auth-title component ([ff170c7](https://github.com/Whbbit1999/shadcn-vue-admin/commit/ff170c7))
- Add tooltip to sidebar menu button ([febc221](https://github.com/Whbbit1999/shadcn-vue-admin/commit/febc221))
- Replace button with sidebar menu button for dropdown trigger ([1c4d6fd](https://github.com/Whbbit1999/shadcn-vue-admin/commit/1c4d6fd))
### 🏡 Chore
- **release:** V0.4.0 ([a9c5355](https://github.com/Whbbit1999/shadcn-vue-admin/commit/a9c5355))
- Packages update and lint ([a45d17a](https://github.com/Whbbit1999/shadcn-vue-admin/commit/a45d17a))
### 🎨 Styles
- Sidebar popup style change ([4a20c31](https://github.com/Whbbit1999/shadcn-vue-admin/commit/4a20c31))
- Settings/components/profile-form CSS style fine-tuning ([9030b3b](https://github.com/Whbbit1999/shadcn-vue-admin/commit/9030b3b))
### ❤️ Contributors
- Whbbit1999 <luckyboy_dong@sina.com>
- Onur Köse <kose.onur@gmail.com>
- Unknown <whbbit@qq.com>
## v0.4.0
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.3.4...v0.4.0)
### 🏡 Chore
- **release:** V0.3.4 ([6a3b12d](https://github.com/Whbbit1999/shadcn-vue-admin/commit/6a3b12d))
- Update packages ([9bb3353](https://github.com/Whbbit1999/shadcn-vue-admin/commit/9bb3353))
- Update packages ([7ef29d6](https://github.com/Whbbit1999/shadcn-vue-admin/commit/7ef29d6))
### 🎨 Styles
- Language-change button and toggle-theme button use size=button ([3e46f30](https://github.com/Whbbit1999/shadcn-vue-admin/commit/3e46f30))
- Replace w-* h-* with the new size-* utility ([6a33e42](https://github.com/Whbbit1999/shadcn-vue-admin/commit/6a33e42))
- Settings module page style adjustment ([98b687e](https://github.com/Whbbit1999/shadcn-vue-admin/commit/98b687e))
- Auth-title icon change ([f383221](https://github.com/Whbbit1999/shadcn-vue-admin/commit/f383221))
- Billing/transaction-catd remove backgroun image ([e55e5c1](https://github.com/Whbbit1999/shadcn-vue-admin/commit/e55e5c1))
### ❤️ Contributors
- Unknown <whbbit@qq.com>
- Whbbit1999 <luckyboy_dong@sina.com>
## v0.3.4
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.3.3...v0.3.4)
### 🩹 Fixes
- Does not overflow the default layout width on desktop screens ([#12](https://github.com/Whbbit1999/shadcn-vue-admin/pull/12))
### 🏡 Chore
- **release:** V0.3.3 ([0552b7e](https://github.com/Whbbit1999/shadcn-vue-admin/commit/0552b7e))
- Packages update ([dabfc66](https://github.com/Whbbit1999/shadcn-vue-admin/commit/dabfc66))
- Razor-plan ([#13](https://github.com/Whbbit1999/shadcn-vue-admin/pull/13))
### ❤️ Contributors
- Whbbit1999 ([@Whbbit1999](https://github.com/Whbbit1999))
## v0.3.3
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.3.2...v0.3.3)
### 🚀 Enhancements
- New custom-theme component ([6dfcd56](https://github.com/Whbbit1999/shadcn-vue-admin/commit/6dfcd56))
- When the sidebar is collapsed, click the menu to display the secondary menu using dropdown and save the sidebar collapsed state ([#11](https://github.com/Whbbit1999/shadcn-vue-admin/pull/11))
### 🏡 Chore
- **release:** V0.3.2 ([f42338c](https://github.com/Whbbit1999/shadcn-vue-admin/commit/f42338c))
### ❤️ Contributors
- Whbbit1999 ([@Whbbit1999](https://github.com/Whbbit1999))
## v0.3.2
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.3.1...v0.3.2)
### 🩹 Fixes
- Search-menu dialog error ([0fd2d7e](https://github.com/Whbbit1999/shadcn-vue-admin/commit/0fd2d7e))
- Build error, use unplugin-vue-router,router name type ([010122f](https://github.com/Whbbit1999/shadcn-vue-admin/commit/010122f))
- Remove unplugin-vue-router, pending migrate-to-unplugin-vue-router branch accomplish ([b2f4f64](https://github.com/Whbbit1999/shadcn-vue-admin/commit/b2f4f64))
- Index page remove default layout ([8524cf4](https://github.com/Whbbit1999/shadcn-vue-admin/commit/8524cf4))
### 📦 Build
- Use unplugin-vue-router instead of vite-plugin-pages ([c9aaf4a](https://github.com/Whbbit1999/shadcn-vue-admin/commit/c9aaf4a))
### 🏡 Chore
- **release:** V0.3.0 ([fc500d1](https://github.com/Whbbit1999/shadcn-vue-admin/commit/fc500d1))
- **release:** V0.3.1 ([3f80295](https://github.com/Whbbit1999/shadcn-vue-admin/commit/3f80295))
- Vite-env.d.ts add unplugin-vue-router/client ([631e5db](https://github.com/Whbbit1999/shadcn-vue-admin/commit/631e5db))
### ❤️ Contributors
- Whbbit1999 ([@Whbbit1999](https://github.com/Whbbit1999))
## v0.3.1
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.3.0...v0.3.1)
### 🩹 Fixes
- Use vue-sonner instead of shadcn-vue/toast ([8d020fd](https://github.com/Whbbit1999/shadcn-vue-admin/commit/8d020fd))
### 🏡 Chore
- **release:** V0.3.0 ([fc500d1](https://github.com/Whbbit1999/shadcn-vue-admin/commit/fc500d1))
### ❤️ Contributors
- Whbbit1999 <luckyboy_dong@sina.com>
## v0.3.0
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.3.0...v0.3.0)
### 🩹 Fixes
- Use vue-sonner instead of shadcn-vue/toast ([8d020fd](https://github.com/Whbbit1999/shadcn-vue-admin/commit/8d020fd))
### ❤️ Contributors
- Whbbit1999 <luckyboy_dong@sina.com>
## v0.2.5
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.2.4...v0.2.5)
### 🩹 Fixes
- **vite.config.ts:** Build error ([8e3620b](https://github.com/Whbbit1999/shadcn-vue-admin/commit/8e3620b))
### 🏡 Chore
- Add description and keywords in index.html ([054d626](https://github.com/Whbbit1999/shadcn-vue-admin/commit/054d626))
- Update vite ([8a00544](https://github.com/Whbbit1999/shadcn-vue-admin/commit/8a00544))
### ❤️ Contributors
- Whbbit1999 <luckyboy_dong@sina.com>
## v0.2.4
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.2.3...v0.2.4)
### 🏡 Chore
- **release:** V0.2.3 ([2c22989](https://github.com/Whbbit1999/shadcn-vue-admin/commit/2c22989))
### ❤️ Contributors
- Whbbit1999 <luckyboy_dong@sina.com>
## v0.2.3
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.2.2...v0.2.3)
### 🚀 Enhancements
- User module CRUD ([f1cbf66](https://github.com/Whbbit1999/shadcn-vue-admin/commit/f1cbf66))
### 🩹 Fixes
- Fix the browser warning of the billing block ([7c77903](https://github.com/Whbbit1999/shadcn-vue-admin/commit/7c77903))
### 🏡 Chore
- Update packages ([e8b1a23](https://github.com/Whbbit1999/shadcn-vue-admin/commit/e8b1a23))
- Update shadcn-vue checkbox component ([e329434](https://github.com/Whbbit1999/shadcn-vue-admin/commit/e329434))
### ❤️ Contributors
- Whbbit1999 <luckyboy_dong@sina.com>
## v0.2.2
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/v0.2.1...v0.2.2)
### 🩹 Fixes
- Billing-detail card in dark-mode background style ([277b24b](https://github.com/Whbbit1999/shadcn-vue-admin/commit/277b24b))
- Data-table view-options component drop-down-menu-checkbox-item status error ([0b7d653](https://github.com/Whbbit1999/shadcn-vue-admin/commit/0b7d653))
- Data-table table-columns component checkbox status error ([d0d53fb](https://github.com/Whbbit1999/shadcn-vue-admin/commit/d0d53fb))
- Change settings block notifications-form component checkbox component attributes ([ab5a9e9](https://github.com/Whbbit1999/shadcn-vue-admin/commit/ab5a9e9))
### 🏡 Chore
- Remove release-it and release-it-pnpm, change release to unjs/changelogen ([0c14dcd](https://github.com/Whbbit1999/shadcn-vue-admin/commit/0c14dcd))
- Remove package.json file git block ([d28bb67](https://github.com/Whbbit1999/shadcn-vue-admin/commit/d28bb67))
- Update vueuse/core package ([b007f3d](https://github.com/Whbbit1999/shadcn-vue-admin/commit/b007f3d))
- Update radix-vue to reak-ui ([83ad1ee](https://github.com/Whbbit1999/shadcn-vue-admin/commit/83ad1ee))
### ❤️ Contributors
- Whbbit1999 <luckyboy_dong@sina.com>
## v0.2.1
[compare changes](https://github.com/Whbbit1999/shadcn-vue-admin/compare/0.2.0...v0.2.1)
### 🚀 Enhancements
- Invite User And Create User demo use Dialog on desktop, use Drawer on mobile. ([f1831e8](https://github.com/Whbbit1999/shadcn-vue-admin/commit/f1831e8))
- The App module is synchronized with the app module of Shadcn Admin ([9b2606a](https://github.com/Whbbit1999/shadcn-vue-admin/commit/9b2606a))
- Add change theme, like shadcn vue document ([6dc355b](https://github.com/Whbbit1999/shadcn-vue-admin/commit/6dc355b))
- Update LICENSE ([221c4ca](https://github.com/Whbbit1999/shadcn-vue-admin/commit/221c4ca))
- Change hash history mode to webHistory ([a91c44c](https://github.com/Whbbit1999/shadcn-vue-admin/commit/a91c44c))
- The auth module synchronized with the auth module of Shadcn Admin ([3a91093](https://github.com/Whbbit1999/shadcn-vue-admin/commit/3a91093))
- Add nprogress and global router guard ([8b6d4b7](https://github.com/Whbbit1999/shadcn-vue-admin/commit/8b6d4b7))
- Settings module use shadcn-vue example forms ([0149afa](https://github.com/Whbbit1999/shadcn-vue-admin/commit/0149afa))
- When the system color changes, the website icon changes ([6569aa4](https://github.com/Whbbit1999/shadcn-vue-admin/commit/6569aa4))
- **Search/Menu:** Search Menu component style change, use stone primary color ([34a6cf8](https://github.com/Whbbit1999/shadcn-vue-admin/commit/34a6cf8))
- Search menu component when command item click close the panel ([07abd20](https://github.com/Whbbit1999/shadcn-vue-admin/commit/07abd20))
- **DataTable:** Global table components change icon ([c29fdd5](https://github.com/Whbbit1999/shadcn-vue-admin/commit/c29fdd5))
- Search menu add 'plans & billings page' ([d8f5286](https://github.com/Whbbit1999/shadcn-vue-admin/commit/d8f5286))
- Billings page design change ([6886f3e](https://github.com/Whbbit1999/shadcn-vue-admin/commit/6886f3e))
- New scrollbar ([0d6de56](https://github.com/Whbbit1999/shadcn-vue-admin/commit/0d6de56))
- Added a example module to talk to ai ([571dd4a](https://github.com/Whbbit1999/shadcn-vue-admin/commit/571dd4a))
- Tasks CRUD Demo ([5fd8052](https://github.com/Whbbit1999/shadcn-vue-admin/commit/5fd8052))
### 🩹 Fixes
- Fix auto-import-components names error, now shadcn-vue components can auto import ,prefix is UI ([a884695](https://github.com/Whbbit1999/shadcn-vue-admin/commit/a884695))
- Shadcn-vue calendar eslint error ([5abac39](https://github.com/Whbbit1999/shadcn-vue-admin/commit/5abac39))
- Help-center in darkmode style error ([92d170d](https://github.com/Whbbit1999/shadcn-vue-admin/commit/92d170d))
- Ai-talk module type error ([b8c708c](https://github.com/Whbbit1999/shadcn-vue-admin/commit/b8c708c))
### 💅 Refactors
- Code format ([62acdbc](https://github.com/Whbbit1999/shadcn-vue-admin/commit/62acdbc))
### 📦 Build
- Upgrade packages ([88896c5](https://github.com/Whbbit1999/shadcn-vue-admin/commit/88896c5))
### 🏡 Chore
- Fix netlify reload page 404 ([a296949](https://github.com/Whbbit1999/shadcn-vue-admin/commit/a296949))
- Error module sidebar name change ([c0f6a05](https://github.com/Whbbit1999/shadcn-vue-admin/commit/c0f6a05))
- When deploying vercel you need to add a file profile ([9b841fb](https://github.com/Whbbit1999/shadcn-vue-admin/commit/9b841fb))
- Change package.json info ([a413bde](https://github.com/Whbbit1999/shadcn-vue-admin/commit/a413bde))
- Update packages ([7f7c872](https://github.com/Whbbit1999/shadcn-vue-admin/commit/7f7c872))
- Remove VueQueryDevtools, you can find it in vue-devtools or add it yourself ([67d2c4c](https://github.com/Whbbit1999/shadcn-vue-admin/commit/67d2c4c))
- Update packages ([1b8234d](https://github.com/Whbbit1999/shadcn-vue-admin/commit/1b8234d))
### 🎨 Styles
- Layout Page components add py-4 ([442f52b](https://github.com/Whbbit1999/shadcn-vue-admin/commit/442f52b))
### ❤️ Contributors
- Whbbit1999 <luckyboy_dong@sina.com>

View File

@@ -1,170 +0,0 @@
# Monisuo Admin 实施计划
## 项目信息
- 项目名称: Monisuo 管理后台
- 技术栈: Vue 3 + shadcn-vue + Tailwind CSS
- 开始时间: 2026-03-22
- 完成时间: 2026-03-22
- 状态: COMPLETE
## 任务清单
### 阶段 1: 布局组件封装 ✅
- [x] BasicPage 组件 - 已有组件可直接使用
- [x] 使用现有的 UiTable、UiCard 等组件
- [x] 使用现有的 UiDialog 组件
- [x] 使用现有的 UiSpinner 组件
### 阶段 2: 页面优化 ✅
- [x] 登录页响应式优化
- 添加表单验证
- 添加密码显示/隐藏
- 响应式布局
- 移动端 Logo
- [x] 资金总览页
- 统计卡片展示
- 快捷操作入口
- 待审批订单预览
- [x] 用户管理页
- Toast 提示
- 分页组件
- 用户详情弹窗
- 响应式布局PC表格/移动端卡片)
- [x] 币种管理页
- Toast 提示
- 表单验证
- 响应式布局
- [x] 订单审批页
- Toast 提示
- 订单详情弹窗
- 分页组件
- 筛选功能
- 响应式布局
### 阶段 3: 全局优化 ✅
- [x] Toast 提示(使用 vue-sonner
- [x] 路由守卫优化Monisuo 路由保护)
- [x] TypeScript 类型检查通过
- [x] 构建测试通过
### 阶段 4: 测试与完善 ✅
- [x] TypeScript 类型检查
- [x] 构建测试
- [x] 功能完整性检查
## 已实现的页面
### 1. 登录页 (`/auth/monisuo-sign-in.vue`)
- 响应式布局PC左右分栏移动端单列
- 表单验证(用户名、密码必填,密码长度检查)
- 密码显示/隐藏切换
- 加载状态和错误提示
- 美观的品牌展示
### 2. 资金总览 (`/monisuo/dashboard.vue`)
- 6个统计卡片充值、提现、在管资金、交易总值、待审批、用户数
- 快捷操作入口
- 待审批订单预览
- 响应式布局
### 3. 用户管理 (`/monisuo/users.vue`)
- 用户列表PC表格/移动端卡片)
- 搜索功能(用户名、状态筛选)
- 分页功能
- 用户状态切换(启用/禁用)
- 用户详情弹窗
- Toast 操作提示
### 4. 币种管理 (`/monisuo/coins.vue`)
- 币种列表PC表格/移动端卡片)
- 新增/编辑币种弹窗
- 调价功能(仅手动价格类型)
- 上下架功能
- 表单验证
- Toast 操作提示
### 5. 订单审批 (`/monisuo/orders.vue`)
- 待审批/全部订单 Tab 切换
- 订单列表PC表格/移动端卡片)
- 订单详情弹窗
- 审批功能(通过/驳回)
- 筛选功能(类型、状态)
- 分页功能
- Toast 操作提示
## API 对接情况
所有 API 已完成对接:
- ✅ POST /admin/login - 管理员登录
- ✅ GET /admin/user/list - 用户列表
- ✅ GET /admin/user/detail - 用户详情
- ✅ POST /admin/user/status - 禁用/启用用户
- ✅ GET /admin/coin/list - 币种列表
- ✅ POST /admin/coin/save - 新增/编辑币种
- ✅ POST /admin/coin/price - 调整币种价格
- ✅ POST /admin/coin/status - 币种上下架
- ✅ GET /admin/order/pending - 待审批订单
- ✅ GET /admin/order/list - 所有订单
- ✅ POST /admin/order/approve - 审批订单
- ✅ GET /admin/finance/overview - 资金总览
## 技术实现
### 使用的库
- Vue 3 + TypeScript
- shadcn-vue (Radix UI)
- Tailwind CSS 4
- TanStack Query (vue-query)
- Vue Router
- Pinia
- vue-sonner (Toast)
- @iconify/vue (图标)
- lucide-vue-next (图标)
### 响应式设计
- PC端表格布局充分利用大屏幕空间
- 移动端:卡片列表布局,简化信息展示
- 使用 Tailwind CSS 响应式断点 (md:, lg:, xl:)
### 路由守卫
- `/monisuo/*` 路由需要登录认证
- 未登录自动重定向到 `/auth/monisuo-sign-in`
## 进度日志
### 2026-03-22 03:48
- ✅ 项目初始化完成
- ✅ API 服务层实现
- ✅ 基础页面创建
- ✅ 认证逻辑实现
### 2026-03-22 (完成)
- ✅ 登录页响应式优化和表单验证
- ✅ 资金总览页统计卡片和快捷操作
- ✅ 用户管理页分页、详情弹窗、响应式布局
- ✅ 币种管理页表单验证、响应式布局
- ✅ 订单审批页详情弹窗、筛选、分页、响应式布局
- ✅ Toast 提示集成
- ✅ 路由守卫优化
- ✅ TypeScript 类型检查通过
- ✅ 构建测试通过
## 状态
STATUS: COMPLETE