hongze 5 months ago
parent
commit
52ced58e3e
1 changed files with 3 additions and 5 deletions
  1. 3 5
      controller/response/base.go

+ 3 - 5
controller/response/base.go

@@ -5,6 +5,7 @@ import (
 	"fmt"
 	"github.com/gin-gonic/gin"
 	"hongze/hongze_yb/global"
+	"hongze/hongze_yb/utils"
 	"strings"
 )
 
@@ -49,12 +50,9 @@ func result(code int, resultData ResultData, c *gin.Context) {
 		global.LOG.Info(strings.Join(logSlice, ";"))
 		c.JSON(code, resultData)
 	} else {
-		//global.LOG.Info(strings.Join(logSlice, ";"))
-		//encryptResult := utils.DesBase64Encrypt(jsonByte)
-		//c.JSON(code, string(encryptResult))
-
 		global.LOG.Info(strings.Join(logSlice, ";"))
-		c.JSON(code, resultData)
+		encryptResult := utils.DesBase64Encrypt(jsonByte)
+		c.JSON(code, string(encryptResult))
 	}
 	c.Abort()
 }