| | |
| | | import { Local } from '../utils/storage'; |
| | | import { accessSessionKey } from '../utils/request'; |
| | | import emitter from '../utils/mitt'; |
| | | import { SHARE_PAGE_NAME, activeChatRoom, isSharePage } from '../stores/chatRoom'; |
| | | import { SHARE_PAGE_NAME, activeChatRoom, isSharePage, openLoginDlg } from '../stores/chatRoom'; |
| | | import { nextTick } from 'vue'; |
| | | |
| | | /** |
| | |
| | | router.beforeEach((to, from, next) => { |
| | | const accessSession = Local.get(accessSessionKey); |
| | | if (!accessSession && to.name !==SHARE_PAGE_NAME) { |
| | | emitter.emit('openLoginDlg'); |
| | | openLoginDlg(); |
| | | if(to.name==='Home'){ |
| | | next(); |
| | | }else{ |