|
@@ -13,18 +13,16 @@ export default {
|
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
|
import { ElMessageBox, ElNotification } from 'element-plus'
|
|
import { ElMessageBox, ElNotification } from 'element-plus'
|
|
|
import { useLogin } from '@/business/login'
|
|
import { useLogin } from '@/business/login'
|
|
|
-import { i18n } from '@/stores'
|
|
|
|
|
import eventBus from '@/services/bus'
|
|
import eventBus from '@/services/bus'
|
|
|
|
|
|
|
|
const { userLogout } = useLogin()
|
|
const { userLogout } = useLogin()
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
|
-const { t } = i18n.global
|
|
|
|
|
|
|
|
|
|
// 接收用户登出通知
|
|
// 接收用户登出通知
|
|
|
eventBus.$on('LogoutNotify', (msg) => {
|
|
eventBus.$on('LogoutNotify', (msg) => {
|
|
|
userLogout(() => {
|
|
userLogout(() => {
|
|
|
if (msg) {
|
|
if (msg) {
|
|
|
- ElMessageBox.alert(msg as string, t('user.login.tips4'))
|
|
|
|
|
|
|
+ ElMessageBox.alert(msg as string, '下线通知')
|
|
|
}
|
|
}
|
|
|
router.replace({ name: 'login' })
|
|
router.replace({ name: 'login' })
|
|
|
})
|
|
})
|