zhengkaixin 2 年之前
當前提交
ad1a97f66f
共有 100 個文件被更改,包括 10725 次插入0 次删除
  1. 10 0
      .env.dev.js
  2. 35 0
      .env.js
  3. 12 0
      .env.prod.js
  4. 11 0
      .env.test.js
  5. 13 0
      .env.uat.js
  6. 31 0
      App.vue
  7. 57 0
      README.md
  8. 111 0
      apis/buytickets.js
  9. 9 0
      apis/car.js
  10. 70 0
      apis/common.js
  11. 90 0
      apis/index.js
  12. 69 0
      apis/my.js
  13. 21 0
      apis/news.js
  14. 21 0
      apis/query.js
  15. 19 0
      apis/remind.js
  16. 39 0
      apis/route.js
  17. 88 0
      apis/user.js
  18. 44 0
      apis/weixin.js
  19. 153 0
      bobo-router/README.md
  20. 362 0
      bobo-router/bobo-router.js
  21. 126 0
      bobo-router/index.js
  22. 384 0
      components/Carmap.vue
  23. 152 0
      components/Common.vue
  24. 39 0
      components/Loading.vue
  25. 25 0
      font.js
  26. 43 0
      main.js
  27. 87 0
      manifest.json
  28. 24 0
      package.json
  29. 403 0
      pages.json
  30. 39 0
      pages/404/404.vue
  31. 39 0
      pages/404/500.vue
  32. 106 0
      pages/buytickets/adjust.js
  33. 77 0
      pages/buytickets/adjust.vue
  34. 208 0
      pages/buytickets/confirm.js
  35. 158 0
      pages/buytickets/confirm.vue
  36. 22 0
      pages/buytickets/edit.vue
  37. 344 0
      pages/buytickets/home.js
  38. 227 0
      pages/buytickets/home.vue
  39. 219 0
      pages/buytickets/index.js
  40. 183 0
      pages/buytickets/index.vue
  41. 410 0
      pages/buytickets/selectSite.js
  42. 471 0
      pages/buytickets/selectSite.vue
  43. 230 0
      pages/buytickets/site.js
  44. 230 0
      pages/buytickets/site.vue
  45. 50 0
      pages/buytickets/success.js
  46. 151 0
      pages/buytickets/success.vue
  47. 32 0
      pages/buytickets/upload.js
  48. 96 0
      pages/buytickets/upload.vue
  49. 22 0
      pages/buytickets/view.vue
  50. 138 0
      pages/car/login.js
  51. 127 0
      pages/car/login.vue
  52. 407 0
      pages/index/index.js
  53. 207 0
      pages/index/index.vue
  54. 95 0
      pages/index/sitePage.js
  55. 109 0
      pages/index/sitePage.vue
  56. 60 0
      pages/my/index.js
  57. 181 0
      pages/my/index.vue
  58. 16 0
      pages/my/platform/about.js
  59. 54 0
      pages/my/platform/about.vue
  60. 88 0
      pages/my/platform/help.js
  61. 31 0
      pages/my/platform/help.vue
  62. 16 0
      pages/my/platform/opinion.js
  63. 22 0
      pages/my/platform/opinion.vue
  64. 81 0
      pages/my/user/bybusDetails.js
  65. 117 0
      pages/my/user/bybusDetails.vue
  66. 68 0
      pages/my/user/bybusList.js
  67. 131 0
      pages/my/user/bybusList.vue
  68. 69 0
      pages/my/user/feedback.js
  69. 63 0
      pages/my/user/feedback.vue
  70. 16 0
      pages/my/user/resetpassword/change.js
  71. 49 0
      pages/my/user/resetpassword/change.vue
  72. 16 0
      pages/my/user/resetpassword/verification.js
  73. 49 0
      pages/my/user/resetpassword/verification.vue
  74. 92 0
      pages/my/user/updateinfo.js
  75. 86 0
      pages/my/user/updateinfo.vue
  76. 129 0
      pages/my/user/updatephone/change.js
  77. 43 0
      pages/my/user/updatephone/change.vue
  78. 32 0
      pages/my/user/updatephone/index.js
  79. 48 0
      pages/my/user/updatephone/index.vue
  80. 131 0
      pages/my/user/updatephone/verification.js
  81. 43 0
      pages/my/user/updatephone/verification.vue
  82. 19 0
      pages/news/details.js
  83. 36 0
      pages/news/details.vue
  84. 102 0
      pages/news/index.js
  85. 95 0
      pages/news/index.vue
  86. 116 0
      pages/query/index.js
  87. 113 0
      pages/query/index.vue
  88. 16 0
      pages/query/record.js
  89. 95 0
      pages/query/record.vue
  90. 107 0
      pages/remind/index.js
  91. 112 0
      pages/remind/index.vue
  92. 600 0
      pages/route/index.js
  93. 636 0
      pages/route/index.vue
  94. 0 0
      static/css/style.css
  95. 2 0
      static/font/iconfont.css
  96. 二進制
      static/img/1.jpg
  97. 二進制
      static/img/2.jpg
  98. 二進制
      static/img/3.jpg
  99. 二進制
      static/img/404.png
  100. 二進制
      static/img/500.png

+ 10 - 0
.env.dev.js

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

+ 35 - 0
.env.js

@@ -0,0 +1,35 @@
+(function() {  
+    const NODE_ENV = 'test'; // dev:开发环境 | test:测试环境  
+    let ENV_VAR = null;  
+	 
+    if (process.env.NODE_ENV === "development") {  
+
+        if (NODE_ENV === 'dev') {  
+            ENV_VAR = require('.env.dev.js');  
+        } else if (NODE_ENV === 'test') {  
+			ENV_VAR = require('.env.test.js'); 
+        }  
+		
+    } 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');  
+		} 
+      
+    }  
+
+    if (ENV_VAR) {  
+		process.car = {};  
+        for (let key in ENV_VAR) {  
+			process.car[key] = ENV_VAR[key];			
+        }  
+    }  
+})();

+ 12 - 0
.env.prod.js

@@ -0,0 +1,12 @@
+const UNI_APP = {  
+	
+	BASE_URL: 'http://121.37.187.149/smart-bus-server/' ,
+	NODE_ENV :"prod",
+	SIMPLE_RUN:false,
+	//企业联合会微信appid
+	VUE_APP_WXAPPID:"wx93675268c87a5a46"
+	//VUE_APP_WXAPPID:"wxa8954f417fa7c32f"
+	
+}  
+
+module.exports = UNI_APP;

+ 11 - 0
.env.test.js

@@ -0,0 +1,11 @@
+const UNI_APP = {  
+	BASE_URL: 'http://192.168.33.120:8087/smart-bus-server/' ,
+
+	NODE_ENV :"test",
+	SIMPLE_RUN:false,
+	//车信达 appid
+	VUE_APP_WXAPPID:"wx93675268c87a5a46"
+
+}  
+
+module.exports = UNI_APP;

+ 13 - 0
.env.uat.js

@@ -0,0 +1,13 @@
+const UNI_APP = {  
+	
+	BASE_URL: 'https://ykt-test.xiaoxinda.com/smart-bus-server/' ,
+	//BASE_URL: 'http://121.37.187.149/smart-bus-server/' ,
+	NODE_ENV :"uat",
+	SIMPLE_RUN:false,
+	//企业联合会微信appid
+	VUE_APP_WXAPPID:"wx93675268c87a5a46"
+	//VUE_APP_WXAPPID:"wxa8954f417fa7c32f"
+	
+}  
+
+module.exports = UNI_APP;

+ 31 - 0
App.vue

@@ -0,0 +1,31 @@
+<script>
+	import '.env.js'
+	import 'font.js'
+	export default {
+		onLaunch: function() {
+			
+			
+		},
+		onShow: function() {
+			
+		
+		},
+		onReady: function() {
+			
+		},
+		onHide: function() {
+			
+		},
+		methods:{
+			
+		} 
+	}
+</script>
+<style lang="scss">
+	/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
+	@import "uview-ui/index.scss";
+
+	/*每个页面公共css */
+	//@import 'static/css/style.css';
+	@import 'static/font/iconfont.css';
+</style>

+ 57 - 0
README.md

