zhongtianhaoyuan 2 vuotta sitten
vanhempi
commit
184ff90144

+ 4 - 4
App.vue

@@ -83,7 +83,7 @@
 							if (shippingNoteInfos) {
 								let dateTtime = Number(shippingNoteInfos.interval + 60000)
 								console.log("开始定时", dateTtime)
-								that.timer = setInterval(() => {
+								that.timer = setTimeout(() => {
 									console.log("定时")
 									that.send()
 								}, dateTtime);
@@ -94,7 +94,7 @@
 							console.log(res)
 							var errorCode = res.data.errorCode; //错误码
 							var errorMsg = res.data.errorMsg; //错误描述
-							that.timer = setInterval(() => { //失败也需要定时发送定位
+							that.timer = setTimeout(() => { //失败也需要定时发送定位
 								console.log("定时")
 								that.send()
 							}, 915204); //15分钟
@@ -115,7 +115,7 @@
 							if (shippingNoteInfos) {
 								let dateTime = Number(shippingNoteInfos.interval + 1000)
 								console.log("定时开始", dateTime)
-								that.timer = setInterval(() => {
+								that.timer = setTimeout(() => {
 									//TODO 
 									that.send()
 								}, dateTime);
@@ -126,7 +126,7 @@
 							var errorCode = res.data.errorCode; //错误码
 							var errorMsg = res.data.errorMsg; //错误描述
 							console.log("定时开始", "915204")
-							that.timer = setInterval(() => { //失败也需要定时上传定位(为了解决频繁调用接口问题)
+							that.timer = setTimeout(() => { //失败也需要定时上传定位(为了解决频繁调用接口问题)
 								that.send()
 							}, 915204);
 						}

+ 1 - 1
pages/mine/fleet/bindingCarCaptain.vue

@@ -7,7 +7,7 @@
 			<view class="fleetInfo_phone">{{fleetInfo.status?fleetInfo.status:"未绑定"}}</view>
 		</view>
 		<view class="btn_css" v-if="fleetInfo.status != '待确认'">
-			<view class="btn_item" v-if="!fleetInfo||fleetInfo.status=='已拒绝'">
+			<view class="btn_item" v-if="!fleetInfo.status||fleetInfo.status=='已拒绝'|| fleetInfo.status=='未绑定'">
 				<u-button type="primary" text="去绑定" @click="operation"></u-button>
 			</view>
 			<view class="btn_item" v-else>

+ 78 - 26
pages/mine/fleet/fleetBill.vue

@@ -3,7 +3,7 @@
 	<view class="center">
 		<view class="list_css" v-for="(item,index) in dataList">
 			<view class="list_css_item_top">
-				<view class="list_css_left">{{item.orderNo}}</view>
+				<view class="list_css_left">{{index}}{{item.orderNo}}</view>
 				<view class="list_css_right">{{item.payeeName}} 承运</view>
 			</view>
 			<view class="list_css_item_middle">
@@ -15,6 +15,9 @@
 			</view>
 			<u-divider></u-divider>
 		</view>
+		<view>
+			<u-loadmore :status="loadStatus" />
+		</view>
 	</view>
 </template>
 
@@ -22,39 +25,81 @@
 	import {
 		mapState
 	} from 'vuex';
-	export default{
-		data(){
-			return{
-				dataList:[]
-				
+	export default {
+		data() {
+			return {
+				//分页
+				currentPage: 1,
+				pageSize: 10,
+				dataList: [],
+				loadStatus: "",
+				isLoadMore: false
 			}
 		},
 		onLoad() {
 			this.getList()
 		},
-		onShow() {
-			
+		onShow() {},
+		//下拉刷新
+		onPullDownRefresh() {
+			this.currentPage = 1
+			this.isLoadMore = false
+			this.loadStatus = 'loading'
+			this.getList()
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		onReachBottom() { //上拉触底函数
+			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+				this.isLoadMore = true
+				this.currentPage += 1
+				this.getList()
+			}
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 		},
-		methods:{
-			getList(){
+		methods: {
+			getList() {
+				uni.showLoading({
+					title: '加载中',
+					mask: true
+				})
 				this.$request.baseRequest('get', '/hyFreightSettlementInfo/selectFleetCaptainBill', {
-					carCaptainCommonId:this.userInfo.id,
-					pageSize: 10,
-					currentPage: 1
-				}).then(res => {
+						carCaptainCommonId: this.userInfo.id,
+						pageSize: this.pageSize,
+						currentPage: this.currentPage
+					}).then(res => {
 						if (res.code == 200) {
-							if(res.data){
+							if (res.data.records.length > 0) {
+								this.isLoadMore = false
+								this.loadStatus = 'loadmore'
+							} else {
+								this.isLoadMore = true
+								this.loadStatus = 'nomore'
+							}
+							if (this.currentPage == 1) {
 								this.dataList = res.data.records
-								for(let i = 0;i<this.dataList.length;i++){
-									if(this.dataList[i].bankCard){
-										this.dataList[i].bankNo = this.dataList[i].bankCard.substr(this.dataList[i].bankCard.length - 4)
+								if (res.data.records.length < 10) {
+									this.loadStatus = 'nomore'
+								}
+							} else {
+								this.dataList = this.dataList.concat(res.data.records)
+							}
+							if (this.dataList.length > 0) {
+								for (let i = 0; i < this.dataList.length; i++) {
+									if (this.dataList[i].bankCard) {
+										this.dataList[i].bankNo = this.dataList[i].bankCard.substr(this.dataList[i]
+											.bankCard.length - 4)
 									}
 								}
 							}
+
+
+							uni.hideLoading()
 						} else {
+							uni.hideLoading()
 							uni.$u.toast(res.message);
 						}
 					})
@@ -63,27 +108,34 @@
 						uni.$u.toast(res.message);
 					});
 			},
-			
-			
+
+
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.center{
+	.center {
 		padding: 20rpx 30rpx;
-		
+
 	}
-	.list_css{
+
+	.list_css {
 		margin-top: 20rpx;
-		.list_css_item_middle,.list_css_item_top,.list_css_item_lower{
+
+		.list_css_item_middle,
+		.list_css_item_top,
+		.list_css_item_lower {
 			display: flex;
 			margin-bottom: 20rpx;
 		}
-		.list_css_right,.list_css_left{
+
+		.list_css_right,
+		.list_css_left {
 			width: 50%;
 		}
-		.list_css_right{
+
+		.list_css_right {
 			text-align: right;
 		}
 	}

+ 117 - 30
pages/mine/fleet/fleetManage.vue

@@ -7,7 +7,7 @@
 			<view class="fleetInfo_phone" v-else>去认证</view>
 		</view>
 		<view class="btn_css">
-			<view class="btn_item" v-if="!fleetInfo">
+			<view class="btn_item" v-if="!fleetInfo.name">
 				<u-button type="primary" text="去认证" @click="operation(1)"></u-button>
 			</view>
 			<view class="btn_item" v-else>
@@ -15,22 +15,34 @@
 			</view>
 		</view>
 		<u-divider></u-divider>
+		<view class="tips_info">
+			<span>绑定司机</span>
+			<image class='yanjingicon' @click="changeStatus(1)" v-if="isShow == 2" src="../../../static/yioncang.png">
+			</image>
+			<image class='yanjingicon' @click="changeStatus(2)" v-if="isShow == 1" src="../../../static/xianshi.png">
+			</image>
+			<!-- <u--image :showLoading="true" src="../../../static/yioncang.png" width="80px" height="80px" @click="click"></u--image> -->
+		</view>
 		<view class="list_css" v-for="(item,index) in formList">
 			<view class="list_left">{{item.driverName}}({{item.accountNumber}})</view>
 			<view class="list_right">
 				<view class="list_text" v-if="item.status == '待确认'" @click="audit(item,1)">拒绝</view>
 				<view class="list_text" v-if="item.status == '待确认'" @click="audit(item,2)">接受</view>
-				<view class="list_text" v-if="item.status == '已绑定'||item.status == '已解绑'||item.status == '已接受'||item.status == '已拒绝'">{{item.status}}</view>
+				<view class="list_text"
+					v-if="item.status == '已绑定'||item.status == '已解绑'||item.status == '已接受'||item.status == '已拒绝'">
+					{{item.status}}</view>
 				<view class="list_text"
 					v-if="item.status == '已绑定'||item.status == '已解绑'||item.status == '已接受'||item.status == '已拒绝'"
 					@click="next(item)">删除</view>
 			</view>
 		</view>
+		<view>
+			<u-loadmore :status="loadStatus" />
+		</view>
 		<u-toast ref="uToast"></u-toast>
 		<u-modal :show="tipsShow" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true'
 			confirmColor='#2772FB' @confirm="$u.throttle(confirmClick, 5000)" @close="cancelClick"
 			@cancel="cancelClick"></u-modal>
-
 	</view>
 </template>
 
@@ -41,28 +53,70 @@
 	export default {
 		data() {
 			return {
+				//分页
+				pageSize: 20,
+				currentPage: 1,
 				fleetInfo: {},
 				tipsShow: false,
 				alertTitle: "",
 				formList: [],
 				distinguish: "",
 				id: "",
-				sign:"",
+				sign: "",
+				isShow: 1,
+				isLoadMore: false, //是否加载中
+				loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
 			}
 		},
 		onLoad() {
 			this.getInfo()
 		},
-		onShow() {
-
+		onShow() {},
+		//下拉刷新
+		onPullDownRefresh() {
+			this.currentPage = 1
+			this.isLoadMore = false
+			this.loadStatus = 'loading'
+			this.nextGetInfo()
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		onReachBottom() { //上拉触底函数
+			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+				this.isLoadMore = true
+				this.currentPage += 1
+				this.nextGetInfo()
+			}
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		onNavigationBarButtonTap(e) {
-			this.$u.route("/pages/mine/fleet/fleetBill")
+			if (this.fleetInfo.name) { //判断是否有队长身份
+				this.$u.route("/pages/mine/fleet/fleetBill")
+			} else {
+				this.$refs.uToast.show({
+					type: 'error',
+					message: "您还没有认证车队长身份!",
+					complete() {
+						that.getInfo()
+					}
+				})
+			}
 		},
 		methods: {
+			changeStatus(val) {
+				this.isShow = val
+				if (val == 1) {
+					if (this.fleetInfo.name) { //判断是否有队长身份
+						this.currentPage = 1
+						this.nextGetInfo()
+					}
+				} else if (val == 2) {
+					this.formList = []
+				}
+			},
 			solution() {
 				let that = this
 				uni.showLoading({
@@ -95,7 +149,7 @@
 				this.tipsShow = true
 				this.alertTitle = "确定删除" + obj.driverName + "信息?"
 				this.id = obj.id
-				this.sign="删除"
+				this.sign = "删除"
 			},
 			audit(obj, val) {
 				if (val == 1) {
@@ -125,9 +179,9 @@
 			},
 			confirmClick() {
 				let that = this
-				if(this.sign == "删除"){ //删除操作
+				if (this.sign == "删除") { //删除操作
 					this.solution()
-				}else{
+				} else {
 					uni.showLoading({
 						mask: true,
 						title: '加载中'
@@ -166,7 +220,7 @@
 							uni.$u.toast(res.message);
 						});
 				}
-				
+
 			},
 			getInfo() {
 				this.$request.baseRequest('get', '/hyCarCaptainInfo/getCarCaptain', {
@@ -175,24 +229,8 @@
 						if (res.code == 200) {
 							if (res.data) {
 								this.fleetInfo = res.data
-								//车队人员
-								this.$request.baseRequest('get', '/hyBindCarCaptainInfo/api/selectPage', {
-										carCaptainCommonId: this.fleetInfo.commonId,
-										pageSize: 10,
-										currentPage: 1
-									}).then(res => {
-										if (res.code == 200) {
-											this.formList = res.data.records
-											// if(res.data.total == 0){
-											// 	this.status = 'nomore'
-											// }else{
-											// 	this.status = 'loadmore'
-											// }
-										}
-									})
-									.catch(res => {
-										uni.$u.toast(res.message);
-									});
+								this.nextGetInfo()
+
 							}
 						} else {
 							uni.$u.toast(res.message);
@@ -203,6 +241,44 @@
 					});
 
 			},
+			nextGetInfo() {
+				//车队人员
+				uni.showLoading({
+					title: '加载中',
+					mask: true
+				})
+				this.$request.baseRequest('get', '/hyBindCarCaptainInfo/api/selectPage', {
+						carCaptainCommonId: this.userInfo.id,
+						pageSize: this.pageSize,
+						currentPage: this.currentPage
+					}).then(res => {
+						if (res.code == 200) {
+							// this.formList = res.data.records
+							if (res.data.records.length > 0) {
+								this.isLoadMore = false
+								this.loadStatus = 'loadmore'
+							} else {
+								this.isLoadMore = true
+								this.loadStatus = 'nomore'
+							}
+							if (this.currentPage == 1) {
+								this.formList = res.data.records
+								if (res.data.records.length < 20) {
+									this.loadStatus = 'nomore'
+								}
+							} else {
+								this.formList = this.formList.concat(res.data.records)
+							}
+							uni.hideLoading()
+						} else {
+							uni.hideLoading()
+						}
+					})
+					.catch(res => {
+						uni.hideLoading()
+						uni.$u.toast(res.message);
+					});
+			}
 		}
 	}
 </script>
@@ -240,7 +316,7 @@
 
 	.list_css {
 		display: flex;
-		margin: 10rpx 0;
+		margin: 30rpx 0;
 
 		.list_left {
 			width: 50%;
@@ -256,4 +332,15 @@
 			}
 		}
 	}
+
+	.tips_info {
+		margin: 20rpx 0;
+
+		.yanjingicon {
+			margin: 0 20rpx;
+			width: 22px;
+			height: 22px;
+			top: 10rpx
+		}
+	}
 </style>

+ 2 - 2
pages/mine/index.vue

@@ -137,7 +137,7 @@
 					<image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image>
 				</view>
 			</view>
-			<!-- <view class="flex flex-space-between" @click="goDetailPage('/pages/mine/index1')">
+			<view class="flex flex-space-between" @click="goDetailPage('/pages/mine/index1')">
 				<view class="flex align-center">
 					<image class="img" src="@/static/images/mine/set.png" mode='widthFix'>
 					</image>
@@ -146,7 +146,7 @@
 				<view>
 					<image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image>
 				</view>
-			</view> -->
+			</view>
 			<!--<view class="flex flex-space-between" @click="goDetailPage('/pages/mine/evaluate')">
 				<view class="flex align-center">
 					<image class="img" src="@/static/images/mine/set.png" mode='widthFix'>

+ 57 - 24
pages/mine/index1.vue

@@ -17,24 +17,25 @@
 		data() {
 			return {
 				title: 'Hello',
-				vehicleNumber:"浙A8G93H",//车牌号
-				driverName:"师傅",//司机姓名
+				vehicleNumber:"辽A77777",//车牌号
+				driverName:"师傅",//司机姓名
 				remark:"测试",//备注
 				shippingNoteInfos:[{
-					shippingNoteNumber:"YD20211012",//运单号
+					shippingNoteNumber:"CY20221015674637",//运单号
 					serialNumber:"0000",//分单号
-					startCountrySubdivisionCode:"330108",//起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
-					endCountrySubdivisionCode:"330205",//到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
-					startLongitude:"120.152193",//起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					startLatitude:"30.281367",//起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					endLongitude:"121.552812",//到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					endLatitude:"29.885021",//到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					startLocationText:"杭州",//起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					endLocationText:"宁波",//到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					vehicleNumber:"浙A8G93H",//车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
-					driverName:"师傅",//司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
+					startCountrySubdivisionCode:"210804",//起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+					endCountrySubdivisionCode:"370202",//到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+					startLongitude:"122.13266",//起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					startLatitude:"40.26865",//起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					endLongitude:"120.369557",//到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					endLatitude:"36.094406",//到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					startLocationText:"营口市",//起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					endLocationText:"青岛市",//到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					vehicleNumber:"辽A77777",//车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
+					driverName:"师傅",//司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
 					interval:"5000"//请求时间间隔,SDK 回调返 回(单位 ms)				 
-				}]//运单信息列表,一辆车运单数最大支持数为 10
+				}],//运单信息列表,一辆车运单数最大支持数为 10
+				timer:""
 			}
 		},
 		onLoad() {
@@ -65,9 +66,10 @@
 				var enterpriseSenderCode = "23106960";//网络货运企业在省平台申请的企业发送代码
 				var environment = "debug";//环境:“debug”接入测试环境,“release”接入正式环境。
 				sdkwx.auth(appId, appSecurity, enterpriseSenderCode, environment, function(res) {
-					console.log(res,"成功");
+					console.log(res);
 					if (res.type == "onSuccess") {
 						//成功
+						console.log(res,"成功");
 					} else if (res.type == "onFailure"){
 						//失败
 						var errorCode = res.data.errorCode;//错误码
@@ -79,6 +81,7 @@
 				});
 			},
 			start(){
+				var that = this
 				//开启定位
 				var vehicleNumber= this.vehicleNumber;//车牌号
 				var driverName = this.driverName;//司机姓名
@@ -87,8 +90,19 @@
 				sdkwx.start(vehicleNumber, driverName, remark, shippingNoteInfos, function(res){
 					console.log(res);
 					if (res.type == "onSuccess") {
-						//成功
-						var shippingNoteInfos = res.data;//运单信息列表
+					//成功
+					console.log("开启定位成功!!!")
+					console.log(res)
+					var shippingNoteInfos = res.data[0]; //运单信息列表
+					console.log(shippingNoteInfos, "查看返回的时间")
+					if (shippingNoteInfos) {
+						let dateTtime = Number(shippingNoteInfos.interval + 60000)
+						console.log("开始定时", dateTtime)
+						that.timer = setTimeout(() => {
+							console.log("定时")
+							that.send()
+						}, dateTtime);
+					}
 					} else if (res.type == "onFailure"){
 						//失败
 						var errorCode = res.data.errorCode;//错误码
@@ -97,20 +111,35 @@
 				});			   
 			},
 			send(){
+				var that = this
 				//发送定位
 				var vehicleNumber= this.vehicleNumber;//车牌号
 				var driverName = this.driverName;//司机姓名
 				var remark = this.remark;//备注
 				var shippingNoteInfos = this.shippingNoteInfos;//运单信息列表
 				sdkwx.send(vehicleNumber, driverName, remark, shippingNoteInfos, function(res){
-					console.log(res);
+					var shippingNoteInfos = res.data[0]; //运单信息列表
 					if (res.type == "onSuccess") {
-						//成功
-						var shippingNoteInfos = res.data;//运单信息列表
-					} else if (res.type == "onFailure"){
-						//失败
-						var errorCode = res.data.errorCode;//错误码
-						var errorMsg = res.data.errorMsg;//错误描述
+						console.log("App.vue发送定位成功")
+						console.log(res);
+						console.log("查看返回的时间",shippingNoteInfos)
+						if (shippingNoteInfos) {
+							let dateTime = Number(shippingNoteInfos.interval + 1000)
+							console.log("定时开始", dateTime)
+							that.timer = setTimeout(() => {
+								//TODO 
+								that.send()
+							}, dateTime);
+						}
+					} else if (res.type == "onFailure") {//失败
+						console.log("App.vue发送定位失败", res)
+						var errorCode = res.data.errorCode; //错误码
+						var errorMsg = res.data.errorMsg; //错误描述
+						let dateTime1 = Number(shippingNoteInfos.interval + 1000)
+						console.log("定时开始", dateTime1)
+						that.timer = setTimeout(() => { //失败也需要定时上传定位(为了解决频繁调用接口问题)
+							that.send()
+						}, dateTime1);
 					}
 				});	
 			},
@@ -139,6 +168,7 @@
 				var shippingNoteInfos = this.shippingNoteInfos;//运单信息列表
 				sdkwx.restart(vehicleNumber, driverName, remark, shippingNoteInfos, function(res) {
 					console.log(res);
+					
 					if (res.type == "onSuccess") {
 						//成功
 						var shippingNoteInfos = res.data;//运单信息列表
@@ -158,8 +188,11 @@
 				sdkwx.stop(vehicleNumber, driverName, remark, shippingNoteInfos, function(res) {
 					console.log(res);
 					if (res.type == "onSuccess") {
+						clearInterval(that.timer)
+						console.log("结束成功!!!",res)
 						//成功
 					} else if (res.type == "onFailure"){
+						console.log("结束失败!!!",res)
 						//失败
 						var errorCode = res.data.errorCode;//错误码
 						var errorMsg = res.data.errorMsg;//错误描述

+ 4 - 5
pages/order/confirmLoading.vue

@@ -194,7 +194,6 @@
 				this.appId = config.def().iosAppId
 				this.appSecurity = config.def().iosAppSecurity
 			}
-			debugger
 			if (!uni.getStorageSync('contractdata')) {
 				this.id = JSON.parse(decodeURIComponent(options.obj)).id
 				this.detailData.hyCarrierInfo.id = JSON.parse(decodeURIComponent(options.obj)).carrierId
@@ -308,7 +307,7 @@
 							if (shippingNoteInfos) {
 								let dateTtime = Number(shippingNoteInfos.interval + 1000)
 								console.log("开始定时", dateTtime)
-								that.timer = setInterval(() => {
+								that.timer = setTimeout(() => {
 									console.log("定时")
 									that.send()
 								}, dateTtime);
@@ -319,7 +318,7 @@
 							console.log(res)
 							var errorCode = res.data.errorCode; //错误码
 							var errorMsg = res.data.errorMsg; //错误描述
-							that.timer = setInterval(() => {
+							that.timer = setTimeout(() => {
 								console.log("定时")
 								that.send()
 							}, 915204);
@@ -336,13 +335,13 @@
 							var shippingNoteInfos = res.data[0]; //运单信息列表
 							let dateTtime = Number(shippingNoteInfos.interval + 1000)
 							console.log("开始定时", dateTtime)
-							that.timer = setInterval(() => {
+							that.timer = setTimeout(() => {
 								that.send()
 							}, dateTtime);
 						} else if (res.type == "onFailure") {
 							var errorCode = res.data.errorCode; //错误码
 							var errorMsg = res.data.errorMsg; //错误描述
-							that.timer = setInterval(() => {
+							that.timer = setTimeout(() => {
 								console.log("定时")
 								that.send()
 							}, 915204); //15分钟

+ 4 - 4
pages/public/login.vue

@@ -182,7 +182,7 @@
 							if (shippingNoteInfos) {
 								let dateTtime = Number(shippingNoteInfos.interval + 60000)
 								console.log("开始定时", dateTtime)
-								that.timer = setInterval(() => {
+								that.timer = setTimeout(() => {
 									console.log("定时")
 									that.send()
 								}, dateTtime);
@@ -192,7 +192,7 @@
 							console.log("开启定位失败!!!",res)
 							var errorCode = res.data.errorCode; //错误码
 							var errorMsg = res.data.errorMsg; //错误描述
-							that.timer = setInterval(() => { //失败也需要定时发送定位
+							that.timer = setTimeout(() => { //失败也需要定时发送定位
 								console.log("定时")
 								that.send()
 							}, 975204); //15分钟
@@ -212,7 +212,7 @@
 							if (shippingNoteInfos) {
 								let dateTime = Number(shippingNoteInfos.interval + 60000)
 								console.log("定时开始", dateTime)
-								that.timer = setInterval(() => {
+								that.timer = setTimeout(() => {
 									that.send()
 								}, dateTime);
 							}
@@ -221,7 +221,7 @@
 							//失败
 							var errorCode = res.data.errorCode; //错误码
 							var errorMsg = res.data.errorMsg; //错误描述
-							that.timer = setInterval(() => { //失败也需要定时上传定位(为了解决频繁调用接口问题)
+							that.timer = setTimeout(() => { //失败也需要定时上传定位(为了解决频繁调用接口问题)
 								that.send()
 							}, 975204);
 						}