Commit 4d5eb0c3 authored by pengguangpu's avatar pengguangpu

合并远程代码,解决冲突,自测;

parents a0181d1d ac55c441
{ {
"pages": [ "pages": [
"pages/index/index", "pages/index/index",
"pages/poster/poster",
"pages/home/home", "pages/home/home",
"pages/poster/poster", "pages/poster/poster",
"pages/waitoperate/waitoperate", "pages/waitoperate/waitoperate",
......
...@@ -30,3 +30,6 @@ export const ACTION_GO_HOME = "ACTION_GO_HOME"; ...@@ -30,3 +30,6 @@ export const ACTION_GO_HOME = "ACTION_GO_HOME";
//获取账户信息 //获取账户信息
export const ACTION_GET_ACCOUNT = "ACTION_GET_ACCOUNT"; export const ACTION_GET_ACCOUNT = "ACTION_GET_ACCOUNT";
//直接收款
export const ACTION_DIRECT_PAYMENT = "ACTION_DIRECT_PAYMENT";
/* home样式 */ /* home样式 */
.homePage { .homePage {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -7,8 +6,22 @@ ...@@ -7,8 +6,22 @@
height: 100%; height: 100%;
background: white; background: white;
/* border: 2px solid red; */ /* border: 2px solid red; */
position: absolute
}
/* home样式 */
.homePageFilter {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
background: #F3F7F9;
filter: blur(3px);
position: absolute;
} }
.homeTopView { .homeTopView {
position: relative; position: relative;
width: 750rpx; width: 750rpx;
...@@ -502,6 +515,14 @@ ...@@ -502,6 +515,14 @@
height: 155rpx; height: 155rpx;
} }
/* 自定义键盘 */
.land-keybord{
width: 100%;
height: 100%;
position: absolute;
border: 2px solid red;
}
/* 结算页 */ /* 结算页 */
.balanceTopView { .balanceTopView {
......
<view> <view>
<view class="homePage" hidden="{{!pageShow['home']}}"> <view class="homePage" hidden="{{!pageShow['home']}}">
<view class="topView"> <view class="{{scene != 0 ? 'homePageFilter' : 'homePage' }}" hidden="{{!pageShow['home']}}">
<view class="homeTopView">
<view class="store"> <view class="store">
<image mode="aspectFit" style="position:absolute;width:24rpx;height:21rpx;left: 19rpx;top:19rpx;" src="/images/icon_store.png"/> <image mode="aspectFit" style="position:absolute;width:24rpx;height:21rpx;left: 19rpx;top:19rpx;" src="/images/icon_store.png"/>
<text style="position:absolute;font-size:19rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(0,0,0,0.85);line-height:22rpx;left:55rpx;top:19rpx;">{{storeName}}</text> <text style="position:absolute;font-size:19rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(0,0,0,0.85);line-height:22rpx;left:55rpx;top:19rpx;">{{storeName}}</text>
...@@ -76,6 +77,7 @@ ...@@ -76,6 +77,7 @@
</swiper> </swiper>
</view> </view>
</view> </view>
</view>
<!--扫码页--> <!--扫码页-->
<view hidden="{{!pageShow['landscan']}}"> <view hidden="{{!pageShow['landscan']}}">
<view class="{{scene != 0 ? 'pfilter' : 'pageland' }}"> <view class="{{scene != 0 ? 'pfilter' : 'pageland' }}">
...@@ -146,9 +148,6 @@ ...@@ -146,9 +148,6 @@
<button class="cancel-use-coupon" size="default" type="ghost" onTap="couponBack">取消</button> <button class="cancel-use-coupon" size="default" type="ghost" onTap="couponBack">取消</button>
</view> </view>
</view> </view>
<!-- 键盘 -->
<land-keybord scene="{{scene}}" onKeyBordFinished="onKeyBordFinished" onKeyBordClose="onKeyBordClose">
</land-keybord>
</view> </view>
<!-- 结算页 --> <!-- 结算页 -->
<view class="balance" hidden="{{!pageShow['waitoperate']}}"> <view class="balance" hidden="{{!pageShow['waitoperate']}}">
...@@ -243,4 +242,7 @@ ...@@ -243,4 +242,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 键盘 -->
<land-keybord scene="{{scene}}" onKeyBordFinished="onKeyBordFinished" onKeyBordClose="onKeyBordClose">
</land-keybord>
</view> </view>
\ No newline at end of file
...@@ -10,6 +10,8 @@ import { ACTION_ON_PAY_SUCCESS } from '../../const/actioncmd' ...@@ -10,6 +10,8 @@ import { ACTION_ON_PAY_SUCCESS } from '../../const/actioncmd'
import { ACTION_ON_PAY_FAILED } from '../../const/actioncmd' import { ACTION_ON_PAY_FAILED } from '../../const/actioncmd'
import { ACTION_GO_HOME } from '../../const/actioncmd' import { ACTION_GO_HOME } from '../../const/actioncmd'
import { ACTION_GET_ACCOUNT } from '../../const/actioncmd' import { ACTION_GET_ACCOUNT } from '../../const/actioncmd'
import { ACTION_DIRECT_PAYMENT } from '../../const/actioncmd'
Page({ Page({
data: { data: {
...@@ -149,6 +151,11 @@ Page({ ...@@ -149,6 +151,11 @@ Page({
context.setData({ context.setData({
storeName: res.data.storeName storeName: res.data.storeName
}); });
}else if(res.action == ACTION_DIRECT_PAYMENT){
if(res.data != null){
context.setData({totalPrice:res.data})
}
context.goPage('waitoperate');
} }
} }
}); });
...@@ -331,6 +338,36 @@ Page({ ...@@ -331,6 +338,36 @@ Page({
}); });
}, },
//直接收银
directPayment(e) {
this.setData({scene:3})
},
//发生直接收银事件
sendPaymentToFront(payment) {
var commonRequest = {
action: ACTION_DIRECT_PAYMENT,
data: payment
};
let context = this;
my.ix.sendBuddyMessage({
target: getApp().globalData.frontScreenAppId,
data: commonRequest,
success: (res) => {
console.log("发送直接收款事件到前屏小程序 成功 ===》" + JSON.stringify(res));
},
fail: (res) => {
console.log("发送收款事件到前屏小程序 失败 ===》 " + JSON.stringify(res));
my.showToast({
type: 'fail',
content: '操作失败',
duration: 3000,
success: () => {
},
});
},
});
},
/**landscan页面逻辑方法 */ /**landscan页面逻辑方法 */
//把所有的商品数据发送到后屏 //把所有的商品数据发送到后屏
...@@ -356,10 +393,17 @@ Page({ ...@@ -356,10 +393,17 @@ Page({
//键盘完成 //键盘完成
onKeyBordFinished(barcode) { onKeyBordFinished(result) {
if(this.data.scene == 3){
this.sendPaymentToFront(result)
}else if(this.data.scene == 1){
this.sendGoodsInfoToFront(result)
}
this.onKeyBordClose(); this.onKeyBordClose();
},
//把手输条码发生到前屏
sendGoodsInfoToFront(barcode) {
my.showLoading({}); my.showLoading({});
var commonRequest = { var commonRequest = {
action: ACTION_REQUEST_GOOD_INFO, action: ACTION_REQUEST_GOOD_INFO,
...@@ -376,15 +420,19 @@ Page({ ...@@ -376,15 +420,19 @@ Page({
my.hideLoading(); my.hideLoading();
my.showToast({ my.showToast({
type: 'fail', type: 'fail',
content: '发送商品条码到后屏失败', content: '操作失败',
duration: 3000, duration: 3000,
success: () => { success: () => {
}, },
}); });
} }
}) })
}, },
// 键盘关闭 // 键盘关闭
onKeyBordClose() { onKeyBordClose() {
this.setData({ scene: 0 }) this.setData({ scene: 0 })
......
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