提交 d0a15b27 编写于 作者: chengxiang.li's avatar chengxiang.li

注销时 新增调用退出登录逻辑

上级 034361e3
......@@ -30,6 +30,17 @@ export const handleLogin = data => {
})
}
// 密码退出登录
export const handleLogout = data => {
return fetch({
headers,
url: getBaseUrl(`account/logout`),
method: 'get',
data: data,
description: '密码退出登录',
})
}
// 忘记密码时 获取验证码
export const handleGetAuthCode = data => {
return fetch({
......
......@@ -43,6 +43,8 @@
import { getLoginUrl,getInnerLoginUrl, getYunQueYiUrl } from '../../utils/index.js'
import { mapGetters } from 'vuex'
import opinionDialog from '@/components/opinionDialog'
import { handleLogout } from '@/utils/account/accountApi';
let vm = null
export default {
components: {
......@@ -77,6 +79,9 @@ export default {
methods: {
handleCommand(command) {
if (command === 'logout') {
// 新增 调用后端退出登录接口
handleLogout();
localStorage.removeItem('storageToken')
if(vm.idType == 1) { // 内部
window.location.href = getInnerLoginUrl()
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册