- 添加几个打印机的清除队列与易联云的播放文本声音操作

This commit is contained in:
gazebo
2019-07-19 17:06:37 +08:00
parent 0ecc8b8727
commit 594ed19bf3
3 changed files with 26 additions and 6 deletions

View File

@@ -247,9 +247,13 @@ func IsStrToken(possibleToken string) bool {
return len(possibleToken) >= len("d65578a6fa414d738e0c44f85ac4b950")
}
func (a *API) CancelAll(machineCode string) (err error) {
func (a *API) CancelAll(machineCode, token string) (err error) {
_, err = a.AccessAPI("printer/cancelall", map[string]interface{}{
"machine_code": machineCode,
}, "")
}, token)
return err
}
func (a *API) PlayText(machineCode, orderID, text, token string) (err error) {
return a.printMsg(machineCode, orderID, fmt.Sprintf("<audio>%s,9,0</audio>", strings.Replace(text, ",", ".", -1)), token)
}