@@ -0,0 +1,57 @@
+# jp-car-phone 车信达手机端
+
+## 运行与安装
+建议使用uniapp的官方推荐开发工具HBuilder最新版本
+
+## 目录结构
+~~~
+www  WEB部署目录(或者子目录)
+├─apis             接口目录
+├─components       组件目录
+├─config           配置目录
+├─pages            页面目录
+├─static           静态文件目录
+├─utils            工具模块目录
+├─App.vue          主入口组件
+├─main.js          主入口模块
+├─mainifest.json   项目配置
+├─pages.json       页面及其他公共配置
+├─uni.scss         控制应用的风格样式文件
+├─vue.config.js    vue配置,多不可用,具体参见文档https://uniapp.dcloud.io/collocation/vue-config
+~~~
+
+## 编码风格
+- 文件命名建议使用驼峰命名,其中首字母小写,名字要语义清晰
+- data内参数或者函数参数使用驼峰命名,关键参数或者有歧义的参数应该有参考备注
+- 页面的命名使用驼峰命名,而组件的命名则使用中划线命名,将两者能够更好的分别
+- 在页面内定义函数和参数需要有备注,定义此方法的含义及其使用, 生命周期函数推荐使用uni-app的内置自带函数,不推荐使用vue的生命函数
+- 在页面中使用this 推荐在全局置顶设置_this 这样会保持风格统一 且节省代码
+- 在页面头部起一行注释,表明这个页面是什么页面 
+- 以前的html标签改了很多,请参照官方文档使用
+`div 改成 view`
+`span、font 改成 text`
+`a 改成 navigator`
+`img 改成 image`
+`input 还在,但type属性改成了confirmtype`
+`form、button、checkbox、radio、label、textarea、canvas、video 这些还在。`
+`select 改成 picker`
+`iframe 改成 web-view`
+`ul、li没有了,都用view替代`
+
+##插件引用
+#控制台
+yarn add vconsole
+###uniapp 路由站
+npm install uni-simple-router uni-read-pages(取消使用, 存在h5 刷新白屏问题)
+//双路由   uni-crazy-router 直接链接访问, 无法触发前置占点
+[uni-crazy-router](https://ext.dcloud.net.cn/plugin?id=1658)
+[bobo-router ](https://ext.dcloud.net.cn/plugin?id=904)
+
+
+
+[vue-router-uni ](https://ext.dcloud.net.cn/plugin?id=605)
+[mac80端口问题无法使用](https://blog.csdn.net/weixin_41047933/article/details/97765502)
+sudo pfctl -ef /etc/pf-tomcat.conf
+
+
+redirectTo

+ 111 - 0
apis/buytickets.js

@@ -0,0 +1,111 @@
+import request from '../utils/request.js';
+import Qs from 'qs';
+
+export function test(data) {
+	return request({
+		method: 'post',
+		data: data,
+		url: '/test/post'
+	})
+}
+
+//查询班次
+export function getShiftInfo(data) {
+	return request({
+		url: '/mobile/passengerApi/getShiftInfo',
+		data: {
+			id:data
+		},
+		method: 'post',
+	})
+}
+
+//查询站点
+export function getVehicleStationInfo(data) {
+	return request({
+		url: '/mobile/passengerApi/getVehicleStationInfo',
+		data: {
+			id:data
+		},
+		method: 'post',
+	})
+}
+//查询车辆
+export function getVehicleInfo(data) {
+	return request({
+		url: '/mobile/passengerApi/getVehicleInfo',
+		data: {
+			id:data
+		},
+		method: 'post',
+	})
+}
+//车牌号查询
+export function passengerApi(data) {
+	return request({
+		url: '/mobile/passengerApi/',
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}
+
+//匹配照片
+export function matchFaceImage(data) {
+	return request({
+		url: '/mobile/passengerApi/matchFaceImage',
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}
+
+//查询车辆
+export function getPassengerInfo(data) {
+	return request({
+		url: '/mobile/passengerApi/getPassengerInfo',
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}
+
+//查询未购票人数
+export function upBusNoTicketList(data) {
+	return request({
+		url: '/mobile/passengerApi/upBusNoTicketList',
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}
+
+//创建订单
+export function createPassengerOrder(data) {
+	return request({
+		url: '/mobile/passengerApi/createPassengerOrder',
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}
+//修改订单
+export function updatePassengerOrder(data) {
+	return request({
+		url: '/mobile/passengerApi/updatePassengerOrder',
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}
+
+//查询金额
+export function ticketAmount(data) {
+	return request({
+		url: '/mobile/driverApi/ticketAmount',
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}
+// 删除订单
+export function deletePassengerOrder(data) {
+	return request({
+		url: '/mobile/passengerApi/deletePassengerOrder',
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}

+ 9 - 0
apis/car.js

@@ -0,0 +1,9 @@
+import request from '../utils/request.js';
+
+export function test(data) {
+	return request({
+		method: 'post',
+		data: data,
+		url: '/test/post'
+	})
+}

+ 70 - 0
apis/common.js

@@ -0,0 +1,70 @@
+import request from '@/utils/request'
+import Qs from 'qs';
+
+//上传图片
+export function upload(formData) {
+	return request({
+		url: '/mobile/passengerApi/upload',
+		data: formData,
+		method: 'post',
+		
+	})
+}
+
+//上传图片
+export function uploadBase64(formData) {
+	return request({
+		url: '/mobile/personInfoApi/uploadBase64',
+		data: formData,
+		method: 'post',
+		timeout: 60000,
+	})
+}
+
+
+export function getSchoolServeList(params) {
+	return request({
+		url: '/mobile/companyInfoApi/schoolServeList',
+		data: Qs.stringify(params),
+		method: 'post',
+	})
+}
+
+//获取banner图片
+export function getBannerInfo(type) {
+	return request({
+		url: '/mobile/bannerInfo/getBannerInfo',
+		data: Qs.stringify({
+			type: type
+		}),
+		method: 'post',
+	})
+}
+
+//综合订单
+export function mergeInfo(id) {
+	return request({
+		url: '/mobile/passengerApi/mergeInfo',
+		data: Qs.stringify({
+			outOrderNo: id
+		}),
+		method: 'post',
+	})
+}
+//发送短信
+export function sendMsg(params) {
+	return request({
+		url: '/mobile/personInfoApi/getVerifyCode',
+		data: Qs.stringify(params),
+		method: 'post',
+	})
+}
+
+//验证验证码并登录
+export function validateCode(params) {
+	return request({
+		url: '/mobile/personInfoApi/validateCode',
+		data: Qs.stringify(params),
+		method: 'post',
+	})
+}

+ 90 - 0
apis/index.js

@@ -0,0 +1,90 @@
+import request from '../utils/request.js';
+import Qs from 'qs';
+
+
+export function test(data) {
+	return request({
+		method: 'post',
+		data: data,
+		url: '/test/post'
+	})
+}
+
+//未读信息
+export function passengerMessageNoReadNum(data) {
+	
+	return request({
+		url: '/mobile/passengerApi/passengerMessageNoReadNum',
+		data:data,
+		method: 'post',
+	})
+}
+export function passengerNearbyStation(data) {
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		
+		url: '/mobile/passengerApi/passengerNearbyStation'
+	})
+}
+export function getBannerInfo(data) {
+	return request({
+		method: 'post',
+		data: {
+			type:data
+		},
+		
+		url: '/mobile/bannerInfo/getBannerInfo'
+		
+	})
+}
+//查询当前人
+export function queryRemind(data) {
+	return request({
+		method: 'get',
+	
+		url: '/mobile/stationRemindApi/findCurrentVehicle?openId='+data
+	})
+}
+// 创建
+export function saveRemind(data) {
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		
+		url: '/mobile/stationRemindApi/add'
+	})
+}
+
+export function cancelRemind(data) {
+	return request({
+		method: 'post',
+		data: {
+			id:data
+		},
+		url: '/mobile/stationRemindApi/cancel'
+	})
+}
+
+export function nearbyStationInfo(data) {
+	return request({
+		method: 'post',
+		data:data,
+		url: '/mobile/passengerApi/nearbyStationInfo'
+	})
+}
+
+export function getRegionList(data) {
+	return request({
+		method: 'post',
+		data:data,
+		url: '/mobile/passengerApi/getRegionList'
+	})
+}
+export function getOwnerRegion(data) {
+	return request({
+		method: 'post',
+		data:data,
+		url: '/mobile/passengerApi/getOwnerRegion'
+	})
+}

+ 69 - 0
apis/my.js

@@ -0,0 +1,69 @@
+import request from '../utils/request.js';
+import Qs from 'qs';
+
+export function passengerRecordList(data) {
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		url: '/mobile/passengerApi/passengerRecordList'
+	})
+}
+
+export function updateUserInfo(data) {
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		url: '/mobile/passengerApi/updateUserInfo'
+	})
+}
+
+
+export function problemFeedback(data) {
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		url: '/mobile/passengerApi/problemFeedback'
+		
+	})
+}
+
+export function userPhone(data) {
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		url: '/mobile/passengerApi/userPhone'
+		
+	})
+}
+
+export function userUpdatePhone(data) {
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		url: '/mobile/passengerApi/userUpdatePhone'
+		
+	})
+}
+
+
+export function passengerRecordDetail(id) {
+	return request({
+		method: 'post',
+		data: {
+			id:id
+		},
+		url: '/mobile/passengerApi/passengerRecordDetail'
+		
+	})
+}
+
+
+
+export function helpCenterList() {
+	return request({
+		method: 'post',
+	
+		url: '/mobile/passengerApi/helpCenterList'
+		
+	})
+}

+ 21 - 0
apis/news.js

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

+ 21 - 0
apis/query.js

@@ -0,0 +1,21 @@
+import request from '../utils/request.js';
+import Qs from 'qs';
+
+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: '/mobile/passengerApi/routeList'
+	})
+}

+ 19 - 0
apis/remind.js

@@ -0,0 +1,19 @@
+import request from '../utils/request.js';
+import Qs from 'qs';
+
+export function passengerRemindList(data) {
+	return request({
+		method: 'post',
+		data: data,
+		
+		url: '/mobile/passengerApi/passengerRemindList'
+	})
+}
+
+export function updateStationNum(data) {
+	return request({
+		method: 'post',
+		data: Qs.stringify(data),
+		url: '/mobile/stationRemindApi/updateStationNum'
+	})
+}

+ 39 - 0
apis/route.js

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

+ 88 - 0
apis/user.js

@@ -0,0 +1,88 @@
+import request from '@/utils/request'
+import Qs from 'qs';
+
+//帐号密码登录
+export function loginUserName(data) {
+	return request({
+		url: '/mobile/personInfoApi/loginByPassword',
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}
+
+//退出登录
+export function loginOut() {
+	return request({
+		url: '/mobile/personInfoApi/logOut',
+		data: {},
+		method: 'post',
+	})
+}
+
+//获取短信验证码
+export function getVerifyCode(data) {
+	return request({
+		url: '/mobile/passengerApi/getVerifyCode',
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}
+
+export function userUpdatePhone(data) {
+	return request({
+		url: '/mobile/passengerApi/userUpdatePhone',
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}
+//验证短信验证码
+export function validateCode(data) {
+	return request({
+		url: '/mobile/passengerApi/validateCode',
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}
+
+//重置密码
+export function resetPassword(data) {
+	return request({
+		url: '/mobile/personInfoApi/resetPassword',
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}
+
+//获取基础信息
+export function getBasicInformation() {
+	return request({
+		url: '/mobile/personInfoApi/basicInformation',
+		method: 'post',
+	})
+}
+
+//提交基础信息
+export function submitBasicInformation(data) {
+	return request({
+		url: '/mobile/personInfoApi/updateBasicInformation',
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}
+
+//关于企联
+export function getAboutInfo() {
+	return request({
+		url: '/mobile/enterpriseInfoApi/enterpriseInfo',
+		method: 'post',
+	})
+}
+
+//变更手机号
+export function changePhone(data) {
+	return request({
+		url: '/mobile/personInfoApi/validateCodeAndUpdatePhone',
+		data: Qs.stringify(data),
+		method: 'post',
+	})
+}

+ 44 - 0
apis/weixin.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+import Qs from 'qs';
+
+//微信支付
+export function wxpay(orderId) {
+	return request({
+		url: '/wxPay/wxJsapiPay',
+		data: {
+			id: orderId
+		},
+		method: 'get',
+	})
+}
+//根据code换取openid
+export function getDataByCode(code) {
+	return request({
+		url: '/wechat/findUserInfo/' + code,
+		params: {},
+		method: 'get',
+	})
+}
+
+//获取用户信息
+export function getDataByOpenId(openId) {
+	return request({
+		url: '/mobile/personInfoApi/findByOpenId',
+		data: Qs.stringify({
+			openId: openId
+		}),
+		method: 'post',
+	})
+}
+
+//获得配置
+export function getConfig() {
+	
+	return request({
+		url: '/wechat/getConfig',
+		data: {
+			url: window.location.href.split('#')[0]
+		},
+		method: 'get',
+	})
+}

+ 153 - 0
bobo-router/README.md

@@ -0,0 +1,153 @@
+# bobo-router
+
+bobo-router 是一个基于uni-app框架的路由拦截插件,本项目借鉴了[uni-simple-router](https://github.com/SilurianYang/uni-simple-router)的思路,并对其进行简化,简化的原因是因为自己比较懒,不想每次新增页面就定义两遍路由表,所以`bobo-router`的特点就是纯粹的路由拦截,不再**定义两遍路由表**。
+
+当然,由于不再定义路由表,也损失了一些能力,比如不能使用命名路由,不能在路由表中自定义路由元信息等。
+
+> 本人不是大神,插件可能会存在各种各样的问题,望大家谨慎使用,并多多担待。
+
+## 安装
+
+下载插件后,在`main.js`中导入即可。
+
+```js
+// main.js
+
+import router from './utils/bobo-router'
+```
+
+## 基本使用
+
+同`uni-simple-router`一样,项目中的路由跳转要全部弃用`uni.navigateTo()`这样的系统跳转方法,转而使用插件提供的`this.$Router.push()`这样的方法。
+
+```js
+// *.vue
+
+// 跳转页面,保留当前页到页面栈,等同于 uni.navigateTo()
+this.$Router.push({
+	page: '/pages/index/index',
+	params: {}
+})
+
+// 跳转页面,替换当前页到页面栈,等同于 uni.redirectTo()
+this.$Router.replace({
+	page: '/pages/index/index',
+	params: {}
+})
+
+// 跳转页面,清空页面栈,等同于 uni.reLaunch()
+this.$Router.replaceAll({
+	page: '/pages/index/index',
+	params: {}
+})
+
+// 跳转 Tabbar,等同于 uni.switchTab()
+this.$Router.pushTab({
+	page: '/pages/index/index',
+	params: {}
+})
+```
+
+> Tips: 
+> 如果不需要传递参数,可以直接使用 this.$Router.push('/pages/index/index')
+
+> 注意:
+> pushTab传递的参数可通过this.$Route.params获取,但h5页面刷新之后就会丢失数据
+
+## 路由拦截
+
+支持路由前置守卫和路由后置守卫,并且提供一个路由跳转失败的回调,可以重写以实现自己的逻辑。
+
+在`bobo-router/index.js`中添加自己的拦截逻辑。
+
+```js
+// ./utils/bobo-router/index.js
+
+// 路由全局拦截器 在这里处理登录、授权等相关操作
+router.beforeEach(function(to, from, next) {
+	console.log('前置守卫')
+	// to.page不存在表示此次路由跳转仅为了执行路由守卫,若不需处理则直接放行,就不会执行任何路由操作了
+	if (from.page === '/pages/plugin/routers/r3' && !to.page) {
+	// 测试小程序跳转
+	// if (from.page === '/pages/index/index' && !to.page) {
+		next({page: '/pages/plugin/routers/r4', params: {
+			message: '我是从路由3刷新跳过来的'
+		}, method: 'redirectTo'})
+	} else {
+		next()
+	}
+})
+
+// 路由后置拦截器 在这里处理用户高频操作信息
+router.afterEach(function (to, from) {
+	console.log('后置守卫')
+})
+
+// 路由跳转出错处理
+router.onError(function(e) {
+	console.log('错误:', e.message || '路由跳转失败')
+})
+```
+
+参数解释:
+
+**to**:目标路由信息,包含`method`路由跳转方式、`page`页面地址和`params`页面参数
+
+> 注:在进入应用的第一个页面或h5刷新页面后会执行路由前置守卫,此时 to 中的属性均为 undefined
+
+**from**:当前路由信息,包含`page`页面地址和`params`页面参数
+
+**next**:下一步操作
+
+- `next(false)` 中断路由跳转
+- `next('/pages/index/index')` 执行指定页面的路由前置守卫,若当前操作指定过跳转方式,则使用该跳转方式,否则使用默认的push进行跳转
+- `next({page:'/pages/index/index',params:{},method:''})` 执行指定页面的路由前置守卫,method传入跳转方式,也可以不指定,效果同直接传入页面地址
+- `next()` 放行 执行跳转操作
+
+## 参数解析
+
+使用本插件的方法去跳转路由,会将对象的第一级属性转换到URL中,深层对象则转为json串放在对应的属性中。
+
+例如:
+
+```js
+// 转换前对象
+{
+	num: 19,
+	numStr: '19',
+	testParams: true,
+	deepObj: {
+		str: 'hahaha'
+	},
+	ignoreFun: function() {
+		console.log('i\'m hide.')
+	},
+	testUndefined: undefined,
+	testNull: null
+}
+
+// 转换后URL
+?num=19&numStr=19&testParams=true&deepObj=%7B"str"%3A"hahaha"%7D&testUndefined=&testNull=
+```
+
+如果要获取当前路由信息,可通过`this.$Route`获取。
+
+```js
+{
+    "path": "/pages/plugin/router?num=19&numStr=19&testParams=true&deepObj={\"str\":\"hahaha\"}&testUndefined=&testNull=",
+    "params": {
+        "num": 19,
+        "numStr": "19",
+        "testParams": true,
+        "deepObj": {
+            "str": "hahaha"
+        },
+        "testNull": null
+    },
+    "page": "/pages/plugin/router",
+    "pageTitle": "路由拦截插件"
+}
+```
+
+> 页面标题 pageTitle 是在页面中的 data(){}代码块中定义了之后才能正常显示,且只能在onload生命周期之后使用。
+> h5端则不需要定义pageTitle,插件可直接获取当前网页标题。

+ 362 - 0
bobo-router/bobo-router.js

@@ -0,0 +1,362 @@
+class Router {
+	constructor(arg) {
+		if (arg && arg.constructor !== Object) {
+			return console.error(`Routing configuration must be an Object`)
+		}
+		Router.$root = this;
+	}
+
+	// 路由跳转方法映射
+	routeMap = {
+		push: 'navigateTo',
+		replace: 'redirectTo',
+		replaceAll: 'reLaunch',
+		pushTab: 'switchTab'
+	}
+
+	/**
+	 * 执行路由跳转
+	 */
+	_pushTo() {
+		return new Promise((resolve, reject) => {
+			let {
+				page,
+				params,
+				method
+			} = this.tempRoute
+			// 对首次进入页面执行路由守卫时如果放行,method page params都为空 此时应该直接中断流程,无需抛出异常
+			if (!method && !page && !params) {
+				return
+			}
+
+			let urlParams = '?'
+			if (!page) {
+				reject(new Error('参数page未填写'))
+				return
+			} else if (params && typeof(params) === 'object') {
+				// 处理参数,转换为url字符串
+				Object.keys(params).forEach(k => {
+					// 深度对象转为json字符串(包含数组)
+					if (typeof(params[k]) === 'object') {
+						if (params[k]) {
+							const json = JSON.stringify(params[k])
+							urlParams += `${k}=${json}&`
+						} else {
+							urlParams += `${k}=&`
+						}
+					} else if (typeof(params[k]) === 'number' || typeof(params[k]) === 'string' || typeof(params[k]) ===
+						'boolean') {
+						// 基础值直接写入
+						urlParams += `${k}=${params[k]}&`
+					} else if (typeof(params[k]) === 'undefined') {
+						urlParams += `${k}=&`
+					}
+				})
+			}
+
+			// 参数组装
+			if (urlParams.length === 1) {
+				urlParams = ''
+			} else {
+				urlParams = urlParams.substr(0, urlParams.length - 1)
+			}
+
+			// 设置路由跳转方式
+			if (!method) {
+				method = 'navigateTo'
+			}
+			if (this.routeMap[method]) {
+				method = this.routeMap[method]
+			}
+
+			// 调用系统跳转方法
+			uni[method]({
+				url: page + urlParams,
+				success: () => {
+					// 执行路由后置守卫
+					if (this._afterEach && typeof(this._afterEach) === 'function') {
+						this._afterEach.call(this, this.tempRoute, this.route)
+					}
+
+					// 更新路由信息
+					this.route = {
+						path: page + urlParams,
+						params: params || {},
+						page
+					}
+					this.tempRoute = null
+					resolve()
+				},
+				fail: (e) => {
+					reject(new Error('路由跳转失败!'))
+				}
+			})
+		})
+	}
+
+	/**动态的导航到一个新 URL 保留浏览历史
+	 * navigateTo
+	 * @param {Object} rule
+	 */
+	push(arg) {
+		const rule = {
+			method: 'navigateTo'
+		}
+		if (typeof(arg) === 'string') {
+			rule.page = arg
+		} else if (typeof(arg) === 'object') {
+			rule.page = arg.page
+			rule.params = arg.params
+		}
+		this.next(rule)
+	}
+
+	/**动态的导航到一个新 URL 关闭当前页面,跳转到的某个页面。
+	 * redirectTo
+	 * @param {Object} rule
+	 */
+	replace(arg) {
+		const rule = {
+			method: 'redirectTo'
+		}
+		if (typeof(arg) === 'string') {
+			rule.page = arg
+		} else if (typeof(arg) === 'object') {
+			rule.page = arg.page
+			rule.params = arg.params
+		}
+		this.next(rule)
+	}
+
+	/**动态的导航到一个新 URL 关闭所有页面,打开到应用内的某个页面
+	 * 	reLaunch
+	 * @param {Object} rule
+	 */
+	replaceAll(arg) {
+		const rule = {
+			method: 'reLaunch'
+		}
+		if (typeof(arg) === 'string') {
+			rule.page = arg
+		} else if (typeof(arg) === 'object') {
+			rule.page = arg.page
+			rule.params = arg.params
+		}
+		this.next(rule)
+	}
+
+	/** 跳转Tabbar
+	 * 	switchTab
+	 * @param {Object} rule
+	 */
+	pushTab(arg) {
+		const rule = {
+			method: 'switchTab'
+		}
+		if (typeof(arg) === 'string') {
+			rule.page = arg
+		} else if (typeof(arg) === 'object') {
+			rule.page = arg.page
+			rule.params = arg.params
+		}
+		this.next(rule)
+	}
+
+
+	/**
+	 * 返回到指定层级页面上
+	 */
+	back(delta = 1) {
+		// 返回上级
+		if (delta.constructor != Number) {
+			this._errorHandler(new Error('返回层级参数必须是一个Number类型且必须大于0:'))
+			return
+		}
+		uni.navigateBack({
+			delta
+		})
+	}
+
+	/**
+	 * 分发路由
+	 * @param {Object} args
+	 */
+	_next() {
+		return new Promise((resolve, reject) => {
+			if (this._beforeEach && typeof(this._beforeEach) === 'function') {
+				// 需要传给守卫 to from next
+				this._beforeEach.call(this, this.tempRoute, this.route, resolve)
+			} else {
+				this._pushTo().catch(e => {
+					reject(e)
+				})
+			}
+		})
+	}
+
+	next(args) {
+		if (args) {
+			// 保存临时数据
+			if (typeof(args) === 'object') {
+				this.tempRoute = {
+					// 第一次调用next一定存在method,后续循环调用可能不会存在,不存在时使用上次缓存的method
+					method: args.method || this.tempRoute.method,
+					page: args.page,
+					params: args.params
+				}
+			} else if (typeof(args) === 'string') {
+				this.tempRoute = {
+					page: args
+				}
+			} else if (!args) {
+				// 中断路由 args = false
+				this.tempRoute = null
+				return
+			}
+
+			if (!this.route) {
+				this.route = {
+					page: '/' + getCurrentPages()[0].route
+				}
+			}
+
+			this._next().then(args => {
+				this.next(args)
+			}).catch(e => {
+				this.tempRoute = null
+				this._errorHandler(e)
+			})
+		} else {
+			this._pushTo().catch(e => {
+				this.tempRoute = null
+				this._errorHandler(e)
+			})
+		}
+	}
+
+	/**
+	 * 应用启动时执行一次路由检查(前置守卫,若通过则不做事情)
+	 */
+	doBeforeHooks() {
+		this.tempRoute = {}
+		this.next({})
+	}
+
+	// 设置路由前置/后置守卫
+	beforeEach(fn) {
+		this._beforeEach = fn
+	}
+	afterEach(fn) {
+		this._afterEach = fn
+	}
+	// 设置路由跳转错误处理
+	onError(fn) {
+		if (fn && typeof(fn) === 'function') {
+			this._errorHandler = fn
+		}
+	}
+
+	// 获取当前路由信息
+	getCurrentRoute() {
+		return this.route
+	}
+
+}
+
+// 路由对象属性定义
+Router.$root = null
+// 当前路由内容
+Router.route = null
+// 临时路由信息
+Router.tempRoute = null
+// 路由前置后置守卫
+Router._beforeEach = null
+Router._afterEach = null
+// 路由跳转错误处理
+Router._errorHandler = function(e) {
+	console.error(e)
+}
+
+Router.install = function(Vue) {
+	Vue.mixin({
+		onLaunch: function() {},
+		onLoad: function(props) {
+			// 首次进入页面时,缓存中不存在当前路由信息,需要初始化路由信息
+			if (!Router.$root.getCurrentRoute()) {
+				const rt = {
+					params: {},
+					page: '/' + getCurrentPages()[0].route
+				}
+				if (props) {
+					Object.keys(props).forEach(k => {
+						// url转的对象全部都是字符串,需要识别其中的对象和基本数据类型
+						try {
+							const obj = JSON.parse(props[k])
+							if (typeof(obj) === 'string') {
+								// 只有字符串还会是字符串,数字、布尔、数组均会转换为正常类型
+								rt.params[k] = props[k]
+							} else {
+								rt.params[k] = obj
+							}
+						} catch (e) {
+							rt.params[k] = props[k]
+						}
+					})
+				}
+				Router.$root.route = rt
+
+				// 执行路由前置守卫
+				Router.$root.doBeforeHooks()
+			}
+
+			// 自动获取页面标题(app端可能获取不到)
+			const pages = getCurrentPages()
+			let pageTitle = pages[pages.length - 1].pageTitle
+			// #ifdef H5
+			if (!pageTitle) {
+				pageTitle = document.title
+			}
+			// #endif
+			Router.$root.route.pageTitle = pageTitle
+		},
+
+		onShow() {
+			if (!getCurrentPages().length) {
+				return
+			}
+			// 获取当前路由信息
+			const pages = getCurrentPages()
+			const page = pages[pages.length - 1]
+			let pageTitle = page.pageTitle
+			const rt = {
+				params: {},
+				page: '/' + page.route,
+			}
+			if (!pageTitle) {
+				// #ifdef H5
+				rt.pageTitle = document.title
+				// #endif
+			} else {
+				rt.pageTitle = pageTitle
+			}
+			
+			const route = Router.$root.route
+			// 若当前页面地址不等于缓存中地址,则更新缓存路由信息
+			if (!route || route.page !== rt.page) {
+				Router.$root.route = rt
+			}
+		}
+	})
+	Object.defineProperty(Vue.prototype, "$Router", {
+		get: function() {
+			return Router.$root
+		}
+	})
+	Object.defineProperty(Vue.prototype, "$Route", {
+		get: function() {
+			return Router.$root.getCurrentRoute()
+		}
+	})
+}
+
+export default Router

+ 126 - 0
bobo-router/index.js

@@ -0,0 +1,126 @@
+import {
+	getUrlParam,
+	getWeixinRedirectURI,
+	isWeiXin
+} from '@/utils'
+import * as API_WeiXin from '@/apis/weixin.js'
+import  carhelp from '@/utils/mixin.js'
+
+import Vue from 'vue'
+import uniCrazyRouter from "uni-crazy-router";
+Vue.use(uniCrazyRouter)
+//** 有bug, 第一次直接敲链接访问, 是访问bobo-router 前置守卫
+//**  后续操作,访问的是 uniCrazyRouter的前置守卫
+
+
+uniCrazyRouter.beforeEach(async (to, from, next) => {
+
+	// 逻辑代码
+	console.log("beforeEach")
+	if(to.url==from.url){
+		
+		var url="pages/index/index";
+		if(to.url.indexOf("pages/my")==0){
+			url="pages/my/index";
+		}
+		if(to.url.indexOf("pages/news")==0){
+			url="pages/news/index";
+		}
+		if(to.url.indexOf("pages/remind")==0){
+			url="pages/remind/index";
+		}
+		
+		window.location.href=window.location.href.split('#')[0]+"#/"+url
+	}else{
+		routerBeforeEach(to, from, next);
+	}
+})
+
+uniCrazyRouter.afterEach((to, from) => {
+	// 逻辑代码
+	console.log("afterEach")
+	if(process.car.NODE_ENV=='dev'||process.car.NODE_ENV=='test'){
+		    uni.setNavigationBarTitle({
+		       		title:'车信达('+process.car.NODE_ENV+')',
+		    						
+		    }) 
+		}
+	
+})
+
+uniCrazyRouter['on' + 'Error']((to, from) => {
+	// 逻辑代码
+	console.log("Error")
+})
+
+import Router from './bobo-router'
+
+Vue.use(Router)
+
+// 路由配置 页面中全部使用this.$Router来操作路由,以实现路由的全局管理
+const router = new Router()
+
+// 路由全局拦截器 在这里处理登录、授权等相关操作
+router.beforeEach(function(to, from, next) {
+	
+	console.log('前置守卫')
+	if (process.car.SIMPLE_RUN) {
+		if (!carhelp.getOpenId()) {
+			carhelp.setOpenId("test")
+		}
+		routerBeforeEach(to, from, next);
+	} else {
+		
+		if (!carhelp.getOpenId()) {
+			if (isWeiXin()) {
+				getOpenId();
+			}
+		} else {
+			
+			routerBeforeEach(to, from, next);
+		}
+
+	}
+
+
+
+})
+
+function getOpenId() {
+	const code = getUrlParam('code');
+	
+	if (!code) {
+		var url = document.URL;
+		
+		window.location.href = getWeixinRedirectURI(process.car.VUE_APP_WXAPPID, url);
+	} else {
+ 
+		 
+		API_WeiXin.getDataByCode(code).then(response => {
+			
+			carhelp.setOpenId(response.data.openid)
+			//var linkUrl = document.URL.replace(/\?code=(.*?)&state=STATE/g, '');
+			//window.location = linkUrl; //隐藏参数
+			//return Promise.resolve(response.openid);
+		}).catch(error => {
+			console.log(error);
+		});
+
+	}
+
+}
+
+function routerBeforeEach(to, from, next) {
+	next();
+}
+// 路由后置拦截器
+router.afterEach(function(to, from) {
+	console.log('后置守卫')
+})
+
+// 路由跳转出错处理
+router.onError(function(e) {
+	console.log('错误:', e.message || '路由跳转失败')
+})
+
+export default router

+ 384 - 0
components/Carmap.vue

@@ -0,0 +1,384 @@
+<template>
+	<view>
+		<view id="container" :style="myStyle"></view>
+	
+			<u-icon name="map-fill" v-if="false" class="input-card"  style="width: 24rem;top: 130px;width: 20px;height: 20px;" color="#999" size="40"></u-icon>
+			
+	</view>
+</template>
+
+<script>
+		import MapLoader from '@/utils/AMap'
+	export default {
+		name:"Carmap",
+		
+		data() {
+			return {
+				myStyle:"width: 100%; height: 140px;",
+				longitude: 112.276527,
+				latitude: 30.306427,
+				AMap:null,
+				//车的位置
+				car: {
+					obj:null,
+					longitude: '',
+					latitude: '',
+				},
+				down: {
+					obj:null,
+					longitude: '',
+					latitude: '',
+				},
+				up: {
+					obj:null,
+					longitude: '',
+					latitude: '',
+				},
+				//个人
+				info: {
+					obj:null,
+					init: false,
+					longitude: '',
+					latitude: '',
+				},
+				mapbus:null,
+				startend: [{
+					longitude:112.279274,
+					latitude:30.303273,
+					name:''
+				}, {
+					longitude:112.273867,
+					latitude:30.309817,
+					name:''
+				}], 
+				start:{},
+				end:{},
+				carList:[],
+				covers: [
+					{
+						longitude:112.273867,
+						latitude:30.309817,
+					},{
+						longitude:112.280261,
+						latitude:30.3041,
+					},{
+						longitude:112.279274,
+						latitude:30.303273,
+					}
+				]
+			};
+		},
+		methods:{
+			setCarList(sz){
+					
+					if(this.AMap==null){
+						return
+					}
+					for(var i in this.carList){
+						this.mapbus.remove(this.carList[i]);
+					}
+					var icon0 = require("@/static/img/icon-busPosition.png");
+					
+					this.carList=[]
+					for(var i in sz){
+						var ob=sz[i];
+						var ob1=new AMap.Marker({
+							map: this.mapbus,
+							position: [ob.longitude,ob.latitude],
+							//offset: new AMap.Pixel(-5, -5),
+							offset: new AMap.Pixel(-18, -40),
+							content:"<img src='"+icon0+"' style='height: 40px;width: 40px' />",
+							
+							zIndex:900,
+							autoRotation: true,
+						});
+						
+						 this.myEmit("car",ob1,ob)
+						
+						
+						this.carList.push(ob1)
+					}
+					
+			},
+			myEmit(type,ob1,obj){
+				var _this=this;
+				AMap.event.addListener(ob1, 'click', function(e) {
+					_this.$emit('clickMap',{
+						type:type,
+						obj:obj
+					})						
+				})
+				
+			},
+			setMyStyle(s){
+				this.myStyle=s;
+			},
+			setStartend(sz){
+				this.start.setPosition( [sz[0].longitude,sz[0].latitude]);
+			this.end.setPosition( [sz[sz.length-1].longitude,sz[sz.length-1].latitude]);
+			
+			},
+			setCenter(item){
+				if(this.mapbus){
+					this.mapbus.setCenter([item.longitude,item.latitude]);
+					return true
+				}else{
+					return false
+				}
+			},
+			setSite(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/map_4.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]);
+				}
+			},
+			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
+				}
+				 this.car.longitude=ob.longitude
+				 this.car.latitude=ob.latitude
+				 if(!this.car.ob){
+				 	
+				 	var icon0 = require("@/static/img/icon-busPosition.png");
+				 	
+				 	this.car.ob= new AMap.Marker({
+				 		map: this.mapbus,
+				 		position: [this.car.longitude,this.car.latitude],
+				 		offset: new AMap.Pixel(-18, -40),
+				 		content:"<img src='"+icon0+"' style='height: 40px;width: 40px' />",
+				 		
+				 		zIndex:900,
+				 		autoRotation: true,
+				 	});
+					var _this=this;
+					 
+					 this.myEmit("car",this.car.ob,ob)
+				 	
+				 }else{
+				 	this.car.ob.setPosition( [this.car.longitude,this.car.latitude]);
+				 }
+			 
+				
+			},
+			setPerson(ob,bl){
+				if(this.AMap==null){
+					return
+				}
+				
+					this.info.longitude=ob.longitude
+					this.info.latitude=ob.latitude
+					if(!this.info.ob){
+						
+						var icon0 = require("@/static/img/icon-userPosition.png");
+						
+						
+						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(-15, -30),
+							content:"<img src='"+icon0+"' style='height: 30px;width: 30px' />",
+							
+							zIndex:99,
+							autoRotation: true,
+						});
+						//this.mapbus.setCenter([this.info.longitude,this.info.latitude]); //设置地图中心点
+						if(!bl){
+							this.mapbus.setCenter([ this.info.longitude,this.info.latitude]); //设置地图中心点
+						}
+
+					}else{
+						this.info.ob.setPosition( [this.info.longitude,this.info.latitude]);
+					}
+				
+				
+			},
+			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){
+				
+				var _this = this;
+				this.covers=point;
+				this.startend=startend;
+				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
+					});
+					var lineArr=[]
+					var icon0 = require("@/static/img/map_0.png");
+					var icon1 = require("@/static/img/map_1.png");
+					var icon2 = require("@/static/img/map_2.png");
+					this.start=new AMap.Marker({
+						map: _this.mapbus,
+						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:99,
+						autoRotation: true,
+					});
+					this.end=new AMap.Marker({
+						map: _this.mapbus,
+						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:99,
+						autoRotation: true,
+					});
+					for(var i in _this.covers){
+						var point=_this.covers[i]
+						lineArr.push([point.longitude,point.latitude])
+						
+					}
+					for(var i in stationList){
+						var point=stationList[i]
+						var ob_point =new AMap.Marker({
+							map: _this.mapbus,
+							position: [point.longitude,point.latitude],
+							offset: new AMap.Pixel(-5, -7),
+							content:"<img src='"+icon1+"' style='height: 10px;width: 10px' />",
+							zIndex:99,
+							autoRotation: true,
+						});
+						this.myEmit("point",ob_point,point)
+					}
+					var polyline = new AMap.Polyline({
+						map: _this.mapbus,
+						path: lineArr,
+						showDir: true,
+						strokeColor: "#28F", //线颜色
+						// strokeOpacity: 1,     //线透明度
+						strokeWeight: 3, //线宽
+						//strokeStyle: "solid"  //线样式
+					});
+					
+					this.$emit('onload')
+				}, e => {
+					//_this.mui.toast('地图加载失败');
+					console.log('地图加载失败', e)
+				})
+			},
+		}
+	}
+</script>
+
+<style scoped>
+/*去除下标*/
+.amap-logo{
+display: none;
+}
+.amap-copyright{
+opacity:0;
+    font-size: 1px;
+}
+
+.input-card {
+  display: flex;
+  flex-direction: column;
+  min-width: 0;
+  word-wrap: break-word;
+  background-color: #fff;
+  background-clip: border-box;
+  border-radius: .25rem;
+  width: 22rem;
+  border-width: 0;
+  border-radius: 0.4rem;
+  box-shadow: 0 2px 6px 0 rgba(114, 124, 245, .5);
+  position: fixed;
+  bottom: 1rem;
+  right: 1rem;
+  -ms-flex: 1 1 auto;
+  flex: 1 1 auto;
+  padding: 0.75rem 0.75rem;
+}
+</style>

+ 152 - 0
components/Common.vue

@@ -0,0 +1,152 @@
+<template >
+	<view>
+		<u-toast ref="uToast"  />
+		<u-loading :show="false"></u-loading>
+		<u-modal v-model="show" :content="content" :confirm-text="confirmtext?confirmtext:'确定'" @confirm="confirmBtn" :title="title?title:'提示'"></u-modal>
+		<u-modal v-model="show2" :show-cancel-button="true" :content="content" :confirm-text="confirmtext?confirmtext:'确定'" :cancel-text="canceltext?canceltext:'取消'" @confirm="confirmBtn" @cancel="cancelBtn" :title="title?title:'提示'"></u-modal>
+		
+		<u-navbar v-if="mytitle" :title="mytitle" :is-back="noback" :border-bottom="!noback">
+				<view class="slot-wrap"></view>	
+		</u-navbar>
+		<view v-show="false"  :login="islogin()" ></view>	
+ 		
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/common.js'
+	
+ 	export default {
+		name:"Common",
+		props:{
+			login: {
+				require: false,
+				default: false,
+			},
+			noback:{
+				require: false,
+				default: true,
+			},
+			mytitle: {
+				require: false,
+				default: false,
+			},
+		},
+		data() {
+			return {
+				
+				isloginBl:true,
+				show:false,
+				show2:false,
+				fnc:null,
+				fncCancel:null,
+				fncBl:false,
+				content:null,
+				confirmtext:null,
+				title:null,
+				canceltext:null,
+			};
+			
+		},methods:{
+			
+			
+			islogin(){
+				if(this.login){
+					if (!this.carhelp.getPersonInfo()) {
+						var route_path = window.location.href.split("#")[1];
+						
+						uni.reLaunch({
+							url: '/pages/car/login'
+						})
+					}
+				}
+			},
+			goError(message){
+				this.setFnc(function(){
+					uni.switchTab({
+					    url: '/pages/index/index'
+					});
+				})
+				this.alert2(message?message:'访问链接异常','前往首页')
+				
+			},
+			setFnc(fnc,fncCancel){
+				
+				this.fnc=fnc;
+				this.fncCancel=fncCancel;
+				this.fncBl=true
+			},
+			alert2(content,confirmtext,title){
+				this.show=true;
+				this.content=content;
+				this.confirmtext=confirmtext;
+				this.title=title;
+				 uni.hideLoading();
+			},
+			confirm(content,confirmtext,title,canceltext){
+				this.show2=true;
+				this.content=content;
+				this.confirmtext=confirmtext;
+				this.canceltext=canceltext;
+				this.title=title;
+				 uni.hideLoading();
+			},
+			cancelBtn(){
+				if(this.fncCancel){
+					this.fncCancel()
+					this.fncBl=false;	
+				}
+			},
+			confirmBtn(){
+				
+				if(this.fncBl){
+					this.fnc()
+					this.fncBl=false;	
+				}
+			},
+			showLoading(bl,message){
+				if(bl==null ||bl){
+					// request  要改同步改
+					uni.showLoading({
+						mask:true,title:'加载中...'
+					})
+				}else{
+					  uni.hideLoading();
+					  if(message){
+						  this.alert(message)
+					  }
+				}
+				
+			},
+			alert(message,fnc){
+				this.$refs.uToast.show({
+					title: message,
+					type:'default',
+					position:'bottom',
+					callback:fnc
+				})
+			}
+		},mounted(){
+				
+		},destroyed(){
+			
+		}
+		
+	}
+</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>

+ 39 - 0
components/Loading.vue

@@ -0,0 +1,39 @@
+<template>
+	<view>
+		<view  class="z-loading">
+			<view class="div">
+				<img src="http://rccs.oss-cn-hangzhou.aliyuncs.com/jp_housekeeper/img/xxd_loading.gif" />
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"Loading",
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+
+<style>
+.z-loading {
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		background: rgb(255, 255, 255, 0.9);
+		z-index: 999;
+	}
+
+	.z-loading .div {
+		top: 40%;
+		position: absolute;
+		left: 40%
+	}
+</style>

+ 25 - 0
font.js

@@ -0,0 +1,25 @@
+(function() {
+				if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
+					handleFontSize();
+				} else {
+					if (document.addEventListener) {
+						document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
+					} else if (document.attachEvent) {
+						document.attachEvent("WeixinJSBridgeReady", handleFontSize);
+						document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
+					}
+				}
+
+				function handleFontSize() {
+					/*设置网页字体为默认大小*/
+					WeixinJSBridge.invoke('setFontSizeCallback', {
+						'fontSize': 0
+					});
+					/*重写设置网页字体大小的事件*/
+					WeixinJSBridge.on('menu:setfont', function() {
+						WeixinJSBridge.invoke('setFontSizeCallback', {
+							'fontSize': 0
+						});
+					});
+				}
+			})();

+ 43 - 0
main.js

@@ -0,0 +1,43 @@
+import Vue from 'vue'
+import App from './App'
+import CarCommon from '@/components/Common.vue'
+import CarLoading from '@/components/Loading.vue'
+
+import  mixin from './utils/mixin.js'
+Vue.config.ignoredElements.push("wx-open-subscribe") ;
+Vue.prototype.carhelp=mixin
+
+import Vconsole from 'vconsole'
+ //import './router' // 引入路由
+ import router from './bobo-router'
+
+
+// main.js
+import uView from "uview-ui";
+Vue.use(uView);
+
+Vue.config.productionTip = false
+App.mpType = 'app'
+
+const app = new Vue({
+
+    ...App
+})
+Vue.component('car-common',CarCommon)
+Vue.component('car-loading',CarLoading)
+
+
+Vue.use(mixin)
+Vue.mixin({ 
+    onLoad( option){  
+        if (option.test == 'test') {
+        	let vConsole = new Vconsole()
+        }
+		
+    } ,onReady(){
+	
+	}
+})
+
+
+app.$mount()

+ 87 - 0
manifest.json

@@ -0,0 +1,87 @@
+{
+    "name" : "jp-commuter-ds",
+    "appid" : "__UNI__AB90D1F",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    /* 5+App特有相关 */
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueStyleCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        /* 模块配置 */
+        "modules" : {},
+        /* 应用发布信息 */
+        "distribute" : {
+            /* android打包配置 */
+            "android" : {
+                "permissions" : [
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            /* ios打包配置 */
+            "ios" : {},
+            /* SDK配置 */
+            "sdkConfigs" : {}
+        }
+    },
+    /* 快应用特有相关 */
+    "quickapp" : {},
+    /* 小程序特有相关 */
+    "mp-weixin" : {
+        "appid" : "wxa8954f417fa7c32f",
+        "setting" : {
+            "urlCheck" : false
+        },
+        "usingComponents" : true
+    },
+    "mp-alipay" : {
+        "usingComponents" : true
+    },
+    "mp-baidu" : {
+        "usingComponents" : true
+    },
+    "mp-toutiao" : {
+        "usingComponents" : true
+    },
+    "uniStatistics" : {
+        "enable" : false
+    },
+    "h5" : {
+        "devServer" : {
+            "port" : 8080,
+            "https" : false,
+            "disableHostCheck" : true
+        },
+        "optimization" : {
+            "treeShaking" : {
+                "enable" : true
+            }
+        },
+        "title" : "车信达",
+        "router" : {
+            "base" : "./"
+        }
+    }
+}

+ 24 - 0
package.json

@@ -0,0 +1,24 @@
+{
+ "scripts": {
+  "test:h5": "cross-env UNI_PLATFORM=h5 jest -i",
+  "serve": "vue-cli-service serve",
+  "build": "vue-cli-service build",
+  "test": "vue-cli-service build --mode test"
+ },
+ "dependencies": {
+  "compression-webpack-plugin": "^7.1.2",
+  "uni-crazy-router": "0.0.31",
+  "uni-read-pages": "^1.0.5",
+  "uni-simple-router": "^2.0.1",
+  "uview-ui": "^1.8.4",
+  "vconsole": "^3.4.0",
+  "vue-cli": "^2.9.6",
+  "vue-cropper": "^0.5.6",
+  "vuex": "^3.6.2",
+  "weixin-js-sdk": "^1.6.0"
+ },
+ "devDependencies": {
+  "node-sass": "^5.0.0",
+  "sass-loader": "^11.0.1"
+ }
+}

+ 403 - 0
pages.json

@@ -0,0 +1,403 @@
+{
+	"easycom": {
+			"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
+		},
+	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages	
+		
+		{
+			"name":"IndexIndex",
+			"path": "pages/index/index",
+			"style": {
+	
+				"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		}
+
+        ,{
+			//注册/登录
+			"name":"CarLogin",
+            "path" : "pages/car/login",
+            "style" :                                                                                    
+            {
+               // "navigationBarTitleText": "登录",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+			//路线详情
+            "path" : "pages/route/index",
+            "style" :                                                                                    
+            {
+               // "navigationBarTitleText": "路线详情",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+       
+        ,{
+			//添加乘车人
+            "path" : "pages/buytickets/index",
+			
+            "style" :                                                                                    
+            {
+               // "navigationBarTitleText": "添加乘车人",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+			//上传图片
+            "path" : "pages/buytickets/selectSite",
+            "style" :                                                                                    
+            {
+               // "navigationBarTitleText": "选择站点",
+                "enablePullDownRefresh": false
+            }
+            
+        },
+		{
+			//上传图片
+		    "path" : "pages/buytickets/upload",
+		    "style" :                                                                                    
+		    {
+		       // "navigationBarTitleText": "上传图片",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+        ,{
+			//调整图片
+            "path" : "pages/buytickets/adjust",
+            "style" :                                                                                    
+            {
+               // "navigationBarTitleText": "调整图片",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+			//确认身份
+            "path" : "pages/buytickets/confirm",
+            "style" :                                                                                    
+            {
+               // "navigationBarTitleText": "确认身份",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+			//选择站点
+            "path" : "pages/buytickets/site",
+            "style" :                                                                                    
+            {
+               // "navigationBarTitleText": "选择站点",
+                "enablePullDownRefresh": false,
+				"navigationStyle": "custom" // 隐藏系统导航栏
+            }
+            
+        }
+        ,{
+			//购买成功
+            "path" : "pages/buytickets/success",
+            "style" :                                                                                    
+            {
+               // "navigationBarTitleText": "购买成功",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+			//搜索
+            "path" : "pages/query/index",
+            "style" :                                                                                    
+            {
+               // "navigationBarTitleText": "搜索",
+                "enablePullDownRefresh": false,
+				"navigationStyle": "custom" // 隐藏系统导航栏
+            }
+            
+        }
+        ,{
+			//搜索结果
+            "path" : "pages/query/record",
+            "style" :                                                                                    
+            {
+               // "navigationBarTitleText": "搜索结果",
+                "enablePullDownRefresh": false,
+				"navigationStyle": "custom" // 隐藏系统导航栏
+            }
+            
+        }
+        ,{
+			 //消息
+            "path" : "pages/news/index",
+            "style" :                                                                                    
+            {
+
+               // "navigationBarTitleText": "消息",
+                "enablePullDownRefresh": false
+
+            }
+            
+        }
+		,{
+			 //消息
+		    "path" : "pages/news/details",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "消息详情",
+		        "enablePullDownRefresh": false
+				
+		    }
+		    
+		}
+		,{
+			//我的
+		    "path" : "pages/my/index",
+		    "style" :                                                                                    
+		    {
+
+		        "navigationBarTitleText": "我的",
+		        "enablePullDownRefresh": false,
+				"navigationStyle": "custom"
+		    }
+		    
+		}
+        ,{
+			//意见反馈
+            "path" : "pages/my/user/feedback",
+            "style" :                                                                                    
+            {
+
+               // "navigationBarTitleText": "",
+
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+			//乘车记录
+            "path" : "pages/my/user/bybusList",
+            "style" :                                                                                    
+            {
+
+               // "navigationBarTitleText": "",
+
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+			//问题反馈
+            "path" : "pages/my/platform/opinion",
+            "style" :                                                                                    
+            {
+
+               // "navigationBarTitleText": "",
+
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+			//关于平台
+            "path" : "pages/my/platform/about",
+            "style" :                                                                                    
+            {
+
+               // "navigationBarTitleText": "",
+
+                "enablePullDownRefresh": false
+            }
+            
+        }
+       
+        ,{
+			//修改密码 -验证
+            "path" : "pages/my/user/resetpassword/verification",
+            "style" :                                                                                    
+            {
+
+               // "navigationBarTitleText": "",
+
+                "enablePullDownRefresh": false
+            }
+            
+        }
+		,{
+			//修改密码 -修改
+		    "path" : "pages/my/user/resetpassword/change",
+		    "style" :                                                                                    
+		    {
+
+		       // "navigationBarTitleText": "",
+
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+		,{
+			//修改手机号 - 绑定手机号
+		    "path" : "pages/my/user/updatephone/index",
+		    "style" :                                                                                    
+		    {
+ // "navigationBarTitleText": "",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+        ,{
+			//修改手机号 - 验证手机号
+            "path" : "pages/my/user/updatephone/verification",
+            "style" :                                                                                    
+            {
+ // "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+       
+        ,{
+			//修改手机号 - 更新手机号
+            "path" : "pages/my/user/updatephone/change",
+            "style" :                                                                                    
+            {
+ // "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+			
+            
+        },
+		{
+			"path": "pages/404/404",
+			"name": "404",
+			 "style" : 
+			{
+			    "navigationBarTitleText": "网页无法打开",
+			    "enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/404/500",
+			"name": "500",
+			 "style" : 
+			{
+			    "navigationBarTitleText": "服务器错误",
+			    "enablePullDownRefresh": false
+			}
+		}
+        
+        ,{
+            "path" : "pages/my/user/updateinfo",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/buytickets/home",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/buytickets/view",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/buytickets/edit",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        },
+		{
+		    "path" : "pages/remind/index",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		},
+		{
+		    "path" : "pages/index/sitePage",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		},
+		{
+		    "path" : "pages/my/user/bybusDetails",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		},{
+            "path" : "pages/my/platform/help",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+    ],
+	"condition": { //模式配置,仅开发期间生效
+	        "current": 0, //当前激活的模式(list 的索引项)
+	        "list": [{
+	            "name": "test", //模式名称
+	            "path": "pages/buytickets/index" //启动页面,必选
+	        }]
+	    },
+	"globalStyle": {
+			"navigationStyle": "custom" // 隐藏系统导航栏
+			,"navigationBarTitleText": "车信达"
+			
+	},
+	"tabBar": {
+	    "color": "#7A7E83",
+	    "selectedColor": "#4b96ff",
+	    "borderStyle": "black",
+	    "backgroundColor": "#ffffff",
+	    "list": [{
+	        "pagePath": "pages/index/index",
+	        "iconPath": "static/img/index-bus-1.png",
+	        "selectedIconPath": "static/img/index-bus-2.png",
+	        "text": "主页"
+	    }, {
+	        "pagePath": "pages/remind/index",
+	        "iconPath": "static/img/index-remind-1.png",
+	        "selectedIconPath": "static/img/index-remind-2.png",
+	        "text": "提醒"
+	    },
+		{
+	        "pagePath": "pages/news/index",
+	        "iconPath": "static/img/index-news-1.png",
+	        "selectedIconPath": "static/img/index-news-2.png",
+	        "text": "消息"
+	    }, {
+	        "pagePath": "pages/my/index",
+	        "iconPath": "static/img/index-my-1.png",
+	        "selectedIconPath": "static/img/index-my-2.png",
+	        "text": "我的"
+	    }]
+	}
+}

+ 39 - 0
pages/404/404.vue

@@ -0,0 +1,39 @@
+<template>
+	<view class="error">
+		<img src="static/img/404.png" alt="">
+		<h4>抱歉!您要查看的页面无法打开</h4>
+		<u-button type="primary"  shape="circle" plain>返回首页</u-button>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		onLoad(...options){
+			console.log(options)
+			console.log(this.$Route)
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.error{
+		text-align: center;
+		padding: 50px;
+		img{
+			width: 300px;
+		}
+		h4{
+			font-weight: normal;
+			font-size: 16px;
+			margin-bottom: 20px;
+		}
+	}
+</style>

+ 39 - 0
pages/404/500.vue

@@ -0,0 +1,39 @@
+<template>
+	<view class="error">
+		<img src="static/img/500.png" alt="">
+		<h4>抱歉!服务器出错了~</h4>
+		<u-button type="primary"  shape="circle" plain>返回首页</u-button>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		onLoad(...options){
+			console.log(options)
+			console.log(this.$Route)
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.error{
+		text-align: center;
+		padding: 50px;
+		img{
+			width: 300px;
+		}
+		h4{
+			font-weight: normal;
+			font-size: 16px;
+			margin-bottom: 20px;
+		}
+	}
+</style>

+ 106 - 0
pages/buytickets/adjust.js

@@ -0,0 +1,106 @@
+import {
+	VueCropper
+} from 'vue-cropper'
+import * as WxJsApi from '@/utils/wxJsApi.js'
+	import {
+		dataUrlToFile
+	} from '@/utils'
+import * as API_Common from '@/apis/common'
+
+export default {
+	data() {
+		return {
+			localId:'',
+			imgBase64: '',
+			cropper: {
+
+				//img的路径自行修改
+				img: '',
+				info: true,
+				size: 0.8,
+				outputType: 'jpeg',
+				canScale: false,
+				autoCrop: true,
+				// 只有自动截图开启 宽度高度才生效
+				autoCropWidth: 250,
+				autoCropHeight: 350,
+				fixed: true,
+				// 真实的输出宽高
+				infoTrue: true,
+				fixedNumber: [5, 7],
+				fixedBox:true
+
+			},
+		}
+	},
+	components: {
+		VueCropper,
+	},
+	methods: {
+		//上传图片
+		uploadpic() {
+			this.$refs.common.showLoading()
+			var _this = this;
+			var formData = {
+				'photoName': '1.jpg',
+				'photoFile': this.imgBase64
+			}
+			
+			API_Common.upload(formData).then(response => {
+				
+				var obj=this.carhelp.get("form");
+				obj.pic=response.data;
+				this.carhelp.set("form",obj);
+				this.$refs.common.showLoading(false,"上传成功!")
+				
+				uni.navigateTo({
+					url: '/pages/buytickets/confirm'
+				})
+			}).catch(error => {
+				this.$refs.common.showLoading(false,error)
+		
+			})
+		},
+		submit(){
+			this.$refs.cropper.goAutoCrop();
+			this.$refs.cropper.getCropData((data) => {
+				this.modelSrc = data
+				this.model = false;
+				//裁剪后的图片显示
+				//this.cropper.img = data;
+				//console.log(data)
+				this.imgBase64=data;
+				this.uploadpic();
+			})
+		},
+		close(){
+			step=1;
+		},
+		rotateRight(){
+			this.$refs.cropper.rotateRight()
+		},
+		getData(res) {
+			var localData = res.localData
+			if (localData.indexOf('data:image') != 0) {
+				//判断是否有这样的头部
+				localData = 'data:image/jpeg;base64,' + localData
+			}
+			localData = localData.replace(/\r|\n/g, '').replace('data:image/jgp', 'data:image/jpeg')
+			this.imgBase64 = localData;
+			this.cropper.img=localData;
+			this.$refs.common.showLoading();
+		},imgLoad(){
+			this.$refs.common.showLoading(false);
+		}
+	},
+	onLoad(obj) {
+		this.localId = obj.localId;
+		
+	},onReady() {
+		this.$refs.common.showLoading()
+			 WxJsApi.getWxConfig([ 'getLocalImgData']).then(() => {
+			 
+			 	WxJsApi.getLocalImgData(this.localId, this.getData);
+			 });
+		}
+}

+ 77 - 0
pages/buytickets/adjust.vue

@@ -0,0 +1,77 @@
+<template>
+	<view>
+		<car-common   mytitle="调整照片" ref="common"></car-common>
+		
+		<view class="adjust-img">
+		 
+			<vueCropper ref="cropper" :img="cropper.img " :outputSize="cropper.size" :outputType="cropper.outputType" :info="cropper.info"
+			 :canScale="cropper.canScale" :autoCrop="cropper.autoCrop" :autoCropWidth="cropper.autoCropWidth" :autoCropHeight="cropper.autoCropHeight"
+			 :fixed="cropper.fixed"  :fixedBox="cropper.fixedBox" :fixedNumber="cropper.fixedNumber"  @imgLoad="imgLoad" :enlarge="4"></vueCropper>
+			 
+		</view>
+		<view class="adjust-btn">
+			<u-button type="primary" size="medium" shape="circle" @click="rotateRight()">旋转</u-button>
+			<u-button type="error" size="medium" shape="circle" @click="submit()">确定</u-button>
+			
+		</view>
+		
+		<view class="adjust-text">
+			<p>1.照片仅用于乘车时人脸识别设备的验证,请上传清晰现场拍摄的肩部半身照;</p>
+			<p>2.可拖动、旋转或缩放照片,将人脸区域调整至轮廓框以内。</p>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './adjust.js'
+	export default api;
+</script>
+
+<style>
+	page{
+		background-color: #000;
+	}
+</style>
+<style scoped lang="scss">
+	.adjust-img{
+		position: relative;
+		height: 240px;
+		width: 240px;
+		margin:50px auto;
+		img{
+			height: 100%;
+			width: 100%;
+		}
+	}
+	.adjust-btn{
+		display: flex;
+		justify-content: space-between;
+	}
+	.adjust-text{
+		padding:60rpx;
+		p{
+			color:#888;
+			margin-bottom: 10rpx;
+		}
+	}
+	.adjust-icon{
+		background-color: #fff;
+		width: 20px;
+		height: 20px;
+		border-radius: 50%;
+		position: absolute;
+		right: -10px;
+		top: -10px;
+		text-align: center;
+	}
+	.adjust-icon2{
+		background-color: #fff;
+		width: 20px;
+		height: 20px;
+		border-radius: 50%;
+		position: absolute;
+		right: -10px;
+		bottom: -10px;
+		text-align: center;
+	}
+</style>

+ 208 - 0
pages/buytickets/confirm.js

@@ -0,0 +1,208 @@
+import * as API from '@/apis/buytickets.js'
+
+
+export default {
+	data() {
+		return {
+			noback:true,
+			id: '',
+			num: 0,
+			pic: '',
+			list: [],
+			selectList: [],
+			subForm: {
+				pageIndex: 1,
+				pageSize: 20,
+				totalPage: 1
+			}
+		}
+	},
+	methods: {
+		gotoHome(){
+			uni.switchTab({
+			    url: '/pages/index/index'
+			});
+		},
+	
+		submit() {
+			var obj = this.carhelp.get("form");
+			obj.oplist = []
+			for (var i in this.list) {
+				if (this.list[i].ck) {
+					obj.oplist.push(this.list[i]);
+				}
+			}
+			this.carhelp.set("form", obj);
+
+			uni.navigateTo({
+				url: '/pages/buytickets/selectSite?id=' + this.id
+			})
+		},
+		ckBtn(item) {
+			item.ck = !item.ck;
+
+			if (item.ck) {
+				var bl=true
+				for (var i = 0; i < this.selectList.length; i++) {
+					if (this.selectList[i].upStationId != item.upStationId) {
+						bl=false;
+					
+					}
+					break;
+				}
+				if(!bl){
+					item.ck = !item.ck;
+					this.$refs.common.alert("所选乘客上车站点不一致,请重新选择。");
+					return;
+				}
+				this.num++;
+				this.selectList.push(item);
+			} else {
+				this.num--;
+				for (var i = 0; i < this.selectList.length; i++) {
+					if (this.selectList[i].id == item.id) {
+						this.selectList.splice(i, 1);
+					}
+				}
+			}
+			console.log(this.selectList)
+		},
+		getPassengerInfo() {
+			
+			
+			var thisform = {
+				id: this.id,
+				openId: this.carhelp.getOpenId()
+			}
+			this.$refs.common.showLoading()
+		
+			API.getPassengerInfo(thisform).then((response) => {
+				if (!response.result) {
+					this.$refs.common.goError(response.message)
+					return
+				}
+				this.passengerInfo = response.data
+				
+				
+		
+				var obj = this.carhelp.get("form");
+				if(!obj){
+					obj={}
+				}
+				obj.list = this.passengerInfo.list;
+				obj.name= 'buytickets';
+				obj.id= this.id;
+				this.carhelp.set("form", obj);
+				
+				if (response.data.supply) {
+					//this.$refs.common.goError(response.message)
+					this.$refs.common.setFnc(()=>{
+						uni.switchTab({
+							url: '/pages/news/index'
+						});
+					},()=>{
+						if (!response.data.id) {
+							uni.redirectTo({
+								url: '/pages/buytickets/index?id=' + this.id+'&back=true'
+							})
+						} else {
+							
+							this.getShiftInfo()
+						}
+					})
+					this.$refs.common.confirm('存在需要补票的订单,是否前去查看?')
+				return;
+				}
+				if (!response.data.id) {
+					uni.redirectTo({
+						url: '/pages/buytickets/index?id=' + this.id+'&back=true'
+					})
+				} else {
+	
+					this.upBusNoTicketList();
+				}
+			}).catch(error => {
+		
+				if (error) {
+					this.$refs.common.goError(error)
+					return
+				}
+				//this.$refs.common.showLoading(false,error)
+			})
+		},
+		upBusNoTicketList() {
+			this.$refs.common.showLoading();
+			this.subForm.id = this.id;
+			var obj = this.carhelp.get("form")
+			this.list = [];
+			API.upBusNoTicketList(this.subForm).then((res) => {
+
+				var list = res.data.data;
+				if(!list.length){
+					this.$refs.common.alert2("无照片,请上车刷脸或联系司机");
+					return;
+				}
+				
+				for (var i in list) {
+					list[i].show = true;
+					list[i].ck = false;
+					for (var j in obj.list) {
+						if (obj.list[j].id == list[i].id) {
+							list[i].show = false;
+							break;
+						}
+					}
+					if (list[i].show) {
+						this.list.push(list[i]);
+					}
+				}
+				this.selectList=[];//清空选中
+				if (this.list.length != 0) {
+					this.$refs.common.showLoading(false, "刷新成功");
+				} else {
+					this.$refs.common.showLoading(false);
+				}
+
+
+
+			}).catch(error => {
+				this.$refs.common.showLoading(false, error);
+
+			})
+		}
+	},
+	onLoad(op) {
+		if(op.back){
+			this.noback=!op.back
+		}
+		this.id = op.id
+	},
+	onReady() {
+
+		if (!this.id) {
+			this.$refs.common.goError()
+		}
+		var obj = this.carhelp.get("form")
+
+		if (obj && obj.name == 'buytickets' && obj.id == this.id) {
+			//不创建新订单
+		} else {
+			this.carhelp.set("form", {
+				name: 'buytickets',
+				id: this.id,
+				oplist: [], //当前添加的2人
+				list: [] // 一共添加的人 
+			});
+		}
+
+		if (false&&!this.carhelp.getPersonInfo()) {
+			this.$refs.common.setFnc(this.confirmBtn)
+			this.$refs.common.alert2('您还不是车信达用户,注册后再购买车票。', '前往注册', '尚未注册')
+		} else {
+		}
+			this.getPassengerInfo()
+			
+
+
+	}
+}

+ 158 - 0
pages/buytickets/confirm.vue

@@ -0,0 +1,158 @@
+<template>
+	<view>
+		<car-common   ref="common"></car-common>
+		
+		<u-navbar title="确认身份"  :is-back="noback">
+			<view class="slot-wrap"></view>
+			<view class="navbar-right"  @click="gotoHome" v-if="!noback" >
+				<u-icon name="home-fill" color="#999" size="28"></u-icon>
+				<span >前往首页</span>
+			</view>
+		</u-navbar>
+		
+		<view class="confirm">
+		
+			<h3 v-if="list.length">请选择购票人的照片?</h3>
+			<p v-show="!num">一位乘客仅需选择一张照片</p>
+			<p v-show="num">如需为您的同伴购票请同时选中Ta的照片</p>
+			<view class="confirm-pic" v-if="list.length">
+				<template v-for="item in list">
+					<view class="confirm-pic-item "   :class="item.ck?'active':''" @click="ckBtn(item)" >
+						<img :src="item.imageUrl+'?x-oss-process=image/resize,h_800,m_lfit/auto-orient,1'" alt="">	
+					</view>
+				</template>	 
+			</view>
+		</view>
+		 
+		<view class="upload-button" >
+			<view class="reset-btn" @click="upBusNoTicketList">
+				<u-icon name="shuaxin" custom-prefix="custom-icon" color="#2979ff" size="36"></u-icon>
+			</view>
+			
+			<view class="submit-btn" v-show="num">
+				<u-button type="primary" shape="circle" @click="submit">确定</u-button>
+			</view>
+			
+			<view class="submit-btn" v-show="!num">
+				<u-button class="gray-btn" type="default" shape="circle" >请选择</u-button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './confirm.js'
+	export default api;
+</script>
+
+<style scoped lang="scss">
+	.confirm{
+		margin-top: 20px;
+		.confirm-img{
+			height: 240px;
+			width: 240px;
+			border-radius: 50%;
+			overflow: hidden;
+			border:4px solid #1677ff;
+			img{
+				height: 100%;
+				width: 100%;
+			}
+		}
+		.confirm-img-border{
+			border: 2px solid #fff;
+			height: 244px;
+			width: 244px;
+			border-radius: 50%;
+		}
+		.confirm-img-border2{
+			border: 2px solid #7fb4ff;
+			height: 248px;
+			width: 248px;
+			border-radius: 50%;		
+			margin: 50px auto 20px;
+		}
+		.confirm-img-border3{
+			border: 2px solid #ffb8b8;
+			height: 248px;
+			width: 248px;
+			border-radius: 50%;		
+			margin: 50px auto 20px;
+			.confirm-img{
+				border-color:#ff6666;
+			}
+		}
+		h3{
+			text-align: center;
+			font-size: 18px;
+		}
+		p{
+			color:#999;text-align: center;
+			margin-top: 10rpx;
+		}
+	}	
+	.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;
+			}
+	.confirm-pic{
+		display: flex;
+		flex-direction: row;
+		flex-wrap: wrap;
+		padding: 20px;
+		margin-bottom: 30px;
+		.confirm-pic-item{
+			height:100px;
+			width: 100px;
+			border-radius: 50%;
+			overflow: hidden;
+			border: 3px solid #fff;
+			margin-bottom: 10px;
+			margin-right: 17px;
+			&:nth-child(3n+0){
+				margin-right: 0;
+			}
+			&.active{
+				border: 3px solid #1677ff;
+			}
+			img{
+				height: 100%;
+				width: 100%;
+			}
+		}
+	}
+	
+	.upload-button{
+		position: fixed;
+		left: 30rpx;
+		bottom:30rpx;
+		right: 30rpx;
+		display: flex;
+		.reset-btn{
+			height: 40px;
+			width: 40px;
+			border-radius: 50%;
+			text-align: center;
+			line-height: 40px;
+			border: 1px solid #eee;
+			margin-right: 10px;
+		}
+		.submit-btn{
+			flex: 1;
+			.gray-btn{
+				background-color: #bfbfbf;
+				color:#fff;
+				border-color: #bfbfbf;
+			}
+		}
+	}
+</style>

+ 22 - 0
pages/buytickets/edit.vue

@@ -0,0 +1,22 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 344 - 0
pages/buytickets/home.js

@@ -0,0 +1,344 @@
+import * as WxJsApi from '@/utils/wxJsApi.js'
+import * as API from '@/apis/buytickets.js'
+import * as Pay from '@/apis/weixin.js'
+import {
+	wxPayJs
+} from '@/utils/wxpay'
+import Carmap from '@/components/Carmap.vue'
+
+export default {
+	data() {
+		return {
+
+			initBl: false,
+			title: '乘车人',
+			show: false,
+			id: 0, // 使用 marker点击事件 需要填写id
+
+			//地图居中后的位置
+			longitude: 112.276527,
+			latitude: 30.306427,
+			shiftInfo: {
+
+			},
+			list: [{}, {}],
+			//车的位置
+			car: {
+				obj: null,
+				longitude: '',
+				latitude: '',
+			},
+			stationList: [],
+			//个人
+			info: {
+				obj: null,
+				init: false,
+				longitude: '',
+				latitude: '',
+			},
+			myinterval: '',
+			downId: '',
+			downName: '',
+			passengerInfo: {
+				totalAmount: 0,
+				id: '',
+				list: []
+			}
+
+		}
+	},
+	components: {
+		Carmap
+	},
+
+	methods: {
+		gotoHome(){
+			uni.switchTab({
+			    url: '/pages/index/index'
+			});
+		},
+	
+		
+		select(op) {
+			//passengerInfo
+			var obj = this.carhelp.get("form");
+			if (this.passengerInfo.id) {
+				obj.mergeOrderId = this.passengerInfo.id;
+
+			}
+
+			if (op) {
+				obj.op = op;
+				this.carhelp.set("form", obj);
+
+				uni.navigateTo({
+					url: '/pages/buytickets/site?id=' + this.id 
+				})
+			} else {
+				obj.op = null;
+				this.carhelp.set("form", obj);
+				uni.navigateTo({
+					url: '/pages/buytickets/index?id=' + this.id+'&back=true'
+				})
+			}
+
+		},
+
+		submit() {
+			this.$refs.common.showLoading();
+			
+			console.log("Pay+"+new Date().getTime())
+			Pay.wxpay(this.passengerInfo.id).then((response) => {
+				if(!response.result){
+					this.$refs.common.showLoading(false, response.message);
+					return
+				}
+				var data = response.data
+				var url = window.location.href.split("#")[0] + "/#/pages/buytickets/success";
+				console.log("Pay+"+new Date().getTime())
+				
+				var obj = {
+					...data,
+					url: url
+				}
+				wxPayJs(obj);
+
+			}).catch(error => {
+				this.$refs.common.showLoading(false, error);
+
+			})
+		},
+		drawing(point, startend) {
+			if (this.$refs.amap) {
+				this.$refs.amap.initMap(point, this.stationList, startend);
+			}
+		},
+		getShiftInfoResponse(response, response2) {
+			this.$refs.common.showLoading();
+
+			var res = response.data
+			this.title = res.routeName;
+			this.shiftInfo = res;
+			this.car.latitude = res.latitude;
+			this.car.longitude = res.longitude;
+			var point = [];
+			res.mapPath.split("|").forEach((item) => {
+				var sz = item.split(",");
+
+				point.push({
+					longitude: sz[0],
+					latitude: sz[1],
+				})
+				if (!process.car.SIMPLE_RUN) {
+					this.longitude = sz[0]
+					this.latitude = sz[1]
+				}
+
+			})
+			var obj = this.carhelp.get("form")
+
+			obj.getShiftInfo = response;
+			obj.getVehicleStationInfo = response2;
+
+			var list = obj.getVehicleStationInfo.data;
+			for (var i in list) {
+				list[i].status = 0;
+			}
+			this.stationList = list
+			obj = this.carhelp.set("form", obj)
+
+			var sz1 = response.data.startStationCoordinate.split("|")
+			var sz2 = response.data.endStationCoordinate.split("|")
+			var startend = [{
+				longitude: sz1[0],
+				latitude: sz1[1],
+				name: response.data.startStation
+			}, {
+				longitude: sz2[0],
+				latitude: sz2[1],
+				name: response.data.endStation
+			}];
+
+			this.drawing(point, startend);
+			//this.$refs.common.showLoading(false);
+			this.getPoint()
+
+		},
+		getShiftInfo() {
+
+			this.$refs.common.showLoading();
+
+			var obj = this.carhelp.get("form")
+			if (false&&obj.getShiftInfo && obj.getVehicleStationInfo) {
+				this.stationList = obj.getVehicleStationInfo.data
+				this.getShiftInfoResponse(obj.getShiftInfo, obj.getVehicleStationInfo);
+				return;
+			}
+
+
+			API.getShiftInfo(this.id).then((response) => {
+				if (!response.result) {
+					this.$refs.common.goError(response.message)
+					return
+				}
+				API.getVehicleStationInfo(this.id).then((response2) => {
+					this.getShiftInfoResponse(response, response2);
+
+				})
+
+			}).catch(error => {
+				this.$refs.common.showLoading(false, error);
+
+			})
+		},
+		getPassengerInfo() {
+			
+			
+			var thisform = {
+				id: this.id,
+				openId: this.carhelp.getOpenId()
+			}
+			this.$refs.common.showLoading()
+
+			API.getPassengerInfo(thisform).then((response) => {
+				if (!response.result) {
+					this.$refs.common.goError(response.message)
+					return
+				}
+				if (response.data.supply) {
+					this.$refs.common.alert('存在需要补票的订单。')
+					
+					uni.switchTab({
+						url: '/pages/news/index'
+					});
+					return;
+				}
+				this.passengerInfo = response.data
+			
+				
+
+				var obj = this.carhelp.get("form");
+				if(!obj){
+					obj={}
+				}
+				obj.list = this.passengerInfo.list;
+				obj.name= 'buytickets';
+				obj.id= this.id;
+				this.carhelp.set("form", obj);
+				this.getShiftInfo()
+				 
+				
+			}).catch(error => {
+
+				if (error) {
+					this.$refs.common.goError(error)
+					return
+				}
+				//this.$refs.common.showLoading(false,error)
+			})
+		},
+		getPoint() {
+
+
+			if (!this.initBl) {
+				this.$refs.common.showLoading();
+			}
+			API.getVehicleInfo(this.id).then((response) => {
+				this.car = response.data;
+				this.$refs.amap.setCar(this.car);
+				var bl = false;
+				for (var i in this.stationList) {
+					var stat = this.stationList[i];
+					stat.status = 0
+					if (bl) {
+						stat.status = 2;
+					}
+					if (stat.id == this.car.currentStationId) {
+						stat.status = 1;
+						bl = true;
+					}
+				}
+				if (!this.initBl) {
+					this.initBl = true
+
+					this.$nextTick(function() {
+						const query = uni.createSelectorQuery().in(this);
+						query.select('.map-now').boundingClientRect(data => {
+							if (data) {
+								document.getElementById('map-route-main').scrollLeft = data
+								.left;
+							}
+							this.$refs.common.showLoading(false);
+						}).exec();
+					});
+				} else {
+					this.$refs.common.showLoading(false);
+				}
+
+
+
+
+			}).catch(error => {
+				this.$refs.common.showLoading(false, error);
+
+			})
+			if (!this.info.init) {
+				WxJsApi.getWxConfig(['getLocation']).then(() => {
+					// this.$refs.common.showLoading(false)
+					this.getLocation()
+				});
+			}else{
+					this.getLocation()
+			}
+		
+			
+
+			var pages = getCurrentPages();
+			var page = (pages[pages.length - 1]).route;
+			if (page == "pages/buytickets/home") {
+				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);
+			
+			}).catch(error => {
+				console.log(error)
+			})
+		}
+
+	},
+	onLoad(op) {
+
+		this.id = op.id
+	},
+	onUnload() {
+		if (this.myinterval) {
+			clearInterval(this.myinterval)
+		}
+	},
+	onReady() {
+		if (false&&!this.carhelp.getPersonInfo()) {
+			this.$refs.common.setFnc(this.confirmBtn)
+			this.$refs.common.alert2('您还不是车信达用户,注册后再购买车票。', '前往注册', '尚未注册')
+		} else{
+		}
+		this.getPassengerInfo()
+			 
+		
+	}
+}

+ 227 - 0
pages/buytickets/home.vue

@@ -0,0 +1,227 @@
+<template>
+	<view>
+		<car-common    ref="common"></car-common>
+			<u-navbar :title="title"  :is-back="false">
+				<view class="slot-wrap"></view>
+				<view class="navbar-right"  @click="gotoHome" >
+					<u-icon name="home-fill" color="#999" size="28"></u-icon>			
+ 					<span >前往首页</span>
+				</view>
+			</u-navbar>
+		
+			<carmap ref="amap" :myStyle="'width: 100%; height: 140px;'"></carmap>
+
+			<view class="map-text">
+				<h4>{{shiftInfo.startStation}} → {{shiftInfo.endStation}}</h4>
+				<p>首班:{{shiftInfo.startTime}} 末班:{{shiftInfo.endTime}}</p>
+			</view>
+			<template  v-for="item in passengerInfo.list">
+				<view class="ticket-item" @click="select(item)">
+					<view class="ticket-item-left"  >
+						<view class="ticket-head">
+							<h3>{{item.ticketUpStationName}} - {{item.ticketDownStationName}}</h3>
+						</view>
+						<view class="ticket-text">
+							<view class="ticket-text-row">
+								<p>票种:</p><span>{{item.ticketTypeStr}}</span>
+							</view>
+							<view class="ticket-text-row">
+								<p>货票:</p><span>¥{{item.goodsTicket}}</span>
+							</view>
+						</view>
+					</view>
+					<view class="ticket-item-right">
+						<u-avatar size="default" :src="item.imageUrl"></u-avatar>
+						<h3>{{item.totalFee}}</h3>
+						
+					</view>
+				</view>
+			</template>
+			
+			 
+			<view class="add-btn">
+				<u-button type="primary" plain @click="select()">
+					<u-icon name="man-add-fill" color="#2979ff"  size="32"></u-icon>
+					添加乘车人
+				</u-button>
+			</view>
+			<view class="add-foot">
+				<view class="add-foot-price">
+					<p>合计:</p>
+					<span>¥{{passengerInfo.totalAmount}}</span>
+				</view>
+				<view class="add-foot-btn" @click="submit()" v-if="passengerInfo.list.length">
+					支付
+				</view>
+				<view class=" gray-btn" v-if="!passengerInfo.list.length">
+					支付
+				</view>
+			</view>
+	
+	</view>
+</template>
+
+<script>
+	import api from './home.js'
+	export default api;
+</script>
+
+<style>
+	page {
+		background-color: #f7f7f7;
+	}
+</style>
+<style scoped lang="scss">
+	.map-text {
+		background-color: #fff;
+		padding: 20rpx;
+
+		h4 {
+			font-size: 16px;
+		}
+
+		p {
+			margin-top: 10rpx;
+			color: #999;
+		}
+	}
+.navbar-right {
+		display: flex;
+		margin-right: 20rpx;
+		span{
+			color:rgb(96, 98, 102);
+			margin-left: 3px;
+		}
+	}
+	.ticket-item {
+		background-color: #fff;
+		margin: 20rpx;
+		border-radius: 10px;
+		display: flex;
+		justify-content: space-between;
+
+		.ticket-item-left {
+			padding: 30rpx;
+
+			.ticket-head {
+				display: flex;
+				align-items: center;
+			}
+
+			.ticket-text {
+				margin-top: 20rpx;
+
+				.ticket-text-row {
+					display: flex;
+					align-items: center;
+					margin-bottom: 10rpx;
+
+					&:last-child {
+						margin-bottom: 0;
+					}
+
+					span {
+						color: #007AFF
+					}
+				}
+			}
+		}
+
+		.ticket-item-right {
+			width: 120px;
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			align-items: center;
+			border-left: 1px dashed #eee;
+			position: relative;
+			padding: 20rpx;
+
+			&:before {
+				content: '';
+				position: absolute;
+				height: 30rpx;
+				width: 30rpx;
+				background-color: #f7f7f7;
+				border-radius: 50%;
+				left: -15rpx;
+				top: -15rpx;
+			}
+
+			&:after {
+				content: '';
+				position: absolute;
+				height: 30rpx;
+				width: 30rpx;
+				background-color: #f7f7f7;
+				border-radius: 50%;
+				left: -15rpx;
+				bottom: -15rpx;
+			}
+
+			h3 {
+				color: #007AFF;
+				font-size: 24px;
+			}
+		}
+
+	}
+
+	.add-btn {
+		margin: 20rpx;
+		padding-bottom: 60px;
+
+		.u-icon {
+			margin-right: 10rpx;
+		}
+	}
+.slot-wrap {
+		display: flex;
+		align-items: center;
+		flex: 1;
+	}
+	.add-foot {
+		position: fixed;
+		background-color: #fff;
+		z-index: 99;
+		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;
+			font-weight: bold;
+
+			span {
+				color: #ff6200;
+			}
+		}
+
+		.add-foot-btn {
+			width: 240rpx;
+			background-color: #ff6200;
+			color: #fff;
+			font-size: 32rpx;
+			text-align: center;
+			line-height: 90rpx;
+			
+		}
+		.gray-btn {
+			width: 240rpx;
+			background-color: #bfbfbf;
+			color:#fff;
+			border-color: #bfbfbf;
+		
+			font-size: 32rpx;
+			text-align: center;
+			line-height: 90rpx;
+			
+		}
+	}
+</style>

+ 219 - 0
pages/buytickets/index.js

@@ -0,0 +1,219 @@
+import * as API from '@/apis/buytickets.js'
+
+
+export default {
+	data() {
+		return {
+			isLoading:true,
+			initBl:false,
+			noback:false,
+			passengerInfo:{},
+			id: '',
+			num: 0,
+			pic: '',
+			list: [],
+			selectList: [],
+			subForm: {
+				pageIndex: 1,
+				pageSize: 20,
+				totalPage: 1
+			}
+		}
+	},
+	methods: {
+		gotoHome(){
+			uni.switchTab({
+			    url: '/pages/index/index'
+			});
+		},
+		
+		submit() {
+			var obj = this.carhelp.get("form");
+			obj.oplist = []
+			for (var i in this.list) {
+				if (this.list[i].ck) {
+					obj.oplist.push(this.list[i]);
+				}
+			}
+			this.carhelp.set("form", obj);
+
+			uni.navigateTo({
+				url: '/pages/buytickets/selectSite?select=true&id=' + this.id
+			})
+		},
+		ckBtn(item) {
+			if(this.num==5&&!item.ck){
+				this.$refs.common.alert("一次最多选择5名乘车人员");
+				return
+			}
+			item.ck = !item.ck;
+
+			if (item.ck) {
+				var bl=true
+				for (var i = 0; i < this.selectList.length; i++) {
+					if (this.selectList[i].upStationId != item.upStationId) {
+						bl=false;
+					
+					}
+					break;
+				}
+				if(!bl){
+					item.ck = !item.ck;
+					this.$refs.common.alert("所选乘客上车站点不一致,请重新选择。");
+					return;
+				}
+				this.num++;
+				this.selectList.push(item);
+			} else {
+				this.num--;
+				for (var i = 0; i < this.selectList.length; i++) {
+					if (this.selectList[i].id == item.id) {
+						this.selectList.splice(i, 1);
+					}
+				}
+			}
+			console.log(this.selectList)
+		},
+		getPassengerInfo() {
+			
+			
+			var thisform = {
+				id: this.id,
+				openId: this.carhelp.getOpenId()
+			}
+			this.$refs.common.showLoading()
+		
+			API.getPassengerInfo(thisform).then((response) => {
+				if (!response.result) {
+					this.$refs.common.goError(response.message)
+					return
+				}
+				this.passengerInfo = response.data
+				
+				var obj = this.carhelp.get("form");
+				if(!obj){
+					obj={}
+				}
+				
+				//obj.list = this.passengerInfo.list;
+				obj.name= 'buytickets';
+				obj.id= this.id;
+				this.carhelp.set("form", obj);
+				
+				if (response.data.supply) {
+					this.$refs.common.alert('存在需要补票的订单。')
+					
+					uni.switchTab({
+						url: '/pages/news/index'
+					});
+					return;
+					//this.$refs.common.goError(response.message)
+					this.$refs.common.setFnc(()=>{
+						uni.switchTab({
+							url: '/pages/news/index'
+						});
+					},()=>{
+						if (!response.data.id) {
+							uni.redirectTo({
+								url: '/pages/buytickets/index?id=' + this.id+'&back=true'
+							})
+						} else {
+							
+							this.getShiftInfo()
+						}
+					})
+					this.$refs.common.confirm('存在需要补票的订单,是否前去查看?')
+				return;
+				}
+				
+				this.upBusNoTicketList(true);
+				
+			}).catch(error => {
+		
+				if (error) {
+					this.$refs.common.goError(error)
+					return
+				}
+				//this.$refs.common.showLoading(false,error)
+			})
+		},
+		upBusNoTicketList(bl) {
+			this.num=0
+			this.$refs.common.showLoading();
+			this.subForm.id = this.id;
+			var obj = this.carhelp.get("form")
+			//this.list = [];
+			//this.isLoading=true;
+			API.upBusNoTicketList(this.subForm).then((res) => {
+				this.isLoading=false;
+				this.list = res.data.data;
+				//this.list = [];
+				if(!this.list.length){
+					this.$refs.common.showLoading(false);
+					if(!bl){
+						this.$refs.common.alert("刷新成功");	
+					}
+					return;
+				}
+				
+		 
+				this.selectList=[];//清空选中
+				if (this.list.length != 0&&!bl) {
+					this.$refs.common.showLoading(false, "刷新成功");
+				} else {
+					this.$refs.common.showLoading(false);
+				}
+
+				
+
+			}).catch(error => {
+				this.$refs.common.showLoading(false, error);
+
+			})
+		}
+	},
+	onLoad(op) {
+		if(op.back){
+			this.noback=op.back
+		}
+		this.id = op.id
+	},
+	onReady() {
+
+		if (!this.id) {
+			this.$refs.common.goError()
+		}
+		var obj = this.carhelp.get("form")
+
+		if (obj && obj.name == 'buytickets' && obj.id == this.id) {
+			//不创建新订单
+			obj.buy=null;
+			this.carhelp.set("form",obj);
+		} else {
+			this.carhelp.set("form", {
+				name: 'buytickets',
+				id: this.id,
+				oplist: [], //当前添加的2人
+				list: [] // 一共添加的人 
+			});
+		}
+
+		if (false&&!this.carhelp.getPersonInfo()) {
+			this.$refs.common.setFnc(this.confirmBtn)
+			this.$refs.common.alert2('您还不是车信达用户,注册后再购买车票。', '前往注册', '尚未注册')
+		} else {
+		}
+		if (this.noback) {
+			 this.upBusNoTicketList(true);
+		} else {
+			this.getPassengerInfo()
+		}
+			//this.upBusNoTicketList();
+		this.initBl=true;
+
+	},onShow(){
+		if(this.initBl){
+			 this.upBusNoTicketList(true);
+		}	
+	}
+}

+ 183 - 0
pages/buytickets/index.vue

@@ -0,0 +1,183 @@
+<template>
+	<view>
+		<car-common   ref="common"></car-common>
+		<car-loading  v-if="isLoading"  ></car-loading>
+		
+		<u-navbar title="确认身份"  :is-back="noback">
+			<view class="slot-wrap"></view>
+			<view class="navbar-right"  @click="gotoHome" v-if="!noback" >
+				<u-icon name="home-fill" color="#999" size="28"></u-icon>
+				<span >前往首页</span>
+			</view>
+		</u-navbar>
+		<view class="confirm" v-show="!list.length">
+		
+			<view class="confirm-img-border3" v-if="!isLoading" >
+				<view class="confirm-img-border">
+					<view class="confirm-img">
+						<img src="static/img/discern.png" alt="">
+					</view>
+				</view>
+			</view>
+			<h3>欢迎乘坐{{passengerInfo.routeName}}车<br>请前往上车处刷脸登记</h3>
+		</view>
+		<view class="confirm" v-show="list.length">
+		
+			<h3 >请选择购票人的照片?</h3>
+			<p v-show="!num">一位乘客仅需选择一张照片</p>
+			<p v-show="num">如需为您的同伴购票请同时选中Ta的照片</p>
+			
+			<view class="confirm-pic" v-if="list.length">
+				<template v-for="item in list">
+					<view class="confirm-pic-item "   :class="item.ck?'active':''" @click="ckBtn(item)" >
+						<img :src="item.imageUrl" alt="">	
+					</view>
+				</template>	 
+				 
+			</view>
+			<p v-show="!num"><span style="color: #007AFF;">若无本人照片?</span>请前往上车处重新刷脸登记</p>
+			
+		</view>
+		 
+		<view class="upload-button" >
+			<view class="reset-btn" @click="upBusNoTicketList(false)">
+				<u-icon name="shuaxin" custom-prefix="custom-icon" color="#2979ff" size="36"></u-icon>
+			</view>
+			
+			<view class="submit-btn" v-show="num">
+				<u-button type="primary" shape="circle" @click="submit">确定</u-button>
+			</view>
+			
+			<view class="submit-btn" v-show="!num">
+				<u-button class="gray-btn" type="default" shape="circle" >请选择</u-button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './index.js'
+	export default api;
+</script>
+
+<style scoped lang="scss">
+	.confirm-img-border3{
+		border: 2px solid #ffb8b8;
+		height: 248px;
+		width: 248px;
+		border-radius: 50%;		
+		margin: 50px auto 20px;
+		.confirm-img{
+			border-color:#ff6666;
+		}
+	}
+	.confirm{
+		margin-top: 20px;
+		.confirm-img{
+			height: 240px;
+			width: 240px;
+			border-radius: 50%;
+			overflow: hidden;
+			border:4px solid #1677ff;
+			img{
+				height: 100%;
+				width: 100%;
+			}
+		}
+		.confirm-img-border{
+			border: 2px solid #fff;
+			height: 244px;
+			width: 244px;
+			border-radius: 50%;
+		}
+		.confirm-img-border2{
+			border: 2px solid #7fb4ff;
+			height: 248px;
+			width: 248px;
+			border-radius: 50%;		
+			margin: 50px auto 20px;
+		}
+		.confirm-img-border3{
+			border: 2px solid #ffb8b8;
+			height: 248px;
+			width: 248px;
+			border-radius: 50%;		
+			margin: 50px auto 20px;
+			.confirm-img{
+				border-color:#ff6666;
+			}
+		}
+		h3{
+			text-align: center;
+			font-size: 18px;
+		}
+		p{
+			color:#999;text-align: center;
+			margin-top: 10rpx;
+		}
+	}	
+	.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;
+			}
+	.confirm-pic{
+		display: flex;
+		flex-direction: row;
+		flex-wrap: wrap;
+		padding: 20px;
+		margin-bottom: 30px;
+		.confirm-pic-item{
+			height:100px;
+			width: 100px;
+			border-radius: 50%;
+			overflow: hidden;
+			border: 3px solid #fff;
+			margin-bottom: 10px;
+			margin-right: 5%;
+			&:nth-child(3n+0){
+				margin-right: 0;
+			}
+			&.active{
+				border: 3px solid #1677ff;
+			}
+			img{
+				height: 100%;
+				width: 100%;
+			}
+		}
+	}
+	
+	.upload-button{
+		position: fixed;
+		left: 30rpx;
+		bottom:30rpx;
+		right: 30rpx;
+		display: flex;
+		.reset-btn{
+			height: 40px;
+			width: 40px;
+			border-radius: 50%;
+			text-align: center;
+			line-height: 40px;
+			border: 1px solid #eee;
+			margin-right: 10px;
+		}
+		.submit-btn{
+			flex: 1;
+			.gray-btn{
+				background-color: #bfbfbf;
+				color:#fff;
+				border-color: #bfbfbf;
+			}
+		}
+	}
+</style>

+ 410 - 0
pages/buytickets/selectSite.js

@@ -0,0 +1,410 @@
+import * as WxJsApi from '@/utils/wxJsApi.js'
+import * as API from '@/apis/buytickets.js'
+
+import Carmap from '@/components/Carmap.vue'
+
+export default {
+	data() {
+		return {
+			caritemBl:false,
+			show1: false,
+			show2: false,
+			buy:"",
+			look:false,
+			initBl: false,
+			title: '乘车人',
+			show: false,
+			id: 0, // 使用 marker点击事件 需要填写id
+			k:0,
+			//地图居中后的位置
+			longitude: 112.276527,
+			latitude: 30.306427,
+			upid:'',
+			shiftInfo: {
+
+			},
+			mapopen:false,
+			list: [{}, {}],
+			//车的位置
+			car: {
+				obj: null,
+				longitude: '',
+				latitude: '',
+			},
+			stationList: [],
+			//个人
+			info: {
+				obj: null,
+				init: false,
+				longitude: '',
+				latitude: '',
+			},
+			showInfo:{
+				driver:{}
+			},
+			myinterval: '',
+			downId: '',
+			downName: '',
+			passengerInfo:{
+				totalAmount:0,
+				id:'',
+				list:[]
+			}
+			
+		}
+	},
+	components: {
+		Carmap
+	},
+
+	methods: {
+		makePhoneCall(tel){
+			uni.makePhoneCall({
+			    phoneNumber: tel //仅为示例
+			});
+		},
+		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) {
+			
+			if (!this.look&&item.id==this.car.currentStationId&&this.upid!=item.id) {
+				this.downId = item.id
+				this.downName = item.stationName
+				this.$refs.amap.setDown(item);
+			}
+			if (!this.look&&item.status != 0) {
+				this.downId = item.id
+				this.downName = item.stationName
+				this.$refs.amap.setDown(item);
+			}
+				this.$refs.amap.setCenter(item);
+
+		},
+		
+	
+		selectSiteBtn(){
+			 
+			var obj=this.carhelp.get("form");
+			var upid='';
+			
+		
+			upid=obj.oplist[0].upStationId;
+			
+			var downid=this.downId;
+			
+			this.$refs.common.showLoading();
+			
+			var thisform={
+				ticketUpStationId:upid,
+				ticketDownStationId:downid	,	
+				ticketDownStationName:this.downName,
+				price1:0,
+				price2:0
+			}
+			thisform.ticketType=1;
+			 
+			API.ticketAmount(thisform).then((response) => {
+				thisform.price1=response.data.price
+				thisform.ticketType=2;
+				API.ticketAmount(thisform).then((response2) => {
+					thisform.price2=response2.data.price
+					obj.ticket=thisform;
+					if(obj.op){
+						 obj.op.ticketDownStationId=this.downId;
+						obj.op.ticketDownStationName=this.downName;
+					}
+					
+					this.carhelp.set("form",obj);
+					//uni.navigateBack()
+					uni.redirectTo({
+						url: '/pages/buytickets/site?id='+this.id
+					})
+				})
+				
+			
+			}).catch(error => {
+				this.$refs.common.showLoading(false, error);
+			
+			})
+			
+		},
+	
+		drawing(point, startend) {
+			if(this.$refs.amap){
+				this.$refs.amap.initMap(point, this.stationList, startend);
+			}
+		},
+		getShiftInfoResponse(response, response2) {
+			this.$refs.common.showLoading();
+
+			var res = response.data
+			this.title = res.routeName;
+			this.shiftInfo = res;
+			this.car.latitude = res.latitude;
+			this.car.longitude = res.longitude;
+			var point = [];
+			res.mapPath.split("|").forEach((item) => {
+				var sz = item.split(",");
+
+				point.push({
+					longitude: sz[0],
+					latitude: sz[1],
+				})
+				if (!process.car.SIMPLE_RUN) {
+					this.longitude = sz[0]
+					this.latitude = sz[1]
+				}
+
+			})
+			var obj = this.carhelp.get("form")
+
+			obj.getShiftInfo = response;
+			obj.getVehicleStationInfo = response2;
+
+			var list = obj.getVehicleStationInfo.data;
+			for (var i in list) {
+				list[i].status = 0;
+			}
+			this.stationList = list
+			obj = this.carhelp.set("form", obj)
+
+			var sz1 = response.data.startStationCoordinate.split("|")
+			var sz2 = response.data.endStationCoordinate.split("|")
+			var startend = [{
+				longitude: sz1[0],
+				latitude: sz1[1],
+				name: response.data.startStation
+			}, {
+				longitude: sz2[0],
+				latitude: sz2[1],
+				name: response.data.endStation
+			}];
+
+			this.drawing(point, startend);
+			//this.$refs.common.showLoading(false);
+			this.getPoint()
+		
+
+		},
+		showname(name){
+			if(!name){
+				return "";
+			}
+		
+			return name.substring(0,1)+'师傅';
+		},
+		carShow(){
+			this.caritemBl=true;
+		},
+		getShiftInfo() {
+			 
+			this.$refs.common.showLoading();
+			
+			var obj = this.carhelp.get("form")
+			if (false&&obj.getShiftInfo && obj.getVehicleStationInfo) {
+				this.stationList = obj.getVehicleStationInfo.data
+				this.getShiftInfoResponse(obj.getShiftInfo, obj.getVehicleStationInfo);
+				return;
+			}
+
+
+			API.getShiftInfo(this.id).then((response) => {
+				if (!response.result) {
+					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);
+
+				})
+
+			}).catch(error => {
+				this.$refs.common.showLoading(false, error);
+
+			})
+		},
+		carShow2(item){
+			console.log(item)
+			if(item.type=="car"){
+				setTimeout(()=>{
+					this.carShow()
+				}, 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);
+			}
+			
+		},
+		getPoint() {
+			if (!this.initBl) {
+				this.$refs.common.showLoading();
+			}
+			//this.k=0
+			API.getVehicleInfo(this.id).then((response) => {
+				this.car = response.data;
+				
+				//this.car.currentStationId=this.stationList[this.k].id
+				//this.car.currentStationStatus="2"
+				//this.car.currentStationId=this.stationList[2].id
+				//this.car.currentStationStatus="2";
+				
+				this.$refs.amap.setCar(this.car);
+				var bl = false;
+				var bl2 = false;
+				for (var i in this.stationList) {
+					var stat = this.stationList[i];
+					stat.status = 0
+					if (bl2) {
+						stat.status = 2;	
+					}
+					if (bl) {
+						stat.status = 1;
+						bl = false;
+						bl2 = true;
+					}
+					
+					if (stat.id == this.car.currentStationId) {
+						if(this.car.currentStationStatus=="3"){
+							if(eval(i+"+"+1)!=this.stationList.length){
+								this.car.currentStationId2=this.stationList[eval(i+"+"+1)].id;
+								
+							}
+						}
+						bl = true;
+						if(i==this.stationList.length-1){
+								stat.status = 1;
+						}
+						if(this.buy){
+							this.downBtn(stat)
+						}
+					}
+				}
+				if (!this.initBl) {
+					this.initBl = true
+					
+					this.$nextTick(function() {
+						const query = uni.createSelectorQuery().in(this);
+						query.select('#map-now').boundingClientRect(data => {
+							if(data){
+								document.getElementById('map-route-main').scrollLeft = data.left-100;
+							}
+							this.$refs.common.showLoading(false);
+						}).exec();
+					});
+				}else{
+					this.$refs.common.showLoading(false);
+				}
+
+
+
+
+			}).catch(error => {
+				this.$refs.common.showLoading(false, error);
+
+			})
+			WxJsApi.getLocation().then((res) => {
+
+				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);
+
+			}).catch(error => {
+
+			})
+			
+			var pages = getCurrentPages();
+			var page = (pages[pages.length - 1]).route;  
+			if(page=="pages/buytickets/selectSite"){
+				setTimeout(this.getPoint, 10000);
+				
+			}
+		},
+
+
+	},
+	onLoad(op) {
+		if(op.select){
+			this.look=false;
+		}else{
+			this.look=true;// 只读界面
+		}
+		this.id = op.id
+		var obj=this.carhelp.get("form");
+		if(obj.oplist&&obj.oplist.length){
+			this.upid=obj.oplist[0].upStationId;	
+		}
+		
+	},
+	onUnload() {
+		if (this.myinterval) {
+			clearInterval(this.myinterval)
+		}
+	},onShow(){
+		console.log("onShowonShowonShowonShow")
+		this.$nextTick(function() {
+			try{
+				const query = uni.createSelectorQuery().in(this);
+				query.select('#map-now').boundingClientRect(data => {
+					if(data){
+						document.getElementById('map-route-main').scrollLeft = data.left-100;
+					}
+					this.$refs.common.showLoading(false);
+				}).exec();
+			}catch(err){
+				console.log("err")
+				
+			}
+			
+		});
+	},
+	onReady() {
+			this.$refs.common.showLoading()
+			 WxJsApi.getWxConfig(['getLocation']).then(()=>{
+				 this.$refs.common.showLoading(false)
+			 });
+			 var obj = this.carhelp.get("form");
+			 this.buy=obj.buy;
+			 
+		this.getShiftInfo()
+		var pages = getCurrentPages();  
+		var page = (pages[pages.length - 1]).route;  
+		
+	}
+}

+ 471 - 0
pages/buytickets/selectSite.vue

@@ -0,0 +1,471 @@
+<template>
+	<view>
+		<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>{{showname(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>
+				<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"   @clickMap="carShow2"  ></carmap>
+
+		<view class="map-info">
+			<view class="map-text">
+				<h4>{{shiftInfo.startStation}} → {{shiftInfo.endStation}}</h4>
+				<p>首班:{{shiftInfo.startTime}} 末班:{{shiftInfo.endTime}}</p>
+			</view>
+			<!-- <view class="map-btn">
+				<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" >
+				&lt;&lt;&lt; 下方列表可以左右滑动 &gt;&gt;&gt;
+			</view>
+		 <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&&!(item.id == car.currentStationId&&car.currentStationStatus=='2'),
+				 'map-after ':(item.id == car.currentStationId&&car.currentStationStatus=='1'),
+					'map-now':(item.id == car.currentStationId2&&car.currentStationStatus=='3')||(item.id == car.currentStationId&&car.currentStationStatus=='2'),
+					'map-geton':upid==item.id||downId==item.id||(item.id == car.currentStationId&&i==0)}">
+					
+					<view class="map-route-car"  @click="carShow()"   v-show="item.id == car.currentStationId&&(car.currentStationStatus=='1'||car.currentStationStatus=='2')">
+						<img src="static/img/car.png" alt="">
+					</view>
+					 
+					<view class="map-route-car"   @click="carShow()"  v-show="item.id == car.currentStationId2&&car.currentStationStatus=='3'">
+						<img src="static/img/car.png" alt="">
+					</view>
+					
+					<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>
+
+			</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="add-foot" v-if="!look">
+			<view class="add-foot-price">
+				<p>下站站点:{{downName?downName:'点击选择站点'}}</p>
+			</view>
+			<view class="add-foot-btn" v-show="downName" @click="selectSiteBtn()">
+				确认
+			</view>
+			<view class="add-foot-btn" style="background-color: #969896;" v-show="!downName">
+				确认
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './selectSite.js'
+	export default api;
+</script>
+<style scoped lang="scss">
+	
+	.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>
+

+ 230 - 0
pages/buytickets/site.js

@@ -0,0 +1,230 @@
+import * as API from '@/apis/buytickets.js'
+import * as Pay from '@/apis/weixin.js'
+import {
+	wxPayJs
+} from '@/utils/wxpay'
+ export default {
+ 	data() {
+ 		return {
+ 			total:0,
+ 			uid: '', //用户id ,有id是修改
+ 			id: '', //车id
+ 			type: 2,
+ 			pnum: 0,
+			pic:'',
+			personNum:0,
+			buy:false,
+ 			up: {
+ 				name: '',
+ 				id: ''
+ 			},
+ 			down: {
+ 				name: '请选择',
+ 				id: ''
+ 			},
+			oplist:[],
+ 			ticket: {
+ 				price1: 0,
+ 				price2: 0,
+ 			},
+			list:[
+				{
+					id:1,
+					name:"儿童票"
+				},{
+					id:2,
+					name:"成人票"
+				}
+			],
+ 			underLine: 1,
+ 			op: {
+
+ 			}
+ 		}
+ 	},
+ 	 
+ 	methods: {
+		
+		radioGroupChange(){
+			var ptotal=this.getTotal();
+			
+			ptotal+=parseFloat(this.pnum)
+			this.total=ptotal;
+		},
+		getTotal(){
+			var ptotal=0;
+			
+			for(var i in this.oplist){
+				if(this.oplist[i].ticketType=="1"){
+					ptotal+=parseFloat(this.ticket.price1*100)
+				}
+				if(this.oplist[i].ticketType=="2"){
+					ptotal+=parseFloat(this.ticket.price2*100)
+				}
+			}
+			return ptotal/100;
+		},
+		personDelete(){ 
+		},
+ 		deleteBtn() {
+			this.$refs.common.setFnc(this.personDelete)
+ 			 this.$refs.common.confirm('是否删除该乘车人信息?')
+ 		},
+ 		select() {
+ 		 
+
+ 			uni.navigateTo({
+ 				url: '/pages/buytickets/selectSite?select=true&id=' + this.id
+ 			})
+ 		},
+		submit(id) {
+			this.$refs.common.showLoading();
+		
+		console.log("Pay+"+new Date().getTime())
+		
+			Pay.wxpay(id).then((response) => {
+				if(!response.result){
+					this.$refs.common.showLoading(false, response.message);
+					return
+				}
+				var data = response.data
+				var url = window.location.href.split("#")[0] + "/#/pages/buytickets/success";
+				
+				var obj = {
+					...data,
+					url: url
+				}
+				console.log("Pay+"+new Date().getTime())
+				
+				wxPayJs(obj);
+		
+			}).catch(error => {
+				this.$refs.common.showLoading(false, error);
+		
+			})
+		},
+ 		clickBtn(bl) {
+ 			var obj = this.carhelp.get("form")
+ 		
+ 			//obj = this.carhelp.set("form", obj)
+			this.$refs.common.showLoading();
+			var arr=[]
+			var arr2=[]
+			for(var i in obj.oplist){
+				arr.push(obj.oplist[i].id);
+			}
+			for(var i in this.oplist){
+				arr2.push(this.oplist[i].ticketType);
+			}
+			
+			var thisform={
+				id:this.id,
+				mergeOrderId:obj.mergeOrderId,
+				openId:this.carhelp.getOpenId(),
+				passengerIds:arr.join(),
+				ticketUpStationId:this.up.id,
+				ticketDownStationId:this.down.id,
+				ticketTypes:arr2.join(),
+				goodsTicket:this.pnum,
+				totalFee:this.total
+			}
+			if(obj.op){
+				 
+			}else{
+				API.createPassengerOrder(thisform).then((response) => {
+				
+					if(this.buy||bl==true){
+						this.submit(response.data.MergeOrderDTO.id);
+					}else{
+						obj.oplist=[];
+						obj.ticket=null;
+						obj = this.carhelp.set("form", obj)
+						uni.reLaunch({
+							url: '/pages/buytickets/home?id=' + this.id 
+						})
+					}
+					
+					console.log(response)
+				}).catch(error => {
+					this.$refs.common.showLoading(false, error);
+				
+				})
+			}
+			
+ 		},
+ 		
+ 	 
+ 		underLineChange(index) {
+ 			this.underLine = index;
+ 			console.log('当前值为: ' + index)
+
+ 		},
+		ticketAmount(){
+
+			this.$refs.common.showLoading();
+			
+			var thisform={
+				ticketUpStationId:this.up.id,
+				ticketDownStationId:this.down.id,	
+				ticketDownStationName:this.down.name,
+				price1:0,
+				price2:0
+			}
+			thisform.ticketType=1;
+			var obj= this.carhelp.get("form");
+			 
+			API.ticketAmount(thisform).then((response) => {
+				thisform.price1=response.data.price
+				thisform.ticketType=2;
+				API.ticketAmount(thisform).then((response2) => {
+					thisform.price2=response2.data.price
+					this.ticket=thisform;
+					this.radioGroupChange()
+					obj.ticket=thisform;
+					this.carhelp.set("form",obj);
+					this.$refs.common.showLoading(false);
+					
+				})
+				
+			
+			}).catch(error => {
+				this.$refs.common.showLoading(false, error);
+			
+			})
+			
+		},
+ 	},onReady(){
+		var obj = this.carhelp.get("form");
+		
+		if(this.uid && !obj.ticket){
+			this.ticketAmount();
+		}
+		
+	},
+ 	onLoad(op) {
+ 		this.id = op.id;
+ 		var obj = this.carhelp.get("form");
+		this.buy=obj.buy;
+		this.oplist=obj.oplist;
+		for(var i  in this.oplist){
+			if(!this.oplist[i].ticketType){
+				this.oplist[i].ticketType="2"
+			}
+		}
+		
+		this.up.name = obj.oplist[0].upStationName;
+		this.up.id = obj.oplist[0].upStationId;
+		
+		this.personNum=obj.oplist.length
+		
+ 		if (obj.ticket) {
+ 			this.ticket = obj.ticket;
+			this.radioGroupChange()
+ 			this.down = {
+ 				id: obj.ticket.ticketDownStationId,
+ 				name: obj.ticket.ticketDownStationName
+ 			}
+ 		}
+ 		
+ 	}
+ }

+ 230 - 0
pages/buytickets/site.vue

@@ -0,0 +1,230 @@
+<template>
+	<view>
+		<car-common  ref="common"></car-common>
+		
+		
+		<u-navbar title="购买车票">
+			<view class="slot-wrap"></view>
+			<view class="navbar-right"  v-if="uid" @click="deleteBtn" >
+				<u-icon name="shanchu" custom-prefix="custom-icon" size="40" :color="uid?'red':'#999'"></u-icon>
+				<span :style="uid?'color:red':''">删除</span>
+			</view>
+		</u-navbar>
+		
+		<view class="site">
+			<view class="site-head">
+				<view class="site-head-up">
+					<view class="title">
+						<view class="circle"></view>
+						<span>上车站点</span>
+					</view>
+					<view class="site-head-img"  v-if="false">
+						<view class="site-head-img-item" v-if="false">
+						</view>
+						<u-avatar size="large"     v-for="item,i in oplist" :key="i" :src="item.imageUrl"></u-avatar>
+						
+						<u-avatar size="large" v-if="pic"   :src="pic"></u-avatar>			
+					</view>
+					
+					<view class="content">
+						<span>{{up.name}}</span>
+					</view>
+				</view>
+				<view class="site-head-down">
+					<view class="title">
+						<view class="circle"></view>
+						<span>下车站点</span>
+					</view>
+					<view class="content" @click="select">
+						<span v-text="down.name" :style="down.id?'':'color:#999'">宿架转盘</span>
+					</view>
+				</view>
+			</view>
+			<view class="site-foot">
+				<view class="site-foot-row"   v-for="item,i in oplist" :key="i">
+					<span>
+						<u-avatar size="large"     :src="item.imageUrl"></u-avatar>
+					</span>
+					<h3 v-if="buy">{{item.ticketTypeName}}</h3>
+					
+					<u-radio-group  v-if="!buy" v-model="item.ticketType" @change="radioGroupChange">
+								<u-radio 
+									v-for="(item, index) in list" :key="index" 
+									:name="item.id"
+								>
+									{{item.name}}
+								</u-radio>
+							</u-radio-group>
+							
+					
+				</view>
+				<view class="site-foot-row">
+					<span>货票(元)</span>
+					<u-number-box v-model="pnum" @change="radioGroupChange" ></u-number-box>
+				</view>
+				<view class="site-foot-row">
+					<span>应付金额</span>
+					<h3>¥{{total}}</h3>
+				</view>
+			</view>
+		</view>
+		<view class="upload-button" v-show="down.id">
+			<u-button type="primary"  shape="circle" @click="clickBtn(true)">支付</u-button>
+		</view>
+		<view class="upload-button" v-show="!down.id">
+			<u-button type="default" class="gray-btn" shape="circle">支付</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './site.js'
+	export default api;
+	
+	
+</script>
+
+<style>
+	page{background-color: #f7f7f7;}
+</style>
+<style scoped lang="scss">
+	.gray-btn{
+		background-color: #bfbfbf;
+		color:#fff;
+		border-color: #bfbfbf;
+	}
+	.slot-wrap {
+		display: flex;
+		align-items: center;
+		flex: 1;
+	}
+	.navbar-right {
+		display: flex;
+		margin-right: 20rpx;
+		span{
+			color:#999;
+			margin-left: 3px;
+		}
+	}
+	.navbar-left{
+		display: flex;
+		align-items: center;
+		margin-left: 20rpx;
+		span{
+			margin-right: 6rpx;
+			font-size: 14px;
+		}
+	}
+	.site{
+		background-color: #fff;
+		margin: 10px;
+		border-radius: 10px;
+		box-shadow:3px 3px 3px rgba(0,0,0,0.1);
+		.site-head{
+			border-bottom:1px dashed #eee;
+			padding: 10px;
+			position: relative;
+			padding-top: 40px;
+			&:before{
+				content: '';
+				position: absolute;
+				height: 30rpx;
+				width: 30rpx;
+				background-color: #f7f7f7;
+				border-radius: 50%;
+				left: -15rpx;
+				bottom:-15rpx;
+			}
+			&:after{
+				content: '';
+				position: absolute;
+				height: 30rpx;
+				width: 30rpx;
+				background-color: #f7f7f7;
+				border-radius: 50%;
+				right: -15rpx;
+				bottom:-15rpx;
+			}
+		}
+		.site-head-up{
+			margin-bottom: 20px;
+			position: relative;
+			.site-head-img{
+				position: absolute;
+				left: 50%;
+				margin-left: -150px;
+				top:-70px;
+				height: 64px;
+				width:300px;
+				display: flex;
+				justify-content: center;
+				.site-head-img-item{
+					height: 60px;
+					width:60px;
+					box-shadow:3px 3px 3px rgba(0,0,0,0.1);
+					border: 2px solid #fff;
+					border-radius: 50%;
+				}
+			}
+			.title{
+				display: flex;
+				align-items: center;
+				margin-bottom: 10rpx;
+				span{
+					margin-left: 10rpx;
+				}
+			}
+			.content{
+				span{
+					font-size: 24px;
+				}
+			}
+			.circle{
+				height: 24rpx;
+				width: 24rpx;
+				border-radius: 50%;
+				background-color: #fff;
+				border: 3px solid #22ac38;
+			}
+		}
+		.site-head-down{
+			.title{
+				display: flex;
+				align-items: center;
+				margin-bottom: 10rpx;
+				span{
+					margin-left: 10rpx;
+				}
+			}
+			.content{
+				span{
+					font-size: 24px;
+				}
+			}
+			.circle{
+				height: 24rpx;
+				width: 24rpx;
+				border-radius: 50%;
+				background-color: #fff;
+				border: 3px solid #ff6868;
+			}
+		}
+		.site-foot{
+			padding: 10px;
+			.site-foot-row{
+				display: flex;
+				justify-content: space-between;
+				padding: 10px 0;
+				span{
+					font-size: 15px;
+				}
+			}
+		}
+	}
+	.upload-button{
+		position: fixed;
+		left: 30rpx;
+		bottom:30rpx;
+		right: 30rpx;
+	}
+</style>

+ 50 - 0
pages/buytickets/success.js

@@ -0,0 +1,50 @@
+
+import * as API from '@/apis/common.js'
+
+	export default {
+		data() {
+			return {
+				id:"",
+				pay:{
+					list:[]
+				}
+			}
+		},
+		methods: {
+			lookBtn(){
+				uni.navigateTo({
+					 url: '/pages/my/user/bybusList'
+				})
+			},
+			getPay(){
+				this.$refs.common.showLoading();
+								
+				API.mergeInfo(this.id).then((response) => {
+					
+					this.pay=response.data;
+					this.$refs.common.showLoading(false);
+				}).catch(error => {
+					this.$refs.common.showLoading(false, error);
+				})	
+			},
+			gotoHome(){
+				uni.switchTab({
+				    url: '/pages/index/index'
+				});
+			},
+			backBtn(){
+				uni.redirectTo({
+					 url: '/pages/buytickets/index?id='+this.pay.id
+				})
+			}
+		},
+		onLoad(op) {		
+			 this.id=op.id;	
+		},onReady(){
+			if(!process.car.SIMPLE_RUN){
+				this.getPay();
+			}
+			
+		}
+	}
+

+ 151 - 0
pages/buytickets/success.vue

@@ -0,0 +1,151 @@
+<template>
+	<view>
+		<car-common    ref="common"  ></car-common>
+		
+		<u-navbar title="缴费结果"  :is-back="false">
+			<view class="slot-wrap"></view>
+			<view class="navbar-right"  @click="gotoHome"  >
+				<u-icon name="home-fill" color="#999" size="28"></u-icon>
+				<span >前往首页</span>
+			</view>
+		</u-navbar>
+		
+		<view class="success">
+			<u-icon name="checkmark-circle-fill" color="#08d152" size="200"></u-icon>
+			<h3>支付成功</h3>
+		</view>
+		
+		<view class="ticket-item" v-for="item,i in pay.list" :key="i" >
+			<view class="ticket-item-left" >
+				<view class="ticket-head">
+					<h3>{{item.startStation}} - {{item.endStation}}</h3>
+				</view>
+				<view class="ticket-text">
+					<view class="ticket-text-row">
+						<p>票种:</p><span>{{item.ticketTypeName}}</span>
+					</view>
+					<view class="ticket-text-row">
+						<p>货票:</p><span>¥{{item.goodTicket}}</span>
+					</view>
+				</view>
+			</view>
+			<view class="ticket-item-right">
+				<u-avatar :src="item.imageUrl" size="default"></u-avatar>
+				<h3>{{item.totalFee}}</h3>
+			</view>
+		</view>
+		<view class="upload-button">
+			<u-button class="upload-btn" type="primary" shape="circle" @click="backBtn" plain>继续购票</u-button>
+			<u-button class="upload-btn" type="primary" shape="circle" @click="lookBtn">查看购票记录</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './success.js'
+	export default api;
+</script>
+
+<style>
+	page{
+		background-color: #f7f7f7;
+	}
+</style>
+<style scoped lang="scss">
+	.ticket-item{
+		background-color: #fff;
+		margin:20rpx;
+		border-radius: 10px;
+		display: flex;
+		justify-content: space-between;
+		box-shadow:3px 3px 3px rgba(0,0,0,0.1);
+		.ticket-item-left{
+			padding: 30rpx;
+			.ticket-head{
+				display: flex;
+				align-items: center;
+			}
+			.ticket-text{
+				margin-top: 20rpx;
+				.ticket-text-row{
+					display: flex;
+					align-items: center;
+					margin-bottom: 10rpx;
+					&:last-child{
+						margin-bottom: 0;
+					}
+					span{
+						color:#007AFF
+					}
+				}
+			}
+		}
+		.ticket-item-right{
+			width: 120px;
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			align-items: center;
+			border-left: 1px dashed #eee;
+			position: relative;
+			padding: 20rpx;
+			&:before{
+				content: '';
+				position: absolute;
+				height: 30rpx;
+				width: 30rpx;
+				background-color: #f7f7f7;
+				border-radius: 50%;
+				left: -15rpx;
+				top:-15rpx;
+			}
+			&:after{
+				content: '';
+				position: absolute;
+				height: 30rpx;
+				width: 30rpx;
+				background-color: #f7f7f7;
+				border-radius: 50%;
+				left: -15rpx;
+				bottom:-15rpx;
+			}
+			h3{
+				color:#007AFF;
+				font-size:24px;
+			}
+		}
+		
+	}
+	.upload-button{
+		display: flex;
+		font-size:24px;
+		position: fixed;
+		left: 30rpx;
+		bottom:30rpx;
+		right: 30rpx;
+		.upload-btn{
+			flex: 1;
+			&:first-child{
+				margin-right: 10px;
+			}
+		}
+	}
+	.success{
+		text-align: center;
+		padding: 100rpx 0 40rpx;
+		
+	}
+	.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>

+ 32 - 0
pages/buytickets/upload.js

@@ -0,0 +1,32 @@
+
+import * as WxJsApi from '@/utils/wxJsApi.js'
+
+	export default {
+		data() {
+			return {
+				imgBase64:'',
+				step:1,
+			}
+		},
+		methods: {
+			
+			uploadPic(){
+			 WxJsApi.chooseImage(9,true).then(res=>{
+				var localId=res[0]
+				uni.navigateTo({
+					url:'/pages/buytickets/adjust?localId='+localId
+				})
+			 })
+			 
+			}
+		},
+		
+		onReady() {
+			this.$refs.common.showLoading()
+			 WxJsApi.getWxConfig(['chooseImage']).then(()=>{
+				 this.$refs.common.showLoading(false)
+			 });
+	
+		}
+	}
+

+ 96 - 0
pages/buytickets/upload.vue

@@ -0,0 +1,96 @@
+<template>
+	<view  >
+		<car-common :login="true" mytitle="上传照片" ref="common"></car-common>
+			<view class="upload">
+				<h4>确认本人操作</h4>
+				<view class="upload-img">
+					<img src="static/img/face1.png" alt="" v-if="!imgBase64">
+					<img :src="imgBase64" v-if="imgBase64" />
+				</view>
+				<p>1.为了确保您的乘车信息的安全和真实性,我们需要对您进行人脸信息的匹配</p>
+				<p>2.请您本人亲自完成,请将脸部置于提示框内,并按提示</p>
+				<view class="upload-step">
+					<view class="upload-step-item">
+						<img src="static/img/icon-face-1.png" alt="">
+						<span>摘下遮挡物</span>
+					</view>
+					<view class="upload-step-item">
+						<img src="static/img/icon-face-2.png" alt="">
+						<span>正对手机</span>
+					</view>
+					<view class="upload-step-item">
+						<img src="static/img/icon-face-3.png" alt="">
+						<span>光线充足</span>
+					</view>
+				</view>
+			</view>
+			<view class="upload-button">
+				<u-button type="primary" shape="circle" @click="uploadPic">上传照片</u-button>
+			</view>
+	
+		
+		
+	</view>
+</template>
+
+<script>
+	import api from './upload.js'
+	export default api;
+</script>
+
+<style scoped lang="scss">
+	 
+	.upload {
+		padding: 100rpx 50rpx;
+
+		h4 {
+			text-align: center;
+			font-size: 36rpx;
+		}
+
+		p {
+			color: #909090;
+			margin-bottom: 20rpx;
+		}
+
+		.upload-img {
+			height: 220px;
+			width: 176px;
+			margin: 40rpx auto;
+
+			img {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.upload-step {
+			display: flex;
+			justify-content: space-between;
+			padding: 10px 0;
+
+			.upload-step-item {
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+
+				img {
+					height: 60px;
+					width: 60px;
+				}
+
+				span {
+					margin-top: 10rpx;
+					font-size: 14px;
+				}
+			}
+		}
+	}
+
+	.upload-button {
+		position: fixed;
+		left: 30rpx;
+		bottom: 30rpx;
+		right: 30rpx;
+	}
+</style>

+ 22 - 0
pages/buytickets/view.vue

@@ -0,0 +1,22 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 138 - 0
pages/car/login.js

@@ -0,0 +1,138 @@
+import * as API_user from '@/apis/user'
+import {
+		checkPhone,
+	} from '@/utils'
+	export default {
+		data() {
+			return {
+				openId:"",
+				subFormCode: {
+					phone: '',
+					openId: '',
+					verifyCode: ''
+				},
+				isSendMsgIng: false,
+				sendMsgSecond: 60,
+				back:false,
+			}
+		},
+		methods: {
+			gotoHome(){
+				uni.switchTab({
+				    url: '/pages/index/index'
+				});
+			},
+			codeCheckForm() {
+				let phoneResult = checkPhone(this.subFormCode.phone);
+				if (typeof phoneResult == 'string') {
+				
+				
+					this.$refs.common.alert(phoneResult)
+					return false;
+				} else if (!this.subFormCode.verifyCode) {
+				
+					this.$refs.common.alert('请输入验证码')
+					
+					return false;
+				} else {
+					return true;
+				}
+			},
+			login() {
+				this.codeSubmit();
+				
+			},
+			//验证码登录
+			codeSubmit() {
+				if (this.codeCheckForm()) {
+					this.$refs.common.showLoading()
+					API_user.validateCode(this.subFormCode).then(response => {
+						  
+						if(response.data){
+							var token = response.data ? response.data.token : '';
+							this.carhelp.setToken(token);
+							this.carhelp.setPersonInfo(response.data.userInfo)
+							
+							this.loginSuccess();
+						}else{
+							 
+							this.$refs.common.showLoading(false,response.message);
+						}
+					
+			
+					}).catch(error => {					
+						this.$refs.common.showLoading(false,error);	
+					})
+				}
+			},
+			//发送验证码
+			sendMsg() {
+				
+				
+				if (!this.isSendMsgIng) {
+					let phoneResult = checkPhone(this.subFormCode.phone);
+					if (typeof phoneResult == 'string') {
+					  
+						this.$refs.common.alert(phoneResult)
+					} else {
+					this.$refs.common.showLoading()
+						API_user.getVerifyCode(this.subFormCode).then(response => {
+							this.$refs.common.showLoading(false) 
+							if(response.message){
+								//倒计时
+								this.msgTimeInterval();
+							}else{
+								this.$refs.common.alert("您的验证码已经发送[5分钟有效],请勿重复点击")
+							}
+							
+						}).catch(error => {
+						 
+							this.$refs.common.alert(error)
+						})
+					}
+				}
+			},
+			//倒计时
+			msgTimeInterval() {
+				this.isSendMsgIng = true;
+				var time = this.sendMsgSecond;
+				var _this = this;
+				this.timer = setInterval(() => {
+					if (time > 0) {
+						_this.sendMsgSecond = time--;
+					} else {
+						_this.isSendMsgIng = false;
+						_this.sendMsgSecond = 60;
+						clearInterval(_this.timer)
+					}
+				}, 1000)
+			},	//登录成功
+			loginSuccess() {
+			 
+				uni.switchTab({
+				    url: '/pages/my/index'
+				});
+			},
+		},
+		onLoad(temp) {
+			 
+			var ob=this.carhelp.getPersonInfo()
+			if(ob){
+				this.loginSuccess()
+			}
+			if(temp.back){
+				this.back=true;
+			}
+			console.log(ob)
+			this.subFormCode.openId = this.carhelp.getOpenId();
+			
+			if (process.car.SIMPLE_RUN) {
+				this.subFormCode.openId = "test";
+				
+			}
+			console.log(this.carhelp.getPrefix())
+			
+				
+		}
+	}
+

+ 127 - 0
pages/car/login.vue

@@ -0,0 +1,127 @@
+<template>
+	
+	<view class="login">
+		<car-common   ref="common"  ></car-common>
+		<u-navbar title="登录"  :is-back="false">
+			<view class="slot-wrap"></view>
+			<view class="navbar-right"  @click="gotoHome" >
+				<u-icon name="home-fill" color="#999" size="28"></u-icon>
+				
+				<span >前往首页</span>
+			</view>
+		</u-navbar>
+		<view class="login-logo">
+			<img src="static/img/logo_1.png" alt="">
+		</view>
+		<view class="login-name">车信达</view>
+		<view class="login-form">
+			<view class="login-form-row">
+				<view class="login-form-title">
+					<u-icon name="zhanghao" custom-prefix="custom-icon"  size="38" color="#1677ff"></u-icon>
+				</view>
+				<view class="login-form-input">
+					<u-input placeholder="请输入手机号" v-model="subFormCode.phone" type="text"></u-input>
+				</view>
+			</view>
+			<view class="login-form-row">
+				<view class="login-form-title">
+					<u-icon name="yanzhengma" custom-prefix="custom-icon"  size="38" color="#1677ff"></u-icon>
+				</view>
+				<view class="login-form-input">
+					<u-input placeholder="请输入验证码" maxlength="6" v-model="subFormCode.verifyCode" type="number"  ></u-input>
+				</view>
+				<view class="login-form-code">
+					<span @click="sendMsg" v-text="isSendMsgIng?(sendMsgSecond+'秒'):'发送验证码'" >发送验证码</span>
+				</view>
+			</view>
+			<view class="login-button">
+				<u-button type="primary" shape="circle" @click="login" >立即登录</u-button>
+			</view>
+			<view class="forget" v-if="false" ><span>忘记密码?</span></view>
+			<view class="login-foot">
+				<p>登录即为同意</p><span>《用户协议》</span><span>《隐私政策》</span> 
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './login.js'
+	export default api;
+	
+</script>
+
+<style scoped lang="scss">
+	.login{
+		text-align: center;
+	}
+	.login-logo{
+		width: 200rpx;
+		height: 200rpx;
+		border-radius: 20px;
+		overflow: hidden;
+		margin: 160rpx auto 0;
+		img{
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.login-name{
+		font-size:16px;
+		font-weight: bold;
+		margin-top: 20rpx;
+	}
+	.login-form{
+		width: 300px;
+		margin: 30px auto;	
+	}
+	.login-form-row{
+		display: flex;
+		align-items: center;
+		padding: 20rpx 0;
+		border-bottom: 1px solid #f7f7f7;
+		position: relative;
+		.login-form-title{
+			margin-right: 20rpx;
+		}
+		.login-form-input{
+			flex: 1;
+			padding-right: 20rpx;
+		}
+	}
+	.login-button{
+		margin: 40rpx 0;
+	}
+	.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;
+		}
+	.forget{
+		text-align: right;
+		color:#1677ff;
+	}
+	.login-form-code{
+		color:#1677ff;
+	}
+	.login-foot{
+		display: flex;
+		text-align: center;
+		position: fixed;
+		bottom:20rpx;
+		left:50%;
+		margin-left:-250rpx;
+		color:#999;
+		span{
+			color:#1677ff
+		}
+	}
+</style>

+ 407 - 0
pages/index/index.js

@@ -0,0 +1,407 @@
+import * as WxJsApi from '@/utils/wxJsApi.js'
+import * as API from '@/apis/index.js'
+
+export default {
+		data() {
+			return {
+				isReady:false,
+				rbool:false,
+				wxinit:false,
+				index:0,
+				btn:{
+					color: '#1677FF'
+				},
+				remindBl:false,
+				remindInfo:null,
+				isLoading:false,
+				getPointBl:false,//是否定位完成
+				longitude: '',
+				latitude: '',
+				optionsName:'荆州',
+				options1:[
+					 
+				],
+				list: [ ],
+				siteList:[
+				],
+				radiolist: [
+					{
+						name: '不提醒',
+						isRemind: "0",
+					},
+					{
+						name: '提前1站',
+						isRemind: "1",
+					},
+					{
+						name: '提前2站',
+						isRemind: "2",
+					}
+				],
+				// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
+				value: 'orange',
+			}
+		},
+		onLoad(){
+			
+		},
+		methods: {
+			
+			// 选中某个单选框时,由radio时触发
+			radioChange(e) {
+				// console.log(e);
+			},
+			// 选中任一radio时,由radio-group触发
+			remindHD(){
+				
+				
+				var item= this.remindInfo
+				
+				if(item.isRemind==0){
+					if(this.remindInfo.remindId){
+						this.del(item.remindId,item.isRemind!=0)
+					}
+					return
+				}
+				if(item.remindId){
+					this.del(item.remindId,item.isRemind!=0)
+				}else{
+					this.add()
+				}
+				
+				
+			},
+			del(id,bl){
+				API.cancelRemind(id).then((res) => {
+					this.remindInfo.remindId=""
+					if(bl){
+						this.add()	
+					}else{
+						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.saveRemind(obj).then((res) => {
+				 	item.remindId=res.data.id
+					this.$refs.common.alert( "设置成功");
+				 
+				 }).catch(error => {
+				 		this.$refs.common.alert( error);
+				 }) 
+			 },
+			radioGroupChange(item) {
+				this.remindHD();
+			},
+			
+			getRemindInfo(){
+				
+				API.queryRemind(this.carhelp.getOpenId()).then((res) => {
+					
+					if(res.data.length){
+						this.remindInfo=res.data[0]
+						var obj=this.remindInfo
+						if(obj.remindId){
+							this.rbool=true;
+							obj.isRemind=obj.stopInAdvance;
+						}else{
+							obj.isRemind="0";
+						}
+					}
+				}).catch(error => {
+						this.$refs.common.alert( error);
+				})  
+			},
+			 
+			getNewNum(){
+				
+				
+				var pages = getCurrentPages();
+				var page = (pages[pages.length - 1]).route;
+			
+				
+				
+				if(page=="pages/index/index"||
+				page=="pages/my/index"||
+				page=="pages/news/index"){
+					setTimeout(this.getNewNum,10000)
+				}else{
+					setTimeout(this.getNewNum,1000)
+					return;
+				}
+				var data={
+						openId:this.carhelp.getOpenId()
+					};
+				
+					if(!this.carhelp.getOpenId()){
+						return
+					}
+				API.passengerMessageNoReadNum(data).then((res) => {
+					var num=res.data.num;
+					
+					
+					if(num){
+						uni.setTabBarBadge({
+						  index: 2,
+						  text: num+''
+						})
+					}else{
+						 uni.removeTabBarBadge({
+								 index:2
+						})
+					}
+				}).catch(error => {
+					
+				})   
+				
+			
+			
+		} ,
+			getBanner() {
+			      API.getBannerInfo("1").then((res) => {
+			      	this.list=res.data;
+					for(var i in this.list){
+						var obj=this.list[i]
+						obj.url=obj.linkUrl
+						obj.image=obj.picUrl
+						obj.title=obj.name
+					}
+					this.carhelp.set("bannerList",this.list);
+			      }).catch(error => {
+			      	this.$refs.common.alert( error);
+			      })     
+			},
+			getOwnerRegion(){
+				var obj={
+					longitude:this.longitude,
+					latitude:this.latitude
+				}
+				API.getOwnerRegion(obj).then((res) => {
+				 	//this.options1=res.data;
+					 
+				}).catch(error => {
+					this.$refs.common.alert( error);
+				})  
+			},
+			setRegion(){
+				var obj={
+					longitude:this.longitude,
+					latitude:this.latitude
+				}
+				API.getOwnerRegion(obj).then((res) => {
+					
+					var index=0;
+					var regionN = this.carhelp.get("car_region");
+					var region=res.data.id;
+					var obj1={};
+					var obj2={};
+					for(var i in 	this.options1 ){
+						if(this.options1[i].id==region){
+							index=i;
+							obj1=this.options1[i]
+						}
+						if(this.options1[i].id==regionN){
+							this.index=i;	
+							obj2=this.options1[i]
+						}
+					}
+					
+					if(regionN&&regionN!=region){
+						
+						var nowDate =new Date();
+						var curDay=nowDate.getFullYear()*10000+(nowDate.getMonth()+1)*10000+nowDate.getDate()*10000+nowDate.getHours()*100+nowDate.getMinutes();
+						var temp = this.carhelp.get("car_region_cur");
+						var i=30;
+						if(process.car.NODE_ENV!="prod"){
+							i=3
+						}
+						
+						if(temp&&temp+i>curDay){
+							return
+						}
+						this.carhelp.set("car_region_cur",curDay);
+						
+						//是否切换
+						this.$refs.common.setFnc(()=>{
+							 this.index=index;
+							 this.carhelp.set("car_region",region);
+						})
+						this.$refs.common.confirm('定位显示您在“'+obj1.name+'”,是否切换','切换')
+					}else{
+						this.index=index;
+						this.carhelp.set("car_region",region);
+					}
+				
+				}).catch(error => {
+					this.$refs.common.alert( error);
+				})  
+			},
+			getRegion(bl) {
+			      API.getRegionList().then((res) => {
+			       	this.options1=res.data;
+					if(this.options1.length){
+						this.carhelp.set("car_region_temp",	this.options1[0].id);
+					}
+					var region= this.carhelp.get("car_region");
+					if(region){
+						for(var i in 	this.options1 ){
+							if(this.options1[i].id==region){
+								this.index=i;
+								break;
+							}
+						}
+					}
+					 if(bl){	 
+						   this.setRegion();
+					 }
+					
+			      }).catch(error => {
+			      	this.$refs.common.alert( error);
+			      })     
+			},
+			 bindPickerChange: function(e) {
+			         
+			            this.index = e.target.value
+						var obj=this.options1[ this.index];
+						var nowDate=new Date();
+						var curDay=nowDate.getFullYear()*10000+(nowDate.getMonth()+1)*10000+nowDate.getDate()*10000+nowDate.getHours()*100+nowDate.getMinutes();
+						this.carhelp.set("car_region_cur",curDay);
+						this.carhelp.set("car_region",obj.id);
+						
+			},
+			gotoQuery(){
+				uni.navigateTo({
+					url:'/pages/query/index?back=true'
+				})
+			},
+			gotoLine(item,downid){
+				uni.navigateTo({
+					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("正在获取定位信息,为您查找附近的站点...");
+			
+				
+				WxJsApi.getLocation().then((res) => {
+					
+					var latitude = parseFloat(res.latitude);
+					var longitude = parseFloat(res.longitude);
+			
+					this.latitude = latitude;
+					this.longitude = longitude;
+					
+					 this.getRegion(true);
+					
+					//this.$refs.common.alert("定位中...",);
+					this.passengerNearbyStation()
+					this.getPointBl=true
+					this.$refs.common.showLoading(false);
+				}).catch(error => {
+					this.$refs.common.alert( error);
+					
+				})
+			},
+			passengerNearbyStation(){
+				if(process.car.SIMPLE_RUN){
+					this.latitude = '30.306452';
+					this.longitude = '112.27642';
+				}
+			
+				
+				var form={
+					longitude:this.longitude,
+					latitude:this.latitude,
+					pageIndex:1,
+					pageSize:5
+				}
+				this.$refs.common.showLoading();
+				API.passengerNearbyStation(form).then((res) => {
+					this.siteList=res.data;
+					this.isLoading=true;
+					//this.$refs.common.showLoading(fa);
+					if(this.siteList.length){
+						this.$refs.common.alert( "已为您查询出附近的站点");
+					}else{
+						this.$refs.common.alert( "查询成功,附近暂无站点信息!");
+					}
+				}).catch(error => {
+					this.$refs.common.alert( error);
+				})
+			},
+			getScan(){
+				this.$refs.common.showLoading()
+				WxJsApi.scanQRCode(0,this.$refs.common).then(function(url){
+					console.log(url)
+					
+					window.location.href=url;
+				}).catch(error => {
+					this.$refs.common.showLoading(false,error)
+					
+				});
+			},
+			clickSwiper(index){
+				
+				var url=this.list[index].url;
+				if(url){
+					if(url.indexOf("http")==0){
+						window.location.href=url;
+					}else if(url.indexOf("/pages/")==0){
+						uni.navigateTo({
+							url:this.list[index].url
+						})
+					}
+				}
+			},
+			closeDropdown() {
+				this.$refs.uDropdown.close();
+			}
+		},onReady(){
+			WxJsApi.getWxConfig(['getLocation','addEventListener']).then(()=>{
+				this.wxinit=true;
+				var _this=this;
+			 
+			})	
+			//WxJsApi.requestSubscribeMessage(['Ilxy2TX264A3RHqRyDZqL_xUDxi9OuBNeJoDOBfMRHg'])
+			
+			var list=this.carhelp.get("bannerList");
+			if(list){
+				this.list=list;
+			}
+			//this.remindHD()
+			this.getPoint();
+			this.getBanner();
+			this.getNewNum();
+			this.getRemindInfo();
+		 
+			this.getRegion();
+			//清空缓存
+			this.carhelp.set("form",{});
+			this.isReady=true;
+		},onShow(){
+			if(this.isReady){
+				this.getPoint();
+				this.getRemindInfo();
+			}
+				
+		},
+	}

+ 207 - 0
pages/index/index.vue

@@ -0,0 +1,207 @@
+<template>
+	<view class="content">
+		<car-common   ref="common"  ></car-common>
+		
+		<u-navbar :is-back="false" title="">	
+			<view class="slot-wrap">
+				<view class="navbar-left">
+					  <picker :value="index" @change="bindPickerChange" range-key="name" :range="options1">
+					          <view class="uni-input" v-if="options1.length">{{options1[index].name}}
+								<u-icon name="arrow-down" color="#999" size="28"></u-icon>			  
+							  </view>					  
+					   </picker>
+				</view>				
+				<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>
+				</view> -->
+			</view>
+			
+		</u-navbar>	
+		<view class="banner" v-show="list.length">
+			<u-swiper height="200" :list="list" @click="clickSwiper"></u-swiper>
+		</view>
+		
+	<view class="remind"   v-if="remindInfo">
+		<h3>{{remindInfo.currentStationName}} - {{remindInfo.ticketDownStationName}}</h3>
+		<p>线路:{{remindInfo.routeName}} 当前:{{remindInfo.currentStationName}}</p>
+		<view class="remind-radio">
+			<span>到站提醒:</span>
+			<u-radio-group v-model="remindInfo.isRemind" @change="radioGroupChange" active-color="#fff">		
+				<u-radio 
+					@change="radioChange" 
+					v-for="(dio, index) in radiolist" :key="index" 
+					:name="dio.isRemind"
+					>
+					{{dio.name}}
+				</u-radio>
+			</u-radio-group>
+		</view>
+	
+	</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="isLoading&&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"  v-for="item,index in siteList" :key="index">
+			<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>
+				</view>
+				<u-icon name="arrow-right" color="#999" size="28"></u-icon>
+			</view>
+			<view class="content">
+				<view class="route">
+					<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&&li.des!='等待发车'?'当前:'+li.currentStationName:''}}</p>
+						</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>
+			</view>
+		</view>
+		
+	</view>
+</template>
+
+<script>
+	import api from './index.js'
+	export default   api
+	
+</script>
+
+<style>
+	page{background-color: #f7f7f7;}
+</style>
+<style scoped lang="scss">
+	.btn{
+		border-color: #1677FF ;
+	}
+	.slot-wrap {
+		display: flex;
+		align-items: center;
+		flex: 1;
+	}
+	.navbar-right {
+		display: flex;
+		margin-right: 20rpx;
+	}
+	.navbar-left{
+		display: flex;
+		align-items: center;
+		margin-left: 20rpx;
+		span{
+			margin-right: 6rpx;
+			font-size: 14px;
+		}
+	}
+	.search-wrap {
+		margin: 0 20rpx;
+		flex: 1;
+	}
+	.banner{
+		padding: 20rpx;
+		background-color: #fff;
+	}
+	.slot-content{
+		background-color: #fff;
+	}
+	.index-floor{
+		margin: 20rpx;
+		background-color: #fff;
+		border-radius: 20rpx;
+		.title{
+			padding: 20rpx;
+			border-bottom: 1px solid #f7f7f7;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.title-site{
+				display: flex;
+				align-items: center;
+			}
+			span{
+				margin-left: 10rpx;
+				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{
+		margin:0 20rpx;
+	}
+	.route-item{
+		padding:  20rpx 0;
+		border-bottom: 1px solid #f7f7f7;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		&:last-child{
+			border: none;
+		}
+		h4{
+			font-size: 32rpx;
+		}
+		p{
+			margin-top: 6rpx;
+			color:#999;
+		}
+	}
+	.route-gap{
+		span{
+			font-size: 32rpx;
+			font-weight: bold;
+			margin-right: 10rpx;
+			color:#1677ff;
+		}
+		&.stop{
+			span{color:#ff731d}
+		}
+	}
+	.remind{
+		background-color: #1677ff;
+		margin: 10px;
+		padding: 10px;
+		border-radius: 10px;
+		h3{color:#fff}
+		p{color:#fff;margin-top: 10px;margin-bottom: 5px;}
+	
+	}
+	.remind-radio{
+		color:#fff;
+		/deep/.u-radio__label{
+			color:#fff;
+		}
+		/deep/.u-icon__icon{
+			color:#1677ff!important
+		}
+	}
+</style>

+ 95 - 0
pages/index/sitePage.js

@@ -0,0 +1,95 @@
+
+import * as API from '@/apis/index.js'
+
+ import Carmap from '@/components/Carmap.vue'
+export default {
+		data() {
+			return {
+					mapopen:false,
+				isReady:false,
+				id:'',
+				longitude: '',
+				latitude: '', 
+				nearbyStationInfo:{
+					nearbyShiftDTOList:[]
+				}
+			}
+		},
+		components: {
+			Carmap
+		},
+		onLoad(op){
+			this.longitude=op.longitude;
+			this.latitude=op.latitude;
+			this.id=op.id;
+		},
+		methods: {
+			mapdown(){
+				var obj={
+					longitude:this.longitude,
+					latitude:this.latitude,
+				}
+				var obj2={
+					longitude:this.nearbyStationInfo.longitude,
+					latitude:this.nearbyStationInfo.latitude,
+				}
+				
+				this.$refs.amap.setPerson(obj);
+				this.$refs.amap.setSite(obj2);
+			},
+			gotoLine(item,downid){
+				uni.navigateTo({
+					url:'/pages/route/index?id='+item.routeId+"&upid="+item.startStationId+"&downid="+downid
+				})
+				
+			},
+			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;")
+					
+				}
+			},
+			gotoLine(item,downid){
+				uni.navigateTo({
+					url:'/pages/route/index?id='+item.routeId+"&upid="+item.startStationId+"&downid="+downid
+				})
+				
+			},
+		 
+			getNearbyStationInfo() {
+				var obj={
+					longitude:this.longitude,
+					latitude:this.latitude,
+					id:this.id,
+				}
+			
+				this.$refs.common.showLoading();
+				
+				API.nearbyStationInfo(obj).then((res) => {
+					this.nearbyStationInfo=res.data;
+					
+					this.$refs.common.showLoading(false);
+				}).catch(error => {
+					this.$refs.common.showLoading(false,error);
+					
+				})
+			},
+		
+		 
+		 
+		},onReady(){
+		
+			this.getNearbyStationInfo();
+			this.isReady=true;
+			this.$refs.amap.init();
+		},onShow(){
+			if(this.isReady){
+					this.getNearbyStationInfo();
+			}
+			
+			
+		},
+	}

+ 109 - 0
pages/index/sitePage.vue

@@ -0,0 +1,109 @@
+<template>
+	<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>{{nearbyStationInfo.stationName}}</span>
+			<p>距离{{nearbyStationInfo.distance}}米</p>
+		</view> 
+		<view class="sitePage-route">
+			<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>{{li.des?li.des:"等待发车"}}</span>
+						<u-icon name="arrow-right" color="#999" size="28"></u-icon>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import api from './sitePage.js'
+	export default   api
+</script>
+
+<style>
+	page{
+		background-color: #f7f7f7;
+	}
+</style>
+<style scoped lang="scss">
+	.sitePage-currentSite{
+		background-color: #fff;
+		height: 50px;
+		display: flex;
+		padding: 0 15px;
+		align-items: center;
+		span{
+			font-size: 18px;
+			margin-left: 10px;
+			font-weight: bold;
+		}
+		p{
+			color:#999;
+			margin-left: 10px;
+		}
+	}
+	.sitePage-route{
+		margin: 10px;
+		.route-item{
+			padding:  20rpx;
+			background-color: #fff;
+			border-bottom: 1px solid #f7f7f7;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			&:last-child{
+				border: none;
+			}
+			h4{
+				font-size: 32rpx;
+			}
+			p{
+				margin-top: 6rpx;
+				color:#999;
+			}
+		}
+		.route-gap{
+			span{
+				font-size: 32rpx;
+				font-weight: bold;
+				margin-right: 10rpx;
+				color:#1677ff;
+			}
+			&.stop{
+				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>

+ 60 - 0
pages/my/index.js

@@ -0,0 +1,60 @@
+export default {
+		data() {
+			return {
+				user:{},
+				pic:'static/img/user.png',
+				show:true,
+			}
+		},
+		onLoad() {
+			
+		},
+		methods: {
+			gotoUrl(url,bl){
+				if(this.user||bl){
+					uni.navigateTo({
+						url:url
+					})
+				}else{
+					this.$refs.common.alert('请登录后操作!')
+					
+				}
+				
+			},
+			makePhoneCall(tel){
+				uni.makePhoneCall({
+				    phoneNumber: tel //仅为示例
+				});
+			},
+			showphone(phone){
+				if(!phone){
+					return "";
+				}
+				if(phone.length!=11){
+					return "";
+				}
+				return phone.substring(0,3)+'****'+phone.substring(8);
+			},
+			signOut(){
+				this.$refs.common.setFnc(()=>{
+					this.carhelp.signOut()
+					uni.redirectTo({
+						url: '/pages/car/login'
+					})
+				})
+				this.$refs.common.confirm('确认是否退出账号?')
+			}
+		},onReady(){
+			this.user=this.carhelp.getPersonInfo();
+				
+			if(this.user.faceImage){
+					this.pic=this.user.faceImage;
+			}
+		},onShow(){
+			this.user=this.carhelp.getPersonInfo();
+			
+			if(this.user.faceImage){
+					this.pic=this.user.faceImage;
+			}
+		}
+	}

+ 181 - 0
pages/my/index.vue

@@ -0,0 +1,181 @@
+<template>
+	<view>
+		 <car-common   ref="common" ></car-common>
+		<!-- <car-common  mytitle="我的" :noback="false" ref="common" ></car-common> -->
+		<u-navbar :is-back="false" title="个人中心" :background="{backgroundColor: '#187aff',}" title-color="#fff" :border-bottom="false"></u-navbar>
+		<view class="u-flex user-box" v-if="user">
+			<view class="u-m-r-20">
+				<u-avatar :src="pic" size="100"></u-avatar>
+			</view>
+			<view class="u-flex-1">
+				<view class="user-name 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"  @click="gotoUrl('/pages/my/user/updateinfo')">修改资料</u-button>
+			</view>
+		</view>
+		  <view class="u-flex user-box" v-if="!user"  @click="gotoUrl('/pages/car/login',true)">
+			<view class="u-m-r-20">
+				<u-avatar :src="pic" size="100"></u-avatar>
+			</view>
+			<view class="u-flex-1">
+				<view class="user-name u-font-18 u-p-b-20">登录/注册</view>
+			</view>
+			
+		</view>  
+		
+		<view class="user-cell">
+			<view class="user-cell-item" @click="gotoUrl('/pages/my/user/bybusList',true)" >
+				<view class="user-cell-title">
+					<u-icon name="ze-coupon" custom-prefix="custom-icon" size="40" color="#6eaaff"></u-icon>
+					<span>乘车记录</span>
+				</view>
+				<u-icon name="arrow-right" color="#999" size="28"></u-icon>
+			</view>
+		</view>
+		<view class="user-cell">
+			<view class="user-cell-item"  @click="gotoUrl('/pages/my/user/updatephone/index')">
+				<view class="user-cell-title">
+					<u-icon name="antOutline-mobile" custom-prefix="custom-icon" size="40" color="#ee9a41"></u-icon>
+					<span>已绑定手机号</span>
+				</view>
+				<view class="user-cell-right">
+					<span>{{showphone(user.phone)}}</span>
+					<u-icon name="arrow-right" color="#999" size="28"></u-icon>
+				</view>
+			</view>
+			 
+			<view class="user-cell-item" @click="gotoUrl('/pages/my/user/feedback')">
+				<view class="user-cell-title">
+					<u-icon name="riLine-feedback-line" custom-prefix="custom-icon" size="40" color="#8fbf7b"></u-icon>
+					<span>意见反馈</span>
+				</view>
+				<view class="user-cell-right">
+					<u-icon name="arrow-right" color="#999" size="28"></u-icon>
+				</view>
+			</view>
+			<view class="user-cell-item" @click="makePhoneCall('400-8899-619')">
+				<view class="user-cell-title">
+					<u-icon name="fasfa-headphonesCopy" custom-prefix="custom-icon" size="40" color="#9cdfff"></u-icon>
+					<span>联系客服</span>
+				</view>
+				<view class="user-cell-right">
+					<span>400-8899-619</span>
+					<u-icon name="arrow-right" color="#999" size="28"></u-icon>
+				</view>			
+			</view>
+			<view class="user-cell-item"  @click="gotoUrl('/pages/my/platform/about?back=true',true)">
+				<view class="user-cell-title">
+					<u-icon name="fasfa-exclamation-circleCopy" custom-prefix="custom-icon" size="40" color="#b0bdd0"></u-icon>
+					<span>关于车信达</span>
+				</view>
+				<view class="user-cell-right">
+					<span>当前版本 v1.1.10</span>
+					<u-icon name="arrow-right" color="#999" size="28"></u-icon>
+				</view>
+			</view>
+			
+			<view class="user-cell-item" @click="gotoUrl('/pages/my/platform/help?back=true',true)">
+				<view class="user-cell-title">
+					<u-icon name="md-live_help" custom-prefix="custom-icon" size="40" color="#ffb589"></u-icon>
+					<span>使用指南</span>
+				</view>
+				<!-- 当前版本V1.1.10 -->
+				<view class="user-cell-right">
+					<span></span>
+					<u-icon name="arrow-right" color="#999" size="28"></u-icon>
+				</view>
+			</view>
+		</view>
+		<!-- <u-cell-group>
+			<u-cell-item title="乘车记录" @click="gotoUrl('/pages/my/user/bybusList')"></u-cell-item>
+			<u-cell-item title="关于车信达"  @click="gotoUrl('/pages/my/platform/about')"></u-cell-item>
+		
+		</u-cell-group>
+		
+		<view class="u-m-t-20" v-if="user">
+			<u-cell-group>
+				<u-cell-item title="意见反馈" @click="gotoUrl('/pages/my/user/feedback')"></u-cell-item>
+				<u-cell-item title="已绑定手机号" @click="gotoUrl('/pages/my/user/updatephone/index')">{{showphone(user.phone)}}</u-cell-item>
+			</u-cell-group>
+		</view>
+		 -->
+		<view class="u-m-t-20" v-if="user">
+			<view class="signOut" @click="signOut">退出账号</view>
+		</view>
+		<view class="u-m-t-20" v-if="!user">
+			<view class="signOut" @click="gotoUrl('/pages/car/login',true)">登录</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './index.js'
+	export default api;
+</script>
+
+<style lang="scss">
+page{
+	background-color: #ededed;
+}
+
+.camera{
+	width: 54px;
+	height: 44px;
+	
+	&:active{
+		background-color: #ededed;
+	}
+}
+.user-box{
+	background:url(../../static/img/userbg.png) bottom center;
+	background-size: 100%;
+	padding: 30rpx;
+	height:120px;
+	.user-name{
+		color:#fff;
+	}
+}
+.signOut{
+	height: 40px;
+	background-color: #fff;
+	text-align: center;
+	line-height: 40px;
+}
+.user-cell{
+	margin-bottom: 10px;
+}
+.user-cell-item{
+	display: flex;
+	flex-direction: row;
+	align-items: center;
+	position: relative;
+	box-sizing: border-box;
+	width: 100%;
+	padding: 10px 13px;
+	font-size: 11px;
+	line-height: 22px;
+	color: #606266;
+	background-color: #fff;
+	text-align: left;
+	justify-content: space-between;
+	position: relative;
+	border-bottom: 0.5px solid #f7f7f7;
+	.user-cell-title{
+		display: flex;
+		align-items: center;
+		span{
+			font-size: 14px;
+			margin-left: 10px;
+		}
+	}
+	.user-cell-right{
+		display: flex;
+		align-items: center;
+		span{
+			margin-right: 10px;
+			color:#999;
+		}
+	}
+}
+</style>

+ 16 - 0
pages/my/platform/about.js

@@ -0,0 +1,16 @@
+
+
+	export default {
+		data() {
+			return {
+			
+			}
+		},
+		methods: {
+			
+		},
+		onLoad() {
+			 
+		}
+	}
+

+ 54 - 0
pages/my/platform/about.vue

@@ -0,0 +1,54 @@
+<template>
+	<view>
+		<car-common  mytitle="关于我们" :noback="noback"  ref="common"  ></car-common>
+		<view class="aboutus">
+			<h4>车信达</h4>
+			<p>“车信达-智慧司乘云管家”由智能乘车终端、司机辅助监控终端、智能监控终端(适应于双门车型)、4G/5G传输及智能电源终端四大硬件部件和云平台组成。主要功能包括BUS线路管理、司乘管理及考勤、乘客身份识别、上下车验票及收费、巴士定位、巴士收费稽查统计等。平台达成老板 “减员增效,应收尽收,颗粒归仓”的目标,乘客 “上车刷脸快速通行,入座扫描手机购票”舒心快捷乘车体验。平台同时支持车票和现金购票传统乘车模式。</p>
+			<h5>客户服务热线:<span>400-8899-619</span></h5>
+			<h5>技术服务热线:<span>15207211859</span></h5>
+			<h5>商家合作咨询:<span>19971390396</span></h5>
+		</view>	
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+					noback:false,
+			}
+		},
+		methods: {
+			
+		},onLoad(op){
+		
+			if(op.back){
+				this.noback=op.back;
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.aboutus{
+		padding: 15px;
+		h4{
+			color:#2979ff;
+			font-size: 16px;
+		}
+		p{
+			margin: 10px 0;
+			color:#666;
+			font-size: 14px;
+			line-height: 24px;
+		}
+		h5{
+			font-size: 15px;
+			margin-bottom: 10px;
+			span{
+				font-weight: normal;
+				color:#666;
+			}
+		}
+	}
+</style>

+ 88 - 0
pages/my/platform/help.js

@@ -0,0 +1,88 @@
+
+	import * as API from '@/apis/my.js'
+	
+	export default {
+		data() {
+			return {
+				noback:false,
+				itemStyle: {
+							
+							},
+							headStyle: {
+											marginLeft: '20px',
+											 marginBottom:'10px',
+											paddingRight:'15px',
+											 paddingBottom:'20px',
+											borderBottom:'1px solid #eee',
+											
+										},
+										bodyStyle: {
+													marginLeft: '25px',
+													
+													},
+				 id:"",
+						itemList: [{
+							titleName: "上车如何购票",
+							desc: "帮助说明内容……",
+						
+						},{
+							titleName: "下车注意事项",
+							desc: "帮助说明内容……",
+						
+						},{
+							titleName: "如何查询车辆位置",
+							desc: "帮助说明内容……",
+						
+						},{
+							titleName: "如何查询站点信息",
+							desc: "帮助说明内容……",
+						
+						},{
+							titleName: "如何设置提醒",
+							desc: "帮助说明内容……",
+						
+						},{
+							titleName: "纸质车票、现金购票应该怎么操作",
+							desc: "帮助说明内容……",
+						
+						},{
+							titleName: "坐过站了怎么办",
+							desc: "帮助说明内容……",
+						
+						},{
+							titleName: "如何退票",
+							desc: "帮助说明内容……",
+						
+						},{
+							titleName: "如何为他人购票",
+							desc: "帮助说明内容……",
+						
+						},],
+					}
+		},
+		methods: {
+			helpCenterList(){
+			this.$refs.common.showLoading();
+				API.helpCenterList().then((res) => {
+					this.itemList=res.data
+					this.$refs.common.showLoading(false);
+					this.$nextTick(()=>{
+						this.$refs.collapseView.init();
+					})
+					
+				}).catch(error => {
+				this.$refs.common.showLoading(false,error);
+				
+				})
+			}
+		},onLoad(op){
+			this.id=op.id;
+			if(op.back){
+				this.noback=op.back;
+			}
+			
+			this.itemList=[]
+		},onReady() {
+			this.helpCenterList();
+		}
+	}

+ 31 - 0
pages/my/platform/help.vue

@@ -0,0 +1,31 @@
+<template>
+	<view>
+		<car-common  mytitle="使用指南"  :noback="noback"  ref="common"  ></car-common>
+		
+		<view class="collapse" v-if="itemList.length" >
+			<u-collapse :item-style="itemStyle" :head-style="headStyle" :body-style="bodyStyle" ref="collapseView">
+				<u-collapse-item :title="item.titleName" v-for="(item, index) in itemList" v-if="(noback&&item.id<100)||(!noback&&item.id>100)" :key="index" :open="item.id==id">
+				
+						<view v-html="item.desc" style="color: #000000;"></view>	
+						<view ><br/><br/></view>
+							
+				</u-collapse-item>
+			</u-collapse>
+		</view>
+	
+	</view>
+</template>
+
+<script>
+	import api from './help.js'
+	export default api;
+</script>
+
+<style>
+
+.collapse{
+	border-top: 10px solid #f7f7f7;
+	padding-top: 5px;
+}
+
+</style>

+ 16 - 0
pages/my/platform/opinion.js

@@ -0,0 +1,16 @@
+
+
+	export default {
+		data() {
+			return {
+			
+			}
+		},
+		methods: {
+			
+		},
+		onLoad() {
+			 
+		}
+	}
+

+ 22 - 0
pages/my/platform/opinion.vue

@@ -0,0 +1,22 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 81 - 0
pages/my/user/bybusDetails.js

@@ -0,0 +1,81 @@
+import * as API from '@/apis/my.js'
+import Carmap from '@/components/Carmap.vue'
+
+export default {
+	data() {
+		return {
+			id:"",
+			mapopen:false,
+			obj:{
+				driverInfo:{},
+				shiftInfo:{},
+				routeInfo:{},
+				vehicleInfo:{},
+			},
+		}
+	},
+	methods: {
+		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;")
+				
+			}
+		},
+		mapdown(){
+			this.$refs.amap.setUp(this.obj.ticketUpDownLonLat[0]);
+			this.$refs.amap.setDown(this.obj.ticketUpDownLonLat[1]);
+			this.$refs.amap.setCenter(this.obj.ticketUpDownLonLat[1]);
+		},
+		makePhoneCall(tel){
+			uni.makePhoneCall({
+			    phoneNumber: tel //仅为示例
+			});
+		},
+		showname(name){
+			if(!name){
+				return "";
+			}
+		
+			return name.substring(0,1)+'师傅';
+		},
+	 
+		passengerRecordDetail() {
+			this.$refs.common.showLoading();
+		
+			API.passengerRecordDetail(this.id).then((res) => {
+				this.isLoading=true;
+				this.obj=res.data;
+				var point=[];
+				res.data.routeInfo.mapPath.split("|").forEach((item) => {
+					var sz = item.split(",");
+				
+					point.push({
+						longitude: sz[0],
+						latitude: sz[1],
+					})
+				})
+				
+				 this.$refs.amap.initMap(point, [],this.obj.routeStationLonLat);
+				this.$refs.common.showLoading(false);
+
+			}).catch(error => {
+				this.$refs.common.showLoading(false,error);
+				
+			})
+		}
+	},
+	components: {
+		Carmap
+	},
+	onLoad(op) {
+		this.id=op.id;
+	},
+	onReady() {
+		 this.passengerRecordDetail();
+	},
+	
+	
+}

+ 117 - 0
pages/my/user/bybusDetails.vue

@@ -0,0 +1,117 @@
+<template>
+	<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>
+		<view class="bybusDetails-map">
+			<carmap ref="amap" @onload="mapdown"></carmap>
+		</view>
+		<view class="bybusDetails-driver">
+			<view class="driver-info">
+				<view class="driver-head">
+					<u-avatar :src="obj.driverInfo.faceImage" size="100"></u-avatar>
+				</view>
+				<view class="driver-text">
+					<h4>{{obj.shiftInfo.startStationName}} → {{obj.shiftInfo.endStationName}}</h4>
+					<p>首班:{{obj.routeInfo.startTime}}  末班:{{obj.routeInfo.endTime}}</p>
+					<p>{{obj.vehicleInfo.licensePlateNumber}}  {{showname(obj.driverInfo.name)}}  {{obj.driverInfo.phone}}</p>
+				</view>
+			</view>
+			<u-icon name="dianhua" custom-prefix="custom-icon"  v-if="obj.driverInfo.phone"  @click="makePhoneCall(obj.driverInfo.phone)"  size="80" color="#1778fb"></u-icon>
+		</view> 
+		<view class="bybusDetailsList">
+			<view class="bybusDetails-list">
+				<p>行程</p><h4>{{obj.tripName}}</h4>
+			</view>
+			<view class="bybusDetails-list">
+				<p>车票</p><h4>{{obj.ticketDes}}</h4>
+			</view>
+			<view class="bybusDetails-list">
+				<p>货票</p><h4>{{obj.goodsTicket}}</h4>
+			</view>
+			<view class="bybusDetails-list">
+				<p>合计票价</p><span>{{obj.totalFee}}</span>
+			</view>
+			<view class="bybusDetails-list">
+				<p>购票时间</p><h4>{{obj.payTime}}</h4>
+			</view>
+			<view class="bybusDetails-list">
+				<p>车票状态</p><h4>{{obj.ticketStatusName}}</h4>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './bybusDetails.js'
+	export default  api;
+</script>
+
+<style>
+	page{
+		background-color: #f7f7f7;
+	}
+</style>
+<style scoped lang="scss">
+	.bybusDetails-driver{
+		background-color: #fff;
+		display: flex;
+		justify-content: space-between;
+		padding: 15px;
+		.driver-info{
+			display:flex;
+			align-items: center;
+		}
+		.driver-text{
+			margin-left: 10px;
+			h4{
+				font-size: 16px;
+			}
+			p{
+				color:#999;
+			}
+		}
+	}
+	.bybusDetailsList{
+		padding-left:15px;
+		background-color: #fff;
+		margin-top: 10px;
+		.bybusDetails-list{
+			display: flex;
+			justify-content: space-between;
+			background-color: #fff;
+			padding:15px 15px 15px 0;
+			border-bottom:1px solid #f7f7f7;
+			p{
+				color:#999;
+			}
+			h4{
+				font-weight: normal;
+			}
+			span{
+				font-weight: bold;
+				color:#ff6200;
+			}
+		}
+	}
+	.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>

+ 68 - 0
pages/my/user/bybusList.js

@@ -0,0 +1,68 @@
+import * as API from '@/apis/my.js'
+
+export default {
+	data() {
+		return {
+			isLoading:false,
+			clientHeight: 0,
+			list: [
+				1, 2, 3, 4, 6, 7
+			],
+			recordList: [],
+			listForm: {
+				totalPage: 1,
+				pageIndex: 1,
+				pageSize: 5
+			}
+		}
+	},
+	methods: {
+		gotoUrl(id){
+			uni.navigateTo({
+				url:"/pages/my/user/bybusDetails?id="+id
+			})
+		},
+		lower() {
+			console.log("--------")
+			if (this.listForm.pageIndex <= this.listForm.totalPage  ) {
+				this.passengerRecordList();
+			} else {
+				return;
+			}
+		},
+		passengerRecordList() {
+			this.$refs.common.showLoading();
+			this.listForm.openId=this.carhelp.getOpenId()
+			API.passengerRecordList(this.listForm).then((res) => {
+				this.isLoading=true;
+				var response=res.data;
+				if (response) {
+					if (this.listForm.pageIndex == 1) {
+						this.recordList = response.data;
+						this.listForm.pageIndex = response.pageNumber;
+						this.listForm.totalPage = response.totalPage;
+					} else {
+						this.recordList = [
+							...this.recordList,
+							...response.data
+						];
+					}
+				}
+				this.listForm.pageIndex++;
+				this.$refs.common.showLoading(false);
+
+			}).catch(error => {
+				this.$refs.common.showLoading(false,error);
+				
+			})
+		}
+	},
+	onLoad() {
+		this.clientHeight = document.body.clientHeight;
+	},
+	onReady() {
+		this.passengerRecordList();
+	},
+	
+	
+}

+ 131 - 0
pages/my/user/bybusList.vue

@@ -0,0 +1,131 @@
+<template>
+	<view>
+		<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" @click="gotoUrl(item.id)">
+			<view class="ticket-item-left">
+				<view class="ticket-head">
+					<u-avatar :src="item.imageUrl" size="mini"></u-avatar>
+					<h3>{{item.startStation}} - {{item.endStation}}</h3>
+				</view>
+				<view class="ticket-text">
+					<view class="ticket-text-row">
+						<view class="ticket-text-row-item">
+							<p>票种:</p><span>{{item.ticketTypeName}}</span>
+						</view>
+						<view class="ticket-text-row-item">
+							<p>货票:</p><span>¥{{item.goodTicket}}</span>
+						</view>
+					</view>
+					<view class="ticket-text-row ">
+						<p>购票时间:</p><h4>{{item.payTime}}</h4>
+					</view>
+				</view>
+			</view>
+			<view class="ticket-item-right " :class="item.status==2?'overdue':''">
+				<h3>{{item.totalFee}}</h3>
+				<p>票价</p>
+			</view>
+		</view>
+		<view style="text-align: center;">{{listForm.pageIndex>listForm.totalPage?'没有更多记录了':'下拉刷新'}}</view>
+		</scroll-view>
+		<view  v-show="isLoading&&recordList.length==0" style="text-align:center;margin-top: 80px;" >
+				<img src="static/img/blankpage.png" style="width: 50%;" alt="" >
+				<view>暂无信息</view>
+		</view>
+		 
+	</view>
+</template>
+
+<script>
+	import api from './bybusList.js'
+	export default  api;
+</script>
+
+<style>
+	page{
+		background-color: #f7f7f7;
+	}
+</style>
+<style scoped lang="scss">
+.ticket-item{
+	background-color: #fff;
+	margin:20rpx;
+	border-radius: 10px;
+	display: flex;
+	justify-content: space-between;
+	
+	.ticket-text-row-item{
+		display: flex;
+		align-items: center;
+		margin-right: 10px;
+	}
+	.ticket-item-left{
+		padding: 20rpx;
+		.ticket-head{
+			display: flex;
+			align-items: center;
+			h3{
+				margin-left: 10rpx;
+			}
+		}
+		.ticket-text{
+			margin-top: 20rpx;
+			.ticket-text-row{
+				display: flex;
+				align-items: center;
+				margin-bottom: 10rpx;
+				&:last-child{
+					margin-bottom: 0;
+				}
+				span{
+					color:#007AFF
+				}
+				h4{
+					color:#999;
+					font-weight: normal;
+				}
+			}
+		}
+	}
+	.ticket-item-right{
+		width: 120px;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		border-left: 1px dashed #eee;
+		position: relative;
+		&:before{
+			content: '';
+			position: absolute;
+			height: 30rpx;
+			width: 30rpx;
+			background-color: #f7f7f7;
+			border-radius: 50%;
+			left: -15rpx;
+			top:-15rpx;
+		}
+		&:after{
+			content: '';
+			position: absolute;
+			height: 30rpx;
+			width: 30rpx;
+			background-color: #f7f7f7;
+			border-radius: 50%;
+			left: -15rpx;
+			bottom:-15rpx;
+		}
+		h3{
+			color:#007AFF;
+			font-size:24px;
+		}
+		&.overdue{
+			background:url(/static/img/overdue.png) no-repeat center center;
+			background-size:75%;
+		}
+	}
+	
+}
+</style>

+ 69 - 0
pages/my/user/feedback.js

@@ -0,0 +1,69 @@
+ import * as API_Common from '@/apis/common'
+ import * as WxJsApi from '@/utils/wxJsApi.js'
+ import * as API from '@/apis/my.js'
+ 
+	export default {
+		data() {
+			return {
+				text:"",
+				mobile:"",
+				// 演示地址,请勿直接使用
+				src:"",
+			}
+		},
+		methods: {
+			submit(){
+				if(!this.text){
+					this.$refs.common.alert('请详细描述您的意见和反馈')
+					return 
+				}
+				this.$refs.common.showLoading();
+				var obj={
+					content:this.text,
+					picUrl:this.src,
+					telephone:this.mobile,
+				}
+				API.problemFeedback(obj).then((res) => {
+					this.$refs.common.setFnc(function(){
+						uni.switchTab({
+						    url: '/pages/my/index'
+						});
+					})
+					this.$refs.common.alert2("操作成功,感谢您的反馈!");
+				
+				}).catch(error => {
+					this.$refs.common.showLoading(false,error);
+					
+				})
+			},
+			upload(){
+				WxJsApi.chooseImage(1).then(res=>{
+					var formData = {
+						'photoName': '1.jpg',
+						'photoFile': res.localData
+					}
+					
+						API_Common.upload(formData).then(response => {
+							
+							this.src=response.data
+ 						
+							this.$refs.common.showLoading(false,"上传成功!")
+							
+						}).catch(error => {
+							this.$refs.common.showLoading(false,error)
+								
+						})
+				})
+			}
+		},
+		onLoad() {
+			 
+		},onReady() {
+			//this.$refs.common.showLoading()
+			 WxJsApi.getWxConfig().then(()=>{
+				// this.$refs.common.showLoading(false)
+			 });
+	
+		}
+	}
+

+ 63 - 0
pages/my/user/feedback.vue

@@ -0,0 +1,63 @@
+<template>
+	<view>
+		<car-common :login="true" mytitle="乘车记录"   ref="common"></car-common>
+		
+		<view class="form-title">
+			意见和问题
+		</view>
+		<view class="form-content">
+			<u-field v-model="text" placeholder="请详细描述您的意见和反馈" type="textarea" label-width="0"></u-field>
+		</view>
+		
+		<view class="form-upload">
+			<view class="form-title">
+				上传图片(选填,提供问题截图)
+			</view>
+			<img src="static/img/upload.png"  v-show="!src"  @click="upload" alt="">
+			<img :src="src" style="width: 100px;" v-show="src"  @click="upload" alt="">
+			
+ 
+		</view>
+
+		<view class="form-phone">
+			<u-field v-model="mobile"	placeholder="选填,方便我们联系您" label="联系方式"></u-field>
+		</view>
+		<view class="upload-button">
+			<u-button type="primary" shape="circle" @click="submit">提交</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './feedback.js'
+	export default  api;
+</script>
+
+<style>
+	page{background-color: #f7f7f7;}
+</style>
+<style scoped lang="scss">
+	.form-content{
+		background-color: #fff;
+	}
+	.form-title{
+		margin: 10px 0;
+		padding-left: 15px;
+		color:#666;
+	}
+	.form-upload{
+		background-color: #fff;
+		padding: 10px;
+		margin-top: 10px;
+	}
+	.form-phone{
+		margin-top: 10px;
+		background-color: #fff;
+	}
+	.upload-button{
+		position: fixed;
+		left: 30rpx;
+		bottom:30rpx;
+		right: 30rpx;
+	}
+</style>

+ 16 - 0
pages/my/user/resetpassword/change.js

@@ -0,0 +1,16 @@
+
+
+	export default {
+		data() {
+			return {
+			
+			}
+		},
+		methods: {
+			
+		},
+		onLoad() {
+			 
+		}
+	}
+

+ 49 - 0
pages/my/user/resetpassword/change.vue

@@ -0,0 +1,49 @@
+<template>
+	<view>
+		<view class="phone-form">
+			<view class="phone-form-row">
+				<view class="phone-form-input">
+					<u-input v-model="value" type="password"  />
+				</view>
+			</view>
+			<view class="phone-form-row">
+				<view class="phone-form-input">
+					<u-input v-model="value" type="password"  />
+				</view>
+			</view>
+			<view class="phone-button">
+				<u-button type="primary" shape="circle">重置密码</u-button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.phone-form-input{
+		padding: 10px;
+		border-bottom: 1px solid #eee;
+	}
+	.phone-form-row{
+		position: relative;
+		.phone-form-code{
+			position: absolute;
+			right: 0;
+			top:10px;
+		}
+	}
+	.phone-button{
+		margin: 10px;
+	}
+</style>

+ 16 - 0
pages/my/user/resetpassword/verification.js

@@ -0,0 +1,16 @@
+
+
+	export default {
+		data() {
+			return {
+			
+			}
+		},
+		methods: {
+			
+		},
+		onLoad() {
+			 
+		}
+	}
+

+ 49 - 0
pages/my/user/resetpassword/verification.vue

@@ -0,0 +1,49 @@
+<template>
+	<view>
+		<view class="phone-form">
+			<view class="phone-form-row">
+				<view class="phone-form-input">
+					<u-field v-model="mobile"	placeholder="请输入已绑定手机号" label-width="0"></u-field>
+				</view>
+			</view>
+			<view class="phone-form-row">
+				<view class="phone-form-input">
+					<u-field v-model="mobile"	maxlength="6" placeholder="请输入验证码" label-width="0"></u-field>
+				</view>
+				<view class="phone-form-code">
+					<u-button shape="circle" size="mini">发送验证码</u-button>
+				</view>
+			</view>
+			<view class="phone-button">
+				<u-button type="primary" shape="circle">下一步</u-button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.phone-form-row{
+		position: relative;
+		.phone-form-code{
+			position: absolute;
+			right: 0;
+			top:10px;
+		}
+	}
+	.phone-button{
+		margin: 10px;
+	}
+</style>

+ 92 - 0
pages/my/user/updateinfo.js

@@ -0,0 +1,92 @@
+ import * as API_Common from '@/apis/common'
+ import * as WxJsApi from '@/utils/wxJsApi.js'
+ import * as API from '@/apis/my.js'
+export default {
+		data() {
+			return {
+				user:{},
+				pic:'/static/img/user.png',
+				show:true,
+			}
+		},
+		onLoad() {
+			
+		},
+		methods: {
+			upload(){
+				WxJsApi.chooseImage(1).then(res=>{
+					var formData = {
+						'photoName': '1.jpg',
+						'photoFile': res.localData
+					}
+					
+						API_Common.upload(formData).then(response => {
+							
+							if(response.data){
+								this.pic=response.data
+														
+								this.$refs.common.showLoading(false,"上传成功!")
+							}else{
+								this.$refs.common.showLoading(false,"图片过大,请上传其他照片!")
+							}
+							
+							
+						}).catch(error => {
+							this.$refs.common.showLoading(false,error)
+								
+						})
+				})
+			},
+			 submit(){
+				 if(!this.user.name){
+					 this.$refs.common.alert('用户名不能为空')
+					return 
+				 }
+				 this.$refs.common.showLoading();
+				 this.user.faceImage=this.pic;
+				 this.user.acceptMessage=(this.user.acceptMessage?1:0)
+				 API.updateUserInfo(this.user).then((res) => {
+					 this.carhelp.setPersonInfo(this.user);
+					 
+				 	this.$refs.common.setFnc(function(){
+				 		uni.switchTab({
+				 		    url: '/pages/my/index'
+				 		});
+				 	})
+				 	this.$refs.common.alert2("操作成功!");
+				 
+				 }).catch(error => {
+				 	this.$refs.common.showLoading(false,error);
+				 	
+				 })
+			 },
+			gotoUrl(url){
+				uni.navigateTo({
+					url:url
+				})
+			},
+			
+			showphone(phone){
+				if(!phone){
+					return "";
+				}
+				if(phone.length!=11){
+					return "";
+				}
+				return phone.substring(0,3)+'****'+phone.substring(8);
+			},
+			signOut(){
+				this.carhelp.signOut()
+				uni.redirectTo({
+					url: '/pages/car/login'
+				})
+			}
+		},onReady(){
+			
+			 WxJsApi.getWxConfig()
+			this.user=this.carhelp.getPersonInfo();
+			if(this.user.faceImage){
+					this.pic=this.user.faceImage;
+			}
+		}
+	}

+ 86 - 0
pages/my/user/updateinfo.vue

@@ -0,0 +1,86 @@
+<template>
+	<view>
+		<car-common :login="true" mytitle="修改个人资料"   ref="common"></car-common>
+		
+ 
+		<!-- <view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30 u-p-t-30">
+			<view class="u-m-r-20">
+				<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>
+		</view> -->
+		 
+		<u-cell-group>
+			<u-field style="color: #606266;"
+						v-model="user.name"
+						label="用户名"
+						placeholder="请填写用户名"
+						input-align="right"
+					></u-field>
+				
+		
+			<u-cell-item title="手机号码"  :arrow="false" >{{showphone(user.phone)}}</u-cell-item>
+			<u-cell-item title="人脸识别照片"  >
+				<u-avatar :src="pic" size="50" @click="upload"></u-avatar>
+				</u-cell-item>
+			
+		</u-cell-group>
+		<view class="u-m-t-20">
+			<u-cell-group>
+				<u-cell-item title="是否接收乘车消息"  :arrow="false" >
+					<u-checkbox 
+									shape="circle"
+									v-model="user.acceptMessage" 
+								
+								></u-checkbox>
+					
+					
+				</u-cell-item>
+				
+			</u-cell-group>
+		</view>
+		
+		
+		
+		<view class="upload-button">
+			<u-button type="primary" shape="circle" @click="submit()">提交</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './updateinfo.js'
+	export default api;
+</script>
+
+<style lang="scss">
+page{
+	background-color: #ededed;
+}
+
+.camera{
+	width: 54px;
+	height: 44px;
+	
+	&:active{
+		background-color: #ededed;
+	}
+}
+.user-box{
+	background-color: #fff;
+}
+.signOut{
+	height: 50px;
+	background-color: #fff;
+	text-align: center;
+	line-height: 50px;
+}
+	.upload-button{
+		position: fixed;
+		left: 30rpx;
+		bottom:30rpx;
+		right: 30rpx;
+	}
+</style>

+ 129 - 0
pages/my/user/updatephone/change.js

@@ -0,0 +1,129 @@
+
+import * as API_user from '@/apis/user'
+
+import {
+		checkPhone,
+	} from '@/utils'
+	export default {
+		data() {
+			return {
+				subFormCode: {
+					phone: '',
+					openId: '',
+					code: ''
+				},
+				isSendMsgIng: false,
+				sendMsgSecond: 60,
+			}
+		},
+		methods: {
+			
+				codeCheckForm() {
+					let phoneResult = checkPhone(this.subFormCode.phone);
+					if (typeof phoneResult == 'string') {
+					
+					
+						this.$refs.common.alert(phoneResult)
+						return false;
+					} else if (!this.subFormCode.code) {
+					
+						this.$refs.common.alert('请输入验证码')
+						
+						return false;
+					} else {
+						return true;
+					}
+				},
+				login() {
+					this.codeSubmit();
+					
+				},
+				//验证码登录
+				codeSubmit() {
+					if (this.codeCheckForm()) {
+						this.$refs.common.showLoading()
+						API_user.userUpdatePhone(this.subFormCode).then(response => {
+							  
+							if(response.data){
+								this.user=this.carhelp.getPersonInfo();
+								this.user.phone=this.subFormCode.phone;
+								this.carhelp.setPersonInfo(this.user)
+								this.$refs.common.setFnc(this.loginSuccess)					
+								this.$refs.common.alert2("变更手机号成功!")
+								
+							}else{
+								 
+								this.$refs.common.showLoading(false,response.message);
+							}
+						
+				
+						}).catch(error => {					
+							this.$refs.common.showLoading(false,error);	
+							
+						})
+					}
+				},
+				//发送验证码
+				sendMsg() {
+					
+					
+					if (!this.isSendMsgIng) {
+						let phoneResult = checkPhone(this.subFormCode.phone);
+						if (typeof phoneResult == 'string') {
+						  
+							this.$refs.common.alert(phoneResult)
+						} else {
+						this.$refs.common.showLoading()
+							API_user.getVerifyCode(this.subFormCode).then(response => {
+								 this.$refs.common.showLoading(false)
+								if(response.message){
+									//倒计时
+									this.msgTimeInterval();
+								}else{
+									this.$refs.common.alert("您的验证码已经发送[5分钟有效],请勿重复点击")
+								}
+								
+							}).catch(error => {
+							 
+								this.$refs.common.alert(error)
+							})
+						}
+					}
+				},
+				//倒计时
+				msgTimeInterval() {
+					this.isSendMsgIng = true;
+					var time = this.sendMsgSecond;
+					var _this = this;
+					this.timer = setInterval(() => {
+						if (time > 0) {
+							_this.sendMsgSecond = time--;
+						} else {
+							_this.isSendMsgIng = false;
+							_this.sendMsgSecond = 60;
+							clearInterval(_this.timer)
+						}
+					}, 1000)
+				},	//登录成功
+				loginSuccess() {
+					
+					uni.switchTab({
+					    url: '/pages/my/index'
+					});
+					
+				},
+				showphone(phone){
+					if(!phone){
+						return "";
+					}
+					if(phone.length!=11){
+						return "";
+					}
+					return phone.substring(0,3)+'****'+phone.substring(8);
+				},
+		},
+		onLoad() {
+			 
+		}
+	}
+

+ 43 - 0
pages/my/user/updatephone/change.vue

@@ -0,0 +1,43 @@
+<template>
+	<view>
+		<car-common  mytitle="更换绑定账号"  ref="common"  ></car-common>
+		
+		<view class="phone-form">
+			<view class="phone-form-row">
+				<view class="phone-form-input">
+					<u-field v-model="subFormCode.phone"	placeholder="请输入新的手机号" label-width="0"></u-field>
+				</view>
+			</view>
+			<view class="phone-form-row">
+				<view class="phone-form-input">
+					<u-field	 maxlength="6" placeholder="请输入验证码" v-model="subFormCode.code" type="number"  label-width="0"></u-field>
+				</view>
+				<view class="phone-form-code">
+					<u-button shape="circle" size="mini" @click="sendMsg" v-text="isSendMsgIng?(sendMsgSecond+'秒'):'发送验证码'"  >发送验证码</u-button>
+				</view>
+			</view>
+			<view class="phone-button">
+				<u-button type="primary" shape="circle"  @click="login">立即绑定</u-button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './change.js'
+	export default api;
+</script>
+
+<style scoped lang="scss">
+	.phone-form-row{
+		position: relative;
+		.phone-form-code{
+			position: absolute;
+			right: 0;
+			top:10px;
+		}
+	}
+	.phone-button{
+		margin: 10px;
+	}
+</style>

+ 32 - 0
pages/my/user/updatephone/index.js

@@ -0,0 +1,32 @@
+
+
+	export default {
+		data() {
+			return {
+				user:{},
+			}
+		},
+		methods: {
+			gotoUrl(){
+				uni.redirectTo({
+					url: '/pages/my/user/updatephone/verification'
+				})
+			},
+			showphone(phone){
+				if(!phone){
+					return "";
+				}
+				if(phone.length!=11){
+					return "";
+				}
+				return phone.substring(0,3)+'****'+phone.substring(8);
+			},
+		},
+		onLoad() {
+			 
+		},onReady(){
+			this.user=this.carhelp.getPersonInfo();
+		
+		}
+	}
+

+ 48 - 0
pages/my/user/updatephone/index.vue

@@ -0,0 +1,48 @@
+<template>
+	<view>
+		<car-common  mytitle="绑定手机号"  ref="common"  ></car-common>
+		
+		<view class="updatephone">
+			<img src="static/img/icon-phoneSafe.png" alt="">
+			<h4>已绑定手机号:{{showphone(user.phone)}}</h4>
+			<p>您可使用绑定的手机号登录当前账号</p>
+			<view class="updatephone-btn">
+				<u-button shape="circle" @click="gotoUrl()">更换绑定</u-button>
+				<p v-if="false">为降低账号安全风险,每6个月仅能更换2次,</br>请谨慎修改</p>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './index.js'
+	export default api;
+</script>
+
+<style>
+	page{background-color: #f7f7f7;}
+</style>
+<style scoped lang="scss">
+	.updatephone{
+		text-align: center;
+		padding: 50px 15px;
+		img{
+			width: 160px;
+			margin-bottom: 20px;
+		}
+		h4{
+			font-size: 16px;
+			margin-bottom: 5px;
+		}
+		p{
+			color:#999;
+		}
+		.updatephone-btn{
+			margin-top: 20px;
+			p{
+				color: rgb(255, 58, 58);
+				margin-top: 10px;
+			}
+		}
+	}
+</style>

+ 131 - 0
pages/my/user/updatephone/verification.js

@@ -0,0 +1,131 @@
+import * as API_user from '@/apis/user'
+
+import {
+		checkPhone,
+	} from '@/utils'
+	export default {
+		data() {
+			return {
+				openId:"",
+				subFormCode: {
+					phone: '',
+					openId: '',
+					verifyCode: ''
+				},
+				isSendMsgIng: false,
+				sendMsgSecond: 60,
+				user:{},
+			}
+		},
+		methods: {
+			codeCheckForm() {
+				let phoneResult = checkPhone(this.subFormCode.phone);
+				if (typeof phoneResult == 'string') {
+				
+				
+					this.$refs.common.alert(phoneResult)
+					return false;
+				} else if (!this.subFormCode.verifyCode) {
+				
+					this.$refs.common.alert('请输入验证码')
+					
+					return false;
+				} else {
+					return true;
+				}
+			},
+			login() {
+				this.codeSubmit();
+				
+			},
+			//验证码登录
+			codeSubmit() {
+				if (this.codeCheckForm()) {
+					this.$refs.common.showLoading()
+					API_user.validateCode(this.subFormCode).then(response => {
+						  
+						if(response.data){
+							var token = response.data ? response.data.token : '';
+							this.carhelp.setToken(token);
+							this.carhelp.setPersonInfo(response.data.userInfo)
+							
+							this.loginSuccess();
+						}else{
+							 
+							this.$refs.common.showLoading(false,response.message);
+						}
+					
+			
+					}).catch(error => {					
+						this.$refs.common.showLoading(false,error);	
+					})
+				}
+			},
+			//发送验证码
+			sendMsg() {
+				
+				
+				if (!this.isSendMsgIng) {
+					let phoneResult = checkPhone(this.subFormCode.phone);
+					if (typeof phoneResult == 'string') {
+					  
+						this.$refs.common.alert(phoneResult)
+					} else {
+					this.$refs.common.showLoading()
+						API_user.getVerifyCode(this.subFormCode).then(response => {
+							this.$refs.common.showLoading(false) 
+							if(response.message){
+								//倒计时
+								this.msgTimeInterval();
+							}else{
+								this.$refs.common.alert("您的验证码已经发送[5分钟有效],请勿重复点击")
+							}
+							
+						}).catch(error => {
+						 
+							this.$refs.common.alert(error)
+						})
+					}
+				}
+			},
+			//倒计时
+			msgTimeInterval() {
+				this.isSendMsgIng = true;
+				var time = this.sendMsgSecond;
+				var _this = this;
+				this.timer = setInterval(() => {
+					if (time > 0) {
+						_this.sendMsgSecond = time--;
+					} else {
+						_this.isSendMsgIng = false;
+						_this.sendMsgSecond = 60;
+						clearInterval(_this.timer)
+					}
+				}, 1000)
+			},	//登录成功
+			loginSuccess() {
+				uni.redirectTo({
+					url: '/pages/my/user/updatephone/change'
+				})
+				
+			},
+			showphone(phone){
+				if(!phone){
+					return "";
+				}
+				if(phone.length!=11){
+					return "";
+				}
+				return phone.substring(0,3)+'****'+phone.substring(8);
+			},
+		},
+		onLoad() {
+			 
+		},onReady(){
+			this.subFormCode.openId = this.carhelp.getOpenId();
+			this.user=this.carhelp.getPersonInfo();
+			this.subFormCode.phone=this.user.phone;
+		
+		}
+	}
+

+ 43 - 0
pages/my/user/updatephone/verification.vue

@@ -0,0 +1,43 @@
+<template>
+	<view>
+		<car-common  mytitle="验证已绑定账号"  ref="common"  ></car-common>
+		
+		<view class="phone-form">
+			<view class="phone-form-row">
+				<view class="phone-form-input">
+					<u-field v-text="showphone(user.phone)" 	placeholder="请输入已绑定手机号" label-width="0"></u-field>
+				</view>
+			</view>
+			<view class="phone-form-row">
+				<view class="phone-form-input">
+					<u-field maxlength="6"	placeholder="请输入验证码" v-model="subFormCode.verifyCode" type="number"  label-width="0"></u-field>
+				</view>
+				<view class="phone-form-code">
+					<u-button shape="circle" size="mini" @click="sendMsg" v-text="isSendMsgIng?(sendMsgSecond+'秒'):'发送验证码'"  >发送验证码</u-button>
+				</view>
+			</view>
+			<view class="phone-button">
+				<u-button type="primary" shape="circle"  @click="login">下一步</u-button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './verification.js'
+	export default api;
+</script>
+
+<style scoped lang="scss">
+	.phone-form-row{
+		position: relative;
+		.phone-form-code{
+			position: absolute;
+			right: 0;
+			top:10px;
+		}
+	}
+	.phone-button{
+		margin: 10px;
+	}
+</style>

+ 19 - 0
pages/news/details.js

@@ -0,0 +1,19 @@
+
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+		 
+			        lower() {
+			            console.log("")
+						this.list.push("1")
+			        },
+		},
+		onLoad() {
+			 
+		}
+	}
+

+ 36 - 0
pages/news/details.vue

@@ -0,0 +1,36 @@
+<template>
+	
+	<view>
+		<car-common :login="true" mytitle="消息详情" ref="common"></car-common>
+		
+		<view class="new-title">
+			<h3>标题标题标题标题标题标题标题标题标题标题标题</h3>
+			<p>推送时间:2021-01-20 19:30</p>
+		</view>
+		<view class="new-content">
+			<p>推送时间推送时间推送时间推送时间推送时间推送时间推送时间推送时间</p>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './details.js'
+	export default  api;
+</script>
+
+<style scoped lang="scss">
+	.new-title{
+		padding: 10px;
+		border-bottom: 1px solid #eee;
+		h3{
+			font-size: 22px;
+		}
+		p{
+			color:#999;
+			margin-top: 5px;
+		}
+	}
+	.new-content{
+		padding: 10px;
+	}
+</style>

+ 102 - 0
pages/news/index.js

@@ -0,0 +1,102 @@
+import * as API from '@/apis/news.js'
+
+export default {
+	data() {
+		return {
+			isLoading:false,
+			initBl:false,
+			clientHeight: 0,
+			list: [
+				1, 2, 3, 4, 6, 7
+			],
+			recordList: [],
+			listForm: {
+				totalPage: 1,
+				pageIndex: 1,
+				pageSize: 20
+			}
+		}
+	},
+	methods: {
+		gotoInfo(item) {
+			this.carhelp.set("form", {
+				name: 'buytickets',
+				id: this.id,
+				buy: true,
+				oplist: [
+					{
+						id:item.id,
+						upStationName:item.stationName,
+						upStationId:item.stationId,
+						imageUrl:item.imageUrl,
+						ticketType:item.ticketType,
+						ticketTypeName:item.ticketTypeName
+					}
+				], //当前添加的2人
+				list: [] // 一共添加的人 
+			});
+			
+			uni.navigateTo({
+				//url: "/pages/news/details?id=" + id
+				url: "/pages/buytickets/selectSite?select=true&id=" +item.vehicleId
+			})
+		},
+		lower() {
+			console.log("--------")
+			if (this.listForm.pageIndex <= this.listForm.totalPage ) {
+				this.passengerMessage();
+			} else {
+				return;
+			}
+		},
+		passengerMessage() {
+			if(this.$refs.common){
+				this.$refs.common.showLoading();
+			}
+			this.listForm.openId=this.carhelp.getOpenId()
+			API.passengerMessage(this.listForm).then((res) => {
+				this.initBl=true
+				this.isLoading=true
+				var response=res.data;
+				if (response) {
+					if (this.listForm.pageIndex == 1) {
+						this.recordList = response.data;
+						this.listForm.pageIndex = response.pageNumber;
+						this.listForm.totalPage = response.totalPage;
+					} else {
+						this.recordList = [
+							...this.recordList,
+							...response.data
+						];
+					}
+				}
+				this.listForm.pageIndex++;
+				this.$refs.common.showLoading(false);
+
+			}).catch(error => {
+				this.$refs.common.showLoading(false,error);
+				
+			})
+		}
+	},
+	onLoad() {
+		this.clientHeight = document.body.clientHeight;
+	},
+	onReady() {
+		
+		this.passengerMessage();
+	},
+	onShow() {
+		if(this.initBl){
+			this.recordList= [],
+			this.listForm= {
+				totalPage: 1,
+				pageIndex: 1,
+				pageSize: 20
+			}
+			this.passengerMessage();
+		}
+		
+	}
+	
+}

+ 95 - 0
pages/news/index.vue

@@ -0,0 +1,95 @@
+<template>
+	<view >
+		<car-common  mytitle="消息" :noback="false" ref="common"></car-common>
+ 		  <scroll-view  v-show="recordList.length" :style="'height: '+clientHeight+'px;'"   scroll-y="true"     @scrolltolower="lower">
+			  <template  v-for="item in recordList">
+				  
+
+			  <view class="new-time">
+			  	{{item.sendTime}}
+			  </view>
+			  <view class="new-item" @click="gotoInfo(item)">
+			  	<view class="new-head">
+			  		<h4>补缴车票通知</h4>
+			  		<p>已经过您的预定下车站点,请重新选择下车站点并补缴车票。</p>
+			  	</view>
+			  	<view class="new-main">
+			  		<view class="new-main-row">
+			  			<p>站点:</p><span>{{item.stationName}}</span>
+			  		</view>
+			  		<view class="new-main-row">
+			  			<p>线路:</p><span>{{item.routeName}}</span>
+			  		</view>
+			  		<view class="new-main-row">
+			  			<p>状态:</p><span>{{item.statusName}}</span>
+			  		</view>
+			  	</view>
+			  	<view class="new-foot" >
+			  		<p style="color: red;">点击补票</p>
+			  		<u-icon name="arrow-right" color="#999" size="28"></u-icon>
+			  	</view>
+			  </view>
+			  
+			    </template>
+		  </scroll-view>
+		 <view  v-show="isLoading&&recordList.length==0" style="text-align:center;margin-top: 80px;" >
+		 		<img src="static/img/blankpage.png" style="width: 50%;" alt="" >
+		 		<view>暂无信息</view>
+		 	</view>
+		
+	</view>
+</template>
+
+<script>
+	import api from './index.js'
+	export default  api;
+</script>
+<style>
+	page{
+		background-color: #f7f7f7;
+	}
+</style>
+<style scoped lang="scss">
+	.new-time{
+		text-align: center;
+		margin-top:10px;
+		color:#999;
+	}
+	.new-item{
+		 box-shadow:3px 3px 3px rgba(0,0,0,0.1);
+		background-color: #fff;
+		margin: 10px;
+		border-radius: 10px;
+		border: 1px solid #eee;
+		.new-head{
+			padding: 10px;
+			h4{
+				font-size: 16px;
+			}
+			p{
+				color:#999;
+				margin-top: 3px;
+			}
+		}
+		.new-main{
+			padding: 10px;
+			.new-main-row{
+				display: flex;
+				align-items: center;
+				margin-bottom: 10px;
+				p{
+					width: 60px;
+					color:#999;
+				}
+			}
+		}
+		.new-foot{
+			padding: 10px;
+			border-top: 1px solid #eee;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			
+		}
+	}
+</style>

+ 116 - 0
pages/query/index.js

@@ -0,0 +1,116 @@
+
+import * as API from '@/apis/query.js'
+
+	export default {
+		data() {
+			return {
+				ing:false,
+				key:'',
+				record:[],
+				result:[],
+				recordsTotal:0,
+				back:false,
+			}
+		},
+		methods: {
+			 gotoLine(item){
+				 uni.redirectTo({
+					url:'/pages/route/index?id='+item.id+"&downid="+item.stationId
+				 })
+			 },
+			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;
+				document.getElementsByTagName('uni-page-wrapper')[0].style="background-color: #ffffff;"
+				
+				if(this.key==""){
+					this.result=[]
+				}
+				
+			},
+			itemBtn(){
+				
+			},
+			submit(){
+				if(this.key==""){
+					return
+				}
+				
+				this.setHistory();
+				 var region= this.carhelp.get("car_region");
+				 if(!region){
+					  region= this.carhelp.get("car_region_temp");
+				 }
+				var form={
+					name:this.key,
+					pageIndex:1,
+					pageSize:20,
+					regionId:region
+				}
+				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);
+
+					}
+					document.getElementsByTagName('uni-page-wrapper')[0].style="background-color: #f7f7f7;"
+					
+					
+					
+				}).catch(error => {
+					this.$refs.common.alert( error);
+				})
+			}
+		},
+		onLoad(op) {
+			if(op.back){
+				 this.back=true;
+			}
+	 
+		},onReady(){
+			
+			this.record=this.carhelp.get("searchHistory");
+		}
+	}
+

+ 113 - 0
pages/query/index.vue

@@ -0,0 +1,113 @@
+<template>
+	<view class="content" :style="ing&&result.length==0?'':'background-color: #ffffff'">
+		<car-common   ref="common"  ></car-common>
+		
+		<u-navbar :is-back="back"  title="">	
+			<view class="slot-wrap">	
+				<view class="search-wrap">
+					<u-search placeholder="搜索线路"  :focus="true" v-model="key" @change="change()" @search="submit"  :show-action="false"></u-search>
+				</view>
+				<view class="navbar-right">
+				
+					<u-button type="warning" shape="circle" size="mini" @click="submit()">搜索</u-button>
+				</view>
+			</view>
+		</u-navbar>	
+		<view class="search" >
+			<view class="search-head" v-show="!ing">
+				<span>搜索历史</span>
+				<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="ing&&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" v-if="!item.stationId"></u-icon>
+				<u-icon name="zhanpai1" v-if="item.stationId" 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 v-show="ing&&result.length&&result.length==recordsTotal" style="text-align:center;margin-top: 10px;">没有更多记录了</view>
+			<view v-show="ing&&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  api;
+</script>
+
+<style scoped lang="scss">
+	
+	
+	.slot-wrap {
+		display: flex;
+		align-items: center;
+		flex: 1;
+	}
+	.navbar-right {
+		display: flex;
+		margin-right: 20rpx;
+	}
+	.navbar-left{
+		display: flex;
+		align-items: center;
+		margin-left: 20rpx;
+		span{
+			margin-right: 6rpx;
+			font-size: 14px;
+		}
+	}
+	.search-wrap {
+		margin: 0 20rpx;
+		flex: 1;
+	}
+	.search{
+		margin: 20rpx;
+		.search-head{
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			span{
+				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{
+				background-color: #eee;
+				float: left;
+				margin:10rpx;
+				padding:10rpx 30rpx;
+				border-radius: 10rpx;
+			}
+			
+		}
+	}
+</style>

+ 16 - 0
pages/query/record.js

@@ -0,0 +1,16 @@
+
+
+	export default {
+		data() {
+			return {
+			
+			}
+		},
+		methods: {
+			
+		},
+		onLoad() {
+			 
+		}
+	}
+

+ 95 - 0
pages/query/record.vue

@@ -0,0 +1,95 @@
+<template>
+	<view class="content">
+		<u-navbar :is-back="false" title="">	
+			<view class="slot-wrap">	
+				<view class="search-wrap">
+					<u-search placeholder="日照香炉生紫烟" :show-action="false"></u-search>
+				</view>
+				<view class="navbar-right">
+					<span>取消</span>
+				</view>
+			</view>
+		</u-navbar>	
+		<view class="search">
+			<view class="search-result">
+				<u-icon name="bus" custom-prefix="custom-icon" size="30" color="#888888"></u-icon>
+				<view class="search-result-text">
+					<span>9</span><p>路 方向 宿架转盘</p>
+				</view>
+			</view>
+			<view class="search-result">
+				<u-icon name="bus" custom-prefix="custom-icon" size="30" color="#888888"></u-icon>
+				<view class="search-result-text">
+					<span>9</span><p>路 方向 六中</p>
+				</view>
+			</view>
+			<view class="search-result">
+				<u-icon name="zhanpai1" custom-prefix="custom-icon" size="30" color="#888888"></u-icon>
+				<view class="search-result-text">
+					<span>九</span><p>路 方向 九龙渊公园</p>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import api from './index.js'
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+<style>
+	page{
+		background-color: #f7f7f7;
+	}
+</style>
+<style scoped lang="scss">
+	.slot-wrap {
+		display: flex;
+		align-items: center;
+		flex: 1;
+	}
+	.navbar-right {
+		display: flex;
+		margin-right: 20rpx;
+	}
+	.navbar-left{
+		display: flex;
+		align-items: center;
+		margin-left: 20rpx;
+		span{
+			margin-right: 6rpx;
+			font-size: 14px;
+		}
+	}
+	.search-wrap {
+		margin: 0 20rpx;
+		flex: 1;
+	}
+	.search{
+		padding:0 20rpx;
+		background-color: #fff;
+		.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
+				}
+			}
+		}
+	}
+</style>

+ 107 - 0
pages/remind/index.js

@@ -0,0 +1,107 @@
+ import * as API from '@/apis/remind.js'
+  import * as API_index from '@/apis/index.js'
+export default {
+		data() {
+			return {
+				readyBl:false,
+				list: [
+				
+					{
+						name: '提前1站',
+						isRemind: "1",
+					},
+					{
+						name: '提前2站',
+						isRemind: "2",
+					}
+				],
+				upList:[],
+				downList:[],
+				// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
+				value: 'orange',
+			}
+		},
+		methods: {
+			passengerRemindList(){
+				this.$refs.common.showLoading()
+				var obj={
+					openId:this.carhelp.getOpenId()
+				}
+				API.passengerRemindList(obj).then((response) => {
+					var list= response.data;
+					for(var i in list){
+						var item=list[i];
+						if(item.remindType=="1"){
+							this.upList.push(item);
+						}else{
+							this.downList.push(item);
+						}
+					}
+					this.$refs.common.showLoading(false)
+				}).catch(error => {
+					this.$refs.common.showLoading(false,error)
+				})
+			},
+			// 选中某个单选框时,由radio时触发
+			radioChange(e) {
+				 console.log(e);
+			},
+			// 选中任一radio时,由radio-group触发
+			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();
+			}
+		}
+	}

+ 112 - 0
pages/remind/index.vue

@@ -0,0 +1,112 @@
+<template>
+	<view>
+		<car-common  mytitle="提醒" :noback="false"  ref="common"></car-common>
+		<view class="remind">
+			<view class="remind-title up">
+				<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="'up_'+i" v-if="!item.del">
+				<view class="remind-left">
+					<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(item)" :data-id="'up_'+item.id">
+							<u-radio 
+								@change="radioChange" 
+								v-for="(item, index) in list" :key="'up_'+index" 
+								:name="item.isRemind"
+							
+							>
+								{{item.name}}
+							</u-radio>
+						</u-radio-group>
+					</view>
+				</view>
+				<view class="remind-right" @click="delBtn(item)">
+					<u-icon name="shanchu" custom-prefix="custom-icon"  color="#fff"></u-icon>
+					<span>删除</span>
+				</view>
+			</view>
+			<view class="remind-title up" v-if="downList.length">
+				<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="'down_'+i" v-if="!item.del">
+				<view class="remind-left">
+					<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(item)" :data-id="'down_'+item.id">
+							<u-radio 
+								@change="radioChange" 
+								v-for="(item, index) in list" :key="'down_'+index" 
+								:name="item.isRemind"
+								:disabled="item.disabled"
+							>
+								{{item.name}}
+							</u-radio>
+						</u-radio-group>
+					</view>
+				</view>
+				<view class="remind-right" @click="delBtn(item)">
+					<u-icon name="shanchu" custom-prefix="custom-icon"  color="#fff"></u-icon>
+					<span>删除</span>
+				</view>
+			</view>
+		</view>	
+	</view>
+</template>
+
+<script>
+	import api from './index.js'
+	export default   api
+</script>
+<style>
+	page{
+		background-color: #f7f7f7;
+	}
+</style>
+<style scoped lang="scss">
+	.remind-title{
+		display: flex;
+		align-items: center;
+		padding: 10px;
+		span{
+			margin-left:5px;
+		}
+	}
+	.remind-item{
+		background-color: #fff;
+		display: flex;
+		margin-top: 10px;
+	}
+	.remind-left{
+		flex: 1;
+		padding: 10px;
+		h3{
+			margin: 10px 0;
+		}
+		p{
+			span{
+				color:#77b0ff;
+			}
+		}
+		.remind-radio{
+			display: flex;
+			align-items: center;
+		}
+	}
+	.remind-right{
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		width:60px;
+		background-color: #ff6666;
+		color:#fff;
+		
+	}
+</style>

+ 600 - 0
pages/route/index.js

@@ -0,0 +1,600 @@
+ 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: false,
+				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;
+				
+				if(!this.centerBl&&this.carList.length){
+					this.centerBl=this.$refs.amap.setCenter(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){
+			
+			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;
+			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/route/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/route/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>

+ 0 - 0
static/css/style.css


File diff suppressed because it is too large
+ 2 - 0
static/font/iconfont.css


二進制
static/img/1.jpg


二進制
static/img/2.jpg


二進制
static/img/3.jpg


二進制
static/img/404.png


二進制
static/img/500.png


Some files were not shown because too many files changed in this diff