提交 d09e8793 authored 作者: 王鹏飞's avatar 王鹏飞

fix: 修复退出登录的问题

上级 c521506e
......@@ -22,5 +22,14 @@
</head>
<body {{ BODY_ATTRS }}>
{{ APP }}
<script>
var _hmt = _hmt || []
;(function() {
var hm = document.createElement('script')
hm.src = 'https://hm.baidu.com/hm.js?c29be2e1d21ce64d1534ece3acbf4ab5'
var s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s)
})()
</script>
</body>
</html>
......@@ -41,9 +41,7 @@ export default {
},
methods: {
logout() {
this.$store.dispatch('logout').then(() => {
this.$router.replace('/')
})
this.$store.dispatch('logout')
},
switchLocale(locale) {
this.$i18n.locale = locale
......
......@@ -32,9 +32,9 @@ export const actions = {
},
// 退出登录
logout({ commit }) {
return logout().then(response => {
logout().then(response => {
commit('setUser', {})
return response
this.$router.replace('/')
})
},
// 检测登录状态
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论