zhengkaixin 4 gadi atpakaļ
vecāks
revīzija
e4a0043732

+ 1 - 1
.env.dev.js

@@ -2,7 +2,7 @@ const UNI_APP = {
 	
     BASE_URL: 'https://ykt-test.xiaoxinda.com/smart-bus-server/' ,
 	NODE_ENV :"dev",
-	SIMPLE_RUN:true,//是否能 无视权限控制跳转页面   , 用于美工人员快速访问各种功能
+	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
 	//企业联合会微信appid
 	VUE_APP_WXAPPID:"wx93675268c87a5a46"
 }  

+ 1 - 1
.env.js

@@ -1,5 +1,5 @@
 (function() {  
-    const NODE_ENV = 'dev'; // dev:开发环境 | test:测试环境  
+    const NODE_ENV = 'test'; // dev:开发环境 | test:测试环境  
     let ENV_VAR = null;  
 	 
     if (process.env.NODE_ENV === "development") {  

+ 2 - 0
README.md

@@ -53,3 +53,5 @@ npm install uni-simple-router uni-read-pages(取消使用, 存在h5 刷新白
 [mac80端口问题无法使用](https://blog.csdn.net/weixin_41047933/article/details/97765502)
 sudo pfctl -ef /etc/pf-tomcat.conf
 
+
+redirectTo

+ 9 - 0
apis/index.js

@@ -1,4 +1,5 @@
 import request from '../utils/request.js';
+import Qs from 'qs';
 
 export function test(data) {
 	return request({
@@ -7,3 +8,11 @@ export function test(data) {
 		url: '/test/post'
 	})
 }
+export function passengerNearbyStation(data) {
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		
+		url: '/mobile/passengerApi/passengerNearbyStation'
+	})
+}

+ 17 - 3
apis/news.js

@@ -1,9 +1,23 @@
 import request from '../utils/request.js';
+import Qs from 'qs';
 
-export function test(data) {
+export function routeDetail(data) {
 	return request({
 		method: 'post',
-		data: data,
-		url: '/test/post'
+		data: {
+			id:data
+		},
+		
+		url: '/mobile/passengerApi/routeDetail'
+	})
+}
+
+export function routeList(data) {
+	return request({
+		method: 'post',
+		data: {
+			name:data
+		},
+		url: '/mobile/passengerApi/routeList'
 	})
 }

+ 14 - 2
apis/query.js

@@ -1,9 +1,21 @@
 import request from '../utils/request.js';
+import Qs from 'qs';
 
-export function test(data) {
+export function routeDetail(data) {
+	return request({
+		method: 'post',
+		data: {
+			id:data
+		},
+		
+		url: '/mobile/passengerApi/routeDetail'
+	})
+}
+
+export function routeList(data) {
 	return request({
 		method: 'post',
 		data: data,
-		url: '/test/post'
+		url: '/mobile/passengerApi/routeList'
 	})
 }

+ 8 - 4
apis/route.js

@@ -1,9 +1,13 @@
 import request from '../utils/request.js';
+import Qs from 'qs';
 
-export function test(data) {
+export function routeDetail(data) {
 	return request({
 		method: 'post',
-		data: data,
-		url: '/test/post'
+		data: {
+			id:data
+		},
+		
+		url: '/mobile/passengerApi/routeDetail'
 	})
-}
+}

+ 70 - 6
components/Carmap.vue

@@ -20,7 +20,16 @@
 					longitude: '',
 					latitude: '',
 				},
-				
+				down: {
+					obj:null,
+					longitude: '',
+					latitude: '',
+				},
+				up: {
+					obj:null,
+					longitude: '',
+					latitude: '',
+				},
 				//个人
 				info: {
 					obj:null,
@@ -53,6 +62,61 @@
 			};
 		},
 		methods:{
+			setCenter(item){
+				if(this.mapbus){
+					this.mapbus.setCenter([item.longitude,item.latitude]);
+				}
+			},
+			setDown(ob){
+				if(this.AMap==null){
+					return
+				}
+				this.down.longitude=ob.longitude
+				this.down.latitude=ob.latitude
+				if(!this.down.ob){
+					
+					var icon0 = require("@/static/img/down.png");
+					
+					this.down.ob= new AMap.Marker({
+						map: this.mapbus,
+						position: [this.down.longitude,this.down.latitude],
+						offset: new AMap.Pixel(-15, -30),
+						content:"<img src='"+icon0+"' style='height: 30px;width: 30px' />",
+						
+						zIndex:999,
+						autoRotation: true,
+					});
+					
+				}else{
+					this.down.ob.setPosition( [this.down.longitude,this.down.latitude]);
+				}
+			},
+			setUp(ob){
+				if(this.AMap==null){
+					return
+				}
+				this.up.longitude=ob.longitude
+				this.up.latitude=ob.latitude
+				if(!this.up.ob){
+					
+					var icon0 = require("@/static/img/up.png");
+					
+					this.up.ob= new AMap.Marker({
+						map: this.mapbus,
+						position: [this.up.longitude,this.up.latitude],
+						offset: new AMap.Pixel(-15, -30),
+						
+						
+						content:"<img src='"+icon0+"' style='height: 30px;width: 30px' />",
+						
+						zIndex:999,
+						autoRotation: true,
+					});
+					
+				}else{
+					this.up.ob.setPosition( [this.up.longitude,this.up.latitude]);
+				}
+			},
 			setCar(ob){
 				if(this.AMap==null){
 					return
@@ -70,7 +134,7 @@
 				 		
 				 		content:"<img src='"+icon0+"' style='height: 30px;width: 30px' />",
 				 		
-				 		zIndex:999,
+				 		zIndex:99,
 				 		autoRotation: true,
 				 	});
 				 	
@@ -98,7 +162,7 @@
 							offset: new AMap.Pixel(-5, -5),
 							content:"<img src='"+icon0+"' style='height: 30px;width: 30px' />",
 							
-							zIndex:999,
+							zIndex:99,
 							autoRotation: true,
 						});
 						//this.mapbus.setCenter([this.info.longitude,this.info.latitude]); //设置地图中心点
@@ -133,7 +197,7 @@
 						position: [_this.startend[0].longitude,_this.startend[0].latitude],
 						content:"<img src='"+icon0+"' style='height: 30px;width: 30px' />",
 						offset: new AMap.Pixel(-15, -30),
-						zIndex:999,
+						zIndex:99,
 						autoRotation: true,
 					});
 					new AMap.Marker({
@@ -141,7 +205,7 @@
 						position: [_this.startend[1].longitude,_this.startend[1].latitude],
 					content:"<img src='"+icon2+"' style='height: 30px;width: 30px' />",
 					offset: new AMap.Pixel(-15, -30),
-					zIndex:999,
+					zIndex:99,
 						autoRotation: true,
 					});
 					for(var i in _this.covers){
@@ -156,7 +220,7 @@
 							position: [point.longitude,point.latitude],
 							offset: new AMap.Pixel(-5, -5),
 							content:"<img src='"+icon1+"' style='height: 10px;width: 10px' />",
-							zIndex:999,
+							zIndex:99,
 							autoRotation: true,
 						});
 					}

