From 279785b0686f3de1763056286a80360cdf5264f2 Mon Sep 17 00:00:00 2001
From: inleft <inleft@qq.com>
Date: Thu, 10 Feb 2022 18:21:39 +0800
Subject: [PATCH] 添加api请求地址

---
 src/utils/request.js |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/utils/request.js b/src/utils/request.js
index b9e2a46..2a3558b 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -20,7 +20,6 @@
 const err = (error) => {
 	if (error.response) {
 
-
 		const data = error.response.data
 		// const token = Vue.ls.get(ACCESS_TOKEN)
 		if (error.response.status === 404) {
@@ -38,8 +37,12 @@
 			})
 		}
 		if (error.response.status === 500) {
-			if (data.message.length > 0) {
-				message.error(data.message)
+			if (data.message == undefined) {
+					message.error(error.response.data)
+			} else {
+				if (data.message.length > 0) {
+					message.error(data.message)
+				}
 			}
 		}
 		if (error.response.status === 401 && !(data.result && data.result.isLogin)) {

--
Gitblit v1.9.1