From 1e593fd9b9f934e6813fbdd56326d4cfa567ac64 Mon Sep 17 00:00:00 2001 From: mutoe Date: Fri, 29 Jun 2018 11:20:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BF=94=E5=9B=9E=20422=20=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E6=97=B6=E6=A0=B9=E6=8D=AE=E8=BF=94=E5=9B=9E=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E6=8F=90=E7=A4=BA=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/api.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/api/api.js b/src/api/api.js index b59b9dce..6ced3477 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -71,6 +71,11 @@ instance.interceptors.response.use( case 408: err.tips = "请求超时"; break; + case 422: { + const { data: { message = "错误请求" } = {} } = err.response; + err.tips = message; + break; + } case 500: err.tips = "服务器端出错"; break;