mirror of
https://github.com/fjykTec/ModernWMS.git
synced 2024-09-20 06:56:08 +08:00
Solve the problem of returning to the login interface and constantly loading after authentication timeout
This commit is contained in:
parent
de317d8e6d
commit
dc19d1dc01
|
@ -52,6 +52,8 @@ function rediretToLogin() {
|
|||
store.commit('system/clearOpenedMenu')
|
||||
store.commit('system/setCurrentRouterPath', '')
|
||||
|
||||
clearLoading() // Clear all loads
|
||||
|
||||
router.push('/login')
|
||||
}
|
||||
|
||||
|
@ -69,6 +71,11 @@ const closeLoading = () => {
|
|||
}
|
||||
}
|
||||
|
||||
const clearLoading = () => {
|
||||
acitveAxios = 0
|
||||
emitter.emit('closeLoading')
|
||||
}
|
||||
|
||||
const handleRefreshToken = (token: string) => {
|
||||
const refreshToken = store.getters['user/refreshToken']
|
||||
store.commit('user/setIsRefreshingToken', true)
|
||||
|
|
|
@ -19,22 +19,16 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, onMounted } from 'vue'
|
||||
import { reactive } from 'vue'
|
||||
import LoginForm from '@/components/login/login-form.vue'
|
||||
import LanguagesSwitch from '@/components/system/languages.vue'
|
||||
import Logo from '@/components/system/logo.vue'
|
||||
import { emitter } from '@/utils/bus.js'
|
||||
|
||||
const method = reactive({
|
||||
toICP: () => {
|
||||
window.open('https://beian.miit.gov.cn/', '_blank')
|
||||
}
|
||||
})
|
||||
|
||||
// 回到登录界面清除状态
|
||||
onMounted(() => {
|
||||
emitter.emit('closeLoading')
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
|
Loading…
Reference in a new issue