From e9716ad886ddcad94bfaa1c89118c2d0a793a3d1 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 03 Nov 2021 18:02:19 +0800
Subject: [PATCH] +抢单

---
 pages/grabOrders/feedback.vue     |   25 ++
 pages/home/home.vue               |    2 
 grabOrdersMap/xcxmap.html         |    2 
 pages/grabOrders/grabOrders.vue   |  227 +++++++++++--------
 pages/grabOrders/inPage/page0.vue |  158 ++++++++++++++
 pages/grabOrders/map.vue          |    7 
 api/mock/home.js                  |    2 
 grabOrdersMap/css/body.css        |    1 
 grabOrdersMap/js/vueMain.js       |   45 +++
 pages/grabOrders/inPage/page1.vue |  157 ++++++++++++++
 store/mutations.js                |    8 
 store/state.js                    |    7 
 12 files changed, 529 insertions(+), 112 deletions(-)

diff --git a/api/mock/home.js b/api/mock/home.js
index 0a3968d..77b4bc2 100644
--- a/api/mock/home.js
+++ b/api/mock/home.js
@@ -130,7 +130,7 @@
 				{
 					name: '我参与',
 					img: '/static/images/home/jusou.png',
-					url: '../patrol/patrol'
+					url: '../grabOrders/grabOrders'
 				},
 				// {
 				// 	name: '我要办',
diff --git a/grabOrdersMap/css/body.css b/grabOrdersMap/css/body.css
index 1c20a2a..611fae4 100644
--- a/grabOrdersMap/css/body.css
+++ b/grabOrdersMap/css/body.css
@@ -14,6 +14,7 @@
 #mapVue {
 	width: 100%;
 	height: 100%;
+	overflow: hidden;
 }
 
 #map {
diff --git a/grabOrdersMap/js/vueMain.js b/grabOrdersMap/js/vueMain.js
index 5123035..f8cac75 100644
--- a/grabOrdersMap/js/vueMain.js
+++ b/grabOrdersMap/js/vueMain.js
@@ -32,7 +32,7 @@
 		oldlat: '',
 		oldlng: '',
 		haveJDWD: true,
-		data:{}
+		data: {}
 		// {
 		// 	type: 0,
 		// 	city: "南昌市",
