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

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

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