v0.5.5: 应急页 v0.5.4 + 移除IT设备升级 + admin登录修复 + 内容审核架构 + 知识库
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
// 包括:
|
||||
// 1. /login → 登录页(简单的用户名密码表单)
|
||||
// 2. /workspace → 坐席工作台(需要认证)
|
||||
// 3. / → 重定向到 /workspace
|
||||
// 3. /agent-preview → v0.5.4 BC/DR 应急页坐席视图(公开)
|
||||
// 4. / → 重定向到 /workspace
|
||||
// =============================================================================
|
||||
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
@@ -33,6 +34,13 @@ const routes = [
|
||||
component: () => import('@/views/Workspace.vue'),
|
||||
meta: { title: '坐席工作台', requiresAuth: true },
|
||||
},
|
||||
// v0.5.4 BC/DR 应急页坐席视图
|
||||
{
|
||||
path: '/agent-preview',
|
||||
name: 'AgentPreview',
|
||||
component: () => import('@/views/AgentPreviewView.vue'),
|
||||
meta: { title: '坐席助手', requiresAuth: false },
|
||||
},
|
||||
]
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -74,6 +82,13 @@ router.beforeEach((to, _from, next) => {
|
||||
const requiresAuth = to.meta.requiresAuth !== false // 默认需要认证
|
||||
const token = localStorage.getItem('agent_token')
|
||||
|
||||
// v0.5.4 BC/DR 应急页(agent-preview)不需 Portal token
|
||||
// 它的鉴权由 /emergency 入口的企微 JS-SDK 完成
|
||||
if (to.name === 'AgentPreview') {
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
if (requiresAuth && !token) {
|
||||
// 需要认证但没有 token,跳转到 Portal 统一入口
|
||||
window.location.href = '/itportal/'
|
||||
|
||||
Reference in New Issue
Block a user