From eb1985c4c9f4bc51b9eb8690bcec96d19d55235a Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Wed, 09 Mar 2022 11:51:23 +0800
Subject: [PATCH] +任务参与失败提醒

---
 pages/grabOrders/grabOrdersZAXC/map.vue          |   49 +----------
 pages/grabOrders/grabOrdersZAXC/grabOrders.vue   |   23 +++--
 pages/grabOrders/grabOrdersZAFFPX/grabOrders.vue |   20 +++-
 pages/grabOrders/grabOrdersZAYWXC/map.vue        |   47 +----------
 pages/grabOrders/grabOrdersZAFFPX/map.vue        |   49 +----------
 pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue |   21 +++-
 6 files changed, 62 insertions(+), 147 deletions(-)

diff --git a/pages/grabOrders/grabOrdersZAFFPX/grabOrders.vue b/pages/grabOrders/grabOrdersZAFFPX/grabOrders.vue
index 05a2b46..b342794 100644
--- a/pages/grabOrders/grabOrdersZAFFPX/grabOrders.vue
+++ b/pages/grabOrders/grabOrdersZAFFPX/grabOrders.vue
@@ -408,20 +408,26 @@
 					},
 					data: this.popupData,
 					success(res) {
+						if (res.data.code == 400) {
+							uni.showToast({
+								title: res.data.msg,
+								icon: 'none',
+								duration: 2000,
+							});
+							return;
+						}
 						const data = res.data.msg;
-						// console.log(data);
 						if (data == "抢单成功") {
 							uni.showToast({
 								title: data,
 								duration: 2000,
 							});
+							// that.listData = data;
+							// that.getGrabOrders(this.);
+							that.current = 1;
+							that.swiperCurrent = 1;
+							that.$store.commit("changegotuGrabOrders");
 						}
-						// that.listData = data;
-						// that.getGrabOrders(this.);
-						that.current = 1;
-						that.swiperCurrent = 1;
-						that.$store.commit("changegotuGrabOrders");
-
 					},
 				});
 			},
diff --git a/pages/grabOrders/grabOrdersZAFFPX/map.vue b/pages/grabOrders/grabOrdersZAFFPX/map.vue
index 5c525be..a3a4226 100644
--- a/pages/grabOrders/grabOrdersZAFFPX/map.vue
+++ b/pages/grabOrders/grabOrdersZAFFPX/map.vue
@@ -234,56 +234,21 @@
 						},
 						success(res) {
 							if (res.data.msg == "抢单成功") {
-								// appenUrl: "http://192.168.0.108:83/",
-								// butCT: "beginUp",
-								// buttype: 0,
-								// captain: "我",
-								// city: "南昌市",
-								// content: "测试",
-								// district: "西湖区",
-								// id: 37,
-								// integral: "222",
-								// iscation: "1",
-								// jnum: 3,
-								// line: "LINESTRING(115.8995839881188 28.687205773173343,115.89391916267935 28.678966027079593,115.90404718391959 28.673644524394046,115.91211526863638 28.681369286356936)",
-								// num: 1,
-								// nums: 0,
-								// province: "江西省",
-								// publisher: "管理",
-								// raddress: null,
-								// rname: "测试1",
-								// rtype: "0",
-								// serid: "1123598821738675201,",
-								// team: "你,他,它",
-								// time: "2022-02-18 14:15:52",
-								// type: "2",
-								// fname: "管理者",
-								// url: "http://2
-								// myid:111
-								//myName:222
-								// that.ourData.rtype = 2;
-								// that.ourData.type = 2;
-								// that.ourData.buttype = 0;
-								// that.ourData.butCT = "begin";
-								// if (that.ourData.num == 0) {
-								// 	that.ourData.iscation = "1";
-								// 	that.ourData.serid += that.ourData.myid + ',';
-								// 	that.ourData.captain = that.ourData.myName;
-								// } else {
-								// 	that.ourData.iscation = "0";
-								// 	that.ourData.serid += that.ourData.myid + ',';
-								// 	that.ourData.team += ',' + that.ourData.myid;
-								// }
-								// that.ourData.butCT = "begin";
 								uni.showToast({
 									title: res.data.msg,
 									duration: 2000,
 								});
 								setTimeout(function() {
 									uni.redirectTo({
-										url: "/pages/grabOrders/grabOrdersZAFFPX/grabOrders?in=1"
+										url: "/pages/grabOrders/grabOrdersZAYWXC/grabOrders?in=1"
 									})
 								}, 2200)
+							} else {
+								uni.showToast({
+									title: res.data.msg,
+									icon: 'none',
+									duration: 2000,
+								});
 							}
 						},
 						complete() {
diff --git a/pages/grabOrders/grabOrdersZAXC/grabOrders.vue b/pages/grabOrders/grabOrdersZAXC/grabOrders.vue
index dda0f26..a4ee71d 100644
--- a/pages/grabOrders/grabOrdersZAXC/grabOrders.vue
+++ b/pages/grabOrders/grabOrdersZAXC/grabOrders.vue
@@ -140,7 +140,7 @@
 				console.log(d)
 				this.appdetitle1 = "是否取消" + (d.iscation == 1 ? "该活动:" : "参与:") + d.name;
 				this.showPopup1 = true;
-			
+
 			},
 			//取消任务弹窗回调
 			outits() {
@@ -408,20 +408,27 @@
 					},
 					data: this.popupData,
 					success(res) {
+						// console.log(res)
+						if (res.data.code == 400) {
+							uni.showToast({
+								title: res.data.msg,
+								icon: 'none',
+								duration: 2000,
+							});
+							return;
+						}
 						const data = res.data.msg;
-						// console.log(data);
 						if (data == "抢单成功") {
 							uni.showToast({
 								title: data,
 								duration: 2000,
 							});
+							// that.listData = data;
+							// that.getGrabOrders(this.);
+							that.current = 1;
+							that.swiperCurrent = 1;
+							that.$store.commit("changegotuGrabOrders");
 						}
-						// that.listData = data;
-						// that.getGrabOrders(this.);
-						that.current = 1;
-						that.swiperCurrent = 1;
-						that.$store.commit("changegotuGrabOrders");
-
 					},
 				});
 			},
