feat: Phase 1 完成 — 基础设施 + 用户认证 + 管理端 + 端到端验证

Phase 1 (基础设施与用户认证) 全部 11 个 Task 开发完成:

后端 (Go):
- Auth 模块: 注册/登录/JWT(有状态)/Profile/密码修改
- Admin 模块: 用户列表/详情/禁用/启用/角色分配/创建用户
- 中间件: JWT认证 + RBAC角色权限 + 请求日志 + CORS + Panic恢复
- Dockerfile 多阶段构建 + Docker Compose 全栈部署

前台 (uni-app):
- 登录/注册页面 + 自定义 TabBar + 个人中心
- 请求封装 + 状态管理 (Pinia)

管理端 (Vue 3 + Element Plus):
- 登录/仪表盘/用户列表/用户详情
- Axios 封装 + 路由守卫 + Pinia 状态管理

验证:
- 全流程 API 端到端测试通过
- Playwright 页面自动化验证通过
- code-reviewer 代码审查通过

Made-with: Cursor
This commit is contained in:
bujinyuan
2026-03-02 11:31:24 +08:00
parent e9bd4dd204
commit 4d03215fe4
63 changed files with 15908 additions and 102 deletions

View File

@@ -1,48 +1,52 @@
<!--
启动页 / 路由分发页
功能
- 判断用户登录状态检查本地 Token
- 已登录 跳转消息列表页TabBar 首页
- 未登录 跳转登录页
此页面不展示 UI仅作为路由分发入口
-->
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{ title }}</text>
</view>
<view class="launch-page">
<text class="loading-text">加载中</text>
</view>
</template>
<script>
/**
* 启动页逻辑
*
* 在 onLoad 生命周期中检查登录状态并重定向
* 使用 reLaunch 确保清除导航栈
*/
import { useUserStore } from '@/store/user'
export default {
data() {
return {
title: 'Hello',
name: 'LaunchPage',
onLoad() {
const store = useUserStore()
if (store.isLoggedIn) {
uni.switchTab({ url: '/pages/chat/index' })
} else {
uni.reLaunch({ url: '/pages/auth/login' })
}
},
onLoad() {},
methods: {},
}
}
</script>
<style>
.content {
<style scoped>
.launch-page {
min-height: 100vh;
background-color: #F8FAFC;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
.loading-text {
font-size: 28rpx;
color: #94A3B8;
}
</style>