Commit f5e4d947 authored by pengguangpu's avatar pengguangpu

修改index首页交互逻辑;

parent 54036739
...@@ -113,24 +113,22 @@ Page({ ...@@ -113,24 +113,22 @@ Page({
totalDisc: viewGoodsInfo.totalDisc, totalDisc: viewGoodsInfo.totalDisc,
}) })
} }
} else if (res.action == ACTION) {
} else if (res.action == ACTION_GO_SCAN) { } else if (res.action == ACTION_GO_SCAN) {
//跳转到 //跳转到
context.goPage("landscan"); context.goPage('landscan');
} else if (res.action == ACTION_GO_BALANCE) { } else if (res.action == ACTION_GO_BALANCE) {
//跳转 //跳转
this.goPage("waitoperate") context.goPage('waitoperate')
} else if (res.action == ACTION_ON_PAY_SUCCESS) { } else if (res.action == ACTION_ON_PAY_SUCCESS) {
setData({ context.setData({
isPaySuccess: true isPaySuccess: true
}) });
this.goPage("payresult"); context.goPage('payresult');
} else if (res.action == ACTION_ON_PAY_FAILED) { } else if (res.action == ACTION_ON_PAY_FAILED) {
setData({ context.setData({
isPaySuccess: false isPaySuccess: false
}) });
this.goPage("payresult"); context.goPage("payresult");
} else { } else {
//未知指令 //未知指令
} }
...@@ -199,16 +197,25 @@ Page({ ...@@ -199,16 +197,25 @@ Page({
action: ACTION_GO_SCAN, action: ACTION_GO_SCAN,
data: null data: null
}; };
my.showToast({
content: "首页发送数据"
});
my.ix.sendBuddyMessage({ my.ix.sendBuddyMessage({
target: getApp().globalData.frontScreenAppId, target: getApp().globalData.frontScreenAppId,
data: commonRequest, data: commonRequest,
success: (res) => { success: (res) => {
my.showToast({
content: "首页发送数据成功"
});
console.log("发送收银事件到前屏小程序 成功 ===》" + JSON.stringify(res)); console.log("发送收银事件到前屏小程序 成功 ===》" + JSON.stringify(res));
}, },
fail: (res) => { fail: (res) => {
console.log("发送收银事件到前屏小程序 失败 ===》 " + JSON.stringify(res)); console.log("发送收银事件到前屏小程序 失败 ===》 " + JSON.stringify(res));
//发送失败重试 //发送失败重试
// context.sendGoToCollections(); // context.sendGoToCollections();
my.showToast({
content: "首页发送数据失败"
});
} }
}); });
}, },
......
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