1
This commit is contained in:
@@ -487,6 +487,7 @@ func replaceContent(content string, printMsg *model.PrintMsg) (result string) {
|
|||||||
// 将语音包转换为十六进制
|
// 将语音包转换为十六进制
|
||||||
voice := ""
|
voice := ""
|
||||||
for _, v := range strings.Split(sound, "2c") {
|
for _, v := range strings.Split(sound, "2c") {
|
||||||
|
voice += hexSignSoundSolidification
|
||||||
soundNum, _ := hex.DecodeString(v) // 十六进制转字符串
|
soundNum, _ := hex.DecodeString(v) // 十六进制转字符串
|
||||||
intSound, _ := strconv.ParseInt(string(soundNum), 10, 64)
|
intSound, _ := strconv.ParseInt(string(soundNum), 10, 64)
|
||||||
int16Sound := strconv.FormatInt(intSound, 16)
|
int16Sound := strconv.FormatInt(intSound, 16)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ func TestPrintMsg(t *testing.T) {
|
|||||||
msg := &model.PrintMsg{
|
msg := &model.PrintMsg{
|
||||||
ModelIDCULD: model.ModelIDCULD{},
|
ModelIDCULD: model.ModelIDCULD{},
|
||||||
PrintNo: "20220707000002",
|
PrintNo: "20220707000002",
|
||||||
Content: "<sound>10</sound>",
|
Content: "<sound>64,64,66</sound>",
|
||||||
OrderNo: 202207261655,
|
OrderNo: 202207261655,
|
||||||
Status: 0,
|
Status: 0,
|
||||||
Comment: "",
|
Comment: "",
|
||||||
|
|||||||
Reference in New Issue
Block a user