Commit 5060c547 authored by 潘永坪's avatar 潘永坪

券bug处理

parent 7cd361e2
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<view> <view>
{{item.useStartDate}}-{{item.useEndDate}} {{item.useStartDate}}-{{item.useEndDate}}
<text v-if="item.savedMoney"> <text>
<text>¥</text>{{parseFloat(item.savedMoney.toFixed(2))}} <text>¥</text>{{parseFloat(item.savedMoney.toFixed(2))}}
</text> </text>
</view> </view>
......
<template> <template>
<view> <view v-show="bodyShow">
<view class="middle" v-show="bodyShow"> <view class="middle">
<view class="main"> <view class="main">
<!-- --------------------------------------复票----------------------------------------------- --> <!-- --------------------------------------复票----------------------------------------------- -->
<view v-if="orderList != ''" v-for="item of orderList" :key="item.id" class="product"> <view v-if="orderList != ''" v-for="item of orderList" :key="item.id" class="product">
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</view> </view>
</view> </view>
<view class="bottom" v-show="bodyShow"> <view class="bottom">
<view class="bottomFirst"> <view class="bottomFirst">
<text> 实付款 </text> <text> 实付款 </text>
......
...@@ -374,6 +374,7 @@ ...@@ -374,6 +374,7 @@
if(arr.length==1){ if(arr.length==1){
this.chooseCouponObj=arr[0] this.chooseCouponObj=arr[0]
}else{ }else{
//如果数组有多个时
let index=arr.findIndex((item)=>{//如果有多个,找到是否有平台券,平台劵优先 let index=arr.findIndex((item)=>{//如果有多个,找到是否有平台券,平台劵优先
return item.createSource==1 return item.createSource==1
}) })
...@@ -440,34 +441,36 @@ ...@@ -440,34 +441,36 @@
couponList,//券列表 couponList,//券列表
} }
this.payBackground="#cccccc" this.payBackground="#cccccc"
//重新加载优惠券
this.initCoupon()
this.$request("orderc/order/codePay", data).then((res) => { this.$request("orderc/order/codePay", data).then((res) => {
setTimeout(() => { setTimeout(() => {
this.payBackground="#1dce2e" this.payBackground="#1dce2e"
},1000) },1000)
if(res.code=="00") { if(res.code=="00") {
if (res.data.errorMessage) { if (res.data.errorMessage) {
uni.showToast({ uni.showToast({
title:res.data.errorMessage, title:res.data.errorMessage,
icon:"none" icon:"none"
}) })
return return
} }
this.orderId=res.data.id this.orderId=res.data.id
//微信入参 //微信入参
this.signType = res.data.signType this.signType = res.data.signType
this.paySign = res.data.sign this.paySign = res.data.sign
this.timeStamp = res.data.timestamp this.timeStamp = res.data.timestamp
this.nonceStr = res.data.noncestr this.nonceStr = res.data.noncestr
this.package = res.data.package this.package = res.data.package
//支付宝入参 //支付宝入参
this.orderInfo = res.data.payInfo || "" this.orderInfo = res.data.payInfo || ""
this.goPay() this.goPay()
} else { } else {
uni.showToast({ uni.showToast({
title:res.message, title:res.message,
icon:"none" icon:"none"
}) })
} }
}).catch((err) => { }).catch((err) => {
this.payBackground="#1dce2e" this.payBackground="#1dce2e"
}) })
......
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