MONSTER-ygh 1 ano atrás
pai
commit
95b9297c3f
1 arquivos alterados com 22 adições e 12 exclusões
  1. 22 12
      pages/bookticket.vue

+ 22 - 12
pages/bookticket.vue

@@ -140,7 +140,7 @@
 					</view>
 				</view>
 				<view class="right">
-					<view class="btn active" v-if="totalPrice>0&&cansubmit&&vuex_member_info.isAuth"
+					<view class="btn active" v-if="totalPrice>=0&&cansubmit&&vuex_member_info.isAuth"
 						@click="setTemplate">立即支付</view>
 					<!-- <u-button @click="setTemplate" class="btn active"  v-if="totalPrice>0&&cansubmit&&vuex_member_info.isAuth">立即支付</u-button> -->
 					<view class="btn" v-else>立即支付</view>
@@ -504,16 +504,27 @@
 					orderId: this.orderId,
 					openid: ''
 				}).then(res => {
-					this.payResult = res.data.payInfo;
-					this.payResult.package = res.data.payInfo.packageValue;
-					// #ifdef H5
-					this.initConfig(this.payResult)
-					// #endif 
-					// #ifdef MP
-					this.wxPay()
-					// #endif 
-
-
+					// this.payResult = res.data.payInfo;
+					// this.payResult.package = res.data.payInfo.packageValue;
+					
+					// ygh
+					if(!res.data.needPay){
+						//this.payQuery();
+						uni.$u.route('/center/orderdetails', {
+							type:'redirectTo',
+							id: this.orderId
+						});
+					}else {
+						this.payResult = res.data.payInfo;
+						this.payResult.package = res.data.payInfo.packageValue;
+						// #ifdef H5
+						this.initConfig(this.payResult)
+						// #endif 
+						// #ifdef MP
+						this.wxPay()
+						// #endif 
+					}
+					
 					// if(this.params.paymentMode==1||this.params.paymentMode==4){
 					// 	this.wxPay()
 					// }else{
@@ -607,7 +618,6 @@
 					}
 				}, interval);
 			},
-
 			/**
 			 * 公众号微信支付
 			 */