增加了util里的get_error_msg

This commit is contained in:
ladeng07
2022-05-05 18:57:35 +08:00
parent 5ca57df452
commit 7fa3281a5f
2 changed files with 24 additions and 48 deletions
+9
View File
@@ -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))