zhengkaixin hace 2 años
padre
commit
7b874150b9
Se han modificado 8 ficheros con 1288 adiciones y 40 borrados
  1. 1 1
      .env.dev.js
  2. 11 10
      .env.js
  3. 1 1
      .env.prod.js
  4. 41 1
      components/Carmap.vue
  5. 9 0
      pages.json
  6. 7 27
      pages/route/index.js
  7. 582 0
      pages/route2/index.js
  8. 636 0
      pages/route2/index.vue

+ 1 - 1
.env.dev.js

@@ -1,6 +1,6 @@
 const UNI_APP = {  
 	
-    BASE_URL: 'http://192.168.77.199:8080/ds-gps/' ,
+    BASE_URL: 'http://192.168.77.162:8096/smart-bus-server/' ,
 	NODE_ENV :"dev",
 	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
 	//企业联合会微信appid

+ 11 - 10
.env.js

@@ -13,16 +13,17 @@
     } else if (process.env.NODE_ENV === "production") {  
 		
 		
-		var url=window.location.href.split('#')[0];
-		if(url.indexOf("http://xpgj.xiaoxinda.com/jp-car/")==0){
-			ENV_VAR = require('.env.prod.js'); 
-		}else if(url.indexOf("http://xpgj.xiaoxinda.com/jp-car-test/")==0){
-			 ENV_VAR = require('.env.uat.js'); 
-		} else if (NODE_ENV === 'uat') {
-		    ENV_VAR = require('.env.uat.js');  
-		} else  {  
-			ENV_VAR = require('.env.prod.js');  
-		} 
+		// var url=window.location.href.split('#')[0];
+		// if(url.indexOf("http://xpgj.xiaoxinda.com/jp-car/")==0){
+		// 	ENV_VAR = require('.env.prod.js'); 
+		// }else if(url.indexOf("http://xpgj.xiaoxinda.com/jp-car-test/")==0){
+		// 	 ENV_VAR = require('.env.uat.js'); 
+		// } else if (NODE_ENV === 'uat') {
+		//     ENV_VAR = require('.env.uat.js');  
+		// } else  {  
+		// 	ENV_VAR = require('.env.prod.js');  
+		// } 
+		ENV_VAR = require('.env.prod.js'); 
       
     }  
 

+ 1 - 1
.env.prod.js

@@ -1,6 +1,6 @@
 const UNI_APP = {  
 	
-	BASE_URL: 'http://121.37.187.149/smart-bus-server/' ,
+	BASE_URL: 'http://47.98.231.198:9090/ds-commute/' ,
 	NODE_ENV :"prod",
 	SIMPLE_RUN:false,
 	//企业联合会微信appid

+ 41 - 1
components/Carmap.vue

@@ -53,6 +53,7 @@
 				}], 
 				start:{},
 				end:{},
+				ifCenterItem:null,
 				carList:[],
 				covers: [
 					{
@@ -117,6 +118,42 @@
 				this.start.setPosition( [sz[0].longitude,sz[0].latitude]);
 			this.end.setPosition( [sz[sz.length-1].longitude,sz[sz.length-1].latitude]);
 			
+			},
+			clickHandler(){
+				var _this = this;
+				
+				var item=_this.ifCenterItem
+				if(_this.mapbus&&item){
+					var map=_this.mapbus
+					var MapData={
+						lat:item.latitude,
+						lng:item.longitude,
+					}
+					if(map.getBounds().southwest.lat < MapData.lat &&
+					           MapData.lat < map.getBounds().northeast.lat &&
+					           map.getBounds().southwest.lng < MapData.lng &&
+					           MapData.lng < map.getBounds().northeast.lng){
+								   console.log("true   ifCenter")
+						
+					}else{
+						_this.mapbus.setCenter([item.longitude,item.latitude]);
+						
+						  console.log("false   ifCenter")
+					}
+					
+							   
+				
+					return true
+				}else{
+					return false
+				}
+			},
+			ifCenter(item){
+				console.log("ifCenterifCenter")
+				this.ifCenterItem=item
+				
+				
+												
 			},
 			setCenter(item){
 				if(this.mapbus){
@@ -278,7 +315,7 @@
 						document.getElementsByClassName("amap-logo")[0].setAttribute("class","amap-copyright" );
 						
 					}
-
+					
 					this.$emit('onload')
 				}, e => {
 					//_this.mui.toast('地图加载失败');
@@ -347,6 +384,9 @@
 						//strokeStyle: "solid"  //线样式
 					});
 					
+					
+					_this.mapbus.on('touchend',this.clickHandler); 
+					
 					this.$emit('onload')
 				}, e => {
 					//_this.mui.toast('地图加载失败');

+ 9 - 0
pages.json

@@ -12,6 +12,15 @@
 		        "enablePullDownRefresh": false
 		    }    
 		},
