fix 修复 删除无用的参数获取

This commit is contained in:
疯狂的狮子Li 2023-07-12 11:14:18 +08:00
parent a681353fe1
commit 64aea65cef

View File

@ -27,7 +27,6 @@ const processResponse = async (res: any) => {
if (res.code !== 200) { if (res.code !== 200) {
throw new Error(res.msg); throw new Error(res.msg);
} }
setToken(res.data.access_token);
ElMessage.success(res.msg); ElMessage.success(res.msg);
location.href = import.meta.env.VITE_APP_CONTEXT_PATH + 'index'; location.href = import.meta.env.VITE_APP_CONTEXT_PATH + 'index';
}; };
@ -48,6 +47,7 @@ const callbackByCode = async (data: LoginData) => {
}; };
const loginByCode = async (data: LoginData) => { const loginByCode = async (data: LoginData) => {
console.log(2)
try { try {
const res = await login(data); const res = await login(data);
await processResponse(res); await processResponse(res);