版本变更V3.28体验优化
This commit is contained in:
@ -190,6 +190,8 @@ const handleLogout = () => {
|
||||
userStore.logout()
|
||||
ElMessage({ type: 'success', message: '已安全退出' })
|
||||
await router.replace('/login')
|
||||
// 【新增】退出后强制刷新,重置 Dify Embed Token 和聊天窗口状态
|
||||
window.location.reload()
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
@ -234,7 +236,7 @@ const handleLogout = () => {
|
||||
<footer v-if="!isLoginPage" class="app-footer">
|
||||
<span class="version-tag">
|
||||
<el-icon style="vertical-align: middle; margin-right: 4px"><InfoFilled /></el-icon>
|
||||
当前版本:V3.26(添加AI助手版)
|
||||
当前版本:V3.28(添加AI助手版)
|
||||
</span>
|
||||
</footer>
|
||||
|
||||
|
||||
@ -80,11 +80,22 @@ const onLogin = async () => {
|
||||
const success = await userStore.handleLogin(loginForm)
|
||||
|
||||
if (success) {
|
||||
// [新增] 2. 登录成功后,立即拉取当前用户的权限字典
|
||||
// 这样进入 Dashboard 时,所有按钮/列的显示状态就已经确定了
|
||||
// 2. 登录成功后,立即拉取当前用户的权限字典
|
||||
await permissionStore.loadPermissions()
|
||||
|
||||
// 3. 跳转
|
||||
// 【新增】防止刷新循环:检查是否已执行过单次刷新
|
||||
const hasReloaded = sessionStorage.getItem('__login_reloaded__')
|
||||
if (!hasReloaded) {
|
||||
sessionStorage.setItem('__login_reloaded__', '1')
|
||||
router.push('/dashboard')
|
||||
window.location.reload()
|
||||
return
|
||||
} else {
|
||||
// 已刷新过,说明是刷新后重复触发,清除标记,正常跳转
|
||||
sessionStorage.removeItem('__login_reloaded__')
|
||||
}
|
||||
|
||||
// 3. 正常跳转(刷新后重复触发或直接登录)
|
||||
router.push('/dashboard')
|
||||
} else {
|
||||
// 失败(业务逻辑拒绝):弹出模态框
|
||||
|
||||
Reference in New Issue
Block a user