|
@@ -42,9 +42,15 @@ func result(code int, resultData ResultData, c *gin.Context) {
|
|
|
if resultData.ErrMsg != "" {
|
|
|
logSlice = append(logSlice, fmt.Sprint("ErrMsg:", resultData.ErrMsg))
|
|
|
}
|
|
|
- global.LOG.Info(strings.Join(logSlice, ";"))
|
|
|
- encryptResult := utils.DesBase64Encrypt(jsonByte)
|
|
|
- c.JSON(code, string(encryptResult))
|
|
|
+
|
|
|
+ // 测试环境不加密
|
|
|
+ if global.CONFIG.Serve.RunMode == "debug" {
|
|
|
+ c.JSON(code, resultData)
|
|
|
+ } else {
|
|
|
+ global.LOG.Info(strings.Join(logSlice, ";"))
|
|
|
+ encryptResult := utils.DesBase64Encrypt(jsonByte)
|
|
|
+ c.JSON(code, string(encryptResult))
|
|
|
+ }
|
|
|
c.Abort()
|
|
|
}
|
|
|
|