You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
1000 B

"use strict";const e=require("../../common/vendor.js"),a=require("../../services/wechat.js"),t=require("../../services/map.js"),n=e.defineComponent({__name:"index",setup(n){const o=e.ref("苏州科技馆"),c=e.ref(""),i=e.ref([]);async function s(){i.value=await t.searchPlace(o.value)}async function u(){const a=await e.index.getLocation({type:"gcj02"}),n=await t.reverseGeocode(a.latitude,a.longitude);c.value=n.address}async function r(){try{await a.wechatOAuthLogin(),e.index.showToast({title:"已发起微信登录",icon:"none"})}catch(t){e.index.showToast({title:(null==t?void 0:t.message)||"登录失败",icon:"none"})}}return e.onMounted(()=>{a.setupWechatShare().catch(()=>{})}),(a,n)=>e.e({a:e.t(e.unref(t.mapConfig).key),b:e.o(r),c:o.value,d:e.o(e=>o.value=e.detail.value),e:e.o(s),f:e.o(u),g:c.value},c.value?{h:e.t(c.value)}:{},{i:e.f(i.value,(a,t,n)=>({a:e.t(a.title),b:e.t(a.address),c:`${a.lat}-${a.lng}`}))})}}),o=e._export_sfc(n,[["__scopeId","data-v-14b6725d"]]);wx.createPage(o);