zhongtianhaoyuan 2 лет назад
Родитель
Сommit
96ee28400b

+ 83 - 4
App.vue

@@ -12,10 +12,30 @@
 	import appUpdate from 'common/appUpdate.js'
 	import app_push from './components/APPPush/app_push.js'
 	import permision from "@/js_sdk/wa-permission/permission.js"
+	//插件对象
+	var sdkwx = uni.requireNativePlugin('Hdgq-LocSdkWX');
 	export default {
+		data() {
+			return {
+				shippingNoteInfos: [{
+					shippingNoteNumber: '',
+					serialNumber: "",
+					startCountrySubdivisionCode: "",
+					endCountrySubdivisionCode: "",
+					startLongitude: "",
+					startLatitude: "",
+					endLongitude: "",
+					endLatitude: "",
+					startLocationText: "",
+					endLocationText: "",
+					vehicleNumber: "",
+					driverName: "",
+					interval: "",
+				}],
+				
+			}},
 		methods: {
-			
-			...mapMutations(['login']),
+			...mapMutations(['login',"firstAuthentication"]),
 			// vue的method里编写如下代码
 			// async requestAndroidPermission(permisionID) {
 			//     var result = await permision.requestAndroidPermission(permisionID)
@@ -30,8 +50,32 @@
 			//         strStatus = "被永久拒绝权限"
 			// 		// permision.gotoAppPermissionSetting()
 			//     }
-			  
 			// },
+			send(_obj){//发送定位
+				var remark = ""
+				var that = this
+				console.log("send参数",this.shippingNoteInfos)
+				sdkwx.send(this.shippingNoteInfos[0].vehicleNumber, this.shippingNoteInfos[0].driverName,remark, this.shippingNoteInfos, function(res){
+					console.log(res)
+					if (res.type == "onSuccess") {
+						console.log("App.vue发送定位成功")
+						console.log(res);
+						//成功
+						var shippingNoteInfos = res.data;//运单信息列表
+						if(shippingNoteInfos&&shippingNoteInfos.length >0 ){
+							that.timer = setInterval(() => {
+							    //TODO 
+								that.send()
+							}, shippingNoteInfos[0].interval+1000);
+						}
+					} else if (res.type == "onFailure"){
+						console.log("App.vue发送定位失败",res)
+						//失败
+						var errorCode = res.data.errorCode;//错误码
+						var errorMsg = res.data.errorMsg;//错误描述
+					}
+				});	
+			},
 		},
 	
 		onLaunch: function() {
@@ -163,6 +207,41 @@
 				this.$request.baseRequest('get', '/orderInfo/getData',  {
 						commonId:uni.getStorageSync('userInfo').id,
 					}).then(res1 => {
+						console.log("/orderInfo/getData",res1.data)
+						this.shippingNoteInfos[0].shippingNoteNumber = res1.data[0].orderNo //运单号
+						this.shippingNoteInfos[0].serialNumber = "0000" //分单号
+						this.shippingNoteInfos[0].startCountrySubdivisionCode = res1.data[0].sendAdCode  //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+						this.shippingNoteInfos[0].endCountrySubdivisionCode = res1.data[0].unsendAdCode  //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+						this.shippingNoteInfos[0].startLongitude = res1.data[0].sendLongitude   //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].startLatitude = res1.data[0].sendLatitude   //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].endLongitude = res1.data[0].unsendLongitude  //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].endLatitude = res1.data[0].unsendLatitude  //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].driverName = res1.data[0].driverName  //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
+						this.shippingNoteInfos[0].vehicleNumber = res1.data[0].carNumber //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
+						this.shippingNoteInfos[0].startLocationText = res1.data[0].sendCity //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].endLocationText = res1.data[0].unloadCity //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].interval = "5000"
+						// for(let i = 0; i < res1.data.length ; i++){
+						// 	this.shippingNoteInfos[i].push({'shippingNoteNumber':res1.data[i].orderNo})
+						// 	this.shippingNoteInfos[i].push({'serialNumber':"0000"})
+						// 	this.shippingNoteInfos[i].push({'interval':'5000'})
+						// 	// this.shippingNoteInfos[i].shippingNoteNumber = res1.data[i].orderNo, 
+						// 	// this.shippingNoteInfos[i].serialNumber = "0000", //分单号
+						// 		// this.shippingNoteInfos[i].startCountrySubdivisionCode = this.detailData.publishTaskInfo.sendAdCode, //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+						// 		// this.shippingNoteInfos[i].endCountrySubdivisionCode = this.detailData.publishTaskInfo.unsendAdCode, //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+						// 		// this.shippingNoteInfos[i].startLongitude = this.detailData.loadingLatitude, //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						// 		// this.shippingNoteInfos[i].startLatitude = this.detailData.loadingLatitude, //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						// 		// this.shippingNoteInfos[i].endLongitude = this.detailData.publishTaskInfo.unsendLongitude, //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						// 		// this.shippingNoteInfos[i].endLatitude = this.detailData.publishTaskInfo.unsendLatitude, //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						// 		// this.shippingNoteInfos[i].startLocationText = res1.data.sendCity, //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						// 		// this.shippingNoteInfos[i].endLocationText = res1.data.unloadCity, //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						// 		// this.shippingNoteInfos[i].vehicleNumber = res1.data.carNumber, //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
+						// 		// this.shippingNoteInfos[i].driverName = res.data.driverName, //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
+						// 		// this.shippingNoteInfos[i].interval = "5000" //请求时间间隔,SDK 回调返 回(单位 ms)
+						// }
+						
+						console.log("查看参数",this.shippingNoteInfos)
+						that.send(res1.data)
 					if(res1.data.length>0){
 						that.$helper.fUN_AmapLocation.start({
 								// intervalTime: 1000 * 60,
@@ -197,7 +276,7 @@
 								// console.log(this.$helper.gjList)
 								// console.log("条数", uni.getStorageSync('mapGJ').length)
 								if (uni.getStorageSync('mapGJ').length > 100) {
-									console.log(JSON.stringify(uni.getStorageSync('mapGJ')) )
+									console.log(JSON.stringify(uni.getStorageSync('mapGJ')))
 									this.$request.baseRequest('post', '/hyOrderTravelPath/api/addInfo',  {
 												orderId:"cdae6ec34c2349768c490a9fefa03fb3",
 												longitudeLatitude:JSON.stringify(uni.getStorageSync('mapGJ'))   

+ 2 - 2
config/index.js

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

+ 323 - 295
pages/goodSource/index.vue

@@ -1,7 +1,7 @@
 <!-- 货源 -->
 <template>
-	<view  @touchend="end" @touchmove="move" :class="{popupShow:isShowAlert}" class="content">
-<!-- 		<fh-no-network></fh-no-network> -->
+	<view @touchend="end" @touchmove="move" :class="{popupShow:isShowAlert}" class="content">
+		<!-- 		<fh-no-network></fh-no-network> -->
 		<view class="banner">
 			<image class="banner-img" src="@/static/images/goodSource/banner@2x.png" mode='widthFix'></image>
 			<view class="head flex s-row paddingr35">
@@ -33,7 +33,9 @@
 						}" :class="scrollTop>1200?'fixed':''"></u-tabs>
 			<view class="tab-right" @click="selectType">
 				<view>{{pickerSelect}}</view>
-				<image style='width:8px;height:8px;margin-left:5px;' :src="!showMenu?'../../static/images/order/xiala.png':'../../static/images/order/shangla.png'" mode=""></image>
+				<image style='width:8px;height:8px;margin-left:5px;'
+					:src="!showMenu?'../../static/images/order/xiala.png':'../../static/images/order/shangla.png'"
+					mode=""></image>
 				<!-- <u-icon name="arrow-down" size="20"></u-icon> -->
 			</view>
 		</view>
@@ -48,7 +50,9 @@
 							v-if="good.freightAdvance==1"></image>
 						<view class="flex align-center">
 							<view class="item1">
-								<view class="ssx">{{$helper.getProvinceAbbreviation(good.sendPrivate?good.sendPrivate:good.sendCity)}}</view>
+								<view class="ssx">
+									{{$helper.getProvinceAbbreviation(good.sendPrivate?good.sendPrivate:good.sendCity)}}
+								</view>
 								<view class="level2-title">{{$helper.filterUrban(good.sendCity)}}
 									{{$helper.filterArea(good.sendArea)}}
 								</view>
@@ -57,7 +61,9 @@
 							<image class="jt-icon item2" src="@/static/images/goodSource/jt.png" mode='widthFix'>
 							</image>
 							<view class="item3">
-								<view class="ssx">{{$helper.getProvinceAbbreviation(good.unloadPrivate?good.unloadPrivate:good.unloadCity)}}</view>
+								<view class="ssx">
+									{{$helper.getProvinceAbbreviation(good.unloadPrivate?good.unloadPrivate:good.unloadCity)}}
+								</view>
 								<view class="level2-title">{{$helper.filterUrban(good.unloadCity)}}
 									{{$helper.filterArea(good.unloadArea)}}
 								</view>
@@ -95,7 +101,7 @@
 						<view class="left flex row" @click.stop="cargoOwner(good)">
 							<u--image
 								:src="good.cargoOwnerPortrait?good.cargoOwnerPortrait:'../../static/images/mine/tx.png'"
-								width='100rpx' height='100rpx' shape="circle" >
+								width='100rpx' height='100rpx' shape="circle">
 							</u--image>
 							<view class="name">{{good.cargoOwnerName}}</view>
 							<!-- <view class="hp flex fontsize-24">
@@ -117,8 +123,8 @@
 		</mescroll-body>
 		<u-toast ref="uToast"></u-toast>
 		<u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :confirmText='confirmText'
-			:showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 5000)" @close="cancelClick"
-			@cancel="cancelClick"></u-modal>
+			:showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 5000)"
+			@close="cancelClick" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 <script>
@@ -135,7 +141,7 @@
 		mixins: [MescrollMixin], // 使用mixin
 		data() {
 			return {
-					confirmText: '确定',
+				confirmText: '确定',
 				showCancelButton: true,
 				isFirstIndex: null,
 				ObjSelect: {},
@@ -169,27 +175,30 @@
 				pickerSelect: '全部类型',
 				tabIndex: 0,
 				scrollTop: 0,
-				isdblclick:0,
+				isdblclick: 0,
 				count: 0,
 				lng: '',
 				lat: '',
 				bool: false,
-				showMenu:false
+				showMenu: false,
+				driverCommonId:"",
+				driverPhone:"",
+				driverName:""
 			}
 		},
 		onTabItemTap(e) {
 			this.isdblclick++
 			// tab 点击时执行,此处直接接收单击事件
-			if(this.scrollTop>1200){
-				if(this.isdblclick>1){
+			if (this.scrollTop > 1200) {
+				if (this.isdblclick > 1) {
 					uni.pageScrollTo({
 						scrollTop: 0,
 						duration: 300
 					});
 				}
-				
+
 			}
-			
+
 		},
 		created() {
 
@@ -197,20 +206,20 @@
 		computed: {
 			...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
 		},
-		watch:{
+		watch: {
 			// startPlace(){
 			// 	console.log(this.startPlace)
-   //              this.upCallback({page});
-   //          },
+			//              this.upCallback({page});
+			//          },
 		},
 		onLoad() {
 			this.checkOpenGPSServiceByAndroidIOS()
 		},
 		onHide() {
-			this.isdblclick=0
+			this.isdblclick = 0
 		},
 		onShow() {
-			if(this.scrollTop>1200){
+			if (this.scrollTop > 1200) {
 				uni.setTabBarItem({
 					index: 0,
 					text: '返回顶部',
@@ -224,10 +233,10 @@
 				iconPath: 'static/images/common/dingdan@2x(1).png',
 				selectedIconPath: 'static/images/common/dingdan@2x.png'
 			})
-			var that= this
-			setTimeout(()=>{
+			var that = this
+			setTimeout(() => {
 				// var photol=await permision.checkSystemEnableLocation()
-				if(uni.getStorageSync('confirm_location')){
+				if (uni.getStorageSync('confirm_location')) {
 					that.get_localtion_permission()
 				}
 				//获取上一次点击起装卸地
@@ -237,13 +246,16 @@
 				if (uni.getStorageSync('sPlaceObj')) {
 					that.endPlace = uni.getStorageSync('sPlaceObj');
 				}
-				that.upCallback({size:10,num:1})
-			},1500)
-			
+				that.upCallback({
+					size: 10,
+					num: 1
+				})
+			}, 1500)
+
 			that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
 				reCommonId: this.userInfo.id,
 			}).then(res3 => {
-				if (res3.data||res3.data==0) {
+				if (res3.data || res3.data == 0) {
 					let name = 'myTip';
 					let value = res3.data
 					if (value == 0) {
@@ -285,7 +297,7 @@
 		// 	// #endif
 
 		// },
-		
+
 		onPageScroll(res) {
 			this.scrollTop = res.scrollTop
 			// console.log("页面滚动了", res.scrollTop)
@@ -307,12 +319,12 @@
 
 		},
 		methods: {
-			stopRoll(){
-				
+			stopRoll() {
+
 			},
 			async get_localtion_permission() {
-				var photol=await permision.checkSystemEnableLocation()
-				if(photol == true){
+				var photol = await permision.checkSystemEnableLocation()
+				if (photol == true) {
 					uni.removeStorageSync('confirm_location')
 					// uni.showToast({
 					// 				title: '只有文字弹窗',
@@ -320,132 +332,134 @@
 					// 				duration: 2000    //持续时间为 2秒
 					// 			})  
 					this.getLngLat()
-				}else{
-					if(uni.getStorageSync('confirm_location')){
+				} else {
+					if (uni.getStorageSync('confirm_location')) {
 						uni.removeStorageSync('confirm_location')
-				}
-					uni.setStorageSync('fPlaceObj',{
-						fchoosearea:'全部',
-						fchoosecity:'市辖区',
-						fchooseprovince:'北京',
-						selected:'东城'
+					}
+					uni.setStorageSync('fPlaceObj', {
+						fchoosearea: '全部',
+						fchoosecity: '市辖区',
+						fchooseprovince: '北京',
+						selected: '东城'
 					})
-					uni.setStorageSync('sPlaceObj',{
-						schoosearea:'请选择区',
-						schoosecity:'请选择市',
-						schooseprovince:'全国',
-						selected:'全国'
+					uni.setStorageSync('sPlaceObj', {
+						schoosearea: '请选择区',
+						schoosecity: '请选择市',
+						schooseprovince: '全国',
+						selected: '全国'
 					})
-					uni.setStorageSync('longitudeAndLatitude','116.3972,39.9096')
+					uni.setStorageSync('longitudeAndLatitude', '116.3972,39.9096')
 				}
 			},
-			async getLngLat(){
+			async getLngLat() {
 				await uni.getLocation({
 					type: 'gcj02',
 					geocode: true,
 					success: res => {
 						if (res.latitude) {
-							if(res.address.city){
-								if(res.address.city.indexOf('市')!=-1){
-									res.address.city=res.address.city.substring(0,res.address.city.length-1)
+							if (res.address.city) {
+								if (res.address.city.indexOf('市') != -1) {
+									res.address.city = res.address.city.substring(0, res.address.city
+										.length - 1)
 								}
 							}
-							if(res.address.province){
-								if(res.address.province.indexOf('省')!=-1){
-									res.address.province=res.address.province.substring(0,res.address.province.length-1)
+							if (res.address.province) {
+								if (res.address.province.indexOf('省') != -1) {
+									res.address.province = res.address.province.substring(0, res.address
+										.province.length - 1)
 								}
 							}
-							uni.setStorageSync('fPlaceObj',{
-								fchoosearea:'全部',
-								fchoosecity:res.address.city,
-								fchooseprovince:res.address.province,
-								selected:res.address.city
+							uni.setStorageSync('fPlaceObj', {
+								fchoosearea: '全部',
+								fchoosecity: res.address.city,
+								fchooseprovince: res.address.province,
+								selected: res.address.city
 							})
-							uni.setStorageSync('sPlaceObj',{
-								schoosearea:'请选择区',
-								schoosecity:'请选择市',
-								schooseprovince:'全国',
-								selected:'全国'
+							uni.setStorageSync('sPlaceObj', {
+								schoosearea: '请选择区',
+								schoosecity: '请选择市',
+								schooseprovince: '全国',
+								selected: '全国'
 							})
-							uni.setStorageSync('longitudeAndLatitude',res.longitude+','+res.latitude)
-				}
-				}
+							uni.setStorageSync('longitudeAndLatitude', res.longitude + ',' + res.latitude)
+						}
+					}
 				})
 			},
 			checkOpenGPSServiceByAndroidIOS() {
-			    let system = uni.getSystemInfoSync(); // 获取系统信息
-			    // console.log(system);
-			    if (system.platform === 'android') { // 判断平台
-			        var context = plus.android.importClass("android.content.Context");
-			        var locationManager = plus.android.importClass("android.location.LocationManager");
-			        var main = plus.android.runtimeMainActivity();
-			        var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
-			        if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
-			            uni.showModal({
-			                title: '提示',
-			                content: '请打开定位服务功能',
-			                // showCancel: false, // 不显示取消按钮
-			                success(res) {
-								if(res.confirm){
-									uni.setStorageSync('confirm_location',1)
+				let system = uni.getSystemInfoSync(); // 获取系统信息
+				// console.log(system);
+				if (system.platform === 'android') { // 判断平台
+					var context = plus.android.importClass("android.content.Context");
+					var locationManager = plus.android.importClass("android.location.LocationManager");
+					var main = plus.android.runtimeMainActivity();
+					var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
+					if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
+						uni.showModal({
+							title: '提示',
+							content: '请打开定位服务功能',
+							// showCancel: false, // 不显示取消按钮
+							success(res) {
+								if (res.confirm) {
+									uni.setStorageSync('confirm_location', 1)
 									if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
-										
+
 										var Intent = plus.android.importClass('android.content.Intent');
 										var Settings = plus.android.importClass('android.provider.Settings');
 										var intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
 										main.startActivity(intent); // 打开系统设置GPS服务页面
 									} else {
-										uni.setStorageSync('fPlaceObj',{
-											fchoosearea:'全部',
-											fchoosecity:'市辖区',
-											fchooseprovince:'北京',
-											selected:'东城'
+										uni.setStorageSync('fPlaceObj', {
+											fchoosearea: '全部',
+											fchoosecity: '市辖区',
+											fchooseprovince: '北京',
+											selected: '东城'
 										})
-										uni.setStorageSync('sPlaceObj',{
-											schoosearea:'请选择区',
-											schoosecity:'请选择市',
-											schooseprovince:'全国',
-											selected:'全国'
+										uni.setStorageSync('sPlaceObj', {
+											schoosearea: '请选择区',
+											schoosecity: '请选择市',
+											schooseprovince: '全国',
+											selected: '全国'
 										})
-										uni.setStorageSync('longitudeAndLatitude','116.3972,39.9096')
+										uni.setStorageSync('longitudeAndLatitude', '116.3972,39.9096')
 									}
-								}else{
-									uni.setStorageSync('fPlaceObj',{
-										fchoosearea:'全部',
-										fchoosecity:'市辖区',
-										fchooseprovince:'北京',
-										selected:'东城'
+								} else {
+									uni.setStorageSync('fPlaceObj', {
+										fchoosearea: '全部',
+										fchoosecity: '市辖区',
+										fchooseprovince: '北京',
+										selected: '东城'
 									})
-									uni.setStorageSync('sPlaceObj',{
-										schoosearea:'请选择区',
-										schoosecity:'请选择市',
-										schooseprovince:'全国',
-										selected:'全国'
+									uni.setStorageSync('sPlaceObj', {
+										schoosearea: '请选择区',
+										schoosecity: '请选择市',
+										schooseprovince: '全国',
+										selected: '全国'
 									})
-									uni.setStorageSync('longitudeAndLatitude','116.3972,39.9096')
+									uni.setStorageSync('longitudeAndLatitude', '116.3972,39.9096')
 								}
-			                }
-			            });
-			        }else{
+							}
+						});
+					} else {
 						this.getLngLat()
 					}
-			    } else if (system.platform === 'ios') {
-			        // console.log("苹果");
-			        var cllocationManger = plus.ios.import("CLLocationManager");
-			        var enable = cllocationManger.locationServicesEnabled();
-			        var status = cllocationManger.authorizationStatus();
-			        plus.ios.deleteObject(cllocationManger);
-			        if (enable && status != 2) {
+				} else if (system.platform === 'ios') {
+					// console.log("苹果");
+					var cllocationManger = plus.ios.import("CLLocationManager");
+					var enable = cllocationManger.locationServicesEnabled();
+					var status = cllocationManger.authorizationStatus();
+					plus.ios.deleteObject(cllocationManger);
+					if (enable && status != 2) {
 						this.getLngLat()
-			            console.log("手机系统的定位已经打开");
-			        } else {
-			            console.log("手机系统的定位没有打开");
-			            uni.showModal({
-			                title: '提示',
-			                content: '请前往设置-隐私-定位服务打开定位服务功能',
-			                // showCancel: false, // 不显示取消按钮
-			                success(res) {
-								if(res.confirm){
+						console.log("手机系统的定位已经打开");
+					} else {
+						console.log("手机系统的定位没有打开");
+						uni.showModal({
+							title: '提示',
+							content: '请前往设置-隐私-定位服务打开定位服务功能',
+							// showCancel: false, // 不显示取消按钮
+							success(res) {
+								if (res.confirm) {
 									var UIApplication = plus.ios.import("UIApplication");
 									var application2 = UIApplication.sharedApplication();
 									var NSURL2 = plus.ios.import("NSURL");
@@ -460,72 +474,50 @@
 									plus.ios.deleteObject(application2);
 									this.getLngLat()
 								}
-			                }
-			            });
-			        }
-			    }
+							}
+						});
+					}
+				}
 			},
-			cargoOwner(_obj){
+			cargoOwner(_obj) {
 				// uni.$u.route('/pages/order/evaluateList');
 				// console.log("查看---------------",_obj)
-				uni.$u.route('/pages/goodSource/cargoOwnerSee',_obj)
+				uni.$u.route('/pages/goodSource/cargoOwnerSee', _obj)
 			},
 			mescrollInit(mescroll) {
 				this.mescroll = mescroll;
 			},
 			confirmClick() {
 				let item = this.ObjSelect
-				var that=this
-				this.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
-					driverPhone: this.userInfo.phone,
-				}).then(res2 => {
-					if(res2.data.authenticationStatus=='已过期'){
-						that.$refs.uToast.show({
-							type: 'error',
-							message: '证件已过期,请上传新证件!',
-						})
-						return
-					}else if(res2.data.authenticationStatus=='未认证'||res2.data.authenticationStatus=='已驳回'){
-						that.$refs.uToast.show({
-							type: 'error',
-							message: '请先完成司机认证!',
-						})
-						return
-					}
-					else if(res2.data.authenticationStatus=='审核中'){
-						that.$refs.uToast.show({
-							type: 'error',
-							message: '司机审核中!',
-						})
-						return
-					}
-					let _obj = {
-						driverCommonId: res2.data.commonId,
-						commonId: item.commonId,
-						compId:item.compId,
-						cargoOwnerName: item.cargoOwnerName,
-						cargoOwner: item.cargoOwner,
-						sendPrivate: item.sendPrivate,
-						sendCity: item.sendCity,
-						sendArea: item.sendArea,
-						sendDetailedAddress: item.sendDetailedAddress,
-						unloadPrivate: item.unloadPrivate,
-						unloadCity: item.unloadCity,
-						unloadArea: item.unloadArea,
-						unloadDetailedAddress: item.unloadDetailedAddress,
-						goodsName: item.goodsName,
-						distance: item.distance,
-						freightPrice: item.freightPrice,
-						driverName: res2.data.driverName,
-						driverPhone: res2.data.driverPhone,
-						cargoOwnerPhone: item.cargoOwnerPhone,
-						id:item.id,
-						billingMethod:item.billingMethod,
-						freightAdvance:item.freightAdvance,
-						goodsType:item.goodsType,
-						goodsTypeKey:item.goodsTypeKey
-					}
-					that.$request.baseRequest('post', '/publishTaskInfo/api/addOrder', _obj).then(res => {
+				var that = this
+
+				let _obj = {
+					driverCommonId: that.driverCommonId,
+					commonId: item.commonId,
+					compId: item.compId,
+					cargoOwnerName: item.cargoOwnerName,
+					cargoOwner: item.cargoOwner,
+					sendPrivate: item.sendPrivate,
+					sendCity: item.sendCity,
+					sendArea: item.sendArea,
+					sendDetailedAddress: item.sendDetailedAddress,
+					unloadPrivate: item.unloadPrivate,
+					unloadCity: item.unloadCity,
+					unloadArea: item.unloadArea,
+					unloadDetailedAddress: item.unloadDetailedAddress,
+					goodsName: item.goodsName,
+					distance: item.distance,
+					freightPrice: item.freightPrice,
+					driverName: that.driverName,
+					driverPhone: that.driverPhone,
+					cargoOwnerPhone: item.cargoOwnerPhone,
+					id: item.id,
+					billingMethod: item.billingMethod,
+					freightAdvance: item.freightAdvance,
+					goodsType: item.goodsType,
+					goodsTypeKey: item.goodsTypeKey
+				}
+				that.$request.baseRequest('post', '/publishTaskInfo/api/addOrder', _obj).then(res => {
 						if (res.code == 200) {
 							that.$refs.uToast.show({
 								type: 'success',
@@ -546,8 +538,8 @@
 					.catch(res => {
 						uni.$u.toast(res.message);
 					});
-				
-				});
+
+				// });
 				this.isShowAlert = false
 			},
 			cancelClick() {
@@ -608,16 +600,47 @@
 				return String(year) + String(mouth) + String(datetime)
 			},
 			grabOrders(item) {
-
-				this.isShowAlert = true
-				this.ObjSelect = item
-
+				let that = this
+				this.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
+					driverPhone: this.userInfo.phone,
+				}).then(res2 => {
+					debugger
+					if (res2.data.authenticationStatus == '已过期') {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: '证件已过期,请上传新证件!',
+						})
+						return
+					} else if (res2.data.authenticationStatus == '未认证' || res2.data.authenticationStatus ==
+						'已驳回') {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: '请先完成司机认证!',
+						})
+						return
+					} else if (res2.data.authenticationStatus == '审核中') {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: '司机审核中!',
+						})
+						return
+					} else if(res2.data.authenticationStatus == '已认证'){
+						this.driverCommonId = res2.data.commonId
+						this.driverPhone = res2.data.driverPhone
+						this.driverName = res2.data.driverName
+						this.isShowAlert = true
+						this.ObjSelect = item
+					}
+				})
 			},
 			confirmSelectType(val) {
 				this.pickerSelect = val.value[0]
-				
+
 				this.show = false
-				this.upCallback({size:10,num:1})
+				this.upCallback({
+					size: 10,
+					num: 1
+				})
 			},
 			selectTypeClose() {
 				this.show = false
@@ -630,7 +653,7 @@
 			// 	// uni.showLoading({
 			// 	// 	title: '获取定位信息'
 			// 	// })
-				
+
 			// 	uni.getLocation({
 			// 		type: 'gcj02',
 			// 		geocode: true,
@@ -674,7 +697,7 @@
 			// 					currentPage: 1,
 			// 					loadingPlaceCity: that.startPlace.fchoosecity,
 			// 					// unLoadingPlaceCity: this.endPlace.schoosecity
-							
+
 			// 				}
 			// 				that.$forceUpdate()
 			// 				// that.$set(that.startPlace,'selected',res.address.city)
@@ -696,7 +719,7 @@
 			// 							}else{
 			// 								that.goods=[]
 			// 							}
-										
+
 			// 						}
 			// 						uni.hideLoading()
 			// 					})
@@ -737,19 +760,19 @@
 			// 					});
 			// 				}
 			// 				uni.hideLoading()
-							
+
 			// 			}
 			// 		}
 			// 	});
 			// },
 			toDetail(id) {
-				var that=this
+				var that = this
 				that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
 					driverPhone: this.userInfo.phone,
 				}).then(res2 => {
 					// console.log('跳转',1111111)
 					uni.setStorageSync('firstAuthentication', res2.data)
-					that.firstAuthentication=uni.getStorageSync('firstAuthentication')
+					that.firstAuthentication = uni.getStorageSync('firstAuthentication')
 					// console.log(that.firstAuthentication)
 					//司机是否认证身份
 					// 保留uni.getStorageSync('firstAuthentication'),thisfirstAuthentication有缓存问题
@@ -772,7 +795,7 @@
 			},
 			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
 			upCallback(page) {
-				var that =this
+				var that = this
 				let _pickerSelect;
 				if (this.pickerSelect == '运费先付') {
 					_pickerSelect = 1
@@ -794,111 +817,113 @@
 				}
 				console.log(uni.getStorageSync('longitudeAndLatitude'))
 				// if (this.tabIndex == 2) {
-					if(uni.getStorageSync('longitudeAndLatitude')){
-						this.lng=uni.getStorageSync('longitudeAndLatitude').split(',')[0]
-						this.lat=uni.getStorageSync('longitudeAndLatitude').split(',')[1]
-					}
-						_data.driverLongitude = this.lng
-						_data.driverLatitude = this.lat
-						// }
-						console.log('------')
-						console.log(_data)
-						if (uni.getStorageSync('fPlaceObj')) {
-							if (this.startPlace.fchoosearea && this.startPlace.fchoosearea == '全部' && this.startPlace
-								.fchoosearea != '请选择区') {
-								// _data.loadingPlaceCity = this.startPlace.fchoosecity
-								if(this.startPlace.fchoosecity=='市辖区'){
-									_data.loadingPlaceCity = this.startPlace.fchooseprovince
-								}else{
-									_data.loadingPlaceCity = this.startPlace.fchoosecity
-								}
-							} else if (this.startPlace.fchoosecity == '全部') {
-								_data.loadingPlace = this.startPlace.selected
-							} else {
-								_data.loadingPlaceCity = this.startPlace.fchoosecity
-								_data.loadingPlace = this.startPlace.fchoosearea
-							}
-						
+				if (uni.getStorageSync('longitudeAndLatitude')) {
+					this.lng = uni.getStorageSync('longitudeAndLatitude').split(',')[0]
+					this.lat = uni.getStorageSync('longitudeAndLatitude').split(',')[1]
+				}
+				_data.driverLongitude = this.lng
+				_data.driverLatitude = this.lat
+				// }
+				console.log('------')
+				console.log(_data)
+				if (uni.getStorageSync('fPlaceObj')) {
+					if (this.startPlace.fchoosearea && this.startPlace.fchoosearea == '全部' && this.startPlace
+						.fchoosearea != '请选择区') {
+						// _data.loadingPlaceCity = this.startPlace.fchoosecity
+						if (this.startPlace.fchoosecity == '市辖区') {
+							_data.loadingPlaceCity = this.startPlace.fchooseprovince
 						} else {
 							_data.loadingPlaceCity = this.startPlace.fchoosecity
 						}
-						if (uni.getStorageSync('sPlaceObj')) {
-							if (this.endPlace.schoosearea && this.endPlace.schoosearea == '全部' && this.endPlace.schoosearea !=
-								'请选择区') {
-									if(this.endPlace.schoosecity=='市辖区'){
-										_data.unLoadingPlaceCity = this.endPlace.schooseprovince
-									}else{
-										_data.unLoadingPlaceCity = this.endPlace.schoosecity
-									}
-							} else if (this.endPlace.schoosearea) {
-								_data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
-							} else {
-								_data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
-								_data.unLoadingPlaceCity = this.endPlace.schoosecity
-							}
+					} else if (this.startPlace.fchoosecity == '全部') {
+						_data.loadingPlace = this.startPlace.selected
+					} else {
+						_data.loadingPlaceCity = this.startPlace.fchoosecity
+						_data.loadingPlace = this.startPlace.fchoosearea
+					}
+
+				} else {
+					_data.loadingPlaceCity = this.startPlace.fchoosecity
+				}
+				if (uni.getStorageSync('sPlaceObj')) {
+					if (this.endPlace.schoosearea && this.endPlace.schoosearea == '全部' && this.endPlace.schoosearea !=
+						'请选择区') {
+						if (this.endPlace.schoosecity == '市辖区') {
+							_data.unLoadingPlaceCity = this.endPlace.schooseprovince
 						} else {
-							_data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
+							_data.unLoadingPlaceCity = this.endPlace.schoosecity
 						}
-						if (this.lng) {
-							_data.longitude = this.lng
-							_data.latitude = this.lat
-						}
-						uni.showLoading({
-							mask: true,
-							title: '加载中'
-						})
-						console.log(_data)
-						this.$request.baseRequest('get', '/publishTaskInfo/selectGoodsSource', _data).then(res => {
-								uni.hideLoading()
-								if (res.code == 200) {
-									
-									if (page.num == 1) {
-										this.goods = [];
-										// this.otherGoods = []
-									};
-									if(res.data.records){
-										for(var i=0;i<res.data.records.length;i++){
-											if(res.data.records[i].cargoDistance){
-												if(res.data.records[i].cargoDistance>10){
-													res.data.records[i].cargoDistance=res.data.records[i].cargoDistance.toFixed(0)
-												}else{
-													res.data.records[i].cargoDistance=res.data.records[i].cargoDistance.toFixed(1)
-												}	
-											}
-											if(res.data.records[i].distance){
-												if(res.data.records[i].distance>10){
-													res.data.records[i].distance=res.data.records[i].distance.toFixed(0)
-												}else{
-													res.data.records[i].distance=res.data.records[i].distance.toFixed(1)
-												}
-												
-											}
+					} else if (this.endPlace.schoosearea) {
+						_data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
+					} else {
+						_data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
+						_data.unLoadingPlaceCity = this.endPlace.schoosecity
+					}
+				} else {
+					_data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
+				}
+				if (this.lng) {
+					_data.longitude = this.lng
+					_data.latitude = this.lat
+				}
+				uni.showLoading({
+					mask: true,
+					title: '加载中'
+				})
+				console.log(_data)
+				this.$request.baseRequest('get', '/publishTaskInfo/selectGoodsSource', _data).then(res => {
+						uni.hideLoading()
+						if (res.code == 200) {
+
+							if (page.num == 1) {
+								this.goods = [];
+								// this.otherGoods = []
+							};
+							if (res.data.records) {
+								for (var i = 0; i < res.data.records.length; i++) {
+									if (res.data.records[i].cargoDistance) {
+										if (res.data.records[i].cargoDistance > 10) {
+											res.data.records[i].cargoDistance = res.data.records[i].cargoDistance
+												.toFixed(0)
+										} else {
+											res.data.records[i].cargoDistance = res.data.records[i].cargoDistance
+												.toFixed(1)
 										}
 									}
-									this.mescroll.endBySize(res.data.records.length, res.data.total);
-									// for (var i = 0; i < res.data.records.length; i++) {
-									// 	res.data.records[i].cargoOwnerName1=
-									// }
-									 //如果是第一页需手动制空列表
-									if(res.data.records){
-										that.goods = that.goods.concat(res.data.records);
-										for (let i = 0; i < that.goods.length; i++) {
-											if (that.goods[i].peripheralInfo == 1) {
-												that.isFirstIndex = i
-												return
-											}
+									if (res.data.records[i].distance) {
+										if (res.data.records[i].distance > 10) {
+											res.data.records[i].distance = res.data.records[i].distance.toFixed(0)
+										} else {
+											res.data.records[i].distance = res.data.records[i].distance.toFixed(1)
 										}
-									}else{
-										that.goods=[]
+
 									}
-									
 								}
-							})
-							.catch(res => {
-								uni.hideLoading()
-								uni.$u.toast(res.message);
-								this.mescroll.endErr();
-							});
+							}
+							this.mescroll.endBySize(res.data.records.length, res.data.total);
+							// for (var i = 0; i < res.data.records.length; i++) {
+							// 	res.data.records[i].cargoOwnerName1=
+							// }
+							//如果是第一页需手动制空列表
+							if (res.data.records) {
+								that.goods = that.goods.concat(res.data.records);
+								for (let i = 0; i < that.goods.length; i++) {
+									if (that.goods[i].peripheralInfo == 1) {
+										that.isFirstIndex = i
+										return
+									}
+								}
+							} else {
+								that.goods = []
+							}
+
+						}
+					})
+					.catch(res => {
+						uni.hideLoading()
+						uni.$u.toast(res.message);
+						this.mescroll.endErr();
+					});
 			},
 			clickTab(val) {
 				this.tabIndex = val.index
@@ -951,6 +976,7 @@
 		height: 100vh;
 		width: 100%;
 	}
+
 	.content {
 		background: #F2F4F7;
 	}
@@ -959,9 +985,11 @@
 		width: 100%;
 		position: relative;
 	}
-.u-flex-wrap{
-	flex-wrap: wrap;
-}
+
+	.u-flex-wrap {
+		flex-wrap: wrap;
+	}
+
 	.fixed,
 	.fixed1 {
 		background: linear-gradient(97deg, #4FABFD 0%, #2772FB 100%);
@@ -1112,7 +1140,7 @@
 
 	.other-goods {
 		// background: red;
-		color:#999999;
+		color: #999999;
 		margin: 40rpx 0;
 		display: flex;
 		justify-content: center;

+ 2 - 1
pages/mine/driverCertification.vue

@@ -393,7 +393,7 @@
 						bankCard: '',
 						bankDeposit: '',
 						bankDepositBranch: '',
-						payeeName: ''
+						payeeName: '',
 					}],
 				},
 				keyShow: false,
@@ -714,6 +714,7 @@
 				)
 			},
 			uploadImg(type, index) {
+				console.log(index,"sdfjkahfi")
 				this.uploadType = type
 				// this.isShowimgType = true
 				// this.imgTypeSelect()

+ 13 - 1
pages/mine/driverCertificationNext.vue

@@ -86,12 +86,17 @@
 					<u--input maxlength='30' placeholder="请输入从业资格证号" inputAlign='right' border="none" v-model="dataDetails.qualificationCertificateNumber">
 					</u--input>
 				</view>
-
+				<view class="flex row ">
+					<view class="left-text">道路运输经营许可证号</view>
+					<u--input maxlength='30' placeholder="请输入道路运输经营许可证号" inputAlign='right' border="none" v-model="dataDetails.actualCarrierBusinessLicense">
+					</u--input>
+				</view>
 				<view class="flex row noborder">
 					<view class="left-text">通讯地址</view>
 					<u--textarea v-model="dataDetails.postalAddress" border="none"  placeholder="输入通讯地址" autoHeight  maxlength="30"></u--textarea>
 					<!-- <u--input placeholder="输入通讯地址" inputAlign='right' border="none" v-model="dataDetails.postalAddress"></u--input> -->
 				</view>
+				
 			</view>
 			
 			<view class="flex service align-center">
@@ -556,6 +561,13 @@
 				// 		return true
 				// 	}
 				// }
+				if (uni.$u.test.isEmpty(this.dataDetails.actualCarrierBusinessLicense)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "道路运输经营许可证号不能为空!",
+					})
+					return true
+				}
 				if (uni.$u.test.isEmpty(this.dataDetails.postalAddress)) {
 					this.$refs.uToast.show({
 						type: 'error',

+ 13 - 1
pages/mine/editDriverCertificationNext.vue

@@ -86,6 +86,11 @@
 					<u--input maxlength='19' placeholder="请输入从业资格证号" inputAlign='right' border="none" v-model="dataDetails.qualificationCertificateNumber">
 					</u--input>
 				</view>
+				<view class="flex row ">
+					<view class="left-text">道路运输经营许可证号</view>
+					<u--input maxlength='30' placeholder="请输入道路运输经营许可证号" inputAlign='right' border="none" v-model="dataDetails.actualCarrierBusinessLicense">
+					</u--input>
+				</view>
 				<view class="flex row noborder align-center">
 					<view class="left-text">通讯地址</view>
 					<u--textarea v-model="dataDetails.postalAddress" border="none"  placeholder="输入通讯地址" autoHeight  maxlength="30"></u--textarea>
@@ -578,7 +583,14 @@
 				// 		})
 				// 		return true
 				// 	}
-				// }
+				// }.
+				if (uni.$u.test.isEmpty(this.dataDetails.actualCarrierBusinessLicense)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "道路运输经营许可证号不能为空!",
+					})
+					return true
+				}
 				if (uni.$u.test.isEmpty(this.dataDetails.postalAddress)) {
 					this.$refs.uToast.show({
 						type: 'error',

+ 1 - 1
pages/mine/index1.vue

@@ -58,7 +58,7 @@
 			});
 		},
 		methods: {
-			auth() {	
+			auth() { 
 				//授权
 				var appId = "uni.UNI9C76CB6";//网络货运企业APP的唯一标识
 				var appSecurity = "24c593b7037347e08857a6ab05fd231b0509f5bb7cb741078f524f506ad32db8";//网络货运企业在省平台申请的接入安全码

+ 8 - 1
pages/mine/settings/editPassword.vue

@@ -13,7 +13,10 @@
 			</view>
 			<view style='border-bottom:1px solid #E8E9ED;padding:10px;position:relative;'>
 				<input class='password' style='height:30px;' v-model='password' placeholder="请输入新密码,6-16位字符" :type="type" value="" />
-				<view @click='switchover' style='position:absolute;right:0;top:38%;z-index:10;cursor:pointer;' class="iconfont " :class='type=="password"?"icon-yanjing-biyan":"icon-yanjing-zhengyan"'></view>
+				<view  style='position:absolute;right:0;top:38%;z-index:10;cursor:pointer;' class="iconfont ">
+					<image class='yanjingicon' style='width:22px;height:22px;margin-top: -10rpx;' @click='switchover' v-if="type=='password'" src="../../../static/yioncang.png" mode=""></image>
+					<image class='yanjingicon' style='width:22px;height:22px;margin-top: -10rpx;' @click='switchover' v-else src="../../../static/xianshi.png" mode=""></image>
+				</view>
 			</view>
 			<button :class='phone!=""&&verifyCode!=""&&password!=""?"active":""' @click='reset' class='verificationCode'>重置密码</button>
 		</view>
@@ -345,4 +348,8 @@
 		display:inline-block;
 		color:#2772FB;
 	}
+	.yanjingicon{
+		margin: 0;
+		justify-content: flex-end;
+	}
 </style>

+ 207 - 81
pages/order/confirmLoading.vue

@@ -110,7 +110,12 @@
 
 <script>
 	let that;
+	//插件对象
+	var sdkwx = uni.requireNativePlugin('Hdgq-LocSdkWX');
 	import uploadImage from '@/components/ossutil/uploadFile.js';
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		data() {
 			return {
@@ -138,20 +143,45 @@
 				keyShow: false,
 				carNumber: '',
 				gjList: [],
+				//网络货运信息定位
+				appId: "", //网络货运企业APP的唯一标识
+				appSecurity: "", //网络货运企业在省平台申请的接入安全码
+				enterpriseSenderCode: "23106960", //网络货运企业在省平台申请的企业发送代码
+				environment: "debug", //环境:“debug”接入测试环境,“release”接入正式环境。
+				shippingNoteInfos: [{
+					shippingNoteNumber: '',
+					serialNumber: "",
+					startCountrySubdivisionCode: "",
+					endCountrySubdivisionCode: "",
+					startLongitude: "",
+					startLatitude: "",
+					endLongitude: "",
+					endLatitude: "",
+					startLocationText: "",
+					endLocationText: "",
+					vehicleNumber: "",
+					driverName: "",
+					interval: "",
+				}],
+				timer:null
 			}
 		},
 		onLoad(options) {
-			if(!uni.getStorageSync('contractdata')){
+			let phoneType = uni.getSystemInfoSync().platform //判断手机类型
+			if (phoneType == "android") {
+				this.appId = "uni.UNI9C76CB6"
+				this.appSecurity = "24c593b7037347e08857a6ab05fd231b0509f5bb7cb741078f524f506ad32db8"
+			} else if (phoneType == "ios") {
+				this.appId = "uni.UNIDCD13AC"
+				this.appSecurity = "b01e4805276646eeb25f0fad91de97a4f32e8c2c0e0d42e5b24cc4737e9f040f"
+			}
+			if (!uni.getStorageSync('contractdata')) {
 				this.id = JSON.parse(decodeURIComponent(options.obj)).id
 				this.detailData.hyCarrierInfo.id = JSON.parse(decodeURIComponent(options.obj)).carrierId
 				this.cyId = JSON.parse(decodeURIComponent(options.obj)).carrierId
 				this.getInfo()
 			}
-			
-			
 			console.log(options)
-			
-			
 			// this.detailData = JSON.parse(options.obj) ;
 			// console.log(this.detailData)
 			// CYHT20220317000001
@@ -160,14 +190,17 @@
 			uni.removeStorageSync(
 				"contractdata")
 		},
-		onShow(){
-			if(uni.getStorageSync('contractdata')){
+		onShow() {
+			if (uni.getStorageSync('contractdata')) {
 				this.id = uni.getStorageSync('contractdata').id
 				this.detailData.hyCarrierInfo.id = uni.getStorageSync('contractdata').carrierId
 				this.cyId = uni.getStorageSync('contractdata').carrierId
 				this.getInfo()
 			}
 		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo', "firstAuthentication"])
+		},
 		methods: {
 			//确认装车提交成功后,开启实时定位,
 			// 调接口5分钟一次发送轨迹,[
@@ -188,7 +221,93 @@
 			// 	{latitude: 39.998968, longitude: 116.48367},
 			// 	{latitude: 39.999861, longitude: 116.484648}
 			// ]
-			// a(){},
+			auth() { //授权
+				// var appId = "uni.UNI9C76CB6";//网络货运企业APP的唯一标识
+				// var appSecurity = "24c593b7037347e08857a6ab05fd231b0509f5bb7cb741078f524f506ad32db8";//网络货运企业在省平台申请的接入安全码
+				// var enterpriseSenderCode = "23106960";//网络货运企业在省平台申请的企业发送代码
+				// var environment = "debug";//环境:“debug”接入测试环境,“release”接入正式环境。
+				console.log("appid:" + this.appId + "安全码:" + this.appSecurity + "发送代码:" + this.enterpriseSenderCode)
+				let that = this
+				sdkwx.auth(this.appId, this.appSecurity, this.enterpriseSenderCode, this.environment, function(res) {
+					if (res.type == "onSuccess") {
+						//成功
+						that.start()
+						console.log("授权成功")
+						console.log(res)
+					} else if (res.type == "onFailure") {
+						//失败
+						var errorCode = res.data.errorCode; //错误码
+						var errorMsg = res.data.errorMsg; //错误描述
+						console.log("授权失败")
+						console.log(res)
+					}
+					// uni.showModal({
+					// 	content: JSON.stringify(res)
+					// });
+				});
+			},
+			start() { //开启定位
+				//车牌号 //司机姓名 //备注 //运单信息列表
+				console.log(this.detailData,"行政区划分")
+				this.shippingNoteInfos[0].shippingNoteNumber = this.detailData.orderNo, //运单号
+					this.shippingNoteInfos[0].serialNumber = "0000", //分单号
+					this.shippingNoteInfos[0].startCountrySubdivisionCode = this.detailData.publishTaskInfo.sendAdCode, //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+					this.shippingNoteInfos[0].endCountrySubdivisionCode = this.detailData.publishTaskInfo.unsendAdCode, //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+					this.shippingNoteInfos[0].startLongitude = this.detailData.loadingLatitude, //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].startLatitude = this.detailData.loadingLatitude, //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].endLongitude = this.detailData.publishTaskInfo.unsendLongitude, //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].endLatitude = this.detailData.publishTaskInfo.unsendLatitude, //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].startLocationText = this.detailData.sendCity, //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].endLocationText = this.detailData.unloadCity, //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].vehicleNumber = this.detailData.carNumber, //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
+					this.shippingNoteInfos[0].driverName = this.detailData.driverName, //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
+					this.shippingNoteInfos[0].interval = "5000" //请求时间间隔,SDK 回调返 回(单位 ms)				 
+				//}],//运单信息列表,一辆车运单数最大支持数为 10
+					var remark = "测试";//备注
+					let that = this
+				sdkwx.start(this.detailData.carNo, this.firstAuthentication.driverName,remark, this.shippingNoteInfos, function(res) {
+					if (res.type == "onSuccess") {
+						//成功
+						console.log("开启定位成功!!!")
+						console.log(res)
+						var shippingNoteInfos = res.data; //运单信息列表
+						if(shippingNoteInfos && shippingNoteInfos.length >0 ){
+							console.log("开始定时")
+							that.timer = setInterval(() => {
+								console.log("定时")
+							    //TODO 
+								that.send()
+							}, shippingNoteInfos[0].interval+1000);
+						}
+					} else if (res.type == "onFailure") {
+						//失败
+						console.log("开启定位失败!!!")
+						console.log(res)
+						var errorCode = res.data.errorCode; //错误码
+						var errorMsg = res.data.errorMsg; //错误描述
+					}
+				});
+			},
+			send(){//发送定位
+				var remark = "测试";//备注
+				let that = this
+				console.log("成功!!!!!")
+				sdkwx.send(this.detailData.carNo, this.firstAuthentication.driverName,remark, this.shippingNoteInfos, function(res){
+					console.log('发送定位',res);
+					if (res.type == "onSuccess") {
+						//成功
+						var shippingNoteInfos = res.data;//运单信息列表
+						that.timer = setInterval(() => {
+						    //TODO 
+							that.send()
+						}, shippingNoteInfos[0].interval+1000);
+					} else if (res.type == "onFailure"){
+						//失败
+						var errorCode = res.data.errorCode;//错误码
+						var errorMsg = res.data.errorMsg;//错误描述
+					}
+				});	
+			},
 			toSignContract() {
 				console.log(this.detailData)
 				this.$request.baseRequest('get', '/orderInfo/getOrderInfo', {
@@ -211,7 +330,7 @@
 					id: this.id,
 				}).then(res => {
 					if (res.code == 200) {
-						
+
 						this.detailData = res.data
 						// #ifdef APP-PLUS
 						this.getLngLat();
@@ -220,21 +339,22 @@
 							orderId: this.detailData.id,
 						}).then(res => {
 							if (res.data) {
-								if(res.data.loadingImg){
-									var data=res.data.loadingImg.split(',')
-									this.imgList=res.data.loadingImg.split(',')
+								if (res.data.loadingImg) {
+									var data = res.data.loadingImg.split(',')
+									this.imgList = res.data.loadingImg.split(',')
 									for (var i = 0; i < data.length; i++) {
-										if(data[i]!=''){
-											this.fileList1.push({url:data[i]})
+										if (data[i] != '') {
+											this.fileList1.push({
+												url: data[i]
+											})
 										}
 									}
-									
 								}
 								console.log(this.fileList1)
 								this.detailData.carNo = res.data.carNo
 								this.detailData.loadingDate = res.data.loadingDate
-								if(res.data.loadingDate){
-									this.detailData.loadingDate1=res.data.loadingDate.split(' ')[0]
+								if (res.data.loadingDate) {
+									this.detailData.loadingDate1 = res.data.loadingDate.split(' ')[0]
 								}
 								this.detailData.weight = res.data.loadingWeight
 								this.detailData.freight = res.data.estimatedFreight
@@ -288,47 +408,45 @@
 				this.detailData.hyCarrierInfo.carNo = e.value //键盘输入值
 			},
 			checkOpenGPSServiceByAndroidIOS() {
-			    let system = uni.getSystemInfoSync(); // 获取系统信息
-			    if (system.platform === 'android') { // 判断平台
-			        var context = plus.android.importClass("android.content.Context");
-			        var locationManager = plus.android.importClass("android.location.LocationManager");
-			        var main = plus.android.runtimeMainActivity();
-			        var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
-					console.log(mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER))
-			        if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
-			            uni.showModal({
-			                title: '提示',
-			                content: '请打开定位服务功能',
-			                // showCancel: false, // 不显示取消按钮
-			                success(res) {
-								if(res.confirm){
+				let system = uni.getSystemInfoSync(); // 获取系统信息
+				if (system.platform === 'android') { // 判断平台
+					var context = plus.android.importClass("android.content.Context");
+					var locationManager = plus.android.importClass("android.location.LocationManager");
+					var main = plus.android.runtimeMainActivity();
+					var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
+					if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
+						uni.showModal({
+			  		title: '提示',
+							content: '请打开定位服务功能',
+							// showCancel: false, // 不显示取消按钮
+							success(res) {
+								if (res.confirm) {
 									if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
-										
 										var Intent = plus.android.importClass('android.content.Intent');
 										var Settings = plus.android.importClass('android.provider.Settings');
 										var intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
 										main.startActivity(intent); // 打开系统设置GPS服务页面
-									} 
+									}
 								}
-			                }
-			            });
-			        }
-			    } else if (system.platform === 'ios') {
-			        // console.log("苹果");
-			        var cllocationManger = plus.ios.import("CLLocationManager");
-			        var enable = cllocationManger.locationServicesEnabled();
-			        var status = cllocationManger.authorizationStatus();
-			        plus.ios.deleteObject(cllocationManger);
-			        if (enable && status != 2) {
-			            console.log("手机系统的定位已经打开");
-			        } else {
-			            console.log("手机系统的定位没有打开");
-			            uni.showModal({
-			                title: '提示',
-			                content: '请前往设置-隐私-定位服务打开定位服务功能',
-			                // showCancel: false, // 不显示取消按钮
-			                success(res) {
-								if(res.confirm){
+							}
+						});
+					}
+				} else if (system.platform === 'ios') {
+					// console.log("苹果");
+					var cllocationManger = plus.ios.import("CLLocationManager");
+			 	var enable = cllocationManger.locationServicesEnabled();
+					var status = cllocationManger.authorizationStatus();
+					plus.ios.deleteObject(cllocationManger);
+					if (enable && status != 2) {
+						console.log("手机系统的定位已经打开");
+					} else {
+						console.log("手机系统的定位没有打开");
+						uni.showModal({
+							title: '提示',
+							content: '请前往设置-隐私-定位服务打开定位服务功能',
+							// showCancel: false, // 不显示取消按钮
+							success(res) {
+								if (res.confirm) {
 									var UIApplication = plus.ios.import("UIApplication");
 									var application2 = UIApplication.sharedApplication();
 									var NSURL2 = plus.ios.import("NSURL");
@@ -342,14 +460,14 @@
 									plus.ios.deleteObject(NSURL2);
 									plus.ios.deleteObject(application2);
 								}
-			                }
-			            });
-			        }
-			    }
+							}
+						});
+					}
+				}
 			},
 			getLngLat() {
 				this.checkOpenGPSServiceByAndroidIOS()
-				var that=this
+				var that = this
 				uni.showLoading({
 					title: '获取定位中',
 					mask: true
@@ -385,19 +503,20 @@
 					geocode: true,
 					success: res => {
 						if (res.latitude) {
-							
-							that.detailData.hyCarrierInfo.longitudeLatitude=res.longitude+','+res.latitude
+							that.detailData.hyCarrierInfo.longitudeLatitude = res.longitude + ',' + res
+								.latitude
 							that.detailData.hyCarrierInfo.loadingAreaLongitude = res.longitude;
 							that.detailData.hyCarrierInfo.loadingAreaLatitude = res.latitude;
 							that.detailData.hyCarrierInfo.sendCity = that.$helper.filterUrban(res.address.city)
 							that.localtion.city = that.$helper.filterUrban(res.address.city)
-							that.$set(that.detailData,'loadingArea',that.$helper.filterUrban(res.address.district))
-							that.$set(that.detailData,'loadingCity',that.$helper.filterUrban(res.address.city))
+							that.$set(that.detailData, 'loadingArea', that.$helper.filterUrban(res.address
+								.district))
+							that.$set(that.detailData, 'loadingCity', that.$helper.filterUrban(res.address
+								.city))
 							that.localtion.sendArea = that.$helper.filterUrban(res.address.district)
 							// .loadingCity = that.$helper.filterUrban(res.address.city)
 							that.detailData.loadingLongitude = res.longitude;
 							that.detailData.loadingLatitude = res.latitude;
-							console.log(res,that.detailData,22222)
 							that.$forceUpdate()
 							uni.hideLoading()
 						} else {
@@ -431,7 +550,6 @@
 										}
 									}
 								});
-								
 								uni.hideLoading()
 							}
 						}
@@ -440,7 +558,6 @@
 						console.log('定位失败')
 						console.log(res)
 						uni.hideLoading()
-
 					}
 				});
 
@@ -487,7 +604,6 @@
 						// 上传成功回调函数
 						console.log('图片地址', result)
 						this.imgList.push(result)
-
 					}
 				)
 			},
@@ -514,6 +630,7 @@
 					}
 					this.alertTitle = '确定提交装车信息?'
 				}
+
 				if (this.validate()) return
 				this.isShowAlert = true
 				this.detailData.statusFlag = type
@@ -563,8 +680,7 @@
 					})
 					return true
 				}
-			
-				if(this.imgList.length == 0){
+				if (this.imgList.length == 0) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "装车照片不能为空!",
@@ -574,7 +690,7 @@
 			},
 			confirmClick() {
 				uni.removeStorageSync('contractdata')
-				var that=this
+				var that = this
 				this.isShowAlert = false
 				//1暂存
 				if (this.detailData.statusFlag == 1) {
@@ -599,16 +715,17 @@
 				if (m < 10) {
 					m = "0" + m
 				}
-				var data={
-					loadingImg:this.imgList.toString(),
-					statusFlag:this.detailData.statusFlag,
-					loadingDate:this.detailData.hyCarrierInfo.loadingDate.split(" ")[0] + " " + h + ":" + f + ":" + m,
-					loadingArea:this.detailData.loadingArea,
-					loadingCity:this.detailData.loadingCity,
-					loadingLongitude:this.detailData.loadingLongitude,
-					loadingLatitude:this.detailData.loadingLatitude,
-					id:this.detailData.hyCarrierInfo.id
+				var data = {
+					loadingImg: this.imgList.toString(),
+					statusFlag: this.detailData.statusFlag,
+					loadingDate: this.detailData.hyCarrierInfo.loadingDate.split(" ")[0] + " " + h + ":" + f + ":" + m,
+					loadingArea: this.detailData.loadingArea,
+					loadingCity: this.detailData.loadingCity,
+					loadingLongitude: this.detailData.loadingLongitude,
+					loadingLatitude: this.detailData.loadingLatitude,
+					id: this.detailData.hyCarrierInfo.id
 				}
+				
 				// console.log("查看id--------",this.detailData.hyCarrierInfo.id)
 				this.$request.baseRequest('post', '/carrierInfo/loadingAdd', data).then(res => {
 						if (res.code == 200) {
@@ -617,6 +734,7 @@
 							if (this.detailData.statusFlag == 1) {
 								_title = '暂存成功!'
 							} else {
+								that.auth() //开始授权并开始定位
 								_title = '提交成功!'
 							}
 							that.$helper.fUN_AmapLocation.start({
@@ -646,16 +764,24 @@
 										city: res.city,
 										area: res.district
 									}
+									if(this.shippingNoteInfos && this.shippingNoteInfos.length > 0){//更新持续定位经纬度
+										for(let i= 0;i<this.shippingNoteInfos.length;i++){
+											this.shippingNoteInfos[i].startLatitude = _data.latitude //纬度
+											this.shippingNoteInfos[i].startLocationText = _data.city //起点
+											this.shippingNoteInfos[i].startLongitude = _data.longitude //经度
+										}
+									}
 									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:that.id,
-													longitudeLatitude:JSON.stringify(uni.getStorageSync('mapGJ'))   
+										// console.log(JSON.stringify(uni.getStorageSync('mapGJ')))
+										// that.send()
+										this.$request.baseRequest('post', '/hyOrderTravelPath/api/addInfo', {
+												orderId: that.id,
+												longitudeLatitude: JSON.stringify(uni.getStorageSync('mapGJ'))
 											}).then(res => {
 												uni.removeStorageSync('mapGJ');
 												this.$helper.gjList = []

+ 51 - 3
pages/order/confirmUnloading.vue

@@ -1,4 +1,4 @@
-<!-- 确认车 -->
+<!-- 确认车 -->
 <template>
 	<view class="content">
 		<view class="content2">
@@ -89,7 +89,8 @@
 		<!--<u- picker :show="isShowValidity" :defaultIndex='defaultIndex' ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 			:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
 		</u-picker> -->
-		<itmister-date-picker :dateStatus="0" ref="dateEl" :endDate="array" :startYear="1999"  
+		<!-- :endDate="array" -->
+		<itmister-date-picker :dateStatus="0" ref="dateEl"  :startYear="1999"  
 		:futureYear="30" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 		<u-toast ref="uToast"></u-toast>
 	</view>
@@ -98,6 +99,8 @@
 <script>
 	let that;
 	import uploadImage from '@/components/ossutil/uploadFile.js';
+	//插件对象
+	var sdkwx = uni.requireNativePlugin('Hdgq-LocSdkWX');
 	export default {
 		data() {
 			return {
@@ -120,11 +123,26 @@
 				alertContent: '',
 				alertTitle: '',
 				localtion:{},
+				shippingNoteInfos: [{
+					shippingNoteNumber: '',
+					serialNumber: "",
+					startCountrySubdivisionCode: "",
+					endCountrySubdivisionCode: "",
+					startLongitude: "",
+					startLatitude: "",
+					endLongitude: "",
+					endLatitude: "",
+					startLocationText: "",
+					endLocationText: "",
+					vehicleNumber: "",
+					driverName: "",
+					interval: "",
+				}],
 			}
 		},
 		onLoad(options) {
 			this.detailData = JSON.parse(options.obj)
-			console.log(this.detailData)
+			console.log(this.detailData,"编号编号焦点方式规范化见到过")
 			this.fileList1=[]
 			this.fileList2=[]
 			if(this.detailData.hyCarrierInfo.unloadingImg){
@@ -171,6 +189,34 @@
 			this.getNowTime()
 		},
 		methods: {
+			stop(){//结束定位
+				this.shippingNoteInfos[0].shippingNoteNumber = this.detailData.orderNo, //运单号
+					this.shippingNoteInfos[0].serialNumber = "0000", //分单号
+					this.shippingNoteInfos[0].startCountrySubdivisionCode = this.detailData.sendAdCode, //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+					this.shippingNoteInfos[0].endCountrySubdivisionCode = this.detailData.unsendAdCode, //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+					this.shippingNoteInfos[0].startLongitude = this.detailData.sendLongitude, //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].startLatitude = this.detailData.sendLatitude, //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].endLongitude = this.detailData.unsendLongitude, //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].endLatitude = this.detailData.unsendLatitude, //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].startLocationText = this.detailData.sendCity, //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].endLocationText = this.detailData.unloadCity, //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].vehicleNumber = this.detailData.carNumber, //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
+					this.shippingNoteInfos[0].driverName = this.detailData.driverName, //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
+					this.shippingNoteInfos[0].interval = "5000" //请求时间间隔,SDK 回调返 回(单位 ms)
+				// var shippingNoteInfos = this.shippingNoteInfos;//运单信息列表
+				let remark = ""
+				sdkwx.stop(this.detailData.carNumber, this.detailData.driverName, remark, this.shippingNoteInfos, function(res) {
+					if (res.type == "onSuccess") {
+						console.log("结束成功!!!",res)
+						//成功
+					} else if (res.type == "onFailure"){
+							console.log("结束成功!!!",res)
+						//失败
+						var errorCode = res.data.errorCode;//错误码
+						var errorMsg = res.data.errorMsg;//错误描述
+					}	
+				});			
+			},
 			deletePic(event) {
 				console.log(this[`fileList${event.name}`])
 				this[`fileList${event.name}`].splice(event.index, 1)
@@ -465,6 +511,7 @@
 				uni.showLoading({
 					title:'加载中'
 				})
+			
 				let time = new Date() //卸车时间   去当前时间的时分秒
 				let h = time.getHours();
 				if (h < 10) {
@@ -489,6 +536,7 @@
 							if (this.detailData.statusFlag == 1) {
 								_title = '暂存成功!'
 							} else {
+								that.stop()
 								_title = '提交成功!'
 							}
 							uni.hideLoading()

+ 40 - 18
pages/public/register.vue

@@ -9,26 +9,38 @@
 				<view style='width:85%;'>
 					<!-- <u-input border="none" maxlength="11" v-model='phone' @input='phoneinput' style='padding-left:10px;'
 						placeholder="请输入手机号码" type="number" class="Regular" /> -->
-					<input placeholder-style="color:#AFB3BF" border="none" maxlength="11" v-model='phone' @input='phoneinput' style='padding-left:10px;'
-							placeholder="请输入手机号码" type="number" class="Regular" />
+					<input placeholder-style="color:#AFB3BF" border="none" maxlength="11" v-model='phone'
+						@input='phoneinput' style='padding-left:10px;' placeholder="请输入手机号码" type="number"
+						class="Regular" />
 				</view>
 				<!-- <image v-if='phone!=""' @click='phone=""' class='close' src='../../static/img/login/guanbi@2x.png'></image> -->
 			</view>
 			<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
 				<view style='width:70%;position:relative;'>
-				<!-- 	<u-input border="none" v-model='verifyCode' class="Regular" placeholder="请输入验证码" type="number" maxlength="6" />
+					<!-- 	<u-input border="none" v-model='verifyCode' class="Regular" placeholder="请输入验证码" type="number" maxlength="6" />
 					 -->
-					<input placeholder-style="color:#AFB3BF" border="none" maxlength="6" v-model='verifyCode'  style='padding-left:10px;'
-							placeholder="请输入验证码" type="number" class="Regular" /><!-- <image v-if='verifyCode' @click='verifyCode=""' class='close1' src='../../static/img/login/guanbi@2x.png'></image> -->
+					<input placeholder-style="color:#AFB3BF" border="none" maxlength="6" v-model='verifyCode'
+						style='padding-left:10px;' placeholder="请输入验证码" type="number" class="Regular" />
+					<!-- <image v-if='verifyCode' @click='verifyCode=""' class='close1' src='../../static/img/login/guanbi@2x.png'></image> -->
 				</view>
 				<button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
 					class='getcode Regular'>{{sendText}}</button>
 			</view>
-			<view style='border-bottom:1px solid #E8E9ED;padding:10px;position:relative;'>
-				<!-- <u-input border="none" maxlength='16' class='Regular input-style' style='height:30px;'
-					v-model='password' placeholder="请输入密码,6-16位字符" :type="type" /> -->
-				<input placeholder-style="color:#AFB3BF" border="none" maxlength="16" v-model='password' style='padding-left:10px;'
-							placeholder="请输入密码,6-16位字符" :type="type" class="Regular input-style" />
+			<view style='border-bottom:1px solid #E8E9ED;padding:10px;position:relative;display: flex;'>
+				<!-- <u-input placeholder-style="color:#AFB3BF" border="none" maxlength="16" v-model='password' style='padding-left:10px;'
+							placeholder="请输入密码,6-16位字符" :type="type" class="Regular input-style" /> -->
+				<input placeholder-style="color:#AFB3BF" class='password' v-model='password'
+					v-if="isShowPassword=='password'" placeholder="请输入密码" type="password">
+				<input maxlength='16' placeholder-style="color:#AFB3BF" class='password' v-model='password' v-else
+					type="text" placeholder="请输入密码">
+				<view style="width: 50%;text-align: right;">
+					<image class='yanjingicon' style='width:22px;height:22px;' @click="passWordStatus(1)"
+						v-if="isShowPassword=='password'" src="../../static/yioncang.png" mode=""></image>
+					<image class='yanjingicon' style='width:22px;height:22px;' @click="passWordStatus(2)" v-else
+						src="../../static/xianshi.png" mode=""></image>
+				</view>
+
+
 				<!-- 				<input maxlength='16' class='password Regular input-style' style='height:30px;' v-model='password' placeholder="请输入密码,6-16位字符" :type="type"> -->
 				<!-- <image v-if='password!=""' @click='password=""' class='close2' src='../../static/img/login/guanbi@2x.png'></image> -->
 				<!-- <view @click='switchover' style='position:absolute;right:0;top:38%;z-index:10;cursor:pointer;' class="iconfont " :class='type=="password"?"icon-yanjing-biyan":"icon-yanjing-zhengyan"'></view> -->
@@ -98,7 +110,8 @@
 				sendDisabled: false,
 				system: '',
 				platform: '',
-				canIUseProfile: false
+				canIUseProfile: false,
+				isShowPassword: "password"
 			}
 		},
 		onShow() {
@@ -125,6 +138,13 @@
 			// })
 		},
 		methods: {
+			passWordStatus(type) {
+				if (type == 1) {
+					this.isShowPassword = 'text'
+				} else {
+					this.isShowPassword = 'password'
+				}
+			},
 			// 随机数
 			randomAccess(min, max) {
 				return Math.floor(Math.random() * (min - max) + max)
@@ -155,13 +175,13 @@
 			phoneinput(e) {
 				if (e.detail.value.length == 11) {
 					this.codestatus = true
-				}else{
+				} else {
 					this.codestatus = false
 				}
 			},
 			getcode() {
 				var that = this
-				if(that.sendText != "获取验证码"){
+				if (that.sendText != "获取验证码") {
 					return
 				}
 				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.phone)) {
@@ -262,8 +282,8 @@
 						password: this.password,
 						verifyCode: this.verifyCode,
 						userName: username,
-						identification:1,//司机标识
-						avatarUrl:"https://taohaoliang.oss-cn-beijing.aliyuncs.com/appData/1656724567954127.png"//司机默认头像
+						identification: 1, //司机标识
+						avatarUrl: "https://taohaoliang.oss-cn-beijing.aliyuncs.com/appData/1656724567954127.png" //司机默认头像
 					}).then(res => {
 						if (res.code == '11003') {
 							uni.showToast({
@@ -288,11 +308,13 @@
 									phone: this.phone,
 									password: this.password,
 									loginFlag: 2,
-									identification:1  //司机标识
+									identification: 1 //司机标识
 								}).then(res => {
 									if (res.code == 200) {
-										uni.setStorageSync("shiro",encodeURIComponent(`ws_login_companyShortName=
-										'黑龙江中天昊元贸易有限公司'; ws_login_rememberMe=1; ws_login_account=${that.phone}; ws_login_pwd=${that.password}; shiro.session=65500189-7bb5-457f-9ff6-0db069150e78`))
+										uni.setStorageSync("shiro", encodeURIComponent(
+											`ws_login_companyShortName=
+										'黑龙江中天昊元贸易有限公司'; ws_login_rememberMe=1; ws_login_account=${that.phone}; ws_login_pwd=${that.password}; shiro.session=65500189-7bb5-457f-9ff6-0db069150e78`
+										))
 										// // pc登录
 										// that.$request.baseRequest('post', '/commonUser/api/loginQuickly', {
 										// 	mobilePhone: this.phone,