Commit 7bf3b36e by 姜雷

引用登出错误码

parent 9bc75e5a
import axios from 'axios';
import { Message, MessageBox } from 'element-ui';
import store from '../store';
import { SUCCESS_CODE } from '@/config';
import { SUCCESS_CODE, LOGOUT_CODE } from '@/config';
import { errorHandle } from '@/api/validate';
import { getYourIP } from '@/utils/getIp.js';
......@@ -73,7 +73,7 @@ const createBaseFetch = config => {
});
// -2:其他客户端登录了;Token 过期了;
if (res.code === '-2') {
if (res.code === LOGOUT_CODE) {
if (logout) return;
logout = true;
MessageBox.confirm(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment