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
32 lines
807 B
JavaScript
32 lines
807 B
JavaScript
/**
|
||
* 管理后台入口文件
|
||
*
|
||
* 初始化 Vue 3 应用,注册全局插件:
|
||
* - Element Plus(UI 组件库,含中文语言包)
|
||
* - Vue Router(路由管理)
|
||
* - Pinia(状态管理)
|
||
* - 全局样式
|
||
*/
|
||
import { createApp } from 'vue'
|
||
import { createPinia } from 'pinia'
|
||
import ElementPlus from 'element-plus'
|
||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
||
import 'element-plus/dist/index.css'
|
||
|
||
import App from './App.vue'
|
||
import router from './router'
|
||
import './styles/global.css'
|
||
|
||
const app = createApp(App)
|
||
|
||
app.use(createPinia())
|
||
app.use(router)
|
||
app.use(ElementPlus, { locale: zhCn })
|
||
|
||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||
app.component(key, component)
|
||
}
|
||
|
||
app.mount('#app')
|