Преглед изворни кода

Merge branch 'master' of http://git.zthymaoyi.com/gongdecai/wangluohuoyun-app

ccj пре 1 година
родитељ
комит
cddc274266

+ 12 - 15
pages/goodSource/index.vue

@@ -245,23 +245,20 @@
 				selectedIconPath: 'static/images/common/dingdan@2x.png'
 			})
 			var that = this
-			
+
 			//获取上一次点击起装卸地
 			if (uni.getStorageSync('fPlaceObj')) {
 				that.startPlace = uni.getStorageSync('fPlaceObj');
 			} else {
-				var photol=await permision.checkSystemEnableLocation()
-				if (uni.getStorageSync('confirm_location')||photol) {
-						this.getLngLat()
-				}else{
-					that.startPlace.selected = '北京'
-					uni.setStorageSync('fPlaceObj', {
-						fchoosearea: '全部',
-						fchoosecity: '市辖区',
-						fchooseprovince: '北京',
-						selected: '北京'
-					})
-				}
+
+				that.startPlace.selected = '沈阳'
+				uni.setStorageSync('fPlaceObj', {
+					fchoosearea: '辽宁省',
+					fchoosecity: '沈阳市',
+					fchooseprovince: '新民市',
+					selected: '沈阳'
+				})
+
 			}
 			if (uni.getStorageSync('sPlaceObj')) {
 				that.endPlace = uni.getStorageSync('sPlaceObj');
@@ -423,7 +420,7 @@
 										var intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
 										main.startActivity(intent); // 打开系统设置GPS服务页面
 										console.log()
-									} 
+									}
 									// else {
 									// 	uni.setStorageSync('fPlaceObj', {
 									// 		fchoosearea: '全部',
@@ -968,7 +965,7 @@
 					// var photol = await permision.checkSystemEnableLocation()
 					// console.log("photol",photol)
 					// if (!photol) {
