"use strict";const e=require("../../common/vendor.js"),o=require("../../utils/wz_location.js"),t={data:()=>({title:"Hello",wzLocation:{accuracy:0,address:{name:""},place:{name:""},latitude:0,longitude:0,source:"",spatialReference:"",timestamp:""}}),onLoad(){},methods:{singleClick(){const t=e.index.getDeviceInfo();console.log("deviceId：",t.deviceId),o.initOption("1hWGdVeHXaRA2guNz3iDTSqLpx93T8I4",t.deviceId,!0,0),o.getLocation((e=>{console.log("index success",e),e.timestamp=new Date(e.timestamp).toLocaleString(),this.wzLocation=e}),(e=>{console.log("fail"+e.code+e.msg)}))},conitueClick(){const t=e.index.getDeviceInfo();console.log("deviceId：",t.deviceId),o.initOption("1hWGdVeHXaRA2guNz3iDTSqLpx93T8I4",t.deviceId,!1,1e4),o.getLocation((e=>{console.log("index success",e),e.timestamp=new Date(e.timestamp).toLocaleString(),this.wzLocation=e}),(e=>{console.log("fail"+e.code+e.msg)}))},getAddress(){o.setAk("1hWGdVeHXaRA2guNz3iDTSqLpx93T8I4"),o.getReverseCode(107.191693,27.945061,"wgs84").then((e=>{console.log("address : "+e.address.name)}),(e=>{console.log("error : "+e)}))},getGeoCode(){o.setAk("1hWGdVeHXaRA2guNz3iDTSqLpx93T8I4"),o.getGeoCode("旺座","西安市").then((e=>{let o=e;console.log(o[0].geoPoint,o[0].address.name)}),(e=>{console.log("error : ",e)}))},poiSearch(){o.setAk("1hWGdVeHXaRA2guNz3iDTSqLpx93T8I4"),o.poiSearch("泛悦城T2","武汉市").then((e=>{let o=e;console.log("poi搜索：",o[0].geoPoint,o[0].address.name)}),(e=>{console.log("error : ",e)}))},stopLocation(){o.stopLocation()}}};const i=e._export_sfc(t,[["render",function(o,t,i,c,n,s){return{a:e.t(n.title),b:e.t(n.wzLocation.address.name),c:e.t(n.wzLocation.place.name),d:e.t(n.wzLocation.longitude),e:e.t(n.wzLocation.latitude),f:e.t(n.wzLocation.timestamp),g:e.o(((...e)=>s.singleClick&&s.singleClick(...e))),h:e.o(((...e)=>s.conitueClick&&s.conitueClick(...e))),i:e.o(((...e)=>s.stopLocation&&s.stopLocation(...e))),j:e.o(((...e)=>s.getAddress&&s.getAddress(...e))),k:e.o(((...e)=>s.getGeoCode&&s.getGeoCode(...e))),l:e.o(((...e)=>s.poiSearch&&s.poiSearch(...e)))}}]]);wx.createPage(i);
