Commit 4138b3e6 authored by gaodapeng's avatar gaodapeng

增加home跳转到scan页面的操作

parent e52078b1
......@@ -14,7 +14,7 @@
</view>
<view class="homeBodyView">
<!-- 还需要加一层swiper -->
<view class="homeGridItem" onTap="collections">
<view class="homeGridItem" onTap="sendGoToCollections">
<image mode="aspectFit" src="/images/collections.png" class="homeItemImage"/>
<view class="homeItemText">收银</view>
</view>
......
......@@ -5,6 +5,7 @@ import { ACTION_GO_BALANCE } from '../../const/actioncmd'
import { ACTION_REQUEST_GOOD_INFO } from '../../const/actioncmd'
import { ACTION_PRINT_RESULT } from '../../const/actioncmd'
import { ACTION_REPRINT } from '../../const/actioncmd'
import { ACTION_GO_SCAN } from '../../const/actioncmd'
Page({
data: {
......@@ -80,7 +81,10 @@ Page({
totalDisc: viewGoodsInfo.totalDisc,
})
}
} else if(res.action == ACTION){
} else if(res.action == ACTION_GO_SCAN){
//跳转到
context.goPage("landscan");
} else {
//未知指令
}
}
......@@ -132,6 +136,27 @@ Page({
});
},
//跳转到收银页面
sendGoToCollections(){
var commonRequest = {
action: ACTION_GO_SCAN,
data: null
};
my.ix.sendBuddyMessage({
target: getApp().globalData.frontScreenAppId,
data: commonRequest,
success: (res) => {
console.log("发送收银事件到前屏小程序 成功 ===》" + JSON.stringify(res));
},
fail: (res) => {
console.log("发送收银事件到前屏小程序 失败 ===》 " + JSON.stringify(res));
//发送失败重试
// context.sendGoToCollections();
}
})
},
/**landscan页面逻辑方法 */
//把所有的商品数据发送到后屏
......
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