Commit f5e4d947 authored by pengguangpu's avatar pengguangpu

修改index首页交互逻辑;

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