- 添加几个打印机的清除队列与易联云的播放文本声音操作
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user