feat(admin): 实现管理员登录认证和页面权限控制
- 添加管理员密码验证登录功能 - 实现登录状态管理和用户界面显示 - 集成权限检查确保页面访问安全 - 添加登录/登出流程处理 - 重构AdminView组件结构和样式 - 集成Element Plus图标和UI组件 - 添加设置页面路由配置 - 优化Token管理页面折叠表单设计 - 移除旧的响应式布局相关代码 - 更新应用标题动态渲染逻辑
This commit is contained in:
+16
-8
@@ -1,21 +1,29 @@
|
||||
import {createApp} from 'vue'
|
||||
import {createPinia} from 'pinia'
|
||||
import persistedState from 'pinia-plugin-persistedstate';
|
||||
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
import './assets/main.css'
|
||||
|
||||
const pinia = createPinia()
|
||||
pinia.use(persistedState)
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
if (import.meta.env.DEV) {
|
||||
document.title = '抖音数据去重 - dev'
|
||||
}
|
||||
|
||||
app.use(createPinia().use(persistedState))
|
||||
app.use(pinia)
|
||||
app.use(router)
|
||||
app.use(ElementPlus)
|
||||
|
||||
app.mount('#app')
|
||||
|
||||
|
||||
router.beforeEach((to, from) => {
|
||||
var postfix: string = ''
|
||||
if (import.meta.env.DEV) {
|
||||
postfix = '-dev'
|
||||
}
|
||||
|
||||
if (to.meta.title) {
|
||||
document.title = to.meta.title + postfix
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user