zhengkaixin 2 lat temu
rodzic
commit
2838460d77

+ 1 - 1
.env.test.js

@@ -3,7 +3,7 @@ const UNI_APP = {
 
 	NODE_ENV :"test",
 	SIMPLE_RUN:false,
-	//车信达 appid
+	//东胜掌上通勤 appid
 	VUE_APP_WXAPPID:"wx93675268c87a5a46"
 
 }  

+ 1 - 1
README.md

@@ -1,4 +1,4 @@
-# jp-car-phone 车信达手机端
+# jp-car-phone 东胜掌上通勤手机端
 
 ## 运行与安装
 建议使用uniapp的官方推荐开发工具HBuilder最新版本

+ 35 - 35
bobo-router/index.js

@@ -3,8 +3,8 @@ import {
 	getWeixinRedirectURI,
 	isWeiXin
 } from '@/utils'
-import * as API_WeiXin from '@/apis/weixin.js'
-import  carhelp from '@/utils/mixin.js'
+import * as API_WeiXin from '@/apis/weixin.js'
+import  carhelp from '@/utils/mixin.js'
 
 import Vue from 'vue'
 import uniCrazyRouter from "uni-crazy-router";
@@ -17,34 +17,34 @@ 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);
+	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+')',
-		    						
-		    }) 
-		}
+	console.log("afterEach")
+	if(process.car.NODE_ENV=='dev'||process.car.NODE_ENV=='test'){
+		    uni.setNavigationBarTitle({
+		       		title:'东胜掌上通勤('+process.car.NODE_ENV+')',
+		    						
+		    }) 
+		}
 	
 })
 
@@ -61,21 +61,21 @@ Vue.use(Router)
 const router = new Router()
 
 // 路由全局拦截器 在这里处理登录、授权等相关操作
