Commit e321ba57 authored by pengguangpu's avatar pengguangpu

添加指令发送失败时的重传逻辑;

parent 5ac3f75d
...@@ -112,9 +112,9 @@ Page({ ...@@ -112,9 +112,9 @@ Page({
}); });
}, },
/**发送打印结果至后屏 */
printCallback(res) { sendPrintResult2Back(printResult) {
//通知后屏打印结果 let context = this;
my.ix.sendBuddyMessage({ my.ix.sendBuddyMessage({
// 填入目标小程序的 AppID // 填入目标小程序的 AppID
target: getApp().globalData.backScreenAppId, target: getApp().globalData.backScreenAppId,
...@@ -127,8 +127,14 @@ Page({ ...@@ -127,8 +127,14 @@ Page({
}, },
fail: (res) => { fail: (res) => {
console.info(`sendBuddyMessage failed: ${JSON.stringify(res)}`); console.info(`sendBuddyMessage failed: ${JSON.stringify(res)}`);
context.sendPrintResult2Back(printResult);
} }
}); });
},
printCallback(res) {
//通知后屏打印结果
this.sendPrintResult2Back(res);
this.setData({ this.setData({
isShowPrinting: false isShowPrinting: false
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment