不转译

This commit is contained in:
suyl
2021-07-14 10:03:31 +08:00
parent 38b2a5363b
commit 97a48e5267

View File

@@ -1,6 +1,7 @@
package controllers
import (
"bytes"
"crypto/md5"
"encoding/json"
"fmt"
@@ -374,8 +375,11 @@ func (c *ApiController) GetPrintMsg(dataMap map[string]interface{}) (data, errCo
} else if printMsg == nil {
return "", model.ErrCodeGeneralFailed, fmt.Errorf("未查询到该消息! msg_id: %v", msgID)
} else {
if byteData, err := json.Marshal(printMsg); err == nil {
data = string(byteData)
bf := bytes.NewBuffer([]byte{})
jsonEncoder := json.NewEncoder(bf)
jsonEncoder.SetEscapeHTML(false)
if err2 := jsonEncoder.Encode(printMsg); err2 == nil {
data = bf.String()
} else {
return "", model.ErrCodeGeneralFailed, err
}