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.
yanzong/public/assets/pages-shop-detail.c54ea5d7.js

2 lines
3.2 KiB

11 months ago
import{o as e,c as a,w as t,e as s,i,a as o,f as l,t as n,g as d,k as c}from"./index-ae8bbb19.js";import{W as r}from"./wxofficial.cfa745b7.js";import{d as f}from"./shop.128443fb.js";import{_ as h}from"./_plugin-vue_export-helper.1b428a4d.js";const _=h({mixins:[r],data:()=>({isLoading:!0,shopId:void 0,detail:null}),onLoad(e){this.shopId=e.shopId,this.getShopDetail()},methods:{getShopDetail(){const e=this;e.isLoading=!0,f(e.shopId).then((a=>{e.detail=a.data.detail,e.setWxofficialShareData()})).finally((()=>e.isLoading=!1))},onMakePhoneCall(){uni.makePhoneCall({phoneNumber:this.detail.phone})},onOpenLocation(){const{detail:e}=this;uni.openLocation({name:e.shop_name,address:e.region.province+e.region.city+e.region.region+e.address,longitude:Number(e.longitude),latitude:Number(e.latitude),scale:15})},setWxofficialShareData(){this.updateShareCardData({title:this.detail.shop_name})}},onShareAppMessage(){const e=this,a=e.$getShareUrlParams({shopId:e.shopId});return{title:e.detail.shop_name,path:"/pages/shop/detail?"+a}},onShareTimeline(){const e=this,a=e.$getShareUrlParams({shopId:e.shopId});return{title:e.detail.shop_name,path:"/pages/shop/detail?"+a}}},[["render",function(r,f,h,_,u,p){const m=d,x=i,g=c;return u.isLoading?s("",!0):(e(),a(x,{key:0,class:"container"},{default:t((()=>[o(x,{class:"header"},{default:t((()=>[o(x,{class:"shop-logo"},{default:t((()=>[o(m,{class:"image",src:u.detail.logo_url},null,8,["src"])])),_:1}),o(x,{class:"shop-name"},{default:t((()=>[o(g,null,{default:t((()=>[l(n(u.detail.shop_name),1)])),_:1})])),_:1}),u.detail.summary?(e(),a(x,{key:0,class:"shop-summary dis-flex"},{default:t((()=>[o(g,null,{default:t((()=>[l("门店简介:"+n(u.detail.summary),1)])),_:1})])),_:1})):s("",!0)])),_:1}),o(x,{class:"content"},{default:t((()=>[o(x,{class:"content-item dis-flex flex-y-center"},{default:t((()=>[o(x,{class:"content-item__icon dis-flex"},{default:t((()=>[o(g,{class:"iconfont icon-shijian"})])),_:1}),o(x,{class:"content-item__text flex-box dis-flex"},{default:t((()=>[o(g,{class:"f-26"},{default:t((()=>[l(n(u.detail.shop_hours),1)])),_:1})])),_:1})])),_:1}),o(x,{class:"content-item dis-flex flex-y-center",onClick:f[0]||(f[0]=e=>p.onOpenLocation())},{default:t((()=>[o(x,{class:"content-item__icon dis-flex"},{default:t((()=>[o(g,{class:"iconfont icon-dingwei"})])),_:1}),o(x,{class:"content-item__text flex-box dis-flex"},{default:t((()=>[o(g,{class:"f-26"},{default:t((()=>[l(n(u.detail.region.province)+n(u.detail.region.city)+n(u.detail.region.region)+n(u.detail.address),1)])),_:1})])),_:1}),o(x,{class:"content-item__arrow dis-flex"},{default:t((()=>[o(g,{class:"iconfont icon-arrow-right"})])),_:1})])),_:1}),o(x,{class:"content-item dis-flex flex-y-center",onClick:f[1]||(f[1]=e=>p.onMakePhoneCall())},{default:t((()=>[o(x,{class:"content-item__icon dis-flex"},{default:t((()=>[o(g,{class:"iconfont icon-dianhua"})])),_:1}),o(x,{class:"content-item__text flex-box dis-flex"},{default:t((()=>[o(g,{class:"f-26"},{default:t((()=>[l(n(u.detail.phone),1)])),_:1})])),_:1}),o(x,{class:"content-item__arrow dis-flex"},{default:t((()=>[o(g,{class:"iconfont icon-arrow-right"})])),_:1})])),_:1})])),_:1})])),_:1}))}],["__scopeId","data-v-ef02f524"]]);export{_ as default};