diff --git a/back/services/user.ts b/back/services/user.ts index be055a99..f463880e 100644 --- a/back/services/user.ts +++ b/back/services/user.ts @@ -83,7 +83,7 @@ export default class UserService { }); return { code: 420, - message: '请输入两步验证token', + message: '', }; } diff --git a/src/utils/http.ts b/src/utils/http.ts index 55662505..a12c8d56 100644 --- a/src/utils/http.ts +++ b/src/utils/http.ts @@ -9,7 +9,6 @@ message.config({ const time = Date.now(); const errorHandler = function (error: any) { - console.log(error); if (error.response) { const msg = error.data ? error.data.message || error.message || error.data @@ -68,7 +67,7 @@ _request.interceptors.response.use(async (response) => { const res = await response.clone().json(); if (res.code !== 200) { const msg = res.message || res.data; - message.error(msg); + msg && message.error(msg); } return res; }