|
|
@@ -77,10 +77,15 @@ router.afterEach(() => {
|
|
|
|
|
|
// 路由跳转函数
|
|
|
const changeRouter = (path: any) => {
|
|
|
+ if (localStorage.getItem('loginAI')) {
|
|
|
+ localStorage.removeItem('loginAI')
|
|
|
+ emitter.emit('login-success')
|
|
|
+ }
|
|
|
if (path == '/PromptConfiguration') {
|
|
|
emitter.emit('checkPrompt')
|
|
|
} else {
|
|
|
- if (userStore.isLogin) {
|
|
|
+ if (localStorage.getItem('loginAI')) {
|
|
|
+ localStorage.removeItem('loginAI')
|
|
|
emitter.emit('checknoPrompt')
|
|
|
}
|
|
|
}
|
|
|
@@ -97,9 +102,6 @@ const changeRouter = (path: any) => {
|
|
|
}
|
|
|
sessionStorage.removeItem('trackingTablePageInfo')
|
|
|
sessionStorage.removeItem('bookingTablePageInfo')
|
|
|
- if (userStore.isLogin) {
|
|
|
- emitter.emit('login-success')
|
|
|
- }
|
|
|
let toPath = path
|
|
|
if (path === '/tracking' && !userStore.userInfo?.uname) {
|
|
|
toPath = '/public-tracking'
|