zkx il y a 4 ans
Parent
commit
8b10dcd2c6

+ 8 - 0
apis/index.js

@@ -64,4 +64,12 @@ export function cancelRemind(data) {
 		},
 		url: '/mobile/stationRemindApi/cancel'
 	})
+}
+
+export function nearbyStationInfo(data) {
+	return request({
+		method: 'post',
+		data:data,
+		url: '/mobile/passengerApi/nearbyStationInfo'
+	})
 }

+ 12 - 0
apis/my.js

@@ -44,3 +44,15 @@ export function userUpdatePhone(data) {
 		
 	})
 }
+
+
+export function passengerRecordDetail(id) {
+	return request({
+		method: 'post',
+		data: {
+			id:id
+		},
+		url: '/mobile/passengerApi/passengerRecordDetail'
+		
+	})
+}

+ 2 - 2
apis/remind.js

@@ -10,10 +10,10 @@ export function passengerRemindList(data) {
 	})
 }
 
-export function passengerMessage(data) {
+export function updateStationNum(data) {
 	return request({
 		method: 'post',
 		data: Qs.stringify(data),
-		url: '/mobile/passengerApi/passengerMessage'
+		url: '/mobile/stationRemindApi/updateStationNum'
 	})
 }

+ 9 - 0
apis/route.js

@@ -28,3 +28,12 @@ export function passengerShiftRemindList(data) {
 		url: '/mobile/passengerApi/passengerShiftRemindList'
 	})
 }
+
+
+export function vehicleStationDis(data) {
+	return request({
+		method: 'post',
+		data:data,
+		url: '/mobile/passengerApi/vehicleStationDis'
+	})
+}

+ 20 - 1
components/Carmap.vue

