Commit 54036739 authored by pengguangpu's avatar pengguangpu

合并代码;解决冲突;

parents d9b2155b 337b1289
......@@ -18,3 +18,9 @@ export const ACTION_GO_SCAN = "ACTION_GO_SCAN";
//获取店铺信息
export const ACTION_STORE_INFO = "ACTION_STORE_INFO";
//支付成功
export const ACTION_ON_PAY_SUCCESS = "ACTION_ON_PAY_SUCCESS";
//支付失败
export const ACTION_ON_PAY_FAILED = "ACTION_ON_PAY_FAILED";
/* 公共样式 */
.topView {
position: relative;
......@@ -504,15 +502,6 @@
/* 结算页 */
/* page{
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
box-sizing: border-box;
align-items: center;
} */
.topView{
position: relative;
width: 768rpx;
......@@ -522,17 +511,6 @@
box-shadow:0rpx 2rpx 7rpx 0rpx rgba(153,153,153,0.16);
}
.backButton {
color: #333333;
font-size: 19rpx;
line-height: 60rpx;
height: 60rpx;
width: 110rpx;
text-align: center;
/* border: 2px solid red; */
position: relative;
}
.bodyContainer {
display: flex;
flex-direction: row;
......@@ -619,5 +597,4 @@
font-weight:400;
color:rgba(0,0,0,0.65);
line-height:27rpx;
}
}
\ No newline at end of file
......@@ -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>
......@@ -115,14 +115,14 @@
</view>
<view class="contentLine" style="margin-top: 14.5rpx;">
<view class="descText">商家优惠:</view>
<view class="totalCoupon">¥{{totalDisct}}</view>
<view class="totalCoupon">¥{{totalDisc}}</view>
</view>
<view style="position: absolute;display: flex;flex-direction: row;align-items: baseline;bottom:22rpx;left:0rpx;padding-left: 29rpx;">
<view class="descText">应收款:</view>
<view class="moneySign">¥</view>
<view class="payPrice">{{totalDisct}}</view>
<view class="descText">(共{{quantity}}件)</view>
<view class="payPrice">{{totalPrice}}</view>
<view class="descText">(共{{totalQuantity}}件)</view>
</view>
</view>
......
......@@ -5,13 +5,16 @@ 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'
import { ACTION_ON_PAY_SUCCESS } from '../../const/actioncmd'
import { ACTION_ON_PAY_FAILED } from '../../const/actioncmd'
Page({
data: {
//页面控制相关参数
pageShow: {
"home": false,
"landscan": true,
"home": true,
"landscan": false,
"waitoperate": false,
"payresult": false
},
......@@ -111,6 +114,24 @@ Page({
})
}
} else if (res.action == ACTION) {
} else if (res.action == ACTION_GO_SCAN) {
//跳转到
context.goPage("landscan");
} else if (res.action == ACTION_GO_BALANCE) {
//跳转
this.goPage("waitoperate")
} else if (res.action == ACTION_ON_PAY_SUCCESS) {
setData({
isPaySuccess: true
})
this.goPage("payresult");
} else if (res.action == ACTION_ON_PAY_FAILED) {
setData({
isPaySuccess: false
})
this.goPage("payresult");
} else {
//未知指令
}
}
......@@ -172,6 +193,26 @@ Page({
this.goPage('home');
},
//跳转到收银页面
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页面逻辑方法 */
//把所有的商品数据发送到后屏
......@@ -311,7 +352,7 @@ Page({
this.sendGoodInfoToFront()
},
//跳转到支付结果页面
//跳转到结算等待页
goPay(e) {
var commonRequest = {
action: ACTION_GO_BALANCE,
......
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