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

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
+7 -7
View File
@@ -18,7 +18,7 @@ func Jwt() gin.HandlerFunc {
if authorization == "" || !strings.HasPrefix(authorization, "Bearer ") {
c.JSON(http.StatusUnauthorized, gin.H{
"message": "请求未授权",
"code": consts.TOKEN_ERROR,
"code": consts.TokenError,
"data": "",
})
c.Abort()
@@ -35,7 +35,7 @@ func Jwt() gin.HandlerFunc {
if res != "" {
c.JSON(http.StatusOK, gin.H{
"message": "token错误/过期",
"code": consts.TOKEN_ERROR,
"code": consts.TokenError,
"data": "",
})
@@ -48,7 +48,7 @@ func Jwt() gin.HandlerFunc {
if err != nil {
c.JSON(http.StatusOK, gin.H{
"message": "token错误/过期",
"code": consts.TOKEN_ERROR,
"code": consts.TokenError,
"data": "",
})
@@ -61,7 +61,7 @@ func Jwt() gin.HandlerFunc {
if err != nil {
c.JSON(http.StatusOK, gin.H{
"message": "token错误",
"code": consts.TOKEN_ERROR,
"code": consts.TokenError,
"data": "",
})
@@ -73,7 +73,7 @@ func Jwt() gin.HandlerFunc {
if err != nil {
c.JSON(http.StatusOK, gin.H{
"message": "token错误",
"code": consts.TOKEN_ERROR,
"code": consts.TokenError,
"data": "",
})
@@ -85,7 +85,7 @@ func Jwt() gin.HandlerFunc {
if err != nil {
c.JSON(http.StatusOK, gin.H{
"message": "token错误",
"code": consts.TOKEN_ERROR,
"code": consts.TokenError,
"data": "",
})
@@ -97,7 +97,7 @@ func Jwt() gin.HandlerFunc {
if err != nil {
c.JSON(http.StatusOK, gin.H{
"message": "token错误",
"code": consts.TOKEN_ERROR,
"code": consts.TokenError,
"data": "",
})