diff --git a/pages/grabOrders/grabOrdersZAXC/map.vue b/pages/grabOrders/grabOrdersZAXC/map.vue
index c92e8e5..dfc8ea4 100644
--- a/pages/grabOrders/grabOrdersZAXC/map.vue
+++ b/pages/grabOrders/grabOrdersZAXC/map.vue
@@ -282,56 +282,21 @@
 						},
 						success(res) {
 							if (res.data.msg == "抢单成功") {
-								// appenUrl: "http://192.168.0.108:83/",
-								// butCT: "beginUp",
-								// buttype: 0,
-								// captain: "我",
-								// city: "南昌市",
-								// content: "测试",
-								// district: "西湖区",
-								// id: 37,
-								// integral: "222",
-								// iscation: "1",
-								// jnum: 3,
-								// line: "LINESTRING(115.8995839881188 28.687205773173343,115.89391916267935 28.678966027079593,115.90404718391959 28.673644524394046,115.91211526863638 28.681369286356936)",
-								// num: 1,
-								// nums: 0,
-								// province: "江西省",
-								// publisher: "管理",
-								// raddress: null,
-								// rname: "测试1",
-								// rtype: "0",
-								// serid: "1123598821738675201,",
-								// team: "你,他,它",
-								// time: "2022-02-18 14:15:52",
-								// type: "2",
-								// fname: "管理者",
-								// url: "http://2
-								// myid:111
-								//myName:222
-								// that.ourData.rtype = 2;
-								// that.ourData.type = 2;
-								// that.ourData.buttype = 0;
-								// that.ourData.butCT = "begin";
-								// if (that.ourData.num == 0) {
-								// 	that.ourData.iscation = "1";
-								// 	that.ourData.serid += that.ourData.myid + ',';
-								// 	that.ourData.captain = that.ourData.myName;
-								// } else {
-								// 	that.ourData.iscation = "0";
-								// 	that.ourData.serid += that.ourData.myid + ',';
-								// 	that.ourData.team += ',' + that.ourData.myid;
-								// }
-								// that.ourData.butCT = "begin";
 								uni.showToast({
 									title: res.data.msg,
 									duration: 2000,
 								});
 								setTimeout(function() {
 									uni.redirectTo({
-										url: "/pages/grabOrders/grabOrdersZAXC/grabOrders?in=1"
+										url: "/pages/grabOrders/grabOrdersZAYWXC/grabOrders?in=1"
 									})
 								}, 2200)
+							} else {
+								uni.showToast({
+									title: res.data.msg,
+									icon: 'none',
+									duration: 2000,
+								});
 							}
 						},
 						complete() {
diff --git a/pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue b/pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue
index ce933b7..27be2f4 100644
--- a/pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue
+++ b/pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue
@@ -411,20 +411,27 @@
 					},
 					data: this.popupData,
 					success(res) {
-						const data = res.data.msg;
 						// console.log(data);
+						if (res.data.code == 400) {
+							uni.showToast({
+								title: res.data.msg,
+								icon: 'none',
+								duration: 2000,
+							});
+							return;
+						}
+						const data = res.data.msg;
 						if (data == "抢单成功") {
 							uni.showToast({
 								title: data,
 								duration: 2000,
 							});
+							// that.listData = data;
+							// that.getGrabOrders(this.);
+							that.current = 1;
+							that.swiperCurrent = 1;
+							that.$store.commit("changegotuGrabOrders");
 						}
-						// that.listData = data;
-						// that.getGrabOrders(this.);
-						that.current = 1;
-						that.swiperCurrent = 1;
-						that.$store.commit("changegotuGrabOrders");
-
 					},
 				});
 			},
