chore: initial baseline with P0-safety .gitignore
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
// =============================================================================
|
||||
// 企微IT智能服务台 — H5用户端应用入口
|
||||
// =============================================================================
|
||||
// 说明:Vue3 应用入口文件,负责:
|
||||
// 1. 创建 Vue 应用实例
|
||||
// 2. 注册 Vant4 移动端组件库
|
||||
// 3. 注册 Pinia 状态管理
|
||||
// 4. 注册 Vue Router 路由
|
||||
// 5. 挂载到 DOM
|
||||
// =============================================================================
|
||||
|
||||
import { createApp } from 'vue'
|
||||
// 根组件
|
||||
import App from './App.vue'
|
||||
// 路由配置
|
||||
import router from './router'
|
||||
// Pinia 状态管理
|
||||
import { createPinia } from 'pinia'
|
||||
// 全局样式
|
||||
import './styles/global.css'
|
||||
|
||||
// 创建 Vue 应用实例
|
||||
const app = createApp(App)
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// 注册插件
|
||||
// --------------------------------------------------------------------------
|
||||
// Pinia: 状态管理(存储会话信息、摇人状态等)
|
||||
app.use(createPinia())
|
||||
// Vue Router: 路由管理(页面跳转)
|
||||
app.use(router)
|
||||
|
||||
// 注意:Vant 组件通过 vite 插件 unplugin-vue-components 按需自动导入,
|
||||
// 不需要在这里手动注册,减小打包体积
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// 挂载应用到 DOM
|
||||
// --------------------------------------------------------------------------
|
||||
app.mount('#app')
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// 企微 OAuth2 授权检查(已迁移至路由守卫 router/index.ts)
|
||||
// --------------------------------------------------------------------------
|
||||
// OAuth2 授权逻辑现在在路由守卫中统一处理:
|
||||
// 1. 检查 URL 中的 code 参数
|
||||
// 2. 有 code → 调用后端 OAuth2 回调
|
||||
// 3. 无 code → 跳转企微授权页面
|
||||
// 参见:frontend-h5/src/router/index.ts 中的 router.beforeEach
|
||||
Reference in New Issue
Block a user