acdr-ui/dist/build/mp-weixin/components/AddressCell.js

2 lines
808 B
JavaScript
Raw Normal View History

2024-09-19 07:20:14 +08:00
"use strict";var e=(e,t,n)=>new Promise(((r,o)=>{var s=e=>{try{i(n.next(e))}catch(t){o(t)}},a=e=>{try{i(n.throw(e))}catch(t){o(t)}},i=e=>e.done?r(e.value):Promise.resolve(e.value).then(s,a);i((n=n.apply(e,t)).next())}));const t=require("../common/vendor.js"),n=require("../service/mapService.js"),r=require("../utils/platform.js"),o={__name:"AddressCell",setup(o){const s=t.ref({}),a=()=>e(this,null,(function*(){try{const e=yield n.getLocation(),t=yield n.getMapDetailAddress(e.longitude,e.latitude);s.value=t}catch(e){}}));return t.onLoad((()=>e(this,null,(function*(){yield a()})))),(e,n)=>({a:t.t(t.unref(s).addressComponent?`${t.unref(s).addressComponent.city} ${t.unref(s).addressComponent.district}`:"正在加载..."),b:t.n(t.unref(r.isH5)?"top-_a_3vw_a_":"top-_a_6vw_a_")})}};wx.createComponent(o);