|
@@ -24,8 +24,14 @@ type ResultData struct {
|
|
|
func result(code int, resultData ResultData, c *gin.Context) {
|
|
|
jsonByte, _ := json.Marshal(resultData)
|
|
|
global.LOG.Debug("resultData:", string(jsonByte))
|
|
|
- responseResult := utils.DesBase64Encrypt(jsonByte)
|
|
|
- c.JSON(code, responseResult)
|
|
|
+
|
|
|
+ //测试环境,数据不进行加密
|
|
|
+ if global.CONFIG.Serve.RunMode == "debug" {
|
|
|
+ c.JSON(code, resultData)
|
|
|
+ } else {
|
|
|
+ responseResult := utils.DesBase64Encrypt(jsonByte)
|
|
|
+ c.JSON(code, responseResult)
|
|
|
+ }
|
|
|
c.Abort()
|
|
|
}
|
|
|
|