-router.beforeEach(function(to, from, next) {
+router.beforeEach(function(to, from, next) {
 	
 	console.log('前置守卫')
-	if (process.car.SIMPLE_RUN) {
-		if (!carhelp.getOpenId()) {
-			carhelp.setOpenId("test")
+	if (process.car.SIMPLE_RUN) {
+		if (!carhelp.getOpenId()) {
+			carhelp.setOpenId("test")
 		}
 		routerBeforeEach(to, from, next);
-	} else {
+	} else {
 		
 		if (!carhelp.getOpenId()) {
-			if (isWeiXin()) {
+			if (isWeiXin()) {
 				getOpenId();
 			}
-		} else {
+		} else {
 			
 			routerBeforeEach(to, from, next);
 		}
@@ -87,7 +87,7 @@ router.beforeEach(function(to, from, next) {
 })
 
 function getOpenId() {
-	const code = getUrlParam('code');
+	const code = getUrlParam('code');
 	
 	if (!code) {
 		var url = document.URL;
@@ -97,7 +97,7 @@ function getOpenId() {
  
 		 
 		API_WeiXin.getDataByCode(code).then(response => {
-			
+			
 			carhelp.setOpenId(response.data.openid)
 			//var linkUrl = document.URL.replace(/\?code=(.*?)&state=STATE/g, '');
 			//window.location = linkUrl; //隐藏参数
@@ -123,4 +123,4 @@ router.onError(function(e) {
 	console.log('错误:', e.message || '路由跳转失败')
 })
 
-export default router
+export default router

+ 1 - 1
manifest.json

@@ -79,7 +79,7 @@
                 "enable" : true
             }
         },
-        "title" : "车信达",
+        "title" : "东胜掌上通勤",
         "router" : {
             "base" : "./"
         }

+ 169 - 169
pages.json

@@ -1,137 +1,137 @@
 {
 	"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",
+			"name":"CarLogin",
+            "path" : "pages/car/login",
             "style" :                                                                                    
             {
                // "navigationBarTitleText": "登录",
                 "enablePullDownRefresh": false
             }
-            
-        }
+            
+        }
         ,{
-			//路线详情
-            "path" : "pages/route/index",
+			//路线详情
+            "path" : "pages/route/index",
             "style" :                                                                                    
             {
                // "navigationBarTitleText": "路线详情",
                 "enablePullDownRefresh": false
             }
-            
-        }
-       
+            
+        }
+       
         ,{
-			//添加乘车人
+			//添加乘车人
             "path" : "pages/buytickets/index",
-			
+			
             "style" :                                                                                    
             {
                // "navigationBarTitleText": "添加乘车人",
                 "enablePullDownRefresh": false
             }
-            
-        }
+            
+        }
         ,{
-			//上传图片
-            "path" : "pages/buytickets/selectSite",
+			//上传图片
+            "path" : "pages/buytickets/selectSite",
             "style" :                                                                                    
             {
                // "navigationBarTitleText": "选择站点",
                 "enablePullDownRefresh": false
             }
-            
-        },
-		{
-			//上传图片
-		    "path" : "pages/buytickets/upload",
-		    "style" :                                                                                    
-		    {
-		       // "navigationBarTitleText": "上传图片",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		}
+            
+        },
+		{
+			//上传图片
+		    "path" : "pages/buytickets/upload",
+		    "style" :                                                                                    
+		    {
+		       // "navigationBarTitleText": "上传图片",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
         ,{
-			//调整图片
-            "path" : "pages/buytickets/adjust",
+			//调整图片
+            "path" : "pages/buytickets/adjust",
             "style" :                                                                                    
             {
                // "navigationBarTitleText": "调整图片",
                 "enablePullDownRefresh": false
             }
-            
-        }
+            
+        }
         ,{
-			//确认身份
-            "path" : "pages/buytickets/confirm",
+			//确认身份
+            "path" : "pages/buytickets/confirm",
             "style" :                                                                                    
             {
                // "navigationBarTitleText": "确认身份",
                 "enablePullDownRefresh": false
             }
-            
-        }
+            
+        }
         ,{
-			//选择站点
-            "path" : "pages/buytickets/site",
+			//选择站点
+            "path" : "pages/buytickets/site",
             "style" :                                                                                    
             {
                // "navigationBarTitleText": "选择站点",
-                "enablePullDownRefresh": false,
+                "enablePullDownRefresh": false,
 				"navigationStyle": "custom" // 隐藏系统导航栏
             }
-            
-        }
+            
+        }
         ,{
-			//购买成功
-            "path" : "pages/buytickets/success",
+			//购买成功
+            "path" : "pages/buytickets/success",
             "style" :                                                                                    
             {
                // "navigationBarTitleText": "购买成功",
                 "enablePullDownRefresh": false
             }
-            
-        }
+            
+        }
         ,{
-			//搜索
-            "path" : "pages/query/index",
+			//搜索
+            "path" : "pages/query/index",
             "style" :                                                                                    
             {
                // "navigationBarTitleText": "搜索",
-                "enablePullDownRefresh": false,
+                "enablePullDownRefresh": false,
 				"navigationStyle": "custom" // 隐藏系统导航栏
             }
-            
-        }
+            
+        }
         ,{
-			//搜索结果
-            "path" : "pages/query/record",
+			//搜索结果
+            "path" : "pages/query/record",
             "style" :                                                                                    
             {
                // "navigationBarTitleText": "搜索结果",
-                "enablePullDownRefresh": false,
+                "enablePullDownRefresh": false,
 				"navigationStyle": "custom" // 隐藏系统导航栏
             }
-            
-        }
+            
+        }
         ,{
-			 //消息
-            "path" : "pages/news/index",
+			 //消息
+            "path" : "pages/news/index",
             "style" :                                                                                    
             {
 
@@ -139,18 +139,18 @@
                 "enablePullDownRefresh": false
 
             }
-            
-        }
-		,{
-			 //消息
-		    "path" : "pages/news/details",
-		    "style" :                                                                                    
-		    {
-		        "navigationBarTitleText": "消息详情",
-		        "enablePullDownRefresh": false
-				
-		    }
-		    
+            
+        }
+		,{
+			 //消息
+		    "path" : "pages/news/details",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "消息详情",
+		        "enablePullDownRefresh": false
+				
+		    }
+		    
 		}
 		,{
 			//我的
@@ -159,14 +159,14 @@
 		    {
 
 		        "navigationBarTitleText": "我的",
-		        "enablePullDownRefresh": false,
+		        "enablePullDownRefresh": false,
 				"navigationStyle": "custom"
 		    }
 		    
-		}
+		}
         ,{
-			//意见反馈
-            "path" : "pages/my/user/feedback",
+			//意见反馈
+            "path" : "pages/my/user/feedback",
             "style" :                                                                                    
             {
 
@@ -174,11 +174,11 @@
 
                 "enablePullDownRefresh": false
             }
-            
-        }
+            
+        }
         ,{
-			//乘车记录
-            "path" : "pages/my/user/bybusList",
+			//乘车记录
+            "path" : "pages/my/user/bybusList",
             "style" :                                                                                    
             {
 
@@ -186,11 +186,11 @@
 
                 "enablePullDownRefresh": false
             }
-            
-        }
+            
+        }
         ,{
-			//问题反馈
-            "path" : "pages/my/platform/opinion",
+			//问题反馈
+            "path" : "pages/my/platform/opinion",
             "style" :                                                                                    
             {
 
@@ -198,11 +198,11 @@
 
                 "enablePullDownRefresh": false
             }
-            
-        }
+            
+        }
         ,{
-			//关于平台
-            "path" : "pages/my/platform/about",
+			//关于平台
+            "path" : "pages/my/platform/about",
             "style" :                                                                                    
             {
 
@@ -210,12 +210,12 @@
 
                 "enablePullDownRefresh": false
             }
-            
-        }
-       
+            
+        }
+       
         ,{
-			//修改密码 -验证
-            "path" : "pages/my/user/resetpassword/verification",
+			//修改密码 -验证
+            "path" : "pages/my/user/resetpassword/verification",
             "style" :                                                                                    
             {
 
@@ -223,7 +223,7 @@
 
                 "enablePullDownRefresh": false
             }
-            
+            
         }
 		,{
 			//修改密码 -修改
@@ -246,119 +246,119 @@
 		        "enablePullDownRefresh": false
 		    }
 		    