-						that.get_localtion_permission()
+					that.get_localtion_permission()
 					// }
 				} else {
 					this.upCallback({

+ 7 - 5
pages/goodSource/shippingDetails.vue

@@ -123,12 +123,14 @@
 				<view class="flex align-center">
 					<view class="left">车型</view>
 					<!-- carModel -->
-					<view v-if='carLength!=""&&carType!="不限"&&carWeight!=""' class="right">
-						{{carLength}} |
-						<text v-if='carType!="不限"'> {{carType}} </text>
-						| {{carWeight}}
+					<view class="right">
+						<text v-if="detailData.carModel.indexOf('1') != -1">不限</text>
+						<text v-show="detailData.carModel.indexOf('2') != -1">高栏 | </text>
+						<text v-show="detailData.carModel.indexOf('3') != -1">集装箱 | </text>
+						<text v-show="detailData.carModel.indexOf('4') != -1">自卸车</text>
+					
 					</view>
-					<view class="right" v-else>不限</view>
+					<!-- <view class="right" v-else>不限</view> -->
 				</view>
 				<view class="flex mt20">
 					<view class="left">描述</view>

+ 4 - 5
pages/order/confirmUnloading.vue

@@ -270,6 +270,7 @@
 				})
 			},
 			stop() { //结束定位
+			var that = this
 				this.shippingNoteInfos[0].shippingNoteNumber = this.detailData.orderNo //运单号
 					this.shippingNoteInfos[0].serialNumber = "0000" //分单号
 					this.shippingNoteInfos[0].startCountrySubdivisionCode = this.detailData
@@ -295,7 +296,6 @@
 					this.shippingNoteInfos[0].interval = "5000" //请求时间间隔,SDK 回调返 回(单位 ms)
 				// var shippingNoteInfos = this.shippingNoteInfos;//运单信息列表
 				console.log("查看结束参数", this.shippingNoteInfos)
-
 				let remark = ""
 				sdkwx.stop(this.detailData.carNumber, this.detailData.driverName, remark, this.shippingNoteInfos, function(
 					res) {
@@ -307,7 +307,7 @@
 						//失败
 						var errorCode = res.data.errorCode; //错误码
 						var errorMsg = res.data.errorMsg; //错误描述
-						this.$refs.uToast.show({
+						that.$refs.uToast.show({
 							type: 'error',
 							message: errorMsg,
 						})
@@ -600,7 +600,7 @@
 				var lat = this.detailData.carrierInfo.unloadingLatitude  //当前定位所在的经纬度
 				var lng = this.detailData.carrierInfo.unloadingLongitude
 				var endlat = this.detailData.publishTaskInfo?this.detailData.publishTaskInfo.unsendLatitude:this.detailData.unsendLatitude
-				var endlng = this.detailData.publishTaskInfo?this.detailData.publishTaskInfo.unloadingLongitude:this.detailData.unloadingLongitude
+				var endlng = this.detailData.publishTaskInfo?this.detailData.publishTaskInfo.unsendLongitude:this.detailData.unsendLongitude
 				if(this.editPlace){//true 未编辑 判断当前定位与任务卸车地点距离  大于5KM提示,编辑卸车地点后不在判断
 				let juli = this.getDistance(endlat,endlng,lat,lng)
 					console.log("更改卸车地后距离",juli)
@@ -668,7 +668,6 @@
 					this.detailData.carrierInfo.unloadingDate = this.detailData.carrierInfo.unloadingDate.split(" ")[0] +
 						" " + h + ":" + f + ":" + m
 				}
-				// this.detailData.carrierInfo.totalFreight = this.detailData.totalFreight
 				this.detailData.carrierInfo.carNo = this.detailData.carNumber
 				this.$request.baseRequest('post', '/carrierInfo/unLoadingAdd', this.detailData.carrierInfo).then(res => {
 						if (res.code == 200) {
@@ -680,7 +679,7 @@
 								_title = '提交成功!'
 							}
 							uni.hideLoading()
-							this.$refs.uToast.show({
+							that.$refs.uToast.show({
 								type: 'success',
 								message: _title,
 								complete() {

+ 19 - 16
pages/public/login.vue

@@ -137,18 +137,18 @@
 			this.$api.logout()
 		},
 		onLoad(options) {
-			
+
 			// #ifdef APP-PLUS
-			var isContains = true;//隐私权政策是否包含高德开平隐私权政策  true是包含
-			var isShow = true;//隐私权政策是否弹窗展示告知用户 true是展示 
+			var isContains = true; //隐私权政策是否包含高德开平隐私权政策  true是包含
+			var isShow = true; //隐私权政策是否弹窗展示告知用户 true是展示 
 			sdkwx.updatePrivacyShow(isContains, isShow);
-			
-			var isAgree = true;//隐私权政策是否取得用户同意  true是用户同意
+
+			var isAgree = true; //隐私权政策是否取得用户同意  true是用户同意
 			sdkwx.updatePrivacyAgree(isAgree);
 			//检查定位权限
-			sdkwx.checkLocationPermission(function(res){
-				console.log(res);
-			});
+			// sdkwx.checkLocationPermission(function(res){
+			// 	console.log(res);
+			// });
 			// #endif
 
 			if (wx.getUserProfile) {
@@ -178,7 +178,7 @@
 					function(res) {
 						if (res.type == "onSuccess") {
 							//成功
-							console.log("开启定位成功!!!",res)
+							console.log("开启定位成功!!!", res)
 							var shippingNoteInfos = res.data[0]; //运单信息列表
 							if (shippingNoteInfos) {
 								let dateTtime = Number(shippingNoteInfos.interval + 60000)
@@ -190,7 +190,7 @@
 							}
 						} else if (res.type == "onFailure") {
 							//失败
-							console.log("开启定位失败!!!",res)
+							console.log("开启定位失败!!!", res)
 							var errorCode = res.data.errorCode; //错误码
 							var errorMsg = res.data.errorMsg; //错误描述
 							that.timer = setTimeout(() => { //失败也需要定时发送定位
@@ -208,7 +208,7 @@
 					.shippingNoteInfos,
 					function(res) {
 						if (res.type == "onSuccess") {
-							console.log("App.vue发送定位成功",res)
+							console.log("App.vue发送定位成功", res)
 							var shippingNoteInfos = res.data[0]; //运单信息列表
 							if (shippingNoteInfos) {
 								let dateTime = Number(shippingNoteInfos.interval + 60000)
@@ -249,12 +249,12 @@
 						if (res.data.length > 0) {
 							that.restart()
 						}
-						console.log("授权成功",res)
+						console.log("授权成功", res)
 					} else if (res.type == "onFailure") {
 						//失败
 						var errorCode = res.data.errorCode; //错误码
 						var errorMsg = res.data.errorMsg; //错误描述
-						console.log("授权失败","没有可定位的订单")
+						console.log("授权失败", "没有可定位的订单")
 						console.log(res)
 					}
 					// uni.showModal({
@@ -348,11 +348,14 @@
 										commonId: uni.getStorageSync('userInfo').id,
 									}).then(res1 => {
 										if (res1.data.length > 0) {
-											that.shippingNoteInfos[0].shippingNoteNumber = res1.data[0].orderNo //运单号
+											that.shippingNoteInfos[0].shippingNoteNumber = res1.data[0]
+												.orderNo //运单号
 											that.shippingNoteInfos[0].serialNumber = "0000" //分单号
-											that.shippingNoteInfos[0].startCountrySubdivisionCode = res1.data[0]
+											that.shippingNoteInfos[0].startCountrySubdivisionCode =
+												res1.data[0]
 												.sendAdCode //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
-											that.shippingNoteInfos[0].endCountrySubdivisionCode = res1.data[0]
+											that.shippingNoteInfos[0].endCountrySubdivisionCode = res1
+												.data[0]
 												.unsendAdCode //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
 											that.shippingNoteInfos[0].startLongitude = res1.data[0]
 												.sendLongitude //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填