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

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

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