-		}
+		}
         ,{
-			//修改手机号 - 验证手机号
-            "path" : "pages/my/user/updatephone/verification",
+			//修改手机号 - 验证手机号
+            "path" : "pages/my/user/updatephone/verification",
             "style" :                                                                                    
             {
  // "navigationBarTitleText": "",
                 "enablePullDownRefresh": false
             }
-            
-        }
-       
+            
+        }
+       
         ,{
-			//修改手机号 - 更新手机号
-            "path" : "pages/my/user/updatephone/change",
+			//修改手机号 - 更新手机号
+            "path" : "pages/my/user/updatephone/change",
             "style" :                                                                                    
             {
  // "navigationBarTitleText": "",
                 "enablePullDownRefresh": false
             }
 			
-            
+            
         },
 		{
 			"path": "pages/404/404",
-			"name": "404",
-			 "style" : 
-			{
-			    "navigationBarTitleText": "网页无法打开",
-			    "enablePullDownRefresh": false
+			"name": "404",
+			 "style" : 
+			{
+			    "navigationBarTitleText": "网页无法打开",
+			    "enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/404/500",
+			"name": "500",
+			 "style" : 
+			{
+			    "navigationBarTitleText": "服务器错误",
+			    "enablePullDownRefresh": false
 			}
-		},
-		{
-			"path": "pages/404/500",
-			"name": "500",
-			 "style" : 
-			{
-			    "navigationBarTitleText": "服务器错误",
-			    "enablePullDownRefresh": false
-			}
-		}
-        
-        ,{
-            "path" : "pages/my/user/updateinfo",
+		}
+        
+        ,{
+            "path" : "pages/my/user/updateinfo",
             "style" :                                                                                    
             {
                 "navigationBarTitleText": "",
                 "enablePullDownRefresh": false
             }
-            
-        }
-        ,{
-            "path" : "pages/buytickets/home",
+            
+        }
+        ,{
+            "path" : "pages/buytickets/home",
             "style" :                                                                                    
             {
                 "navigationBarTitleText": "",
                 "enablePullDownRefresh": false
             }
-            
-        }
-        ,{
-            "path" : "pages/buytickets/view",
+            
+        }
+        ,{
+            "path" : "pages/buytickets/view",
             "style" :                                                                                    
             {
                 "navigationBarTitleText": "",
                 "enablePullDownRefresh": false
             }
-            
-        }
-        ,{
-            "path" : "pages/buytickets/edit",
+            
+        }
+        ,{
+            "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",
+            
+        },
+		{
+		    "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 的索引项)
@@ -366,10 +366,10 @@
 	            "name": "test", //模式名称
 	            "path": "pages/buytickets/index" //启动页面,必选
 	        }]
-	    },
-	"globalStyle": {
+	    },
+	"globalStyle": {
 			"navigationStyle": "custom" // 隐藏系统导航栏
-			,"navigationBarTitleText": "车信达"
+			,"navigationBarTitleText": "东胜掌上通勤"
 			
 	},
 	"tabBar": {
@@ -387,7 +387,7 @@
 	        "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",
@@ -399,5 +399,5 @@
 	        "selectedIconPath": "static/img/index-my-2.png",
 	        "text": "我的"
 	    }]