@@ -53,6 +53,36 @@
 		// }
 	},
 	methods: {
+		openAPP(type) {
+			console.log(type)
+			if (type != 1) {
+				//反馈
+				uni.navigateTo({
+					url: '/pages/grabOrders/feedback?data=' + JSON.stringify(this.data)
+				});
+			} else {
+				//抢单
+				// console.log(this.data)
+				let up = this.data.appenUrl == '/api' ? "http://192.168.0.107:85" : this.data.appenUrl;
+				let url = up + "/taskqd/Graborder",
+					dataAppend = this.data;
+				axios.post(url, dataAppend).then(res => {
+					console.log(res);
+					if (res.data.msg == "抢单成功") {
+						this.data.type = 0;
+						this.$message({
+							message: res.data.msg,
+							type: 'success'
+						});
+						return;
+					}
+					this.$message({
+						message: res.data.msg,
+						type: 'warning'
+					});
+				})
+			}
+		},
 		getDataList() {
 			var that = this;
 			that.beginCome();
@@ -72,7 +102,8 @@
 			// this.getdata = data;
 			// this.changeDom(this.getdata[0]);//改变地图高度
 			// console.log(this.getdata[0]);
-			let position = this.data.line.slice(11, 47).split(" ");
+			let lines = this.data.line
+			let position = lines.slice(lines.indexOf("(") + 1, lines.indexOf(",")).split(" ");
 			// console.log(position)
 			// return
 			this.map = this.beginMap(this.map, position); //创建并接受map
@@ -457,12 +488,12 @@
 		},
 		addlines(map) {
 			let line = this.data.line;
-			line = line.slice(line.indexOf('(') +1,line.indexOf(')')).split(",");
-			for(let k in line){
+			line = line.slice(line.indexOf('(') + 1, line.indexOf(')')).split(",");
+			for (let k in line) {
 				line[k] = line[k].split(" ").reverse();
 			}
 			// console.log(line)
-			
+
 			// var latlngs = [
 			// 	['28.67705200351289', '115.88518439579809'],
 			// 	['28.68755200354289', '115.88518439574809'],
@@ -473,7 +504,9 @@
 			// 	fillColor: '#0000ed',
 			// 	weight: 2
 			// });
-			var polyline = L.polyline(line, {color: '#FC5E20'})
+			var polyline = L.polyline(line, {
+				color: '#FC5E20'
+			})
 			// let point = L.circle([28.67705200351289,115.88518439579809],{color:'#FF0000',fillColor:'#FF0000',radius:1000000,fillOpacity:1});
 			map.addLayer(polyline)
 		}
diff --git a/grabOrdersMap/xcxmap.html b/grabOrdersMap/xcxmap.html
index 515cfe6..fcd5f95 100644
--- a/grabOrdersMap/xcxmap.html
+++ b/grabOrdersMap/xcxmap.html
@@ -136,7 +136,7 @@
 					</span>
 				</div>
 				<div class="once-c">
-					<el-button :type="data.type==1?'primary':'success'">{{data.type==1?'我反馈':'我参与'}}</el-button>
+					<el-button :type="data.type==1?'success':'primary'" @click="openAPP(data.type)">{{data.type==1?'我参与':'我反馈'}}</el-button>
 				</div>
 			</div>
 			<!-- </div>
diff --git a/pages/grabOrders/feedback.vue b/pages/grabOrders/feedback.vue
index cdeaec9..3a67f99 100644
--- a/pages/grabOrders/feedback.vue
+++ b/pages/grabOrders/feedback.vue
@@ -60,9 +60,34 @@
 				longInputD1: '',//意见
 				imgs: [],
 				videos: [],
+				data:{}
 			}
 		},
 		methods: {
+			onLoad: function(option) {
+				var b;
+				if (option.data == undefined) {
+					this.data = {
+						rname: '无数据',
+						content: '无数据',
+						district: '无数据',
+						place: '无数据',
+						time: '无数据',
+						num: "无数据",
+						ourNum: "无数据",
+						inNum: "无数据",
+						infor: "无数据"
+					}
+					return;
+				}
+				try {
+					b = JSON.parse(option.data);
+				} catch (e) {
+					//TODO handle the exception
+				}
+				// console.log(b);
+				this.data = b;
+			},
 			upData() {
 				console.log('开始上传');
 				var dataList = {
diff --git a/pages/grabOrders/grabOrders.vue b/pages/grabOrders/grabOrders.vue
index 51c9f26..6933812 100644
--- a/pages/grabOrders/grabOrders.vue
+++ b/pages/grabOrders/grabOrders.vue
@@ -9,7 +9,11 @@
 			<swiper-item class="swiper-item" v-for="(item, index) in list" :key="index"
 				style="height: 100%;width: 100%;">
 				<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="onreachBottom">
-					<view class="once" v-for="(item,index) in listData" :key="index" @click="openOnce(item)">
+					<page0 :listData="listData0" :swiperCurrent="swiperCurrent" v-if="item.name == '正在进行'"
+						@openOnce="openOnce" @getOrders="getOrders"></page0>
+					<page1 :listData="listData1" :swiperCurrent="swiperCurrent" v-if="item.name == '抢单池'"
+						@openOnce="openOnce" @getOrders="getOrders"></page1>
+					<!-- <view class="once" v-for="(item,index) in listData" :key="index" @click="openOnce(item)">
 						<view class="onve-left">
 							<view class="o-l-img">
 								<image :src="item.url" mode=""></image>
@@ -37,14 +41,20 @@
 								积分:{{item.integral}}
 							</view>
 						</view>
-					</view>
+					</view> -->
 				</scroll-view>
 			</swiper-item>
 		</swiper>
 	</view>
 </template>
 <script>
+	import page0 from "./inPage/page0.vue"
+	import page1 from "./inPage/page1.vue"
 	export default {
+		components: {
+			page0,
+			page1
+		},
 		data() {
 			return {
 				list: [{
@@ -55,17 +65,26 @@
 				// 因为内部的滑动机制限制,请将tabs组件和swiper组件的current用不同变量赋值
 				current: 0, // tabs组件的current值,表示当前活动的tab选项
 				swiperCurrent: 0, // swiper组件的current值,表示当前那个swiper-item是活动的
-				listData: [],
+				listData0: [],
+				listData1: [],
 			};
 		},
 		watch: {
 			current() {
 				// console.log(this.current)
-				this.getGrabOrders(this.current);
+				this.getGrabOrders(this.swiperCurrent);
+			},
+			change() {
+				this.getGrabOrders(this.swiperCurrent);
 			}
 		},
 		mounted() {
 			this.getGrabOrders();
+		},
+		computed: {
+			change() {
+				return this.$store.state.gotuGrabOrders;
+			}
 		},
 		methods: {
 			// tabs通知swiper切换
@@ -92,7 +111,10 @@
 			},
 			openOnce(val) {
 				// console.log(this.swiperCurrent)
-				val['current'] = this.swiperCurrent;
+				val['type'] = this.swiperCurrent;
+				val['serid'] = uni.getStorageSync('ids') + ",";
+				val['appenUrl'] = this.$store.state.piAPI;
+				// val['apendurl'] = this.swiperCurrent;
 				// if (this.swiperCurrent == 1) {
 				// 	uni.navigateTo({
 				// 		url: './task?data=' + JSON.stringify(val),
@@ -109,7 +131,9 @@
 			},
 			getGrabOrders(val = 0) {
 				//获取全部的数据
-				this.listData = [];
+				// console.log("beggggg")
+				this["listData" + val] = [];
+				console.log(val)
 				let that = this,
 					d = {
 						serid: uni.getStorageSync('ids'),
@@ -124,15 +148,21 @@
 					},
 					success(res) {
 						const data = res.data.data;
-						// console.log(data)
-						that.listData = data;
+						console.log(data)
+						if (val == 0) {
+							that.listData0 = data;
+						} {
+							that.listData1 = data;
+						}
 					}
 				})
 			},
-			getOrders(val, item) {
+			getOrders(b) {
+				let val = b.val,
+					item = b.item;
 				console.log(val, item)
 				let that = this;
-				if (val != 3) { //接单
+				if (val != 0) { //接单
 					//
 					// let d = {
 					// 	city:item.city,
@@ -144,7 +174,7 @@
 					// 	city:item.city,
 					// }
 					item['serid'] = uni.getStorageSync('ids') + ",";
-					console.log(item)
+					// console.log(item)
 					// return;
 					uni.request({
 						url: this.$store.state.piAPI + "/taskqd/Graborder",
@@ -167,11 +197,16 @@
 								});
 							}
 							// that.listData = data;
-							that.getGrabOrders();
+							// that.getGrabOrders(this.);
+							that.$store.commit("changegotuGrabOrders");
 						}
 					})
 				} else { //反馈
 					//
+					uni.navigateTo({
+						url: './feedback?data=' + JSON.stringify(item)
+						// url: "./feedback"
+					})
 				}
 			}
 		}
@@ -184,102 +219,102 @@
 		width: 100%;
 	}
 
