Commit 97f9d805 authored by jiangjiantao's avatar jiangjiantao

bugfix

parent a6a972cd
......@@ -13,15 +13,11 @@ Page({
},
onshow(){
onShow(){
my.ix.onBuddyMessage({
success: (res) => {
console.info(`onBuddyMessage success: ${JSON.stringify(res)}`);
if(res.action == ACTION_GO_SCAN){
//跳转到扫码页面
my.redirectTo({
url: "/pages/scan/scan"
});
my.ix.sendBuddyMessage({
// 填入目标小程序的 AppID
target: getApp().globalData.backScreenAppId,
......@@ -31,6 +27,10 @@ Page({
},
success: (res) => {
console.info(`sendBuddyMessage success: ${JSON.stringify(res)}`);
//跳转到扫码页面
my.reLaunch({
url: "/pages/scan/scan",
});
},
fail: (res) => {
console.info(`sendBuddyMessage failed: ${JSON.stringify(res)}`);
......
import { ACTION_PRINT_RESULT } from '../../const/actioncmd'
import { ACTION_REPRINT } from '../../const/actioncmd'
import { ACTION_GO_HOME } from '../../const/actioncmd'
Page({
data: {
......@@ -125,8 +126,11 @@ Page({
if (res.action == ACTION_REPRINT) {
//重新打印
this.print();
} else {
//未知指令
} else if(res.action == ACTION_GO_HOME) {
//去首页
my.reLaunch({
url: "/pages/home/home",
});
}
}
});
......
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