W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
獲取當前掃描到的所有外圍設(shè)備信息
printPOSCommand({params}, callback(ret,err))
{ msg: "" //pos命令以及需要打印的內(nèi)容連接的字符串 支持中文 }
ret:
{
status: true //成功
}
err:
{
msg: //錯誤信息
}
var BluetoothPrinter = api.require('djyPrinter');
BluetoothPrinter.printPOSCommand({
msg:
String.fromCharCode(29) + String.fromCharCode(33) + String.fromCharCode(17) + //字體放大
String.fromCharCode(27) + String.fromCharCode(97) + String.fromCharCode(1) + //居中
String.fromCharCode(10) +
String.fromCharCode(10) +
"零點美食城\n" +
String.fromCharCode(29) + String.fromCharCode(33) + String.fromCharCode(0) + //字體放大
String.fromCharCode(27) + String.fromCharCode(97) + String.fromCharCode(0) +
"西紅柿雞蛋面" + "12元" + "\n" +
String.fromCharCode(27) + String.fromCharCode(97) + String.fromCharCode(0) +
String.fromCharCode(10) +
"總計12元"
+ "\n"
// + "\n" + "\n" + "\n" + "\n" + "\n" + "\n"
}, function (ret, err) {
});
Android系統(tǒng)
可提供的1.0.0及更高版本
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: