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