Jelajahi Sumber

Merge branch 'master' of http://47.100.3.209:3000/gongdecai/wangluohuoyun-app

zhongtianhaoyuan 2 tahun lalu
induk
melakukan
b444d4f52f
7 mengubah file dengan 124 tambahan dan 23 penghapusan
  1. 58 2
      App.vue
  2. 2 1
      common/helper.js
  3. 2 2
      config/index.js
  4. 6 3
      manifest.json
  5. 11 14
      pages/goodSource/index.vue
  6. 2 1
      pages/mine/index.vue
  7. 43 0
      pages/public/login.vue

+ 58 - 2
App.vue

@@ -57,9 +57,65 @@
 			        }
 			    })
 			// #ifdef APP-PLUS
-			
-			var that = this
+			var that=this
 			//判断该用户是否需要开启持续定位
+			if(uni.getStorageSync('userInfo')){
+				this.$request.baseRequest('get', '/orderInfo/getData',  {
+						commonId:uni.getStorageSync('userInfo').id,
+					}).then(res1 => {
+					if(res1.data.length>0){
+						that.$helper.fUN_AmapLocation.start({
+								// intervalTime: 1000 * 60,
+								intervalTime: 5000,
+								// locationCacheEnable:true,
+								isReport: false
+								// url: 'http://192.168.0.66/fun/open/test_json.do',
+								// params: {
+								// 	a: 1,
+								// 	B: '测试',
+								// 	c: true
+								// },
+								// headers: {
+								// 	a: '123',
+								// 	B: 'abcd'
+								// }
+							},
+							res => {
+								// console.log('====确认装车开启连续定位====');
+								// console.log(res)
+								let _data = {
+									orderId: res1.data[0].id,
+									longitude: res.longitude,
+									latitude: res.latitude,
+									province: res.province,
+									city: res.city,
+									area: res.district
+								}
+								this.$helper.gjList.push(_data)
+								uni.setStorageSync('mapGJ', this.$helper.gjList);
+								console.log('this.$helper.gjList')
+								console.log(this.$helper.gjList)
+								console.log("条数", uni.getStorageSync('mapGJ').length)
+								if (uni.getStorageSync('mapGJ').length > 100) {
+									console.log(JSON.stringify(uni.getStorageSync('mapGJ')) )
+									this.$request.baseRequest('post', '/hyOrderTravelPath/api/addInfo',  {
+												orderId:"cdae6ec34c2349768c490a9fefa03fb3",
+												longitudeLatitude:JSON.stringify(uni.getStorageSync('mapGJ'))   
+										}).then(res => {
+											uni.removeStorageSync('mapGJ');
+											this.$helper.gjList = []
+										})
+										.catch(res => {
+											uni.$u.toast(res.message);
+										});
+								}
+								//判断缓存数据条数,超过reportInterval时清空缓存,重新存入缓存
+							}
+						);	
+					}
+				
+				})
+			}
 			// this.$helper.fUN_AmapLocation.stop({}, result => {
 			// 	console.log('====fUN_AmapLocation定位stop====', JSON.stringify(result));
 			// 	this.$helper.fUN_AmapLocation.start(

+ 2 - 1
common/helper.js

