From 7fa3281a5ff36241a3cab42d00a20fc37c9eaea6 Mon Sep 17 00:00:00 2001
From: ladeng07 <40017222+ladeng07@users.noreply.github.com>
Date: Thu, 5 May 2022 18:57:35 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86util=E9=87=8C?=
=?UTF-8?q?=E7=9A=84get=5Ferror=5Fmsg?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.idea/workspace.xml | 63 ++++++++++--------------------------------
utils/get_error_msg.py | 9 ++++++
2 files changed, 24 insertions(+), 48 deletions(-)
create mode 100644 utils/get_error_msg.py
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index f99f03d..856a1bb 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -31,50 +31,9 @@
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -194,7 +153,7 @@
-
+
1650187914913
@@ -210,7 +169,14 @@
1650785005055
-
+
+ 1651746739401
+
+
+
+ 1651746739401
+
+
@@ -244,7 +210,8 @@
-
+
+
@@ -319,10 +286,10 @@
-
+
-
+
diff --git a/utils/get_error_msg.py b/utils/get_error_msg.py
new file mode 100644
index 0000000..f9fe2c4
--- /dev/null
+++ b/utils/get_error_msg.py
@@ -0,0 +1,9 @@
+def get_error_msg(code="20000"):
+ error_set = {
+ "20000": "成功",
+ "50000": "意外错误",
+ "50403": "Forbidden",
+ "40000": "请求方法错误",
+ "40001": "JSON解析错误",
+ }
+ return error_set.get(str(code))