@@ -225,7 +225,8 @@
 						this.info.ob= new AMap.Marker({
 							map: this.mapbus,
 							position: [this.info.longitude,this.info.latitude],
-							offset: new AMap.Pixel(-5, -5),
+							//offset: new AMap.Pixel(-5, -5),
+								offset: new AMap.Pixel(-15, -30),
 							content:"<img src='"+icon0+"' style='height: 30px;width: 30px' />",
 							
 							zIndex:99,
@@ -239,6 +240,24 @@
 					}
 				
 				
+			},
+			init(){
+					var _this = this;
+				MapLoader().then(AMap => {
+					
+					this.AMap=AMap;
+					_this.mapbus && _this.mapbus.destroy();
+				
+					_this.mapbus=new AMap.Map("container", {
+						resizeEnable: true,
+						center: [this.longitude, this.latitude],
+						zoom: 14
+					});
+					this.$emit('onload')
+				}, e => {
+					//_this.mui.toast('地图加载失败');
+					console.log('地图加载失败', e)
+				})
 			},
 			initMap(point,stationList,startend){
 				

+ 13 - 1
components/Common.vue

@@ -136,5 +136,17 @@
 </script>
 
 <style>
-
+	.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>

+ 20 - 2
pages/buytickets/selectSite.js

@@ -6,6 +6,7 @@ import Carmap from '@/components/Carmap.vue'
 export default {
 	data() {
 		return {
+			caritemBl:false,
 			show1: false,
 			show2: false,
 			buy:"",
@@ -38,6 +39,9 @@ export default {
 				longitude: '',
 				latitude: '',
 			},
+			showInfo:{
+				driver:{}
+			},
 			myinterval: '',
 			downId: '',
 			downName: '',
@@ -53,7 +57,12 @@ export default {
 		Carmap
 	},
 
-	methods: {
+	methods: {
+		makePhoneCall(tel){
+			uni.makePhoneCall({
+			    phoneNumber: tel //仅为示例
+			});
+		},
 		mapopenBtn(){
 			this.mapopen=!this.mapopen;
 			if(this.mapopen){
@@ -183,6 +192,9 @@ export default {
 			this.getPoint()
 		
 
+		},
+		carShow(){
+			this.caritemBl=true;
 		},
 		getShiftInfo() {
 			 
@@ -201,7 +213,13 @@ export default {
 					this.$refs.common.goError(response.message)
 					return
 				}
+				this.showInfo={
+					driver:response.data.driver,
+					licensePlateNumber:response.data.licensePlateNumber
+				}
+				
 				API.getVehicleStationInfo(this.id).then((response2) => {
+					
 					this.getShiftInfoResponse(response, response2);
 
 				})
@@ -310,7 +328,7 @@ export default {
 		}
 		this.id = op.id
 		var obj=this.carhelp.get("form");
-		if(obj.oplist.length){
+		if(obj.oplist&&obj.oplist.length){
 			this.upid=obj.oplist[0].upStationId;	
 		}
 		

+ 34 - 8
pages/buytickets/selectSite.vue

@@ -1,7 +1,33 @@
 <template>
 	<view>
-		<car-common     ref="common"></car-common>
-		<u-navbar :title="title"  >
+		<car-common     ref="common"></car-common>
+		
+		
+		<u-popup v-model="caritemBl"  mode="center" closeable="true" border-radius="20">
+			<view class="sitePopup">
+				<view class="sitePopup-head">
+				
+					<h1>{{shiftInfo.startStation}} → {{shiftInfo.endStation}}</h1>
+					<p>首班:{{shiftInfo.startTime}} 末班:{{shiftInfo.endTime}}</p>
+				</view>
+				<view class="sitePopup-main">
+					<view class="sitePopup-driver">				
+						<view class="driver-info">
+							<view class="driver-head">
+								<u-avatar :src="showInfo.driver.faceImage" size="100"></u-avatar>
+							</view>
+							<view class="driver-text">
+								<h2>{{showInfo.licensePlateNumber}}</h2>
+								<p>{{showInfo.driver.name}}  {{showInfo.driver.phone}}</p>
+							</view>
+						</view>
+						<u-icon name="dianhua" v-if="showInfo.driver.phone"  @click="makePhoneCall(showInfo.driver.phone)"  custom-prefix="custom-icon" size="80" color="#1778fb"></u-icon>
+					</view>
+				</view>
+			</view>
+		</u-popup>
+		
+		<u-navbar :title="title"   :is-back="!look" >
 			<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>
@@ -32,18 +58,18 @@
 		 <view class="map-route-main"  id="map-route-main">
 			<template v-for="item,i in stationList">
 				<view :id="item.status==1?'map-now':''" class="scroll-view-item " :class="{'map-route-origin':i==0,'map-route-item':i!=0,'map-after':item.status==0,
-					'map-color':item.status==1,'map-now':car.currentStationStatus=='2','map-geton':upid==item.id||downId==item.id||(item.id == car.currentStationId&&i==0)}" @click="downBtn(item)">
+					'map-color':item.status==1,'map-now':car.currentStationStatus=='2','map-geton':upid==item.id||downId==item.id||(item.id == car.currentStationId&&i==0)}">
 					
-					<view class="map-route-car"   v-show="item.id == car.currentStationId&&car.currentStationStatus=='1'">
+					<view class="map-route-car"  @click="carShow()"   v-show="item.id == car.currentStationId&&car.currentStationStatus=='1'">
 						<img src="static/img/car.png" alt="">
 					</view>
-					<view class="map-route-car"   v-show="item.status==1&&car.currentStationStatus=='2'">
+					<view class="map-route-car"   @click="carShow()"  v-show="item.status==1&&car.currentStationStatus=='2'">
 						<img src="static/img/car.png" alt="">
 					</view>
 					
-					<view class="map-route-circle">{{upid==item.id?'上':''}}{{downId==item.id?'下':''}}</view>
-					<view class="map-route-line"></view>
-					<view class="map-route-name">
+					<view class="map-route-circle"  @click="downBtn(item)">{{upid==item.id?'上':''}}{{downId==item.id?'下':''}}</view>
+					<view class="map-route-line"  @click="downBtn(item)"></view>
+					<view class="map-route-name"  @click="downBtn(item)">
 						{{item.stationName}}
 					</view>
 				</view>

+ 14 - 2
pages/index/index.js

@@ -5,7 +5,8 @@ import {
 } from '@/utils'
 export default {
 		data() {
-			return {
+			return {
+				isReady:false,
 				rbool:false,
 				wxinit:false,
 				index:0,
@@ -210,6 +211,13 @@ export default {
 					url:'/pages/route/index?id='+item.routeId+"&upid="+item.startStationId+"&downid="+downid
 				})
 				
+			},
+			gotoLineList(downid){
+			
+				uni.navigateTo({
+					url:"/pages/index/sitePage?id="+downid+"&longitude="+this.longitude+"&latitude="+this.latitude
+				})
+				
 			},
 			getPoint() {
 			this.$refs.common.alert("正在获取定位信息,为您查找附近的站点...");
@@ -304,9 +312,13 @@ export default {
 			this.getRemindInfo();
 			this.getBtn();
 			//清空缓存
-			this.carhelp.set("form",{});
+			this.carhelp.set("form",{});
+			this.isReady=true;
 		},onShow(){
+			if(this.isReady){
 				this.getPoint();
 				this.getRemindInfo();
+			}
+				
 		},
 	}

+ 3 - 3
pages/index/index.vue

@@ -54,7 +54,7 @@
 			<u-button  :custom-style="btn" size="medium" shape="circle" plain   @click="getPoint(true)" >刷新</u-button>
 		</view>
 		<view class="index-floor"  v-for="item,index in siteList" :key="index">
-			<view class="title">
+			<view class="title" @click="gotoLineList(item.stationId)" >
 				<view class="title-site">
 					<u-icon name="zhanpai" custom-prefix="custom-icon" size="40" color="#1677ff"></u-icon>
 					<span>{{item.stationName}}</span>
@@ -66,11 +66,11 @@
 					<view class="route-item" v-for="li,i in item.nearbyShiftDTOList" :key="i" @click="gotoLine(li,item.stationId)">
 						<view class="route-text">
 							<h4>{{li.routeName}}</h4>
-							<p>开往:{{li.endStationName}} 当前:{{li.currentStationName}}</p>
+							<p>开往:{{li.endStationName}} {{li.currentStationName&&li.des!='等待发车'?'当前:'+li.currentStationName:''}}</p>
 						</view>
 						<view class="route-gap" >
 							<view class="route-gap stop">
-								<span>{{li.des}}</span>
+								<span>{{li.des?li.des:"等待发车"}}</span>
 								<u-icon name="arrow-right" color="#999" size="28"></u-icon>
 							</view>
 						</view>

+ 39 - 41
pages/index/sitePage.vue

@@ -1,49 +1,32 @@
 <template>
 	<view>
-		<car-common  mytitle="站点主页"   ref="common"></car-common>
-		<view class="sitePage-map">
-			<map style="width: 100%; height: 200px;" scale="12" ></map>
-		</view>
+		<car-common     ref="common"></car-common>
+		<u-navbar 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"></carmap>
 		<view class="sitePage-currentSite">
 			<u-icon name="zhanpai" custom-prefix="custom-icon" size="40" color="#1677ff"></u-icon>
-			<span>豉湖路</span>
-			<p>距离888米</p>
+			<span>{{nearbyStationInfo.stationName}}</span>
+			<p>距离{{nearbyStationInfo.distance}}米</p>
 		</view> 
 		<view class="sitePage-route">
-			<view class="route-item">
-				<view class="route-text">
-					<h4>阿萨德阿斯</h4>
-					<p>开往阿萨德阿萨德</p>
-				</view>
-				<view class="route-gap" >
-					<view class="route-gap">
-						<span>123123</span>
-						<u-icon name="arrow-right" color="#999" size="28"></u-icon>
-					</view>
-				</view>
-			</view>
-			<view class="route-item">
-				<view class="route-text">
-					<h4>阿萨德阿斯</h4>
-					<p>开往阿萨德阿萨德</p>
+			<view class="route-item" v-for="li,i in nearbyStationInfo.nearbyShiftDTOList " :key="i" @click="gotoLine(li,nearbyStationInfo.stationId)">
+				<view class="route-text">
+					<h4>{{li.routeName}}</h4>
+					<p>开往:{{li.endStationName}} {{li.currentStationName&&li.des!='等待发车'?'当前:'+li.currentStationName:''}}</p>
 				</view>
-				<view class="route-gap" >
-					<view class="route-gap stop">
-						<span>123123</span>
-						<u-icon name="arrow-right" color="#999" size="28"></u-icon>
-					</view>
-				</view>
-			</view>
-			<view class="route-item">
-				<view class="route-text">
-					<h4>阿萨德阿斯</h4>
-					<p>开往阿萨德阿萨德</p>
-				</view>
-				<view class="route-gap" >
-					<view class="route-gap">
-						<span>123123</span>
-						<u-icon name="arrow-right" color="#999" size="28"></u-icon>
-					</view>
+				<view class="route-gap" >
+					<view class="route-gap stop">
+						<span>{{li.des?li.des:"等待发车"}}</span>
+						<u-icon name="arrow-right" color="#999" size="28"></u-icon>
+					</view>
 				</view>
 			</view>
 		</view>
@@ -51,7 +34,8 @@
 </template>
 
 <script>
-
+import api from './sitePage.js'
+	export default   api
 </script>
 
 <style>
@@ -107,5 +91,19 @@
 				span{color:#ff731d}
 			}
 		}
-	}	
+	}	
+	
+	.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>

+ 2 - 1
pages/my/user/bybusDetails.vue

@@ -41,7 +41,8 @@
 </template>
 
 <script>
-
+	import api from './bybusDetails.js'
+	export default  api;
 </script>
 
 <style>

+ 6 - 1
pages/my/user/bybusList.js

@@ -17,7 +17,12 @@ export default {
 		}
 	},
 	methods: {
-		
+		gotoUrl(id){
+			return;
+			uni.navigateTo({
+				url:"/pages/my/user/bybusDetails?id="+id
+			})
+		},
 		lower() {
 			console.log("--------")
 			if (this.listForm.pageIndex <= this.listForm.totalPage  ) {

+ 3 - 3
pages/my/user/bybusList.vue

@@ -3,7 +3,7 @@
 		<car-common  mytitle="乘车记录"   ref="common"></car-common>
 		<scroll-view  v-show="recordList.length" :style="'height: '+clientHeight+'px;'"   scroll-y="true"     @scrolltolower="lower">
 		
-		<view class="ticket-item" v-for="item,i in recordList" :key="i">
+		<view class="ticket-item" v-for="item,i in recordList" :key="i" @click="gotoUrl(item.id)">
 			<view class="ticket-item-left">
 				<view class="ticket-head">
 					<u-avatar :src="item.imageUrl" size="mini"></u-avatar>
@@ -18,12 +18,12 @@
 							<p>货票:</p><span>¥{{item.goodTicket}}</span>
 						</view>
 					</view>
-					<view class="ticket-text-row">
+					<view class="ticket-text-row ">
 						<p>购票时间:</p><h4>{{item.payTime}}</h4>
 					</view>
 				</view>
 			</view>
-			<view class="ticket-item-right">
+			<view class="ticket-item-right " :class="item.status==2?'overdue':''">
 				<h3>{{item.totalFee}}</h3>
 				<p>票价</p>
 			</view>

+ 50 - 4
pages/remind/index.js

@@ -44,17 +44,63 @@ export default {
 			},
 			// 选中某个单选框时,由radio时触发
 			radioChange(e) {
-				// console.log(e);
+				 console.log(e);
 			},
 			// 选中任一radio时,由radio-group触发
-			radioGroupChange(e) {
-				// console.log(e);
-			}
+			radioGroupChange(item) {
+				var obj={
+					id:item.id,
+					num:item.stopInAdvance
+				}
+				 API.updateStationNum(obj).then((res) => {
+				 	
+				 	this.$refs.common.alert( "设置成功");
+				 }).catch(error => {
+				 		this.$refs.common.alert( error);
+				 }) 
+			},del(id){
+				API_index.cancelRemind(id).then((res) => {
+					
+					this.$refs.common.alert( "设置成功");
+				}).catch(error => {
+						this.$refs.common.alert( error);
+				}) 
+			},
+			 add(){
+				 var item= this.remindInfo
+				 var obj={
+				 	startStationId:item.startStationId,
+				 	remindStationId :item.ticketDownStationId,
+				 	stopInAdvance:item.isRemind,
+				 	remindType:"2",
+				 	vehicleShiftId:item.vehicleShiftId,
+				 	openId:this.carhelp.getOpenId()
+				 }
+				 API_index.saveRemind(obj).then((res) => {
+				 	item.remindId=res.data.id
+					this.$refs.common.alert( "设置成功");
+				 
+				 }).catch(error => {
+				 		this.$refs.common.alert( error);
+				 }) 
+			 },
+			 delBtn(item){
+				 
+				 this.$refs.common.setFnc(()=>{
+					 item.del=true;
+					  this.del(item.id);
+					 this.$forceUpdate()
+				 })
+				  this.$refs.common.confirm('是否删除当前提醒?')
+				 
+			 },
 		},onReady(){
 			this.readyBl=true;
 			this.passengerRemindList();
 		},onShow(){
 			if(this.readyBl){
+				this.upList=[];
+				this.downList=[];
 					this.passengerRemindList();
 			}
 		}

+ 14 - 14
pages/remind/index.vue

@@ -6,17 +6,17 @@
 				<u-icon name="md-alarm" custom-prefix="custom-icon" color="#69b54a" size="40"></u-icon>
 				<span style="color:#69b54a">上车提醒</span>
 			</view>
-			<view class="remind-item" v-for="item,i in upList" :key="i">
+			<view class="remind-item" v-for="item,i in upList" :key="'up_'+i" v-if="!item.del">
 				<view class="remind-left">
-					<h3>19路</h3>
-					<p>开往<span>红光路加气站</span>方向,<span>豉湖路转盘</span>上车</p>
+					<h3>{{item.routeName}}</h3>
+					<p>开往<span>{{item.endStationName}}</span>方向,<span>{{item.remindStationName}}</span>上车</p>
 					<view class="remind-radio">
 						<span>到站提醒:</span>
-						<u-radio-group v-model="item.stopInAdvance" @change="radioGroupChange">
+						<u-radio-group v-model="item.stopInAdvance" @change="radioGroupChange(item)" :data-id="'up_'+item.id">
 							<u-radio 
 								@change="radioChange" 
-								v-for="(item, index) in list" :key="index" 
-								:name="item.id"
+								v-for="(item, index) in list" :key="'up_'+index" 
+								:name="item.isRemind"
 							
 							>
 								{{item.name}}
@@ -24,7 +24,7 @@
 						</u-radio-group>
 					</view>
 				</view>
-				<view class="remind-right">
+				<view class="remind-right" @click="delBtn(item)">
 					<u-icon name="shanchu" custom-prefix="custom-icon"  color="#fff"></u-icon>
 					<span>删除</span>
 				</view>
@@ -33,17 +33,17 @@
 				<u-icon name="md-alarm" custom-prefix="custom-icon" color="#fd8032" size="40"></u-icon>
 				<span style="color:#fd8032">下车提醒</span>
 			</view>
-			<view class="remind-item" v-for="item,i in downList" :key="i">
+			<view class="remind-item" v-for="item,i in downList" :key="'down_'+i" v-if="!item.del">
 				<view class="remind-left">
-					<h3>19路</h3>
-					<p>开往<span>红光路加气站</span>方向,<span>豉湖路转盘</span>上车</p>
+					<h3>{{item.routeName}}</h3>
+					<p>开往<span>{{item.endStationName}}</span>方向,<span>{{item.remindStationName}}</span>下车</p>
 					<view class="remind-radio">
 						<span>到站提醒:</span>
-						<u-radio-group v-model="value" @change="radioGroupChange">
+						<u-radio-group v-model="item.stopInAdvance" @change="radioGroupChange(item)" :data-id="'down_'+item.id">
 							<u-radio 
 								@change="radioChange" 
-								v-for="(item, index) in list" :key="index" 
-								:name="item.name"
+								v-for="(item, index) in list" :key="'down_'+index" 
+								:name="item.isRemind"
 								:disabled="item.disabled"
 							>
 								{{item.name}}
@@ -51,7 +51,7 @@
 						</u-radio-group>
 					</view>
 				</view>
-				<view class="remind-right">
+				<view class="remind-right" @click="delBtn(item)">
 					<u-icon name="shanchu" custom-prefix="custom-icon"  color="#fff"></u-icon>
 					<span>删除</span>
 				</view>

+ 50 - 7
pages/route/index.js

@@ -19,8 +19,8 @@ export default {
 			//地图居中后的位置
 			longitude: 112.276527,
 			latitude: 30.306427,
-				show1: false,
-						show2: false,
+			show1: false,
+			show2: false,
 			shiftInfo: {
 
 			},
@@ -32,7 +32,7 @@ export default {
 			},
 			caritemBl:false,
 			stationList: [],
-			
+			dis:'',
 			//个人
 			info: {
 				obj: null,
@@ -43,6 +43,7 @@ export default {
 			reverseInit:false,
 			myinterval: '',
 			routeInfo:{},
+			popid:0,
 			radiolist: [
 					{
 						name: '不提醒',
@@ -65,12 +66,48 @@ export default {
 	},
 
 	methods: {
+		selectBtn(i){
+			
+			this.popid=i;
+			
+			this.$forceUpdate()
+		},
+		makePhoneCall(tel){
+			uni.makePhoneCall({
+			    phoneNumber: tel //仅为示例
+			});
+		},
+		radioChange(e){
+			console.log(e)
+		},
+		vehicleStationDis(){
+			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
 			}
@@ -85,7 +122,9 @@ export default {
 					this.downItem.remindId=""
 					if(bl){
 						this.remindAdd()	
-					}else{
+					}else{
+						this.show1 = false
+						this.$forceUpdate()
 						this.$refs.common.alert( "设置成功");
 					}
 				}).catch(error => {
@@ -136,6 +175,7 @@ export default {
 			this.$refs.amap.setCenter(item);
 			this.downid=item.id;
 			this.downItem=item;
+			this.vehicleStationDis();
 			this.$forceUpdate()
 		},
 		remindAdd(){
@@ -143,21 +183,24 @@ export default {
 			
 				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",
-					vehicleShiftId:this.routeInfo.id,
+					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);
@@ -219,7 +262,7 @@ export default {
 		 passengerShiftRemindList(){
 			 	this.$refs.common.showLoading()
 			 API.passengerShiftRemindList({
-			 	shiftId:this.id,
+			 	routeId:this.id,
 			 	openId:this.carhelp.getOpenId(),
 			 }).then((response) => {
 			 	this.remindList=response.data;

+ 34 - 29
pages/route/index.vue

@@ -1,14 +1,7 @@
 <template>
 	<view>
 		<car-common    ref="common"  ></car-common>
-		<u-modal  v-model="caritemBl" v-if="stationList.length" >
-				<view class="slot-content">
-						<h4>{{stationList[0].name}} → {{stationList[stationList.length-1].name}}</h4>
-				</view>
-				<view class="slot-content">
-					{{caritem.licensePlateNumber}}{{caritem.driverInfo.name}}{{caritem.driverInfo.phone}}
-				</view>
-		</u-modal>
+	 
 		<u-popup v-model="show1" mode="center" border-radius="20">
 					<view class="sitePopup">
 						<view class="sitePopup-head">
@@ -16,19 +9,19 @@
 							<p>开往:红光路加气站 上车站点:玉桥小区</p>
 						</view>
 						<view class="sitePopup-main">
-							<view class="remind-item-bg remind-item-bg1 ">							
+							<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 active">	
+							<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">
+							<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>
@@ -36,36 +29,36 @@
 							</view>
 						</view>
 						<view class="sitePopup-foot">
-							<view class="sitePopup-btn">取消</view>
-							<view class="sitePopup-btn">确定</view>
+							<view class="sitePopup-btn" @click="show1 = false">取消</view>
+							<view class="sitePopup-btn" @click="radioGroupChange">确定</view>
 						</view>
 					</view>
 				</u-popup>
-				<u-button @click="show1 = true">打开</u-button>
+			 
 				
-				<u-popup v-model="show2" mode="center" closeable="true" border-radius="20">
+				<u-popup v-model="caritemBl" v-if="stationList.length" mode="center" closeable="true" border-radius="20">
 					<view class="sitePopup">
 						<view class="sitePopup-head">
-							<h1>六中 → 锣场</h1>
-							<p>首班:6:00 末班:18:00</p>
+							<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="src" size="100"></u-avatar>
+										<u-avatar :src="caritem.driverInfo.faceImage" size="100"></u-avatar>
 									</view>
 									<view class="driver-text">
-										<h2>鄂D12345</h2>
-										<p>李师傅  15512344567</p>
+										<h2>{{caritem.licensePlateNumber}}</h2>
+										<p>{{caritem.driverInfo.name}}  {{caritem.driverInfo.phone}}</p>
 									</view>
 								</view>
-								<u-icon name="dianhua" custom-prefix="custom-icon" size="80" color="#1778fb"></u-icon>
+								<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-button @click="show2 = true">打开</u-button>
+			
 		
 		<u-navbar :title="title"  >
 			<view class="slot-wrap"></view>
@@ -91,7 +84,7 @@
 			</view>
 		</view>
 		<view class="map-route">
-			<view class="map-route-head" >
+			<view class="map-route-head" v-if="false" >
 				<view  >上车提醒</view>
 				<view  >
 					 <u-radio-group v-model="downItem.isRemind" @change="radioGroupChange" >
@@ -106,7 +99,10 @@
 				</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">
@@ -132,11 +128,20 @@
 		
 		</view>
 		<view class="map-route-foot">
-			<view class="remind-btn">
-				<u-icon name="md-alarm" custom-prefix="custom-icon" color="#666" size="44"></u-icon>
-				<span>设置提醒</span>
+			<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="reset-btn">
+			<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>
@@ -270,7 +275,7 @@
 			font-size: 16px;
 			color: #007AFF;
 			text-align: center;
-			line-height: 40px;
+			line-height: 20px;
 			border-bottom: 1px solid #eee;
 		}