acdr-ui/dist/build/mp-weixin/sheep/components/s-share-modal/s-share-modal.js

2 lines
1.8 KiB
JavaScript

"use strict";const e=require("../../../common/vendor.js"),s=require("../../index.js"),o=require("../../hooks/useModal.js");if(!Array){e.resolveComponent("su-popup")()}Math||((()=>"../../ui/su-popup/su-popup.js")+r)();const r=()=>"./canvas-poster/index.js",a={__name:"s-share-modal",props:{shareInfo:{type:Object,default(){}}},setup(r){const a=e.computed((()=>s.sheep.$store("modal").share)),h=e.computed((()=>s.sheep.$store("app").platform.share)),t=e.ref(""),u=r,l=e.reactive({showShareGuide:!1,showPosterModal:!1}),p=()=>{o.closeShareModal(),s.sheep.$store("user").isLogin?(e.unref(t).getPoster(),l.showPosterModal=!0):o.showAuthModal()},n=()=>{o.closeShareModal()},d=()=>{s.sheep.$helper.copyText(u.shareInfo.link),o.closeShareModal()};function i(){l.showShareGuide=!1}return(u,c)=>e.e({a:e.o(i),b:e.p({show:l.showShareGuide,showClose:!1}),c:l.showShareGuide},l.showShareGuide?{d:e.unref(s.sheep).$url.static("/static/img/shop/share/share_guide.png")}:{},{e:h.value.methods.includes("forward")},h.value.methods.includes("forward")?{f:e.unref(s.sheep).$url.static("/static/img/shop/share/share_wx.png"),g:e.o(n)}:{},{h:h.value.methods.includes("poster")},h.value.methods.includes("poster")?{i:e.unref(s.sheep).$url.static("/static/img/shop/share/share_poster.png"),j:e.o(p)}:{},{k:h.value.methods.includes("link")},h.value.methods.includes("link")?{l:e.unref(s.sheep).$url.static("/static/img/shop/share/share_link.png"),m:e.o(d)}:{},{n:e.o(((...s)=>e.unref(o.closeShareModal)&&e.unref(o.closeShareModal)(...s))),o:e.o(e.unref(o.closeShareModal)),p:e.p({show:a.value,round:"10",showClose:!1}),q:e.sr(t,"13f67033-2",{k:"SharePosterRef"}),r:e.o((e=>l.showPosterModal=!1)),s:e.p({show:l.showPosterModal,shareInfo:r.shareInfo})})}},h=e._export_sfc(a,[["__scopeId","data-v-13f67033"]]);wx.createComponent(h);