Browse Source

Merge remote-tracking branch 'origin/master'

puyao 2 tháng trước cách đây
mục cha
commit
1bedbcd4ad
2 tập tin đã thay đổi với 23 bổ sung19 xóa
  1. 11 9
      pages/shopping/paymentOrder.vue
  2. 12 10
      pages_user/user/otherPaymentOrder.vue

+ 11 - 9
pages/shopping/paymentOrder.vue

@@ -147,6 +147,7 @@
 	import {getUserInfo} from '@/api/user'
 
 	import {getStoreConfig} from '@/api/common'
+	import {checkpayment} from '@/api/payment'
 	import {editPayType,pay,getStoreOrderById,getMyStoreOrderById} from '@/api/storeOrder'
 	export default {
 		data() {
@@ -327,22 +328,23 @@
 					 // 启动定时器并保存 ID
 					   that.checkTimer = setInterval(() => {
 						 const data = { orderId: that.order.id };
-						 getMyStoreOrderById(data).then(res => {
+						 checkpayment(data).then(res => {
 						   if (res.code == 200) {
-							 if (res.order.status == 3) {
+							 if (res.status == 1) {
 							   // 跳转前清除定时器
 							   clearInterval(that.checkTimer);
 							   uni.navigateTo({
 								 url: '/pages_user/user/storeOrderDetail?id=' + that.order.id
 							   });
-							 }else{
-								 setTimeout(()=>{
-									 clearInterval(that.checkTimer);
-									 uni.navigateTo({
-									 	 url: '/pages_user/user/storeOrderDetail?id=' + that.order.id
-									 });
-								 },10000)
 							 }
+							 // else{
+								//  setTimeout(()=>{
+								// 	 clearInterval(that.checkTimer);
+								// 	 uni.navigateTo({
+								// 	 	 url: '/pages_user/user/storeOrderDetail?id=' + that.order.id
+								// 	 });
+								//  },10000)
+							 // }
 						   }
 						 });
 					   }, 4000);

+ 12 - 10
pages_user/user/otherPaymentOrder.vue

@@ -53,6 +53,7 @@
 
 <script>
 	import {otherPayment,getStoreOrderById,getMyStoreOrderById} from '@/api/storeOrder'
+	import {checkpayment} from '@/api/payment'
 	export default {
 		data() {
 			return {
@@ -148,23 +149,24 @@
 									// 启动定时器并保存 ID
 									  that.checkTimer = setInterval(() => {
 										 const data = { orderId: that.order.id };
-										 getMyStoreOrderById(data).then(res => {
+										 checkpayment(data).then(res => {
 										   if (res.code == 200) {
-											 if (res.order.status == 3) {
+											 if (res.status == 3) {
 											   // 跳转前清除定时器
 											   clearInterval(that.checkTimer);
 											   uni.navigateTo({
 												 url: '/pages_user/user/storeOrderDetail?id=' + that.order.id
 											   });
-											 }else{
-												 clearInterval(that.checkTimer);
-												 setTimeout(()=>{
-													 uni.navigateTo({
-													 		 url: '/pages_user/user/storeOrderDetail?id=' + that.order.id
-													 });
-												 },10000)
-												 
 											 }
+											 // else{
+												//  clearInterval(that.checkTimer);
+												//  setTimeout(()=>{
+												// 	 uni.navigateTo({
+												// 	 		 url: '/pages_user/user/storeOrderDetail?id=' + that.order.id
+												// 	 });
+												//  },10000)
+												 
+											 // }
 										   }
 										 });
 									  }, 4000);