|
|
@@ -17,6 +17,8 @@ import Config from '@/config/index'
|
|
|
import { customApi } from '@/service/custom'
|
|
|
import { userToken } from "@/composables/config";
|
|
|
import { usePopup } from '@/hooks/usePopup'
|
|
|
+import useUserStore from '@/stores/use-user-store'
|
|
|
+const userStore = useUserStore()
|
|
|
|
|
|
const { confirm } = usePopup()
|
|
|
|
|
|
@@ -160,6 +162,7 @@ async function confirmSwitchSystem(item: SystemItem) {
|
|
|
if (props.eventSource === 'login'){
|
|
|
const baseUrl = `${item.sysUrl}/#/signin`
|
|
|
// #ifdef H5
|
|
|
+ userStore.clearUser()
|
|
|
window.location.replace(baseUrl)
|
|
|
// #endif
|
|
|
|
|
|
@@ -173,6 +176,7 @@ async function confirmSwitchSystem(item: SystemItem) {
|
|
|
const token = typeof accessToken === 'string' ? accessToken : String(accessToken || '')
|
|
|
const baseUrl = `${item.sysUrl}/#/signin?sysLoginToken=${btoa(token)}`
|
|
|
// #ifdef H5
|
|
|
+ userStore.clearUser()
|
|
|
window.location.replace(baseUrl)
|
|
|
// #endif
|
|
|
|