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

券bug处理

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