Bladeren bron

auto commit

gcz 3 jaren geleden
bovenliggende
commit
679d5613ed
1 gewijzigde bestanden met toevoegingen van 8 en 2 verwijderingen
  1. 8 2
      pages/attence/attence.vue

+ 8 - 2
pages/attence/attence.vue

@@ -140,7 +140,9 @@
 		},
 		methods:{
 			getLocation(){
+				//#ifdef APP-PLUS
 				ALog?.info({msg:'请求定位'});
+				//#endif
 				uni.showLoading({ title: '定位中'});
 				let that = this;
 				uni.getLocation({
@@ -149,7 +151,9 @@
 						uni.hideLoading();
 						console.log("定位返回信息:", res)
 						// alert(res.longitude + "," + res.latitude )
+						//#ifdef APP-PLUS
 						ALog?.info({msg:res})
+						//#endif
 						that.payeeinfo.longitude = res.longitude;
 						that.payeeinfo.latitude = res.latitude;
 						var dst = `${that.payeeinfo.longitude},${that.payeeinfo.latitude}`;
@@ -157,7 +161,7 @@
 						var locRet = location?.distance?.(src, dst);
 						that.positionInfo = true;
 						// console.log('locRet',locRet);
-						ALog?.info({msg:locRet.distance})
+						// ALog?.info({msg:locRet.distance})
 						if(locRet<=that.payeeinfo.workDistance){//在打卡范围内
 							that.outPosition = false;
 							console.log('that.workType',that.workType);
@@ -206,8 +210,10 @@
 					},
 					fail: function(res){
 						uni.hideLoading();
-						console.log('getLocation err',res)					
+						console.log('getLocation err',res)	
+						//#ifdef APP-PLUS
 						ALog?.info({msg:'请求错误',err:res})
+						//#endif				
 					}
 				})
 			},