-	.once {
-		width: calc(100% - 10px);
-		height: 100px;
-		border: 1px solid #d0d0d0;
-		padding: 8px;
-		box-sizing: border-box;
-		margin: 5px;
-		border-radius: 8px;
-		display: flex;
-		align-items: center;
-		justify-content: center;
+	// .once {
+	// 	width: calc(100% - 10px);
+	// 	height: 100px;
+	// 	border: 1px solid #d0d0d0;
+	// 	padding: 8px;
+	// 	box-sizing: border-box;
+	// 	margin: 5px;
+	// 	border-radius: 8px;
+	// 	display: flex;
+	// 	align-items: center;
+	// 	justify-content: center;
 
-		.onve-left {
-			width: 75%;
-			display: flex;
-			align-items: center;
-			justify-content: center;
+	// 	.onve-left {
+	// 		width: 75%;
+	// 		display: flex;
+	// 		align-items: center;
+	// 		justify-content: center;
 
-			.o-l-img {
-				width: 80px;
-				height: 80px;
-				background-color: #d0d0d0;
-				margin-right: 5px;
-				border-radius: 7px;
+	// 		.o-l-img {
+	// 			width: 80px;
+	// 			height: 80px;
+	// 			background-color: #d0d0d0;
+	// 			margin-right: 5px;
+	// 			border-radius: 7px;
 
-				image {
-					width: 100%;
-					height: 100%;
-					border-radius: 7px;
-				}
-			}
+	// 			image {
+	// 				width: 100%;
+	// 				height: 100%;
+	// 				border-radius: 7px;
+	// 			}
+	// 		}
 
-			.o-l-main {
-				width: calc(100% - 85px);
-				height: 80px;
-				display: flex;
-				// align-items: center;
-				justify-content: center;
-				flex-direction: column;
+	// 		.o-l-main {
+	// 			width: calc(100% - 85px);
+	// 			height: 80px;
+	// 			display: flex;
+	// 			// align-items: center;
+	// 			justify-content: center;
+	// 			flex-direction: column;
 
-				.o-l-m-up {
-					height: 30px;
-					font-size: 16px;
-				}
-			}
-		}
+	// 			.o-l-m-up {
+	// 				height: 30px;
+	// 				font-size: 16px;
+	// 			}
+	// 		}
+	// 	}
 
-		.onve-right {
-			width: 25%;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			flex-direction: column;
+	// 	.onve-right {
+	// 		width: 25%;
+	// 		display: flex;
+	// 		align-items: center;
+	// 		justify-content: center;
+	// 		flex-direction: column;
 
-			view {
-				margin-top: 10px;
-			}
-		}
+	// 		view {
+	// 			margin-top: 10px;
+	// 		}
+	// 	}
 
-		// .onceUp {
-		// 	width: 100%;
-		// 	height: 25%;
-		// 	padding-bottom: 5px !important;
-		// 	border-bottom: 1px solid #d0d0d0;
-		// }
+	// 	// .onceUp {
+	// 	// 	width: 100%;
+	// 	// 	height: 25%;
+	// 	// 	padding-bottom: 5px !important;
+	// 	// 	border-bottom: 1px solid #d0d0d0;
+	// 	// }
 
-		// .onceMain {
-		// 	width: 100%;
-		// 	height: 80%;
-		// 	display: flex;
-		// 	align-items: center;
-		// 	justify-content: center;
+	// 	// .onceMain {
+	// 	// 	width: 100%;
+	// 	// 	height: 80%;
+	// 	// 	display: flex;
+	// 	// 	align-items: center;
+	// 	// 	justify-content: center;
 
-		// 	.o-m-left {
-		// 		width: 80%;
-		// 		height: 100%;
-		// 		border: 1 solid #d0d0d0;
-		// 		display: flex;
-		// 		// align-items: center;
-		// 		justify-content: center;
-		// 		flex-direction: column;
+	// 	// 	.o-m-left {
+	// 	// 		width: 80%;
+	// 	// 		height: 100%;
+	// 	// 		border: 1 solid #d0d0d0;
+	// 	// 		display: flex;
+	// 	// 		// align-items: center;
+	// 	// 		justify-content: center;
+	// 	// 		flex-direction: column;
 
-		// 		view {
-		// 			margin-top: 2.5px;
-		// 			padding-bottom: 2.5px;
-		// 		}
-		// 	}
-		// }
+	// 	// 		view {
+	// 	// 			margin-top: 2.5px;
+	// 	// 			padding-bottom: 2.5px;
+	// 	// 		}
+	// 	// 	}
+	// 	// }
 
-	}
+	// }
 
