import { IconWechat } from "@/assets/icons"; import { PromotionController } from "@/modules/resource/controllers/PromotionController"; import { clipboard } from "@/utils"; import { useAuth } from "@queenjs-modules/auth"; import { Image } from "@queenjs/ui"; import { useQRCode } from "@vueuse/integrations/useQRCode"; import { Button, Divider, Input } from "ant-design-vue"; import { defineComponent, reactive } from "vue"; import { any } from "vue-types"; export default defineComponent({ props: { record: any().isRequired, controller: any().isRequired, }, setup(props, { slots }) { const auth = useAuth(); const userInfo: any = auth.store.userInfo; const isSys = userInfo.roles?.includes("system") ? true : false; let shareLink = location.origin + "/share.html?id=" + props.record._id + "&isSys=" + isSys; // if (location.host == "www.infish.cn") { // shareLink = // location.origin + // "/projects/queenshowv1/share.html?id=" + // props.record._id; // } const qrUrl = useQRCode(shareLink, { margin: 2 }); const state = reactive({ ...props.record, }); return () => { const { controller, record } = props; const { desc, thumbnail, title } = state; return (
{slots.preview?.()}

分享设置

{ const res: any = await controller.changeThumbnail(); state.thumbnail = res[0]?.file?.url; }} > 更换封面
{ const title = e.target.value; // if (!title) return; state.title = title; }} /> { const desc = e.target.value; // if (!desc) return; state.desc = desc; }} />

二维码

微信扫一扫分享

链接分享

{shareLink}
); }; }, });