+		{
+			//路线详情
+		    "path" : "pages/route2/index",
+		    "style" :                                                                                    
+		    {
+		       // "navigationBarTitleText": "路线详情",
+		        "enablePullDownRefresh": false
+		    }    
+		},
 		{
 			"name":"IndexIndex",
 			"path": "pages/index/index",

+ 7 - 27
pages/route/index.js

@@ -211,7 +211,11 @@ export default {
 			}
 			 
 			API.routeShiftList(obj).then((response) => {
+				if(this.carList.length==0){
+					this.$refs.amap.setCenter(response.data);
+				}
 				this.carList=[response.data];
+				this.$refs.amap.ifCenter(this.carList[0]);
 				
 				if(!this.centerBl&&this.carList.length){
 					this.centerBl=this.$refs.amap.setCenter(this.carList[0]);
@@ -385,34 +389,10 @@ export default {
 			this.caritemBl=true;
 	
 		},
-		carShow(item){
+		carShow(item){
+			this.$refs.amap.setCenter(item);
 			return
-			var caritem =null;
-			for(var i in this.carList){
-				var car= this.carList[i]
-				if(car.currentStationId==this.stationList[this.stationList.length-1].id&&car.currentStationStatus==3 ){
-					if(car.currentStationId==item.id){
-						var caritem=car;
-						break
-					}
-				}else if(car.currentStationStatus==3){
-					if(car.currentStationId2==item.id){
-						var caritem=car;
-						break
-					}
-				}else{
-					if(car.currentStationId==item.id){
-						var caritem=car;
-						break
-					}
-				}
-				
-				
-			}
-			this.caritem=caritem;
-			this.caritemBl=true;
-			
-			
+		
 		},
 		reverse(){
 			this.centerBl=false;

+ 582 - 0
pages/route2/index.js

@@ -0,0 +1,582 @@
+ import * as API from '@/apis/route.js'
+  import * as API_index from '@/apis/index.js'
+ import * as WxJsApi from '@/utils/wxJsApi.js'
+ 
+import Carmap from '@/components/Carmap.vue'
+
+export default {
+	data() {
+		return {
+			wxinit:false,
+			mapopen:false,
+			initBl: false,
+			title: '乘车人',
+			show: false,
+			id: 0, // 使用 marker点击事件 需要填写id
+			upid:'',
+			downid:'',
+			downItem:{},
+			//地图居中后的位置
+			longitude: 112.276527,
+			latitude: 30.306427,
+			show1: false,
+			show2: false,
+			centerBl:false,
+			shiftInfo: {
+
+			},
+			remindList:[],
+			list: [{}, {}],
+			 carList:[],
+			caritem:{
+				driverInfo:{}
+			},
+			caritemBl:false,
+			stationList: [],
+			routeTimeTableList:[],
+			dis:'',
+			//个人
+			info: {
+				obj: null,
+				init: true,
+				longitude: '',
+				latitude: '',
+			},
+			reverseInit:false,
+			myinterval: '',
+			routeInfo:{},
+			popid:0,
+			radiolist: [
+					{
+						name: '不提醒',
+						isRemind: "0",
+					},
+					{
+						name: '提前1站',
+						isRemind: "1",
+					},
+					{
+						name: '提前2站',
+						isRemind: "2",
+					}
+				]
+
+		}
+	},
+	components: {
+		Carmap
+	},
+
+	methods: {
+		selectBtn(i){
+			
+			this.popid=i;
+			
+			this.$forceUpdate()
+		},
+		makePhoneCall(tel){
+			uni.makePhoneCall({
+			    phoneNumber: tel //仅为示例
+			});
+		},
+		radioChange(e){
+			console.log(e)
+		},
+		vehicleStationDis(){
+			
+			if(this.stationList[0].id==this.downItem.id&&this.routeTimeTableList&&this.routeTimeTableList.length){
+				
+				
+				var nowDate =new Date();
+				var curDay=nowDate.getFullYear()+"-"+(nowDate.getMonth()+1)+"-"+nowDate.getDate();
+				var startDate =null;
+				
+				for(var i in this.routeTimeTableList){
+					var obj=this.routeTimeTableList[i]
+					var objDate =new Date(curDay+" "+obj.startTime+":00");
+					
+					if(nowDate.getTime()<objDate.getTime()){
+						if(startDate==null){
+							startDate=objDate;
+						}
+						if(objDate<startDate){
+							startDate=objDate;
+						}
+					}
+				}
+				
+				if(startDate==null){
+					this.dis="今日发车已经结束,明日发车时间"+this.routeInfo.startTime
+				}else{
+					console.log(startDate)
+						console.log(nowDate)
+					var d=  parseInt((startDate.getTime()-nowDate.getTime())/1000/60)
+					this.dis="等待发车... 大约"+d+"分钟发车"
+				}
+				
+			}else{
+				var obj={
+					startStationId:this.stationList[0].id,
+					currentStationId :this.downItem.id,
+					routeId:this.routeInfo.id,
+				}
+				//this.$refs.common.showLoading();
+				API.vehicleStationDis(obj).then((res) => {
+					this.dis=res.data;
+					//this.$refs.common.showLoading(false);
+				}).catch(error => {
+						this.$refs.common.showLoading(false,error);			
+				}) 
+			}
+			
+		},
+		radioGroupChange(){
+			
+			this.downItem.isRemind=this.popid;
+			var item= this.downItem
+			
+			if(item.isRemind==0){
+				if(this.downItem.remindId){
+					this.del(item.remindId,item.isRemind!=0)
+				}else{
+					this.show1 = false
+					this.$forceUpdate()
+				}
+				return
+			}
+			if(item.remindId){
+				this.del(item.remindId,item.isRemind!=0)
+			}else{
+				this.remindAdd()	
+			}
+			
+		},del(id,bl){
+				API_index.cancelRemind(id).then((res) => {
+					this.downItem.remindId=""
+					if(bl){
+						this.remindAdd()	
+					}else{
+						this.show1 = false
+						this.$forceUpdate()
+						this.$refs.common.alert( "设置成功");
+					}
+				}).catch(error => {
+						this.$refs.common.alert( error);
+				}) 
+			},
+			 
+		remind(){
+			 var myBtn = document.getElementById("subscribe-btn").tap();
+			 myBtn.tap();
+		},
+		showCar(item){
+			 
+			for(var i in this.carList){
+				var car= this.carList[i]
+				
+				if(car.currentStationStatus=="3"){
+					if(car.currentStationId==this.stationList[this.stationList.length-1].id&&car.currentStationId==item.id){
+					
+						return true;
+					}else 	if(car.currentStationId2==item.id){
+						
+						return true;
+					}
+				}else{
+					if(car.currentStationId==item.id){
+						return true;
+					}
+				}
+				
+				
+			}
+			return false;
+		},
+		showname(name){
+			if(!name){
+				return "";
+			}
+		
+			return name.substring(0,1)+'师傅';
+		},
+		getCar(){
+			
+			if(this.stationList.length==0){
+				return;
+			}
+			var obj={
+				routeId:this.id,
+				startStationId:this.stationList[0].id,
+			}
+			 
+			API.routeShiftList(obj).then((response) => {
+				
+				this.carList=response.data;
+				this.$refs.amap.ifCenter(this.carList[0]);
+				
+				if(!this.centerBl&&this.carList.length){
+					this.centerBl=this.$refs.amap.setCenter(this.carList[0]);
+					
+					this.$refs.amap.ifCenter(this.carList[0]);
+				
+					//this.centerBl=true;
+					if(this.centerBl){
+						document.getElementById('map-route-main').scrollLeft = 0
+						this.$nextTick(function() {
+							const query = uni.createSelectorQuery().in(this);
+							query.select('.map-route-car').boundingClientRect(data => {
+								if(data){
+									document.getElementById('map-route-main').scrollLeft = data.left-100;
+								}
+								
+								//this.downBtn()
+							}).exec();
+						});
+					}
+				}
+				
+					//car.currentStationId=this.stationList[this.stationList.length-1].id
+					//car.currentStationStatus="1";
+					
+					// this.carList=[];
+					// this.carList.push({
+					// 	currentStationId:"9e5be927-178b-4163-a34b-49bba6460eec",
+					// 	currentStationStatus:"1"
+						
+					// })
+					// this.carList.push({
+					// 	currentStationId:"ff2251e0-26ca-41ad-a4a0-43ece7ab3471",
+					// 	currentStationStatus:"2"
+						
+					// })
+					for(var j in this.stationList){
+						var station =this.stationList[j];
+						 station.currentStationStatus="1";
+					}
+					console.log("this.stationList")
+					
+					console.log(this.stationList)
+						console.log("this.stationList")
+					for(var j in this.stationList){
+						
+						var station =this.stationList[j];
+						// station.currentStationStatus="1";
+						 
+						for(var i in this.carList){
+							var car =this.carList[i];
+							
+						
+						if(car.currentStationId==station.id){
+							console.log(car.licensePlateNumber+"------"+station.name)
+							if(car.currentStationStatus==3){
+								
+								if(eval(j+"+"+1)!=this.stationList.length){
+									console.log(this.stationList[eval(j+"+"+1)].id);
+									car.currentStationId2=this.stationList[eval(j+"+"+1)].id
+									this.stationList[eval(j+"+"+1)].currentStationStatus="2";
+								
+									console.log("--------this.carList----A------"+car.licensePlateNumber)
+									
+									
+								}else{
+									car.currentStationStatus=1
+									this.stationList[j].currentStationStatus="1";
+									console.log("--------this.carList----B------"+car.licensePlateNumber)
+									
+								}
+								
+								
+							}else{
+								this.stationList[j].currentStationStatus=car.currentStationStatus;
+								console.log("--------this.carList----c------"+car.licensePlateNumber)
+								
+							}
+							
+							break;
+						}
+					}
+					
+				}
+				console.log("--------this.carList----------")
+				console.log(this.carList)
+				console.log("--------this.carList----------")
+				
+				this.$refs.amap.setCarList(this.carList);
+				this.vehicleStationDis();
+			}).catch(error => {
+				console.log(error);
+				this.$refs.common.showLoading(false,error)
+			})
+		},
+		mapopenBtn(){
+			this.mapopen=!this.mapopen;
+			if(this.mapopen){
+				this.$refs.amap.setMyStyle("width: 100%; height: 340px;")
+			}else{
+				this.$refs.amap.setMyStyle("width: 100%; height: 140px;")
+				
+			}
+		},
+		downBtn(item) {
+			
+			this.$refs.amap.setSite(item);
+			this.$refs.amap.setCenter(item);
+			this.downid=item.id;
+			this.downItem=item;
+			this.vehicleStationDis();
+			this.$forceUpdate()
+		},
+		remindAdd(){
+			if(this.downItem.id){
+			
+				var obj={
+					startStationId:this.stationList[0].id,
+					endStationId:this.stationList[this.stationList.length-1].id,
+					remindStationId :this.downItem.id,
+					stopInAdvance:this.downItem.isRemind,
+					remindType:"1",
+					routeId:this.routeInfo.id,
+					openId:this.carhelp.getOpenId()
+				}
+				API_index.saveRemind(obj).then((res) => {
+					this.downItem.remindId=res.data.id
+					this.$refs.common.alert( "设置成功");
+					this.show1 = false
+					this.$forceUpdate()
+				}).catch(error => {
+						this.$refs.common.alert( error);
+				}) 
+			}
+		},
+		
+		drawing(point, startend) {
+			if (this.$refs.amap) {
+				this.$refs.amap.initMap(point, this.stationList,startend);
+			}
+		},
+		carShow2(item){
+			console.log(item)
+			if(item.type=="car"){
+				setTimeout(()=>{
+					this.carShow3(item.obj)
+				}, 100);
+			}
+			if(item.type=="point"){
+				
+				setTimeout(()=>{
+					this.downBtn(item.obj)
+					document.getElementById('map-route-main').scrollLeft = 0
+					
+					this.$nextTick(function() {
+						const query = uni.createSelectorQuery().in(this);
+						query.select('.map-down').boundingClientRect(data => {
+							if(data){
+								document.getElementById('map-route-main').scrollLeft = data.left-100;
+							}
+							this.$refs.common.showLoading(false);
+							//this.downBtn()
+						}).exec();
+					});
+				}, 100);
+			}
+			
+		},
+		carShow3(item){
+			
+			var caritem =item;
+		
+			this.caritem=caritem;
+			this.caritemBl=true;
+	
+		},
+		carShow(item){
+			
+			
+			this.$refs.amap.setCenter(item);
+			
+		},
+		reverse(){
+			this.centerBl=false;
+			this.stationList.reverse();
+			this.getCar()
+			 this.passengerShiftRemindList();
+			
+			this.$refs.amap.setStartend(this.stationList);
+			document.getElementById('map-route-main').scrollLeft = 0
+			this.$nextTick(function() {
+				const query = uni.createSelectorQuery().in(this);
+				query.select('.map-down').boundingClientRect(data => {
+					if(data){
+						document.getElementById('map-route-main').scrollLeft = data.left-100;
+					}
+					this.$refs.common.showLoading(false);
+					//this.downBtn()
+				}).exec();
+			});
+			
+		},
+		 setRemind(){
+			 for(var i in this.stationList){
+			 	var item=this.stationList[i];
+				item.isRemind=0;
+				item.remindId="";
+			 	for(var j in this.remindList){
+			 			var obj=this.remindList[j];	
+						if(this.stationList[0].id==obj.startStationId&&obj.remindType==1){
+							if(obj.remindStationId==item.id){
+								item.remindId=obj.id;
+								item.isRemind=obj.stopInAdvance;
+							}
+						}
+			 	}
+			 
+			 }
+			 this.$forceUpdate()
+		 },
+		 passengerShiftRemindList(){
+			 	this.$refs.common.showLoading()
+			 API.passengerShiftRemindList({
+			 	routeId:this.id,
+			 	openId:this.carhelp.getOpenId(),
+			 }).then((response) => {
+			 	this.remindList=response.data;
+			 	this.setRemind();
+					this.$refs.common.showLoading(false)
+			 })
+		 },
+		getPassengerInfo() {
+			
+			this.$refs.common.showLoading()
+				
+			API.routeDetail(this.id).then((response) => {
+				 
+				var  list=response.data.stationInfoList;
+				if(this.upid&&list.length){
+					
+					if(this.upid==list[list.length-1].id){
+						list.reverse();
+					}
+					this.upid="";
+				}
+				this.stationList=list;
+				for(var i in list){
+					list[i].isRemind=0;
+					if(list[i].id==this.downid){
+						this.downItem=list[i];
+					}			
+				}
+				this.passengerShiftRemindList();
+				
+				this.$refs.common.showLoading(false)
+				
+				var point = [];
+				this.routeInfo=response.data.routeInfo;
+				this.routeTimeTableList=response.data.routeTimeTableList;
+				this.title=this.routeInfo.name;
+				if(!response.data.routeInfo.mapPath){
+					this.$refs.common.showLoading(false,"路线加载失败!")
+					return;
+				}
+				response.data.routeInfo.mapPath.split("|").forEach((item) => {
+					var sz = item.split(",");
+				
+					point.push({
+						longitude: sz[0],
+						latitude: sz[1],
+					})
+				})
+				var startend = [{
+					longitude: this.stationList[0].longitude,
+					latitude: this.stationList[0].latitude,
+					name: this.stationList[0].name
+				}, {
+					longitude: this.stationList[this.stationList.length-1].longitude,
+					latitude: this.stationList[this.stationList.length-1].latitude,
+					name: this.stationList[this.stationList.length-1].name
+				}];
+				
+				this.drawing(point,startend);
+				this.$refs.common.showLoading(false)
+				
+				//this.getPoint()
+				
+			
+				
+			}).catch(error => {
+				this.$refs.common.showLoading(false,error)
+			})
+		},
+		mapdown(){
+			this.getPoint();
+			
+				if(this.downid=="null"){
+					this.downid="";
+				}else{
+					this.centerBl=true;
+				}
+			if(this.downid){
+				this.downBtn(this.downItem)
+			}
+			
+		},
+		getPoint() {
+			
+			if (!this.info.init) {
+				WxJsApi.getWxConfig([ 'getLocation','getSetting']).then(() => {
+					// this.$refs.common.showLoading(false)
+					this.getLocation()
+				});
+			}else{
+					this.getLocation()
+			}
+			this.getCar();
+			var pages = getCurrentPages();
+			var page = (pages[pages.length - 1]).route;
+			if (page == "pages/route2/index") {
+				setTimeout(this.getPoint, 10000);
+			}
+		},
+		getLocation(){
+			WxJsApi.getLocation().then((res) => {
+				console.log("----getLocation ok-----")
+				var latitude = parseFloat(res.latitude);
+				var longitude = parseFloat(res.longitude);
+			
+				if (!this.info.init) {
+					this.latitude = latitude;
+					this.longitude = longitude;
+				}
+				this.info.init = true
+				this.info.latitude = latitude;
+				this.info.longitude = longitude;
+			
+				this.$refs.amap.setPerson(this.info,true);
+			
+			}).catch(error => {
+				console.log(error)
+			})
+		}
+
+	},
+	onLoad(op) {
+		this.upid=op.upid;
+		this.id = op.id
+		this.downid=op.downid;
+	},
+	onUnload() {
+		if (this.myinterval) {
+			clearInterval(this.myinterval)
+		}
+	},
+	onReady() {
+		WxJsApi.getWxConfig([ 'getLocation','getSetting']).then(() => {
+					// this.$refs.common.showLoading(false)
+					this.wxinit=true;
+				
+					
+				});	
+		
+		this.getPassengerInfo()
+		
+	}
+}

+ 636 - 0
pages/route2/index.vue

@@ -0,0 +1,636 @@
+<template>
+	<view>
+		<car-common    ref="common"    ></car-common>
+	 
+		<u-popup v-model="show1" mode="center" border-radius="20">
+					<view class="sitePopup">
+						<view class="sitePopup-head">
+							<h4>{{title}}</h4>
+							<p v-if="stationList.length">开往:{{stationList[stationList.length-1].name}} </p>
+							<p v-if="stationList.length">上车站点:{{downItem.name}}</p>
+							
+						</view>
+						<view class="sitePopup-main">
+							<view class="remind-item-bg remind-item-bg1 ":class="popid==0?'active':''"  @click="selectBtn(0)" >							
+								<view class="remind-item remind-item1">
+									<u-icon name="icon_tixing-01" custom-prefix="custom-icon" size="72"  color="#fff"></u-icon>
+									<span>无提醒</span>
+								</view>
+							</view>
+							<view class="remind-item-bg remind-item-bg2 " :class="popid==1?'active':''" @click="selectBtn(1)">	
+								<view class="remind-item remind-item2">
+									<u-icon name="icon_tixing-02" custom-prefix="custom-icon" size="72"  color="#fff"></u-icon>
+									<span>距离1站</span>
+								</view>
+							</view>
+							<view class="remind-item-bg remind-item-bg3" :class="popid==2?'active':''" @click="selectBtn(2)">
+								<view class="remind-item remind-item3">
+									<u-icon name="icon_tixing-03" custom-prefix="custom-icon" size="72"  color="#fff"></u-icon>
+									<span>距离2站</span>
+								</view>
+							</view>
+						</view>
+						<view class="sitePopup-foot">
+							<view class="sitePopup-btn" @click="show1 = false">取消</view>
+							<view class="sitePopup-btn" @click="radioGroupChange">确定</view>
+						</view>
+					</view>
+				</u-popup>
+			 
+				
+				<u-popup v-model="caritemBl" v-if="stationList.length" mode="center" closeable="true" border-radius="20">
+					<view class="sitePopup">
+						<view class="sitePopup-head">
+							<h1>{{stationList[0].name}} → {{stationList[stationList.length-1].name}}</h1>
+							<p>首班:{{routeInfo.startTime}}  末班:{{routeInfo.endTime}}</p>
+						</view>
+						<view class="sitePopup-main">
+							<view class="sitePopup-driver">				
+								<view class="driver-info">
+									<view class="driver-head">
+										<u-avatar :src="caritem.driverInfo.faceImage" size="100"></u-avatar>
+									</view>
+									<view class="driver-text">
+										<h2>{{caritem.licensePlateNumber}}</h2>
+										<p>{{showname(caritem.driverInfo.name)}}  {{caritem.driverInfo.phone}}</p>
+									</view>
+								</view>
+								<u-icon name="dianhua" v-if="caritem.driverInfo.phone"  @click="makePhoneCall(caritem.driverInfo.phone)"  custom-prefix="custom-icon" size="80" color="#1778fb"></u-icon>
+							</view>
+						</view>
+					</view>
+				</u-popup>
+			
+		
+		<u-navbar :title="title"  >
+			<view class="slot-wrap"></view>
+			<view class="navbar-right" @click="mapopenBtn"  >
+				<u-icon name="plus-circle" v-if="!mapopen" color="#999" size="28"></u-icon>
+				<span v-if="!mapopen">放大地图</span>
+				<u-icon name="minus-circle" v-if="mapopen" color="#999" size="28"></u-icon>
+				<span v-if="mapopen">缩小地图</span>
+			</view>
+		</u-navbar>
+		<carmap ref="amap" @onload="mapdown"  @clickMap="carShow2" ></carmap>
+		
+		<view class="map-info">
+			<view class="map-text" v-if="stationList.length">
+				<h4>{{stationList[0].name}} → {{stationList[stationList.length-1].name}}</h4>
+				<p>首班:{{routeInfo.startTime}}  末班:{{routeInfo.endTime}}</p>
+			</view>
+		
+		
+			<view class="map-btn" @click="reverse">
+				<u-icon name="swap" custom-prefix="custom-icon"  color="#2979ff"></u-icon>
+				<span>换向</span>
+			</view>
+		</view>
+		<view class="map-route">
+			<view class="map-route-head" v-if="false" >
+				<view  >上车提醒</view>
+				<view  >
+					 <u-radio-group v-model="downItem.isRemind" @change="radioGroupChange" >
+					 	<u-radio 
+					 	 
+					 		v-for="(dio, index) in radiolist" :key="index" 
+					 		:name="dio.isRemind"
+					 		>
+					 		{{dio.name}}
+					 	</u-radio>
+					 </u-radio-group>
+				</view>
+				 
+			</view>
+			 <view class="map-route-head" >
+			 	<view>{{dis}}</view>
+			 	&lt;&lt;&lt; 下方列表可以左右滑动 &gt;&gt;&gt;
+			 </view>
+			<view class="map-route-main" id="map-route-main">
+				
+				<template v-for="item,i in stationList">
+					<view   class="scroll-view-item" 
+					:class="{'map-route-origin map-geton ':i==0,'map-route-item':i!=0,'map-geton':downid==item.id,'map-down':downid==item.id,'map-now':item.currentStationStatus=='2'}"
+					 >
+						
+						<view class="map-route-car" v-if="showCar(item)">
+							<img src="static/img/car.png" alt=""  @click="carShow(item)">
+						</view>
+						<view class="map-route-circle"  @click="downBtn(item)" :style="i==0&&downid!=item.id?'border: 3px solid #1e8abd;':''">
+			
+							<img src="static/img/plate4.png?v=1" style=" width: 12px; margin-top: 3px;" v-if="downid==item.id" alt="">
+						</view>
+						
+						<view class="map-route-line" @click="downBtn(item)"></view>
+						<view class="map-route-name" @click="downBtn(item)">
+							{{item.name}}
+						</view>
+					</view>
+				</template> 
+			</view>
+		<view class="map-route-main" v-if="false"  >
+				<!-- <view class="map-route-origin">
+					<view class="map-route-circle"></view>
+					<view class="map-route-name">
+						1锣场
+					</view>
+				</view> -->
+				<view class="map-route-origin map-geton">
+					<view class="map-route-car">
+						<img src="static/img/car.png" alt="">
+					</view>
+					<view class="map-route-circle">上</view>
+					<view class="map-route-name">
+						1锣场
+					</view>
+				</view>
+				<view class="map-route-item map-after">
+					<view class="map-route-circle"></view>
+					<view class="map-route-line"></view>
+					<view class="map-route-name">
+						2东方大道
+					</view>
+				</view>
+				<view class="map-route-item map-now">
+					<view class="map-route-car">
+						<img src="static/img/car.png" alt="">
+					</view>
+					<view class="map-route-circle"></view>
+					<view class="map-route-line"></view>
+					<view class="map-route-name">
+						3小天鹅
+					</view>
+				</view>
+				<view class="map-route-item map-color">
+					<view class="map-route-circle"></view>
+					<view class="map-route-line"></view>
+					<view class="map-route-name">
+						4宿架转盘转盘
+					</view>
+				</view>
+				<view class="map-route-item">
+					<view class="map-route-car">
+						<img src="static/img/car.png" alt="">
+					</view>
+					<view class="map-route-circle"></view>
+					<view class="map-route-line"></view>
+					<view class="map-route-name">
+						5荆棉
+					</view>
+				</view>
+				<view class="map-route-item map-geton">
+					<view class="map-route-car">
+						<img src="static/img/car.png" alt="">
+					</view>
+					<view class="map-route-circle">下</view>
+					<view class="map-route-line"></view>
+					<view class="map-route-name">
+						6跃进村
+					</view>
+				</view>
+				<view class="map-route-item">
+					<view class="map-route-circle"></view>
+					<view class="map-route-line"></view>
+					<view class="map-route-name">
+						7变电站
+					</view>
+				</view>
+				<view class="map-route-item">
+					<view class="map-route-circle"></view>
+					<view class="map-route-line"></view>
+					<view class="map-route-name">
+						8跃进村
+					</view>
+				</view>
+				<view class="map-route-item">
+					<view class="map-route-circle"></view>
+					<view class="map-route-line"></view>
+					<view class="map-route-name">
+						9变电站
+					</view>
+				</view>
+			</view>
+		
+		</view>
+		<view class="map-route-foot">
+			<view class="remind-btn" @click="show1 = true,popid=downItem.isRemind" v-show="!downItem.remindId">
+				 
+					<u-icon name="md-alarm" custom-prefix="custom-icon" color="#666" size="44"></u-icon>
+					<span>设置提醒</span>
+		 
+			</view>
+			<view class="remind-btn" @click="show1 = true,popid=downItem.isRemind" v-show="downItem.remindId" style=" background-color: blue; color: #fff; ">
+				
+				<u-icon name="md-alarm" custom-prefix="custom-icon" color="#fff" size="44"></u-icon>
+					<span>提前{{downItem.isRemind}}站</span>
+
+			</view>
+				
+			<view class="reset-btn" v-if="false">
+				<u-icon name="shuaxin" custom-prefix="custom-icon" color="#666" size="44"></u-icon>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './index.js'
+	export default   api
+</script>
+	
+<style scoped lang="scss">
+	.map-route-foot{
+		position: fixed;
+		bottom:10px;
+		right: 0px;
+		display: flex;
+		justify-content: flex-end;
+		z-index: 999;
+		.remind-btn{
+			background-color: #fff;
+			height: 40px;
+			width: 120px;
+			border-radius: 20px;
+			line-height: 40px;
+			border: 1px solid #eee;
+			margin-right: 10px;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+		}
+		span{
+			margin-left: 5px;
+		}
+		.reset-btn{
+			background-color: #fff;
+			height: 40px;
+			width: 40px;
+			border-radius: 50%;
+			text-align: center;
+			line-height: 40px;
+			border: 1px solid #eee;
+			margin-right: 10px;
+		}
+	}
+	.sitePopup{
+			width: 300px;
+			padding: 15px;
+			border: 10px;
+		}
+		.sitePopup-head{
+			h4{
+				font-size: 18px;
+			}
+		}
+		.sitePopup-driver{
+			display: flex;
+			width: 100%;
+			padding-top: 15px;
+			border-top: 1px solid #f7f7f7;
+			justify-content: space-between;
+			.driver-info{
+				display: flex;
+				.driver-text{
+					margin-left: 10px;
+				}
+			}
+		}
+		.sitePopup-main{
+			display: flex;
+			justify-content: space-between;
+			margin-top: 20px;
+			.remind-item{
+				height: 80px;
+				width: 80px;
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
+				border-radius: 10px;
+				border: 2px solid #fff;
+				span{
+					color:#fff;
+				}
+			}
+			.remind-item1{
+				background-color: #ff6666;
+			}
+			.remind-item2{
+				background-color: #389e0d;
+			}
+			.remind-item3{
+				background-color: #4291ff;
+			}
+			.remind-item-bg{
+				border: 2px solid #fff;
+			}
+			.remind-item-bg1.active{
+				border: 2px solid #ff6666;
+				border-radius:10px;
+			}
+			.remind-item-bg2.active{
+				border: 2px solid #389e0d;
+				border-radius:10px;
+			}
+			.remind-item-bg3.active{
+				border: 2px solid #4291ff;
+				border-radius:10px;
+			}
+		}
+		.sitePopup-foot{
+			display: flex;
+			justify-content: space-between;
+			margin-top: 20px;
+			.sitePopup-btn{
+				background-color: #ddd;
+				flex: 1;
+				margin: 5px;
+				height: 40px;
+				line-height: 40px;
+				text-align: center;
+				border-radius: 20px;
+			}
+		}
+	.map-route {
+		border-top: 10px solid #f7f7f7;
+		background-color: #fff;
+		padding-bottom: 60px;
+	
+		.map-route-head {
+			font-size: 16px;
+			color: #007AFF;
+			text-align: center;
+			line-height: 20px;
+			border-bottom: 1px solid #eee;
+		}
+	
+		.map-route-main {
+			padding: 10px;
+			position: relative;
+			overflow-x: scroll !important;
+			display: -webkit-box;
+		}
+	}
+
+	.map-info {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		background-color: #fff;
+		padding: 20rpx;
+	}
+
+	.map-text {
+		h4 {
+			font-size: 16px;
+		}
+
+		p {
+			margin-top: 10rpx;
+			color: #999;
+		}
+	}
+
+	.map-btn {
+		border: 1px solid #007AFF;
+		color: #007AFF;
+		padding: 5px 15px;
+		border-radius: 30px;
+
+		span {
+			margin-left: 6rpx;
+		}
+	}
+
+	.map-route-origin {
+		position: relative;
+		height: 200px;
+		width: 15px;
+		.map-route-circle {
+			position: absolute;
+			left: 0;
+			top: 30px;
+			height: 15px;
+			width: 15px;
+			border-radius: 50%;
+			background-color: #999;
+			border: 3px solid #fff;
+			box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
+			z-index: 99;
+		}
+		.map-route-name {
+			position: absolute;
+			top: 50px;
+			width: 16px;
+			line-height: 16px;
+			z-index: 999;
+			left: 3px;
+		}
+		&.map-geton{
+			.map-route-circle {
+				width: 24px;
+				background-color: #fff;
+				height: 24px;
+				border: 3px solid #25ad3b;
+				color:#25ad3b;
+				text-align: center;
+				line-height: 18px;
+				font-size:10px;
+				top:25px;
+				left: -3px;
+			}
+			.map-route-car {
+				height: 30px;
+				width: 30px;
+				position: absolute;
+				right: -10px;
+				top: 2px;
+			
+				img {
+					height: 100%;
+					width: 100%;
+				}
+			}
+		}
+	}
+
+	.map-route-item {
+		position: relative;
+		height: 200px;
+		width: 60px;
+		.map-route-car {
+			height: 30px;
+			width: 30px;
+			position: absolute;
+			right: -10px;
+			top: 2px;
+		
+			img {
+				height: 100%;
+				width: 100%;
+			}
+		}
+		.map-route-circle {
+			position: absolute;
+			right: -2px;
+			top: 30px;
+			height: 15px;
+			width: 15px;
+			border-radius: 50%;
+			background-color: #fff;
+			border: 3px solid #1677ff;
+			z-index: 99;
+		}
+
+		.map-route-line {
+			height: 6px;
+			background-color: #1677ff;
+			width: 55px;
+			position: absolute;
+			left: 0px;
+			top: 35px;
+			z-index: 9;
+		}
+
+		.map-route-name {
+			position: absolute;
+			top: 50px;
+			width: 16px;
+			line-height: 16px;
+			z-index: 999;
+			right: -3px;
+			text-align: center;
+		}
+	}
+
+	.map-route-item.map-now {
+		.map-route-car {
+			height: 30px;
+			width: 30px;
+			position: absolute;
+			left: 10px;
+			top: 2px;
+
+			img {
+				height: 100%;
+				width: 100%;
+			}
+		}
+
+		.map-route-circle {
+			border: 3px solid #ff6200;
+		}
+
+		.map-route-line {
+			background-color: #ff6200;
+		}
+	}
+
+	.map-route-item.map-after {
+		.map-route-circle {
+			border: 3px solid #999;
+		}
+
+		.map-route-line {
+			background-color: #999;
+		}
+	}
+
+	.map-route-item.map-geton {
+		.map-geton-mark {
+			width:20px;
+			height: 20px;
+			right: 0;
+			position: absolute;
+			right: -4px;
+			top: 5px;
+			img {
+				height: 100%;
+				width: 100%;
+			}
+		}
+
+		.map-route-circle {
+			width: 24px;
+			height: 24px;
+			border: 3px solid #25ad3b;
+			color:#25ad3b;
+			text-align: center;
+			line-height: 18px;
+			font-size:10px;
+			top:25px;
+			right: -8px;
+		}
+
+		.map-route-name {
+			color: #25ad3b
+		}
+	}
+.map-route-item.map-geton1 {
+		.map-geton-mark {
+			width: 20px;
+			height: 20px;
+			right: 0;
+			position: absolute;
+			right: -4px;
+			top: 5px;
+
+			img {
+				height: 100%;
+				width: 100%;
+			}
+		}
+
+		.map-route-circle {
+			border: 3px solid #25ad3b;
+		}
+
+		.map-route-name {
+			color: #25ad3b
+		}
+	}
+	.add-foot { 
+		position: fixed;
+		background-color: #fff;
+		border-top: 1px solid #eee;
+		z-index: 999;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		height: 90rpx;
+		display: flex;
+		justify-content: space-between;
+
+		.add-foot-price {
+			display: flex;
+			align-items: center;
+			padding-left: 20rpx;
+			font-size: 32rpx;
+
+			span {
+				color: #1677ff;
+			}
+		}
+
+		.add-foot-btn {
+			width: 240rpx;
+			background-color: #1677ff;
+			color: #fff;
+			font-size: 32rpx;
+			text-align: center;
+			line-height: 90rpx;
+		}
+	}
+		.navbar-right {
+				display: flex;
+				margin-right: 20rpx;
+				span{
+					color:rgb(96, 98, 102);
+					margin-left: 3px;
+				}
+			}
+			.slot-wrap {
+					display: flex;
+					align-items: center;
+					flex: 1;
+				}
+</style>