Commit 594a2435 authored by pengguangpu's avatar pengguangpu

修复日结相关bug;

parent b250f27d
...@@ -373,12 +373,11 @@ Page({ ...@@ -373,12 +373,11 @@ Page({
var printDayCheckResult = res.data; var printDayCheckResult = res.data;
if (printDayCheckResult.code == 0) { if (printDayCheckResult.code == 0) {
//打印成功 //打印成功
my.showToast({ content: "打印成功" }); context.showToast('打印成功');
} else { } else {
//打印失败 //打印失败
my.showToast({ content: "打印失败" }); context.showToast('打印失败');
} }
context.goPage('landscan');
} else if (res.action == ACTION_VERIFY_SUCCESS) { } else if (res.action == ACTION_VERIFY_SUCCESS) {
//核验成功 //核验成功
//跳转到成功页面 //跳转到成功页面
...@@ -592,6 +591,7 @@ Page({ ...@@ -592,6 +591,7 @@ Page({
/**日结 */ /**日结 */
onHomeDayCheckClicked() { onHomeDayCheckClicked() {
//发送打印日结订单到前屏 //发送打印日结订单到前屏
let context = this;
my.ix.sendBuddyMessage({ my.ix.sendBuddyMessage({
// 填入目标小程序的 AppID // 填入目标小程序的 AppID
target: getApp().globalData.frontScreenAppId, target: getApp().globalData.frontScreenAppId,
...@@ -600,10 +600,12 @@ Page({ ...@@ -600,10 +600,12 @@ Page({
data: null data: null
}, },
success: (res) => { success: (res) => {
context.showToast('已发送日结打印请求...');
console.info(`sendBuddyMessage success: ${JSON.stringify(res)}`); console.info(`sendBuddyMessage success: ${JSON.stringify(res)}`);
}, },
fail: (res) => { fail: (res) => {
context.showToast('发送失败');
console.info(`sendBuddyMessage failed: ${JSON.stringify(res)}`); console.info(`sendBuddyMessage failed: ${JSON.stringify(res)}`);
} }
}); });
......
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