Commit 337b1289 authored by gaodapeng's avatar gaodapeng

修改了支付成功和失败之后的处理

parent 4138b3e6
......@@ -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";
......@@ -504,7 +504,7 @@
/* 结算页 */
page{
.balance{
display: flex;
flex-direction: column;
width: 100%;
......@@ -522,17 +522,6 @@ page{
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;
......
......@@ -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>
......
......@@ -6,6 +6,8 @@ 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: {
......@@ -84,6 +86,19 @@ Page({
} 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 {
//未知指令
}
......@@ -296,7 +311,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