-	}
+	}
 }

+ 94 - 94
pages/buytickets/confirm.js

@@ -3,7 +3,7 @@ import * as API from '@/apis/buytickets.js'
 
 export default {
 	data() {
-		return {
+		return {
 			noback:true,
 			id: '',
 			num: 0,
@@ -17,11 +17,11 @@ export default {
 			}
 		}
 	},
-	methods: {
-		gotoHome(){
-			uni.switchTab({
-			    url: '/pages/index/index'
-			});
+	methods: {
+		gotoHome(){
+			uni.switchTab({
+			    url: '/pages/index/index'
+			});
 		},
 	
 		submit() {
@@ -41,19 +41,19 @@ export default {
 		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;
+			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);
@@ -66,69 +66,69 @@ export default {
 				}
 			}
 			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)
-			})
+		},
+		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();
@@ -137,11 +137,11 @@ export default {
 			this.list = [];
 			API.upBusNoTicketList(this.subForm).then((res) => {
 
-				var list = res.data.data;
-				if(!list.length){
-					this.$refs.common.alert2("无照片,请上车刷脸或联系司机");
-					return;
-				}
+				var list = res.data.data;
+				if(!list.length){
+					this.$refs.common.alert2("无照片,请上车刷脸或联系司机");
+					return;
+				}
 				
 				for (var i in list) {
 					list[i].show = true;
@@ -155,7 +155,7 @@ export default {
 					if (list[i].show) {
 						this.list.push(list[i]);
 					}
-				}
+				}
 				this.selectList=[];//清空选中
 				if (this.list.length != 0) {
 					this.$refs.common.showLoading(false, "刷新成功");
@@ -171,9 +171,9 @@ export default {
 			})
 		}
 	},
-	onLoad(op) {
-		if(op.back){
-			this.noback=!op.back
+	onLoad(op) {
+		if(op.back){
+			this.noback=!op.back
 		}
 		this.id = op.id
 	},
@@ -197,12 +197,12 @@ export default {
 
 		if (false&&!this.carhelp.getPersonInfo()) {
 			this.$refs.common.setFnc(this.confirmBtn)
-			this.$refs.common.alert2('您还不是车信达用户,注册后再购买车票。', '前往注册', '尚未注册')
+			this.$refs.common.alert2('您还不是东胜掌上通勤用户,注册后再购买车票。', '前往注册', '尚未注册')
 		} else {
-		}
+		}
 			this.getPassengerInfo()
 			
 
 
 	}
-}
+}

+ 63 - 63
pages/buytickets/home.js

@@ -51,12 +51,12 @@ export default {
 		Carmap
 	},
 
-	methods: {
-		gotoHome(){
-			uni.switchTab({
-			    url: '/pages/index/index'
-			});
-		},
+	methods: {
+		gotoHome(){
+			uni.switchTab({
+			    url: '/pages/index/index'
+			});
+		},
 	
 		
 		select(op) {
@@ -89,13 +89,13 @@ export default {
 			
 			console.log("Pay+"+new Date().getTime())
 			Pay.wxpay(this.passengerInfo.id).then((response) => {
-				if(!response.result){
-					this.$refs.common.showLoading(false, response.message);
-					return
+				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())
+				console.log("Pay+"+new Date().getTime())
 				
 				var obj = {
 					...data,
@@ -191,8 +191,8 @@ export default {
 
 			})
 		},
-		getPassengerInfo() {
-			
+		getPassengerInfo() {
+			
 			
 			var thisform = {
 				id: this.id,
@@ -204,28 +204,28 @@ export default {
 				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
+				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={}
+				var obj = this.carhelp.get("form");
+				if(!obj){
+					obj={}
 				}
-				obj.list = this.passengerInfo.list;
-				obj.name= 'buytickets';
+				obj.list = this.passengerInfo.list;
+				obj.name= 'buytickets';
 				obj.id= this.id;
 				this.carhelp.set("form", obj);
-				this.getShiftInfo()
+				this.getShiftInfo()
 				 
 				
 			}).catch(error => {
@@ -281,15 +281,15 @@ export default {
 			}).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()
-			}
+			})
+			if (!this.info.init) {
+				WxJsApi.getWxConfig(['getLocation']).then(() => {
+					// this.$refs.common.showLoading(false)
+					this.getLocation()
+				});
+			}else{
+					this.getLocation()
+			}
 		
 			
 
@@ -300,25 +300,25 @@ export default {
 
 			}
 		},
-		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)
-			})
+		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)
+			})
 		}
 
 	},
