Commit 20300255 authored by 潘永坪's avatar 潘永坪

支付页面配合后端参数兼容

parent b61853e7
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
<view v-show="bodyShow"> <view v-show="bodyShow">
<view class="middle"> <view class="middle">
<view class="main"> <view class="main">
<!-- --------------------------------------复票----------------------------------------------- --> <view v-if="orderList.length>0" v-for="item of orderList" :key="item.id" class="product">
<view v-if="orderList != ''" v-for="item of orderList" :key="item.id" class="product">
<view> <view>
<text> {{ item.merchantName }}{{ item.productName }}</text> <text> {{ item.merchantName }}{{ item.productName }}</text>
...@@ -16,20 +15,6 @@ ...@@ -16,20 +15,6 @@
<text></text> <text> <text style="font-size:24rpx;"></text>{{ item.pdDiscountMoney }} </text> <text></text> <text> <text style="font-size:24rpx;"></text>{{ item.pdDiscountMoney }} </text>
</view> </view>
</view> </view>
<!-- --------------------------------------单票----------------------------------------------- -->
<view v-if="orderList == ''" class="product">
<view>
<text> {{ merchantName }}{{ productName }}</text>
<text style="text-align: right;">
<text style="font-size:24rpx;">¥</text>{{ unitPrice }} <text>x</text> {{ orderNum }}
<text style="margin-top:10rpx;font-size:22rpx;display:block;color:#f45803;" v-if="depositReceived">押金:{{ depositReceived }}</text>
</text>
</view>
<view class="coupon" v-if="pdDiscountMoney">
<text></text> <text> <text style="font-size:24rpx;"></text>{{ pdDiscountMoney }} </text>
</view>
</view>
<view class="mainP3"> <view class="mainP3">
<text> 实际支付 </text> <text> 实际支付 </text>
<text> <text>
...@@ -72,13 +57,7 @@ export default { ...@@ -72,13 +57,7 @@ export default {
data() { data() {
return { return {
enterUrl: '', //进入页面路由 enterUrl: '', //进入页面路由
merchantName: '', //商户名称 orderList:[], //订单列表
productName: '', //产品名称
orderList: '', //订单列表
unitPrice: '', //单价
depositReceived: 0, //押金
pdDiscountMoney: '', //优惠价格
orderNum: '', //数量
pdOrderMoney: '', //实际总价 pdOrderMoney: '', //实际总价
totalMoney: '', //原价总价 totalMoney: '', //原价总价
errorMessage: '', //错误信息 errorMessage: '', //错误信息
...@@ -205,16 +184,17 @@ export default { ...@@ -205,16 +184,17 @@ export default {
} }
this.errorMessage = res.data.errorMessage this.errorMessage = res.data.errorMessage
this.totalMoney = res.data.totalMoney this.totalMoney = res.data.totalMoney
this.orderList = res.data.orderList this.orderList = res.data.orderList||[]
if (typeof this.orderList == 'undefined') { if (this.orderList.length==0) {
//单票 this.orderList.push({
this.orderList = '' merchantName:res.data.merchantName,
this.merchantName = res.data.merchantName productName:res.data.productName,
this.productName = res.data.productName unitPrice:res.data.unitPrice,
this.unitPrice = res.data.unitPrice orderNum:res.data.orderNum,
this.orderNum = res.data.orderNum depositReceived:res.data.depositReceived,
this.depositReceived = res.data.depositReceived pdDiscountMoney:res.data.pdDiscountMoney,
this.pdDiscountMoney = res.data.pdDiscountMoney endPlayDate:res.data.endPlayDate
})
} }
} else { } else {
uni.showToast({ uni.showToast({
......
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