-	.orange {
-		color: orange;
-	}
+	// .orange {
+	// 	color: orange;
+	// }
 
-	.green {
-		color: #00ba15;
-	}
+	// .green {
+	// 	color: #00ba15;
+	// }
 </style>
diff --git a/pages/grabOrders/inPage/page0.vue b/pages/grabOrders/inPage/page0.vue
new file mode 100644
index 0000000..2750089
--- /dev/null
+++ b/pages/grabOrders/inPage/page0.vue
@@ -0,0 +1,158 @@
+<template>
+	<view class="onveMain">
+
+
+		<view class="once" v-for="(item,index) in listData" :key="index" @click="openOnce(item)">
+			<view class="onve-left">
+				<view class="o-l-img">
+					<image :src="item.url" mode=""></image>
+				</view>
+				<view class="o-l-main">
+					<view class="o-l-m-up">
+						{{item.rname}}
+					</view>
+					<view class="o-l-m-center">
+						<u-icon name="order" color="#d0d0d0" size="28"></u-icon>
+						人数:{{item.num}}/ {{item.jnum}}
+					</view>
+					<view class="o-l-m-center">
+						<u-icon name="volume" color="#d0d0d0" size="28"></u-icon>
+						时间:{{item.time.slice(0,10)}}
+					</view>
+				</view>
+			</view>
+			<view class="onve-right">
+				<u-button :class="[swiperCurrent == 0?'orange':'green']" size="mini"
+					@click="getOrders(swiperCurrent,item)">
+					{{swiperCurrent == 0?"上传反馈":'我要参与'}}
+				</u-button>
+				<view class="o-r-$">
+					积分:{{item.integral}}
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: ["listData", "swiperCurrent"],
+		methods: {
+			openOnce(val) {
+				this.$emit("openOnce", val);
+			},
+			getOrders(val,item) {
+				let b = {
+					val:val,
+					item:item
+				}
+				this.$emit("getOrders", b);
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.onveMain{
+		width: 100%;
+		height: auto;
+	}
+	.once {
+		width: calc(100% - 10px);
+		height: 100px;
+		border: 1px solid #d0d0d0;
+		padding: 8px;
+		box-sizing: border-box;
+		margin: 5px;
+		border-radius: 8px;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+
+		.onve-left {
+			width: 75%;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+
+			.o-l-img {
+				width: 80px;
+				height: 80px;
+				background-color: #d0d0d0;
+				margin-right: 5px;
+				border-radius: 7px;
+
+				image {
+					width: 100%;
+					height: 100%;
+					border-radius: 7px;
+				}
+			}
+
+			.o-l-main {
+				width: calc(100% - 85px);
+				height: 80px;
+				display: flex;
+				// align-items: center;
+				justify-content: center;
+				flex-direction: column;
+
+				.o-l-m-up {
+					height: 30px;
+					font-size: 16px;
+				}
+			}
+		}
+
+		.onve-right {
+			width: 25%;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex-direction: column;
+
+			view {
+				margin-top: 10px;
+			}
+		}
+
+		// .onceUp {
+		// 	width: 100%;
+		// 	height: 25%;
+		// 	padding-bottom: 5px !important;
+		// 	border-bottom: 1px solid #d0d0d0;
+		// }
+
+		// .onceMain {
+		// 	width: 100%;
+		// 	height: 80%;
+		// 	display: flex;
+		// 	align-items: center;
+		// 	justify-content: center;
+
+		// 	.o-m-left {
+		// 		width: 80%;
+		// 		height: 100%;
+		// 		border: 1 solid #d0d0d0;
+		// 		display: flex;
+		// 		// align-items: center;
+		// 		justify-content: center;
+		// 		flex-direction: column;
+
+		// 		view {
+		// 			margin-top: 2.5px;
+		// 			padding-bottom: 2.5px;
+		// 		}
+		// 	}
+		// }
+
+	}
+
+	.orange {
+		color: orange;
+	}
+
+	.green {
+		color: #00ba15;
+	}
+</style>
diff --git a/pages/grabOrders/inPage/page1.vue b/pages/grabOrders/inPage/page1.vue
new file mode 100644
index 0000000..5d039b7
--- /dev/null
+++ b/pages/grabOrders/inPage/page1.vue
@@ -0,0 +1,157 @@
+<template>
+	<view class="onveMain">
+
+		<view class="once" v-for="(item,index) in listData" :key="index" @click="openOnce(item)">
+			<view class="onve-left">
+				<view class="o-l-img">
+					<image :src="item.url" mode=""></image>
+				</view>
+				<view class="o-l-main">
+					<view class="o-l-m-up">
+						{{item.rname}}
+					</view>
+					<view class="o-l-m-center">
+						<u-icon name="order" color="#d0d0d0" size="28"></u-icon>
+						人数:{{item.num}}/ {{item.jnum}}
+					</view>
+					<view class="o-l-m-center">
+						<u-icon name="volume" color="#d0d0d0" size="28"></u-icon>
+						时间:{{item.time.slice(0,10)}}
+					</view>
+				</view>
+			</view>
+			<view class="onve-right">
+				<u-button :class="[swiperCurrent == 0?'orange':'green']" size="mini"
+					@click="getOrders(swiperCurrent,item)">
+					{{swiperCurrent == 0?"上传反馈":'我要参与'}}
+				</u-button>
+				<view class="o-r-$">
+					积分:{{item.integral}}
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: ["listData", "swiperCurrent"],
+		methods: {
+			openOnce(val) {
+				this.$emit("openOnce", val);
+			},
+			getOrders(val,item) {
+				let b = {
+					val:val,
+					item:item
+				}
+				this.$emit("getOrders", b);
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.onveMain{
+		width: 100%;
+		height: auto;
+	}
+	.once {
+		width: calc(100% - 10px);
+		height: 100px;
+		border: 1px solid #d0d0d0;
+		padding: 8px;
+		box-sizing: border-box;
+		margin: 5px;
+		border-radius: 8px;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+
+		.onve-left {
+			width: 75%;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+
+			.o-l-img {
+				width: 80px;
+				height: 80px;
+				background-color: #d0d0d0;
+				margin-right: 5px;
+				border-radius: 7px;
+
+				image {
+					width: 100%;
+					height: 100%;
+					border-radius: 7px;
+				}
+			}
+
+			.o-l-main {
+				width: calc(100% - 85px);
+				height: 80px;
+				display: flex;
+				// align-items: center;
+				justify-content: center;
+				flex-direction: column;
+
+				.o-l-m-up {
+					height: 30px;
+					font-size: 16px;
+				}
+			}
+		}
+
+		.onve-right {
+			width: 25%;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex-direction: column;
+
+			view {
+				margin-top: 10px;
+			}
+		}
+
+		// .onceUp {
+		// 	width: 100%;
+		// 	height: 25%;
+		// 	padding-bottom: 5px !important;
+		// 	border-bottom: 1px solid #d0d0d0;
+		// }
+
+		// .onceMain {
+		// 	width: 100%;
+		// 	height: 80%;
+		// 	display: flex;
+		// 	align-items: center;
+		// 	justify-content: center;
+
+		// 	.o-m-left {
+		// 		width: 80%;
+		// 		height: 100%;
+		// 		border: 1 solid #d0d0d0;
+		// 		display: flex;
+		// 		// align-items: center;
+		// 		justify-content: center;
+		// 		flex-direction: column;
+
+		// 		view {
+		// 			margin-top: 2.5px;
+		// 			padding-bottom: 2.5px;
+		// 		}
+		// 	}
+		// }
+
+	}
+
+	.orange {
+		color: orange;
+	}
+
+	.green {
+		color: #00ba15;
+	}
+</style>
diff --git a/pages/grabOrders/map.vue b/pages/grabOrders/map.vue
index 9288e85..5b4cb8d 100644
--- a/pages/grabOrders/map.vue
+++ b/pages/grabOrders/map.vue
@@ -19,11 +19,11 @@
 			// console.log(options.data);
 			if (options.data == undefined) {
 				data =
-					'{"id":7,"rname":"巡逻青山湖校区","content":"巡逻青山湖校区","time":"2021-11-02 16:31:47","province":"江西省","city":"南昌市","district":"青山湖区","jnum":2,"line":"LINESTRING(115.95983713142935 28.674674492655765,115.96086709969107 28.7012820060835,115.97254007332388 28.701625328837405,115.97305505745474 28.68875072556592,115.96704690926138 28.68274257737256,115.96739023201529 28.674674492655765,115.9600087928063 28.674846154032718,115.95983713142935 28.674846154032718)","raddress":null,"rtype":"0","serid":"1416311615662448641,1123598821738675201","num":2,"integral":"100","url":"http://223.82.109.183:2081/zhba/upload/20211102/7050fe68e5d1e9921a3e93329996a943.png","current":0}'
+					'{"id":7,"rname":"无数据","content":"无数据","time":"2021-11-02 16:31:47","province":"江西省","city":"南昌市","district":"青山湖区","jnum":2,"line":"LINESTRING(115.95983713142935 28.674674492655765,115.96086709969107 28.7012820060835,115.97254007332388 28.701625328837405,115.97305505745474 28.68875072556592,115.96704690926138 28.68274257737256,115.96739023201529 28.674674492655765,115.9600087928063 28.674846154032718,115.95983713142935 28.674846154032718)","raddress":null,"rtype":"0","serid":"1416311615662448641,1123598821738675201","num":2,"integral":"100","url":"http://223.82.109.183:2081/zhba/upload/20211102/7050fe68e5d1e9921a3e93329996a943.png","current":0}'
 			} else {
 				data = options.data;
 			}
-			console.log(data);
+			// console.log(data);
 			// return
 			// console.log(options.html)
 			// var a = options.html != undefined ? options.html : "xcxMapJQ/xcxmap.html";
@@ -35,6 +35,9 @@
 			// this.dataList = data;
 			// console.log(this.urls);
 		},
+		beforeDestroy() {
+			this.$store.commit("changegotuGrabOrders");
+		}
 	}
 </script>
 
diff --git a/pages/home/home.vue b/pages/home/home.vue
index c29b4bc..116fb7f 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -114,7 +114,7 @@
 		</view>
 
 		<!-- 底部导航条 -->
-		<u-tabbar :list="tabbar" :mid-button="false" height="50px" icon-size="40"></u-tabbar>
+		<u-tabbar :list="tabbar" :mid-button="true" height="50px" icon-size="40"></u-tabbar>
 	</view>
 </template>
 
diff --git a/store/mutations.js b/store/mutations.js
index f3ed1b9..9b8da45 100644
--- a/store/mutations.js
+++ b/store/mutations.js
@@ -22,12 +22,16 @@
 		state.message.useName = '过客 ';
 		WxStorage.clear();
 	},
-	getUse(state,data){
+	getUse(state, data) {
 		state.puserName = data.userName;
 		state.puserID = data.userID;
 	},
-	getUserData(state,data){
+	getUserData(state, data) {
 		state.UserData = data;
+	},
+	changegotuGrabOrders(state, data) {
+		// console.log(2123131)
+		state.gotuGrabOrders = !state.gotuGrabOrders;
 	}
 }
 
diff --git a/store/state.js b/store/state.js
index 53c5b52..638ed61 100644
--- a/store/state.js
+++ b/store/state.js
@@ -4,9 +4,9 @@
 		useName: '过客',
 	},
 	logPath: '',
-	piAPI: 'http://223.82.109.183:2082/api/',
+	// piAPI: 'http://223.82.109.183:2082/api/',
 	// piAPI: 'http://192.168.0.107:85', //唐
-	// piAPI: '/api', //本地转发
+	piAPI: '/api', //本地转发
 	//piAPI: 'http://s16s652780.51mypc.cn/api/',
 	//piAPI: 'http://192.168.0.113:83/',
 	//piAPI: 'http://192.168.0.111:83/',
@@ -46,7 +46,8 @@
 			iconPath: "/static/tabbar/my.png",
 			selectedIconPath: "/static/tabbar/my-blue.png"
 		}
-	]
+	],
+	gotuGrabOrders: false
 }
 
 export default state

--
Gitblit v1.9.3