@@ -331,14 +331,14 @@ export default {
 			clearInterval(this.myinterval)
 		}
 	},
-	onReady() {
-		if (false&&!this.carhelp.getPersonInfo()) {
-			this.$refs.common.setFnc(this.confirmBtn)
-			this.$refs.common.alert2('您还不是车信达用户,注册后再购买车票。', '前往注册', '尚未注册')
-		} else{
-		}
-		this.getPassengerInfo()
+	onReady() {
+		if (false&&!this.carhelp.getPersonInfo()) {
+			this.$refs.common.setFnc(this.confirmBtn)
+			this.$refs.common.alert2('您还不是东胜掌上通勤用户,注册后再购买车票。', '前往注册', '尚未注册')
+		} else{
+		}
+		this.getPassengerInfo()
 			 
 		
 	}
-}
+}

+ 122 - 122
pages/buytickets/index.js

@@ -3,10 +3,10 @@ import * as API from '@/apis/buytickets.js'
 
 export default {
 	data() {
-		return {
-			isLoading:true,
-			initBl:false,
-			noback:false,
+		return {
+			isLoading:true,
+			initBl:false,
+			noback:false,
 			passengerInfo:{},
 			id: '',
 			num: 0,
@@ -20,11 +20,11 @@ export default {
 			}
 		}
 	},
-	methods: {
-		gotoHome(){
-			uni.switchTab({
-			    url: '/pages/index/index'
-			});
+	methods: {
+		gotoHome(){
+			uni.switchTab({
+			    url: '/pages/index/index'
+			});
 		},
 		
 		submit() {
@@ -41,26 +41,26 @@ export default {
 				url: '/pages/buytickets/selectSite?select=true&id=' + this.id
 			})
 		},
-		ckBtn(item) {
-			if(this.num==5&&!item.ck){
-				this.$refs.common.alert("一次最多选择5名乘车人员");
-				return
+		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;
+			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);
@@ -73,90 +73,90 @@ export default {
 				}
 			}
 			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) {
+		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.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.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, "刷新成功");
@@ -172,9 +172,9 @@ export default {
 			})
 		}
 	},
-	onLoad(op) {
-		if(op.back){
-			this.noback=op.back
+	onLoad(op) {
+		if(op.back){
+			this.noback=op.back
 		}
 		this.id = op.id
 	},
@@ -186,34 +186,34 @@ export default {
 		var obj = this.carhelp.get("form")
 
 		if (obj && obj.name == 'buytickets' && obj.id == this.id) {
-			//不创建新订单
-			obj.buy=null;
+			//不创建新订单
+			obj.buy=null;
 			this.carhelp.set("form",obj);
 		} else {
-			this.carhelp.set("form", {
-				name: 'buytickets',
-				id: this.id,
-				oplist: [], //当前添加的2人
-				list: [] // 一共添加的人 
+			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('您还不是车信达用户,注册后再购买车票。', '前往注册', '尚未注册')
+			this.$refs.common.alert2('您还不是东胜掌上通勤用户,注册后再购买车票。', '前往注册', '尚未注册')
+		} else {
+		}
+		if (this.noback) {
+			 this.upBusNoTicketList(true);
 		} else {
-		}
-		if (this.noback) {
-			 this.upBusNoTicketList(true);
-		} else {
-			this.getPassengerInfo()
+			this.getPassengerInfo()
 		}
 			//this.upBusNoTicketList();
 		this.initBl=true;
 
-	},onShow(){
-		if(this.initBl){
-			 this.upBusNoTicketList(true);
-		}	
+	},onShow(){
+		if(this.initBl){
+			 this.upBusNoTicketList(true);
+		}	
 	}
-}
+}

+ 1 - 1
pages/car/login.vue

@@ -13,7 +13,7 @@
 		<view class="login-logo">
 			<img src="static/img/logo_1.png" alt="">
 		</view>
-		<view class="login-name">车信达</view>
+		<view class="login-name">东胜掌上通勤</view>
 		<view class="login-form">
 			<view class="login-form-row">
 				<view class="login-form-title">

+ 15 - 15
pages/my/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<view>
+	<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>
@@ -67,29 +67,29 @@
 			<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>
+					<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 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-item title="关于东胜掌上通勤"  @click="gotoUrl('/pages/my/platform/about')"></u-cell-item>
 		
 		</u-cell-group>
 		

+ 7 - 7
pages/my/platform/about.vue

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