xiziwen 1 week ago
parent
commit
933897cb25
1 changed files with 1 additions and 1 deletions
  1. 1 1
      middleware/check_cygx_auth.go

+ 1 - 1
middleware/check_cygx_auth.go

@@ -17,7 +17,7 @@ func CheckCygxAuth() gin.HandlerFunc {
 
 		thirdCodeEncrypt := c.Request.Header.Get("thirdCode")
 		thirdCode := utils.DesBase64Encrypt([]byte(thirdCodeEncrypt))
-		if string(thirdCode) == "" {
+		if len(thirdCode) == 0 {
 			ok, checkInfo, _, err := company.CheckBaseFiccPermission(userInfo.CompanyID, int(userInfo.UserID))
 			if err != nil {
 				response.FailMsg("用户权限验证失败", "CheckBaseAuth-用户权限验证失败"+err.Error(), c)