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

fix: 修复退出登录未调用接口的问题

上级 8bbae0ec
......@@ -41,7 +41,7 @@
</template>
<script>
// import cAction from '@action'
import cAction from '@action'
export default {
props: {
......@@ -122,15 +122,15 @@ export default {
},
/* 退出登录 - 跳转方法 */
goOutLogin () {
this.$router.push({ path: '/login/index' })
// cAction.Other.outLogin().then(str => {
// if (/^login/gi.test(str)) {
// } else {
// /* 出错 */
// }
// }).catch(e => {
// this.$message.error(e.message)
// })
// this.$router.push({ path: '/login/index' })
cAction.Other.outLogin()
.then(str => {
window.G.UserInfo = {}
this.$router.push({ path: '/login/index' })
})
.catch(e => {
this.$message.error(e.message)
})
/* 清空一下记录,然后调整到登录页 */
// this.$router.push({ path: '/login/index' })
},
......
......@@ -66,15 +66,15 @@ export default {
methods: {
/* 退出登录 - 跳转方法 */
logout() {
this.$router.push({ path: '/login/index' })
// cAction.Others.outLogin()
// .then(str => {
// window.G.UserInfo = {}
// this.$router.push({ path: '/login/index' })
// })
// .catch(e => {
// this.$message.error(e.message)
// })
// this.$router.push({ path: '/login/index' })
cAction.Other.outLogin()
.then(str => {
window.G.UserInfo = {}
this.$router.push({ path: '/login/index' })
})
.catch(e => {
this.$message.error(e.message)
})
},
getNewLiveMsg() {
// 获取最新直播提醒
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论