@@ -98,7 +98,7 @@ const contactCustomerService = (phone) => {
 	console.log(phone)
 	//客服
 	if (!phone) {
-		phone = '400123123'
+		phone = '13304979986'
 	}
 	const res = uni.getSystemInfoSync();
 	// ios系统默认有个模态框
@@ -210,6 +210,7 @@ function isToday(str,type) {
 	}
 }
 const changeTime = (t1) => {
+	console.log(t1)
 	// t1截止时间  t2当前时间
 	// 调用getDtes函数把当前时间传过去,获取本周一和本周日时间戳
 	// var weeks = getDates(t2)

+ 2 - 2
config/index.js

@@ -1,6 +1,6 @@
 const dev = {
-	// baseUrlNew: 'https://apitest.eliangeyun.com',
-	baseUrlNew: 'http://192.168.110.9:8099',
+	baseUrlNew: 'https://apitest.eliangeyun.com',
+	// baseUrlNew: 'http://192.168.110.9:8099',
 	// baseUrlNew: 'http://192.168.110.82:8999',
 	// baseUrlNew: 'http://192.168.1.119:8999',
 	h5Appid: 'wxb66b599f7f61b46f',

+ 6 - 3
manifest.json

@@ -1,9 +1,9 @@
 {
-    "name" : "智运",
+    "name" : "畅运通",
     "appid" : "__UNI__9C76CB6",
     "description" : "",
-    "versionName" : "1.0.8",
-    "versionCode" : 108,
+    "versionName" : "1.0.9",
+    "versionCode" : 109,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {
@@ -65,6 +65,9 @@
                         "__platform__" : [ "ios", "android" ],
                         "appkey_ios" : "450806e9eef29de257faad3a06ec7e9a",
                         "appkey_android" : "dc40c1be0513c1c8e01eb560318dbc68"
+                    },
+                    "system" : {
+                        "__platform__" : [ "ios", "android" ]
                     }
                 }
             },

+ 11 - 14
pages/goodSource/index.vue

@@ -78,7 +78,7 @@
 									<view v-if="carWeight(good)">{{carWeight(good)}}</view>
 								</view>
 								<view class="flex row">
-									<view class="row-tips" v-if="good.taskDescription">{{good.taskDescription}}</view>
+									<view class="row-tips">{{good.taskDescription}}</view>
 								</view>
 							</view>
 							<view class="right flex h-color">
@@ -192,9 +192,9 @@
 			} else {
 				// #ifdef APP-PLUS
 				var that=this
-				this.$nextTick(function(){
-					that.getLngLat();
-				})
+				// this.$nextTick(function(){
+					this.getLngLat();
+				// })
 				
 				// #endif
 				if(!this.startPlace.selected){
@@ -274,6 +274,7 @@
 		methods: {
 			cargoOwner(_obj){
 				// uni.$u.route('/pages/order/evaluateList');
+				console.log("查看---------------",_obj)
 				uni.$u.route('/pages/goodSource/cargoOwnerSee',_obj)
 			},
 			mescrollInit(mescroll) {
@@ -413,11 +414,11 @@
 					success: res => {
 						if (res.latitude) {
 							// console.log(that.startPlace)
-							if(res.address.city.indexOf('市')!=-1){
-								res.address.city=res.address.city.substring(0,res.address.city.length-1)
-							}
-							
-							that.$set(that.startPlace,'selected',res.address.city)
+							// if(res.address.city.indexOf('市')!=-1){
+							// 	res.address.city=res.address.city.substring(0,res.address.city.length-1)
+							// }
+							that.startPlace.selected=res.address.city
+							// that.$set(that.startPlace,'selected',res.address.city)
 							that.lng = res.longitude;
 							that.lat = res.latitude;
 							uni.hideLoading()
@@ -449,15 +450,12 @@
 												var main = plus.android.runtimeMainActivity();
 												main.startActivity(intent); // 打开系统设置GPS服务页面
 											}
-											uni.hideLoading()
-										}else{
-											uni.hideLoading()
 										}
 									}
-									
 								});
 							}
 							uni.hideLoading()
+							
 						}
 					}
 				});
@@ -504,7 +502,6 @@
 				}
 				// if (this.tabIndex == 2) {
 					if(!this.startPlace.selected){
-						console.log(1111111)
 						this.getLngLat();
 					}
 					_data.driverLongitude = this.lng

+ 2 - 1
pages/mine/index.vue

@@ -282,10 +282,11 @@
 				this.isShowAlert = false
 			},
 			goDetailPage(src, type) {
+				console.log(type)
 				if (!this.hasLogin) {
 					this.isShowAlert = true;
 				} else {
-					if (type == 1 && this.statusVal == '已认证' || this.statusVal == '证件已过期' || this.statusVal == '身份认证未通过') {
+					if (type == 1 && this.statusVal == '已认证' || type == 1 &&this.statusVal == '证件已过期' || type == 1 &&this.statusVal == '身份认证未通过') {
 						src = '/pages/mine/editDriverCertification'
 					}
 					if ((type == 2 || type == 3) && this.isFirstSH) {

+ 43 - 0
pages/public/login.vue

@@ -182,6 +182,49 @@
 									}
 								}
 							})
+							that.$request.baseRequest('get', '/orderInfo/getData',  {
+									commonId:uni.getStorageSync('userInfo').id,
+								}).then(res1 => {
+								if(res1.data.length>0){
+									that.$helper.fUN_AmapLocation.start({
+											intervalTime: 5000,
+											isReport: false
+										},
+										res => {
+											// console.log('====确认装车开启连续定位====');
+											// console.log(res)
+											let _data = {
+												orderId: res1.data[0].id,
+												longitude: res.longitude,
+												latitude: res.latitude,
+												province: res.province,
+												city: res.city,
+												area: res.district
+											}
+											this.$helper.gjList.push(_data)
+											uni.setStorageSync('mapGJ', this.$helper.gjList);
+											// console.log('this.$helper.gjList')
+											// console.log(this.$helper.gjList)
+											console.log("条数", uni.getStorageSync('mapGJ').length)
+											if (uni.getStorageSync('mapGJ').length > 100) {
+												console.log(JSON.stringify(uni.getStorageSync('mapGJ')) )
+												this.$request.baseRequest('post', '/hyOrderTravelPath/api/addInfo',  {
+															orderId:"cdae6ec34c2349768c490a9fefa03fb3",
+															longitudeLatitude:JSON.stringify(uni.getStorageSync('mapGJ'))   
+													}).then(res => {
+														uni.removeStorageSync('mapGJ');
+														this.$helper.gjList = []
+													})
+													.catch(res => {
+														uni.$u.toast(res.message);
+													});
+											}
+											//判断缓存数据条数,超过reportInterval时清空缓存,重新存入缓存
+										}
+									);	
+								}
+							
+							})
 							that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
 								driverPhone: this.phone,
 							}).then(res2 => {