소스 검색

打开定位问题

aleyds 3 년 전
부모
커밋
62ab96e132
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      pages/attence/attence.vue

+ 4 - 3
pages/attence/attence.vue

@@ -154,14 +154,15 @@
 						//#ifdef APP-PLUS
 						ALog?.info({msg:res})
 						//#endif
-						that.payeeinfo.longitude = res.longitude;
-						that.payeeinfo.latitude = res.latitude;
+						// that.payeeinfo.longitude = res.longitude;
+						// that.payeeinfo.latitude = res.latitude;
 						var dst = `${that.payeeinfo.latitude},${that.payeeinfo.longitude}`;
 						var src = res.latitude + ',' + res.longitude;
 						var locRet = location?.distance?.(src, dst);
 						that.positionInfo = true;
 						// console.log('locRet',locRet);
-						// ALog?.info({msg:locRet.distance})
+						ALog?.info({msg:'计算距离:' + locRet.distance})
+						ALog?.info({msg:'打开距离:' + that.payeeinfo.workDistance})
 						if(locRet.distance <= that.payeeinfo.workDistance){//在打卡范围内
 							that.outPosition = false;
 							console.log('that.workType',that.workType);