acdr-ui/dist/build/mp-weixin/pages/index/components/recommendedServices.js

2 lines
1.3 KiB
JavaScript
Raw Normal View History

2024-10-01 09:15:35 +08:00
"use strict";var e=(e,t,r)=>new Promise(((a,i)=>{var o=e=>{try{n(r.next(e))}catch(t){i(t)}},l=e=>{try{n(r.throw(e))}catch(t){i(t)}},n=e=>e.done?a(e.value):Promise.resolve(e.value).then(o,l);n((r=r.apply(e,t)).next())}));const t=require("../../../common/vendor.js"),r=require("../../../utils/commUtils.js"),a=require("../../../service/personalService.js"),i=require("../../../service/mapService.js");Math||(o+n+l)();const o=()=>"../../../components/RecommendedServiceCard.js",l=()=>"../../../components/EmptyState.js",n=()=>"../../../components/LocalLoader.js",c={__name:"recommendedServices",setup(o){const l=t.ref(!1),n=t.ref([]),c=()=>e(this,null,(function*(){const e=yield i.getLocation(),t=yield a.getNearbyServices(e.latitude,e.longitude);n.value=t}));return t.onLoad((()=>e(this,null,(function*(){l.value=!0,setTimeout((()=>{l.value=!1}),3e3),yield c(),l.value=!1})))),(e,a)=>t.e({a:n.value.length>0},n.value.length>0?{b:t.f(n.value,((e,a,i)=>({a:"126145bd-0-"+i,b:t.p({image:t.unref(r.imgUrl)(e.url),title:e.serviceName,description:e.description,price:e.price}),c:t.o((r=>(e=>{t.index.navigateTo({url:"/modules/pet/service/detail?id="+e.id})})(e)),a),d:a})))}:{},{c:t.o((e=>l.value=e)),d:t.p({modelValue:l.value}),e:0==n.value.length&&!l.value},(0!=n.value.length||l.value,{}))}},s=t._export_sfc(c,[["__scopeId","data-v-126145bd"]]);wx.createComponent(s);