Browse Source

1.订单详情

guo 3 years ago
parent
commit
100374d9f4
2 changed files with 29 additions and 12 deletions
  1. 1 7
      common/request.js
  2. 28 5
      pages/order/orderDetail.vue

+ 1 - 7
common/request.js

@@ -83,13 +83,7 @@ const http = (url = '', date = {}, type = 'POST', header = {
 			}else if(res.data.code==409){
 				 // getToken(url,date,type,header)
 			}
-			else if(res.data.code==1){
-				 uni.showToast({
-				     title: res.data.msg,
-				 	 icon:'none',
-				     duration: 3000,
-				 });
-			}
+			
             resolve(res.data);
         }).catch(error => {
             let [err, res] = error;

+ 28 - 5
pages/order/orderDetail.vue

@@ -417,9 +417,20 @@
 					sheetId: this.id,
 
 				}, 'GET').then(res => {
-					
-
-					if (res.code == 0) {
+					 uni.hideLoading();
+					if(res.code==1){
+						
+						 uni.showModal({
+						 	title: '提示',
+							showCancel:false,
+						 	content: res.msg,
+						 	success: function(res) {
+						 		
+						 
+						 	}
+						 });
+					}
+					else if (res.code == 0) {
 						uni.navigateTo({
 							url: '../changeStore/changeStore?sheetId=' + this.id +'&oldShopID='+this.orderData.ShopID+ '&oldStoreName=' + this
 								.orderData.ShopName + '&oldStoreAddress=' + this.orderData.ProvinceName +
@@ -584,8 +595,20 @@
 					sheetId: this.id,
 
 				}, 'GET').then(res => {
-					
-					if (res.code == 0) {
+					uni.hideLoading();
+					if(res.code==1){
+						
+						 uni.showModal({
+						 	title: '提示',
+							showCancel:false,
+						 	content: res.msg,
+						 	success: function(res) {
+						 		
+						 
+						 	}
+						 });
+					}
+					else if (res.code == 0) {
 						
 						uni.navigateTo({
 							url: '../refundMoney/refundMoney?sheetId=' + this.id + '&maxMoney=' + this