import{_ as a,bd as t,b as o,d as n,p as s,w as e,H as i,i as l,o as c,f as d,k as u,v as r,e as f,t as h,F as _,C as p,R as m}from"./index-2PZN6pGH.js";import{a as g}from"./util.BQsFLuvY.js";var k=g;const L=a({data:()=>({title:"chooseLocation",hasLocation:!1,location:{},locationAddress:""}),methods:{chooseLocation:function(){t({success:a=>{this.hasLocation=!0,this.location=k(a.longitude,a.latitude),this.locationAddress=a.address}})},clear:function(){this.hasLocation=!1}}},[["render",function(a,t,g,k,L,F){const x=o(n("page-head"),i),y=l,b=p,C=m;return c(),s(y,null,{default:e((()=>[d(x,{title:L.title},null,8,["title"]),d(y,{class:"uni-padding-wrap"},{default:e((()=>[d(y,{style:{background:"#FFFFFF",padding:"40rpx"}},{default:e((()=>[d(y,{class:"uni-hello-text uni-center"},{default:e((()=>[u("当前位置信息")])),_:1}),!1===L.hasLocation?(c(),s(y,{key:0,class:"uni-h2 uni-center uni-common-mt"},{default:e((()=>[u("未选择位置")])),_:1})):r("",!0),!0===L.hasLocation?(c(),f(_,{key:1},[d(y,{class:"uni-hello-text uni-center",style:{"margin-top":"10px"}},{default:e((()=>[u(h(L.locationAddress),1)])),_:1}),d(y,{class:"uni-h2 uni-center uni-common-mt"},{default:e((()=>[d(b,null,{default:e((()=>[u("E: "+h(L.location.longitude[0])+"°"+h(L.location.longitude[1])+"′",1)])),_:1}),d(b,null,{default:e((()=>[u("\\nN: "+h(L.location.latitude[0])+"°"+h(L.location.latitude[1])+"′",1)])),_:1})])),_:1})],64)):r("",!0)])),_:1}),d(y,{class:"uni-btn-v"},{default:e((()=>[d(C,{type:"primary",onClick:F.chooseLocation},{default:e((()=>[u("选择位置")])),_:1},8,["onClick"]),d(C,{onClick:F.clear},{default:e((()=>[u("清空")])),_:1},8,["onClick"])])),_:1})])),_:1})])),_:1})}],["__scopeId","data-v-8f39bf8d"]]);export{L as default};
