Ver código fonte

修改支付逻辑

gcz 3 anos atrás
pai
commit
6b0c368736
1 arquivos alterados com 24 adições e 5 exclusões
  1. 24 5
      pages/index/index.vue

+ 24 - 5
pages/index/index.vue

@@ -200,12 +200,31 @@
 				});
 			},
 			goPay(orderId){
-				this.$u.route({
-					url: 'pages/payPage/payPage',
-					params: {
-						orderId: orderId
-					}
+				let orderList=[];
+				orderList.push(orderId);
+				this.$u.api.payGzbank({orderList: orderList}).then(res=>{
+					let payUrl = res.data.url;
+					this.currentPayUrl=encodeURIComponent(res.data.url);
+					// return;
+					this.$u.route({
+						url: 'pages/payLists/pay',
+						params: {
+							currentPayUrl:this.currentPayUrl
+						}
+					});
+				}).catch(err=>{
+					this.$refs.uToast.show({
+						title: err.msg,
+						type: 'error',
+					});
 				});
+				
+				// this.$u.route({
+				// 	url: 'pages/payPage/payPage',
+				// 	params: {
+				// 		orderId: orderId
+				// 	}
+				// });
 			},			
 			//
 			onRoadInfo(item){