diff --git a/pages/grabOrders/grabOrdersZAYWXC/map.vue b/pages/grabOrders/grabOrdersZAYWXC/map.vue
index af31932..3d5e32e 100644
--- a/pages/grabOrders/grabOrdersZAYWXC/map.vue
+++ b/pages/grabOrders/grabOrdersZAYWXC/map.vue
@@ -278,47 +278,6 @@
 						},
 						success(res) {
 							if (res.data.msg == "抢单成功") {
-								// appenUrl: "http://192.168.0.108:83/",
-								// butCT: "beginUp",
-								// buttype: 0,
-								// captain: "我",
-								// city: "南昌市",
-								// content: "测试",
-								// district: "西湖区",
-								// id: 37,
-								// integral: "222",
-								// iscation: "1",
-								// jnum: 3,
-								// line: "LINESTRING(115.8995839881188 28.687205773173343,115.89391916267935 28.678966027079593,115.90404718391959 28.673644524394046,115.91211526863638 28.681369286356936)",
-								// num: 1,
-								// nums: 0,
-								// province: "江西省",
-								// publisher: "管理",
-								// raddress: null,
-								// rname: "测试1",
-								// rtype: "0",
-								// serid: "1123598821738675201,",
-								// team: "你,他,它",
-								// time: "2022-02-18 14:15:52",
-								// type: "2",
-								// fname: "管理者",
-								// url: "http://2
-								// myid:111
-								//myName:222
-								// that.ourData.rtype = 2;
-								// that.ourData.type = 2;
-								// that.ourData.buttype = 0;
-								// that.ourData.butCT = "begin";
-								// if (that.ourData.num == 0) {
-								// 	that.ourData.iscation = "1";
-								// 	that.ourData.serid += that.ourData.myid + ',';
-								// 	that.ourData.captain = that.ourData.myName;
-								// } else {
-								// 	that.ourData.iscation = "0";
-								// 	that.ourData.serid += that.ourData.myid + ',';
-								// 	that.ourData.team += ',' + that.ourData.myid;
-								// }
-								// that.ourData.butCT = "begin";
 								uni.showToast({
 									title: res.data.msg,
 									duration: 2000,
@@ -328,6 +287,12 @@
 										url: "/pages/grabOrders/grabOrdersZAYWXC/grabOrders?in=1"
 									})
 								}, 2200)
+							} else {
+								uni.showToast({
+									title: res.data.msg,
+									icon: 'none',
+									duration: 2000,
+								});
 							}
 						},
 						complete() {

--
Gitblit v1.9.3