新增问诊订单详情。修改错误码格式

This commit is contained in:
2023-09-06 14:30:54 +08:00
parent dc0217d191
commit 654c0fed05
23 changed files with 810 additions and 59 deletions
+4 -4
View File
@@ -128,7 +128,7 @@ func Auth() gin.HandlerFunc {
} else {
c.JSON(http.StatusOK, gin.H{
"message": "请求路径错误",
"code": consts.SERVER_ERROR,
"code": consts.ServerError,
"data": "",
})
@@ -147,7 +147,7 @@ func Auth() gin.HandlerFunc {
if len(adminApis) == 0 || err != nil {
c.JSON(http.StatusOK, gin.H{
"message": "请求路径错误",
"code": consts.SERVER_ERROR,
"code": consts.ServerError,
"data": "",
})
c.Abort()
@@ -168,7 +168,7 @@ func Auth() gin.HandlerFunc {
if adminRoleMenu == nil {
c.JSON(http.StatusForbidden, gin.H{
"message": "暂无权限",
"code": consts.CLIENT_HTTP_UNAUTHORIZED,
"code": consts.ClientHttpUnauthorized,
"data": "",
})
c.Abort()
@@ -197,7 +197,7 @@ func Auth() gin.HandlerFunc {
if !hasPermission {
c.JSON(http.StatusForbidden, gin.H{
"message": "暂无权限",
"code": consts.CLIENT_HTTP_UNAUTHORIZED,
"code": consts.ClientHttpUnauthorized,
"data": "",
})