视频会议

This commit is contained in:
duoaohui
2026-05-23 14:15:19 +08:00
parent 2689301721
commit 2e66717932
5 changed files with 130 additions and 49 deletions

View File

@@ -1,11 +1,11 @@
<!--
<!--
启动页 / 路由分发页
功能
- 判断用户登录状态检查本地 Token
- 已登录 跳转消息列表页TabBar 首页
- 未登录 跳转登录页
此页面不展示 UI仅作为路由分发入口
-->
<template>
@@ -23,9 +23,30 @@
*/
import { useUserStore } from '@/store/user'
function readSsoQueryFromLocation() {
try {
if (typeof window === 'undefined') return ''
const hash = String(window.location.hash || '')
if (hash.indexOf('/pages/auth/sso') >= 0 && hash.indexOf('?') >= 0) {
return hash.slice(hash.indexOf('?') + 1)
}
const search = String(window.location.search || '').replace(/^\?/, '')
if (search.indexOf('payload=') >= 0 || search.indexOf('token=') >= 0 || search.indexOf('cloudLawSso=') >= 0) {
return search
}
} catch (e) {}
return ''
}
export default {
name: 'LaunchPage',
onLoad() {
const ssoQuery = readSsoQueryFromLocation()
if (ssoQuery) {
console.warn('[Index] detected SSO params on launch page, redirect to SSO')
uni.redirectTo({ url: `/pages/auth/sso?${ssoQuery}` })
return
}
const store = useUserStore()
if (store.isLoggedIn) {
uni.switchTab({ url: '/pages/chat/index' })
@@ -50,3 +71,4 @@ export default {
color: #94A3B8;
}
</style>