Переглянути джерело

Merge branch 'develop' of http://git.chelingzhu.com/chelingzhu-web/zxyj-mini-html into develop

lilei 4 роки тому
батько
коміт
a16fcb60be
2 змінених файлів з 29 додано та 5 видалено
  1. 14 3
      pages/order/order.vue
  2. 15 2
      pages/order/orderDetail.vue

+ 14 - 3
pages/order/order.vue

@@ -98,7 +98,7 @@
 		@cancel="payAgain"
 		></u-modal>
 		<!-- 确认支付弹窗 -->
-		 <u-popup mode="center" closeable @close="showLeavePsw=true" v-model="showInputPsw" width="500rpx" >
+		 <u-popup mode="center" closeable @close="closePayModal" v-model="showInputPsw" width="500rpx" >
 			<view class="slot-content">
 				<view>确认支付</view>
 				<view class="text-cont">
@@ -181,6 +181,7 @@
 				showSetPswModal: false,  // 设置支付密码弹窗
 				showInputPsw: false, // 打开输入密码弹窗
 				showLeavePsw: false, // 打开确定放弃弹窗
+				payFinish: false  // 是否支付成功
 			}
 		},
 		onLoad() {
@@ -312,6 +313,12 @@
 					this.showInputPsw = true
 				}
 			},
+			// 关闭输入密码弹窗
+			closePayModal(){
+				if(!this.payFinish) {
+					this.showLeavePsw = true
+				} 
+			},
 			//确认放弃
 			canclePay() {
 				this.password = ''
@@ -327,6 +334,7 @@
 			toPay(item) {
 				this.orderId = item.id
 				this.totalPrice = item.originalGold
+				this.payFinish = false
 				// 判断用户是否设置过支付密码
 				existPayPwd().then(res=>{
 					console.log(res,'rrrrrr')
@@ -362,13 +370,16 @@
 				signPay(params).then(res=>{
 					this.btnLoading = false
 					if(res.status == 200) {
-						this.showLeavePsw = false
+						// 关闭弹窗 刷新列表
+						this.payFinish = true
+						this.showInputPsw = false
+						this.getRow()
 						setTimeout(()=>{
 							// 跳转到支付完成界面
 							uni.navigateTo({
 								url:"/pages/toOrder/payFinish?id=" + this.orderId
 							})
-						},300)
+						},500)
 						
 					} else{
 						this.password = ''

+ 15 - 2
pages/order/orderDetail.vue

@@ -93,7 +93,7 @@
 		@cancel="payAgain"
 		></u-modal>
 		<!-- 确认支付弹窗 -->
-		 <u-popup mode="center" closeable @close="showLeavePsw=true" v-model="showInputPsw" width="500rpx" >
+		 <u-popup mode="center" closeable @close="closePayModal" v-model="showInputPsw" width="500rpx" >
 			<view class="slot-content">
 				<view>确认支付</view>
 				<view class="text-cont">
@@ -134,7 +134,8 @@
 				showInputPsw: false, // 打开输入密码弹窗
 				showLeavePsw: false, // 打开确定放弃弹窗
 				orderId: '', // 订单id
-				leftTime: null
+				leftTime: null,
+				payFinish: false  // 是否支付成功
 			}
 		},
 		onLoad(options) {
@@ -194,6 +195,12 @@
 					this.showInputPsw = true
 				}
 			},
+			// 关闭输入密码弹窗
+			closePayModal(){
+				if(!this.payFinish) {
+					this.showLeavePsw = true
+				} 
+			},
 			//确认放弃
 			canclePay() {
 				this.password = ''
@@ -208,6 +215,7 @@
 			// 支付 判断用户是否设置过支付密码
 			toPay() {
 				this.totalPrice = this.orderInfo.originalGold
+				this.payFinish = false
 				// 判断用户是否设置过支付密码
 				existPayPwd().then(res=>{
 					console.log(res,'rrrrrr')
@@ -244,6 +252,11 @@
 				signPay(params).then(res=>{
 					this.btnLoading = false
 					if(res.status == 200) {
+						// 关闭弹窗 刷新页面
+						this.payFinish = true
+						this.showInputPsw = false
+						this.getOrderDetail()
+						// 刷新订单列表
 						uni.$emit('refresh')
 						// 跳转到支付完成界面
 						uni.navigateTo({