From 4e8f36d9a4aab2dd49c380adc7c53fcde6414036 Mon Sep 17 00:00:00 2001 From: whyour Date: Fri, 23 Sep 2022 17:44:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/services/user.ts | 2 +- src/utils/http.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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; }