+ 19 - 4
pages/buytickets/index.js

@@ -51,7 +51,14 @@ export default {
 		Carmap
 	},
 
-	methods: {
+	methods: {
+		confirmBtn() {
+			var route_path = window.location.href.split("#")[1];
+			this.carhelp.set("back_url", route_path);
+			uni.reLaunch({
+				url: '/pages/car/login?back=true'
+			})
+		},
 		downBtn(item) {
 			if (item.status == 2) {
 				this.downId = item.id
@@ -225,7 +232,9 @@ export default {
 
 			})
 		},
-		getPassengerInfo() {
+		getPassengerInfo() {
+			
+			
 			var thisform = {
 				id: this.id,
 				openId: this.carhelp.getOpenId()
@@ -355,7 +364,13 @@ export default {
 			clearInterval(this.myinterval)
 		}
 	},
-	onReady() {
-		this.getPassengerInfo()
+	onReady() {
+		if (!this.carhelp.getPersonInfo()) {
+			this.$refs.common.setFnc(this.confirmBtn)
+			this.$refs.common.alert2('您还不是车信达用户,注册后再购买车票。', '前往注册', '尚未注册')
+		} else{
+			this.getPassengerInfo()
+		}
+		
 	}
 }

+ 9 - 23
pages/buytickets/selectSite.js

@@ -6,7 +6,7 @@ import Carmap from '@/components/Carmap.vue'
 export default {
 	data() {
 		return {
-			
+			look:false,
 			initBl: false,
 			title: '乘车人',
 			show: false,
@@ -50,31 +50,15 @@ export default {
 
 	methods: {
 		downBtn(item) {
-			if (item.status != 0) {
+			if (!this.look&&item.status != 0) {
 				this.downId = item.id
 				this.downName = item.stationName
-
+				this.$refs.amap.setDown(item);
 			}
+				this.$refs.amap.setCenter(item);
 
 		},
-		select(uid) {
-			//passengerInfo
-			if(this.passengerInfo.id){
-				var obj=this.carhelp.get("form");
-				obj.mergeOrderId=this.passengerInfo.id;
-				this.carhelp.set("form",obj);
-			}
-			if(uid){
-				uni.navigateTo({
-					url: '/pages/buytickets/site?id=' + this.id + '&uid=' + uid
-				})
-			}else{
-				uni.navigateTo({
-					url: '/pages/buytickets/confirm?id=' + this.id 
-				})
-			}
-			
-		},
+		
 	
 		selectSiteBtn(){
 			 
@@ -112,7 +96,7 @@ export default {
 					
 					this.carhelp.set("form",obj);
 					//uni.navigateBack()
-					uni.navigateTo({
+					uni.redirectTo({
 						url: '/pages/buytickets/site?id='+this.id
 					})
 				})
@@ -301,7 +285,9 @@ export default {
 
 		this.id = op.id
 		var obj=this.carhelp.get("form");
-	 
+		if(obj && obj.name != 'buytickets'){
+			this.look=true;// 只读界面
+		}
 		
 		if(obj.op){
 			

+ 1 - 1
pages/buytickets/selectSite.vue

@@ -113,7 +113,7 @@
 				</view>
 			</view>
 		</view>
-		<view class="add-foot">
+		<view class="add-foot" v-if="!look">
 			<view class="add-foot-price">
 				<p>下站站点:{{downName?downName:'点击选择站点'}}</p>
 			</view>

+ 4 - 4
pages/buytickets/site.js

@@ -58,7 +58,7 @@ import * as API from '@/apis/buytickets.js'
 				obj.ticket=null;
 				obj = this.carhelp.set("form", obj)
 				this.$refs.common.alert( "操作成功",()=>{
-					uni.navigateTo({
+					uni.reLaunch({
 						url: '/pages/buytickets/index?id=' + this.id 
 					})
 				});
@@ -77,7 +77,7 @@ import * as API from '@/apis/buytickets.js'
  			//obj.op = this.op;
  			//obj = this.carhelp.set("form", obj)
 
- 			uni.navigateTo({
+ 			uni.redirectTo({
  				url: '/pages/buytickets/selectSite?id=' + this.id
  			})
  		},
@@ -107,7 +107,7 @@ import * as API from '@/apis/buytickets.js'
 					obj.oplist=[];
 					obj.ticket=null;
 					obj = this.carhelp.set("form", obj)
-					uni.navigateTo({
+					uni.reLaunch({
 						url: '/pages/buytickets/index?id=' + this.id 
 					})
 					console.log(response)
@@ -120,7 +120,7 @@ import * as API from '@/apis/buytickets.js'
 					obj.oplist=[];
 					obj.ticket=null;
 					obj = this.carhelp.set("form", obj)
-					uni.navigateTo({
+					uni.reLaunch({
 						url: '/pages/buytickets/index?id=' + this.id 
 					})
 					console.log(response)

+ 38 - 7
pages/index/index.js

@@ -4,6 +4,10 @@ import * as API from '@/apis/index.js'
 export default {
 		data() {
 			return {
+				btn:{
+					color: '#1677FF'
+				},
+				getPointBl:false,//是否定位完成
 				longitude: '',
 				latitude: '',
 				list: [{
@@ -21,30 +25,59 @@ export default {
 						title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳',
 						url:"/pages/buytickets/index?id=0cb4dd6c-ca33-4837-bd4a-7f01afb4d1a3"
 					}
-				],
+				],
+				siteList:[
+				]
 			}
 		},
 		onLoad(){
 			
 		},
 		methods: {
+			gotoQuery(){
+				uni.navigateTo({
+					url:'/pages/query/index'
+				})
+			},
+			gotoLine(item){
+				uni.navigateTo({
+					url:'/pages/buytickets/selectSite?id='+item.id
+				})
+			},
 			getPoint() {
 			
-			
+				this.$refs.common.alert("定位中...");
 				WxJsApi.getLocation().then((res) => {
-			
+					
 					var latitude = parseFloat(res.latitude);
 					var longitude = parseFloat(res.longitude);
 			
 					this.latitude = latitude;
 					this.longitude = longitude;
-					
+					this.passengerNearbyStation();
+					this.getPointBl=true
 			
 				}).catch(error => {
 					this.$refs.common.alert( error);
 					
 				})
 			},
+			passengerNearbyStation(){
+				this.latitude = '30.284867';
+				this.longitude = '112.291269';
+				
+				var form={
+					longitude:this.longitude,
+					latitude:this.latitude,
+					pageIndex:1,
+					pageSize:5
+				}
+				API.passengerNearbyStation(form).then((res) => {
+					this.siteList=res.data;
+				}).catch(error => {
+					this.$refs.common.alert( error);
+				})
+			},
 			getScan(){
 				WxJsApi.scanQRCode(0).then(function(url){
 					console.log(url)
@@ -67,9 +100,7 @@ export default {
 				this.$refs.uDropdown.close();
 			}
 		},onReady(){
-			WxJsApi.getWxConfig(['scanQRCode','getLocation']);
-			console.log(this.carhelp.getOpenId());
-			
+			WxJsApi.getWxConfig(['scanQRCode','getLocation']);			
 			this.getPoint();
 			//清空缓存
 			this.carhelp.set("form",{});

+ 40 - 53
pages/index/index.vue

@@ -16,8 +16,8 @@
 						</u-dropdown-item>
 					</u-dropdown>
 				</view>				
-				<view class="search-wrap">
-					<u-search placeholder="日照香炉生紫烟" :show-action="false"></u-search>
+				<view class="search-wrap" >
+					<u-search placeholder="查线路、站点" @click="gotoQuery" :disabled="true" :show-action="false"></u-search>
 				</view>
 				<view class="navbar-right"  @click="getScan">
 					<u-icon name="saoma" custom-prefix="custom-icon" size="40" color="#333"></u-icon>
@@ -27,75 +27,49 @@
 		</u-navbar>	
 		<view class="banner">
 			<u-swiper :list="list" @click="clickSwiper"></u-swiper>
+		</view>
+		
+		<view  v-if="!getPointBl"  style="text-align:center;margin-top: 40px;" >		
+			 <img src="static/img/getPointError.png" style="width: 50%;" alt="" >
+			 <view>无法获取定位信息,请打开手机定位功能</view>
+			 <u-button :custom-style="btn" size="medium" shape="circle" plain @click="getPoint(true)"  >刷新</u-button>
+			 
+		</view>
+		
+		<view  v-if="getPointBl&&siteList.length==0" style="text-align:center;margin-top: 40px;" >
+			<img src="static/img/null.png" style="width: 50%;" alt="" >
+			<view>附近暂无站点信息</view>
+			<u-button   :custom-style="btn" size="medium" shape="circle" plain   @click="getPoint(true)" >刷新</u-button>
 		</view>
-		<view class="index-floor">
-			<view class="title">
-				<u-icon name="zhanpai" custom-prefix="custom-icon" size="40" color="#1677ff"></u-icon>
-				<span>玉桥小区</span>
-			</view>
-			<view class="content">
-				<view class="route">
-					<view class="route-item">
-						<view class="route-text">
-							<h4>沙岑线</h4>
-							<p>开往岑河物流园</p>
-						</view>
-						<view class="route-gap">
-							<view class="route-gap stop">
-								<span>已到站</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">
-							<span>1站5公里</span>
-							<u-icon name="arrow-right" color="#999" size="28"></u-icon>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="index-floor">
+		<view class="index-floor"  v-for="item,index in siteList" :key="index">
+			
 			<view class="title">
 				<u-icon name="zhanpai" custom-prefix="custom-icon" size="40" color="#1677ff"></u-icon>
-				<span>豉湖路站牌</span>
+				<span>{{item.stationName}}</span>
 			</view>
 			<view class="content">
 				<view class="route">
-					<view class="route-item">
+					<view class="route-item" v-for="li,i in item.nearbyShiftDTOList" :key="i" @click="gotoLine(li)">
 						<view class="route-text">
-							<h4>沙岑线</h4>
-							<p>开往岑河物流园</p>
+							<h4>{{li.routeName}}</h4>
+							<p>开往 {{li.endStationName}}</p>
 						</view>
-						<view class="route-gap">
+						<view class="route-gap" >
 							<view class="route-gap stop">
-								<span>已到站</span>
+								<span>{{li.distance}}米</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">
-							<span>1站5公里</span>
-							<u-icon name="arrow-right" color="#999" size="28"></u-icon>
-						</view>
-					</view>
 				</view>
 			</view>
 		</view>
+		
 	</view>
 </template>
 
-<script>
+<script>
+	
 	import api from './index.js'
 	export default   api
 </script>
@@ -103,7 +77,10 @@
 <style>
 	page{background-color: #f7f7f7;}
 </style>
-<style scoped lang="scss">
+<style scoped lang="scss">
+	.btn{
+		border-color: #1677FF ;
+	}
 	.slot-wrap {
 		display: flex;
 		align-items: center;
@@ -147,6 +124,16 @@
 				font-size: 16px;
 				font-weight: bold;
 			}
+		}
+		.text{
+			padding: 20rpx;
+			border-bottom: 1px solid #f7f7f7;
+			display: flex;
+			align-items: center;
+			span{
+				margin-left: 10rpx;
+				font-size: 12px;
+			}
 		}
 	}
 	.route{

+ 27 - 9
pages/my/index.js

@@ -1,16 +1,34 @@
-
-
-	export default {
+export default {
 		data() {
 			return {
-			
+				user:{},
+				pic:'/static/img/user.png',
+				show:true,
 			}
 		},
-		methods: {
+		onLoad() {
 			
 		},
-		onLoad() {
-			 
+		methods: {
+			showphone(phone){
+				if(!phone){
+					return "";
+				}
+				if(phone.length!=11){
+					return "";
+				}
+				return phone.substring(0,3)+'****'+phone.substring(8);
+			},
+			signOut(){
+				this.carhelp.signOut()
+				uni.reLaunch({
+					url: '/pages/car/login'
+				})
+			}
+		},onReady(){
+			this.user=this.carhelp.getPersonInfo();
+			if(this.user.faceImage){
+					this.pic=this.user.faceImage;
+			}
 		}
-	}
-
+	}

+ 5 - 17
pages/my/index.vue

@@ -7,7 +7,7 @@
 				<u-avatar :src="pic" size="100"></u-avatar>
 			</view>
 			<view class="u-flex-1">
-				<view class="u-font-18 u-p-b-20">用户名称</view>
+				<view class="u-font-18 u-p-b-20">{{user.name}}</view>
 			</view>
 			<view class="u-m-l-10 u-p-10">
 				<u-button type="primary" plain size="mini" shape="circle">修改资料</u-button>
@@ -29,33 +29,21 @@
 		<view class="u-m-t-20">
 			<u-cell-group>
 				<u-cell-item title="意见反馈"></u-cell-item>
-				<u-cell-item title="已绑定手机号"></u-cell-item>
+				<u-cell-item title="已绑定手机号">{{showphone(user.phone)}}</u-cell-item>
 				<u-cell-item title="重置密码"></u-cell-item>
 				<u-cell-item title="关于车信达"></u-cell-item>
 			</u-cell-group>
 		</view>
 		
 		<view class="u-m-t-20">
-			<view class="signOut">退出账号</view>
+			<view class="signOut" @click="signOut">退出账号</view>
 		</view>
 	</view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				pic:'/static/img/user.png',
-				show:true
-			}
-		},
-		onLoad() {
-			
-		},
-		methods: {
-			
-		}
-	}
+	import api from './index.js'
+	export default api;
 </script>
 
 <style lang="scss">

+ 85 - 1
pages/query/index.js

@@ -1,16 +1,100 @@
 
+import * as API from '@/apis/query.js'
 
 	export default {
 		data() {
 			return {
-			
+				ing:false,
+				key:'',
+				record:[],
+				result:[],
+				recordsTotal:0,
 			}
 		},
 		methods: {
+			 gotoLine(item){
+				 uni.redirectTo({
+					url:'/pages/route/index?id='+item.id
+				 })
+			 },
+			setHistory(){
+			    //搜索记录保存
+			    var sz=this.carhelp.get("searchHistory");
+			    if(!sz){
+			        sz=[];
+			    }
+			    var temp =[];
+			    //去重 ,后插入的,排队到最前面
+			    if(sz.length){
+			        for(var i in sz){
+			            if(i==0){
+			                temp.push(this.key);
+			            }
+			            if(sz[i]==this.key){
+			                continue;
+			            }
+			            temp.push(sz[i]);
+			
+			            if(temp.length==10){
+			                break
+			            }
+			
+			        }
+			    }else{
+			        temp.push(this.key);
+			    }
+				this.record=temp;
+			    this.carhelp.set("searchHistory",temp);
+			},
 			
+			clearBtn(){
+				this.carhelp.set("searchHistory",[]);
+				this.record=[];
+				this.$refs.common.alert("搜索内容已清空")
+			},
+			change(){
+				this.ing=false;
+				if(this.key==""){
+					this.result=[]
+				}
+				
+			},
+			itemBtn(){
+				
+			},
+			submit(){
+				if(this.key==""){
+					return
+				}
+				
+				this.setHistory();
+				var form={
+					name:this.key,
+					pageIndex:1,
+					pageSize:20
+				}
+				API.routeList(form).then((res) => {
+					this.ing=true;
+					this.result=res.data.data;
+					this.recordsTotal=res.data.recordsTotal
+					for(var i in this.result){
+						var item=this.result[i];
+						var len =item.name.indexOf(this.key)
+						this.result[i].name1=item.name.substring(0,len);
+						this.result[i].name2=item.name.substring(len+this.key.length);
+
+					}
+					
+				}).catch(error => {
+					this.$refs.common.alert( error);
+				})
+			}
 		},
 		onLoad() {
 			 
+		},onReady(){
+			
+			this.record=this.carhelp.get("searchHistory");
 		}
 	}
 

+ 46 - 26
pages/query/index.vue

@@ -1,47 +1,52 @@
 <template>
 	<view class="content">
-		<u-navbar :is-back="false" title="">	
+		<car-common   ref="common"  ></car-common>
+		
+		<u-navbar   title="">	
 			<view class="slot-wrap">	
 				<view class="search-wrap">
-					<u-search placeholder="日照香炉生紫烟" :show-action="false"></u-search>
+					<u-search placeholder="查线路、站点"  :focus="true" v-model="key" @change="change()" @search="submit"  :show-action="false"></u-search>
 				</view>
 				<view class="navbar-right">
-					<span>取消</span>
+				
+					<u-button type="warning" shape="circle" size="mini" @click="submit()">搜索</u-button>
 				</view>
 			</view>
 		</u-navbar>	
-		<view class="search">
-			<view class="search-head">
+		<view class="search" >
+			<view class="search-head" v-show="!ing">
 				<span>搜索历史</span>
-				<u-icon name="shanchu" custom-prefix="custom-icon" size="36" color="#888888"></u-icon>
+				<u-icon name="shanchu" @click="clearBtn"  custom-prefix="custom-icon" size="36" color="#888888"></u-icon>
+			</view>
+			
+			<view class="search-main" v-show="!ing">
+				<view class="search-record" v-for="item,index in record" :key="index" @click="key=item,submit()">{{item}}</view>
+			 
+			</view>
+			<view class="search-result" v-show="result.length" v-for="item,index in result" :key="index" @click="gotoLine(item)">
+				<u-icon name="bus" custom-prefix="custom-icon" size="30" color="#888888"></u-icon>
+				<u-icon name="zhanpai1" v-if="false" custom-prefix="custom-icon" size="30" color="#888888"></u-icon>
+				
+				<view class="search-result-text"  >
+					<p>{{item.name1}}</p><span>{{key}}</span><p>{{item.name2}}</p>
+				</view>
 			</view>
-			<view class="search-main">
-				<view class="search-record">8路</view>
-				<view class="search-record">9路</view>
-				<view class="search-record">9路支线</view>
-				<view class="search-record">8路</view>
-				<view class="search-record">9路</view>
-				<view class="search-record">9路支线</view>
-				<view class="search-record">8路</view>
-				<view class="search-record">9路</view>
-				<view class="search-record">9路支线</view>
+			<view v-show="result.length&&result.length==recordsTotal" style="text-align:center;margin-top: 10px;">没有更多记录了</view>
+			<view v-show="result.length&&result.length<recordsTotal" style="text-align:center;margin-top: 10px;">只展示20条数据</view>
+			
+			<view  v-show="ing&&result.length==0" style="text-align:center;margin-top: 80px;" >
+				<img src="static/img/blankpage.png" style="width: 50%;" alt="" >
+				<view>附近暂无站点信息</view>
 			</view>
+			
+			
 		</view>
 	</view>
 </template>
 
 <script>
 	import api from './index.js'
-	export default {
-		data() {
-			return {
-				
-			}
-		},
-		methods: {
-			
-		}
-	}
+	export default  api;
 </script>
 
 <style scoped lang="scss">
@@ -77,6 +82,20 @@
 				color:#999;
 			}
 		}
+		.search-result{
+			border-bottom: 1px solid #f7f7f7;
+			padding:20rpx ;
+			display: flex;
+			align-items: center;
+			.search-result-text{
+				display: flex;
+				align-items: center;
+				margin-left: 20rpx;
+				span{
+					color:#ff7826
+				}
+			}
+		}
 		.search-main{
 			margin-top: 30rpx;
 			.search-record{
@@ -86,6 +105,7 @@
 				padding:10rpx 30rpx;
 				border-radius: 10rpx;
 			}
+			
 		}
 	}
 </style>

BIN
static/img/getPointError.png


BIN
static/img/null.png


+ 1 - 1
utils/mixin.js

@@ -11,7 +11,7 @@ var app = {
 	getPersonInfo : () => {
 		 return uni.getStorageSync(prefix + 'personInfo')
 	},
-
+	signOut:()=>  uni.removeStorageSync(prefix + + 'personInfo'),
 	getOpenId : () =>   uni.getStorageSync(prefix + 'wx_openId'),
 
 	setOpenId : (value) => uni.setStorageSync(prefix + 'wx_openId', value),