zhanghui пре 2 година
родитељ
комит
280464929a
2 измењених фајлова са 17 додато и 13 уклоњено
  1. 7 7
      orderPages/orderDetail/index.vue
  2. 10 6
      pages/order/index.vue

+ 7 - 7
orderPages/orderDetail/index.vue

@@ -141,7 +141,7 @@
 			<view class="bottomBtn flex-row justify-between">
 				<view class=" flex-row">
 					<text  class="unpaid">合计</text>
-					<text  class="preferentialPrice">¥{{order.totalAmount}}</text>
+					<text  class="preferentialPrice">¥{{order.payAmount}}</text>
 <!--					<text  class="unpaid">已优惠</text>-->
 <!--					<text  class="originalPrice">¥{{totalDiscount}}</text>-->
 					<!--                        <text  class="priceDetail">价格明细</text>-->
@@ -212,7 +212,7 @@
 						<u-icon name="/static/me/u701.png" color="#38db38" size="36"></u-icon>
 						<view class="payName flex-col justify-center">
 							<text>余额支付</text>
-							<text class="balance">可余额¥{{userInfo.balance || 0}}</text>
+							<text class="balance">可余额¥{{userInfo.balance || 0}}</text>
 						</view>
 					</view>
 
@@ -548,11 +548,11 @@
 				console.log('this.userInfo.balance',this.userInfo.balance*1)
 				console.log('this.price',this.order.totalAmount*1)
 
-				if (this.loveCard.totalBalance*1 < this.order.totalAmount*1 && num == 0){
-					uni.$u.toast('余额不足')
-					return
-				}
-				if (this.userInfo.balance*1 < this.order.totalAmount*1 && num == 1){
+				// if (this.loveCard.totalBalance*1 < this.order.totalAmount*1 && num == 0){
+				// 	uni.$u.toast('余额不足')
+				// 	return
+				// }
+				if (this.userInfo.balance*1 < this.order.payAmount*1 && num == 1){
 					uni.$u.toast('余额不足')
 					return
 				}

+ 10 - 6
pages/order/index.vue

@@ -98,7 +98,8 @@
 							<u-icon name="/static/me/u701.png" color="#38db38" size="36"></u-icon>
 							<view class="payName flex-col justify-center">
 								<text>余额支付</text>
-								<text class="balance">可以余额¥{{userInfo.balance || 0}}</text>
+								<text class="balance">可用余额¥{{userInfo.balance || 0}}</text>
+<!--								<text class="balance">应付金额¥{{payAmount}}</text>-->
 							</view>
 						</view>
 
@@ -173,6 +174,7 @@
 				loveCard:{},
 				orderNumberData:{},
 				num: 0,
+				payAmount:'',//调用支付组件时需要支付的金额
 				title: 'Hello',
 				tabIndex: 0,
 				tabBarIndex:3,
@@ -244,6 +246,7 @@
 			openPayAppointment(order,number){
 				console.log(order)
 				console.log(number)
+				this.payAmount = order.subAmount
 				this.appointmentOrder = order
 				this.openType=number
 				this.$refs.popup.open()
@@ -421,12 +424,12 @@
 
 				console.log(this.userInfo.balance*1,this.appointmentOrder.totalAmount*1)
 
-				if (this.loveCard.totalBalance*1 < this.appointmentOrder.totalAmount*1 && num == 0){
-					uni.$u.toast('余额不足')
-					return
-				}
+				// if (this.loveCard.totalBalance*1 < this.appointmentOrder.totalAmount*1 && num == 0){
+				// 	uni.$u.toast('余额不足')
+				// 	return
+				// }
 
-				if (this.userInfo.balance*1 < this.appointmentOrder.totalAmount*1){
+				if (this.userInfo.balance*1 < this.payAmount*1){
 					uni.$u.toast('余额不足')
 					return
 				}
@@ -443,6 +446,7 @@
 				console.log(order)
 				console.log(number)
 				this.openType=number
+				this.payAmount = order.payAmount
 				this.appointmentOrder = order
 				this.$api.oneClickPay({
 					orderId:order.orderId