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

1 line
6.9 KiB
Plaintext
Raw Normal View History

2024-09-19 07:20:14 +08:00
{"version":3,"file":"s-share-modal.js","sources":["../../../../../../src/sheep/components/s-share-modal/s-share-modal.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9zaGVlcC9jb21wb25lbnRzL3Mtc2hhcmUtbW9kYWwvcy1zaGFyZS1tb2RhbC52dWU"],"sourcesContent":["<!-- 全局分享弹框 -->\r\n<template>\r\n <view>\r\n <su-popup :show=\"state.showShareGuide\" :showClose=\"false\" @close=\"onCloseGuide\" />\r\n <view v-if=\"state.showShareGuide\" class=\"guide-wrap\">\r\n <image\r\n class=\"guide-image\"\r\n :src=\"sheep.$url.static('/static/img/shop/share/share_guide.png')\"\r\n />\r\n </view>\r\n\r\n <su-popup :show=\"show\" round=\"10\" :showClose=\"false\" @close=\"closeShareModal\">\r\n <!-- 分享 tools -->\r\n <view class=\"share-box\">\r\n <view class=\"share-list-box ss-flex\">\r\n <!-- 操作 ①:发送给微信好友 -->\r\n <button\r\n v-if=\"shareConfig.methods.includes('forward')\"\r\n class=\"share-item share-btn ss-flex-col ss-col-center\"\r\n open-type=\"share\"\r\n @tap=\"onShareByForward\"\r\n >\r\n <image\r\n class=\"share-img\"\r\n :src=\"sheep.$url.static('/static/img/shop/share/share_wx.png')\"\r\n mode=\"\"\r\n />\r\n <text class=\"share-title\">微信好友</text>\r\n </button>\r\n\r\n <!-- 操作 ②:生成海报图片 -->\r\n <button\r\n v-if=\"shareConfig.methods.includes('poster')\"\r\n class=\"share-item share-btn ss-flex-col ss-col-center\"\r\n @tap=\"onShareByPoster\"\r\n >\r\n <image\r\n class=\"share-img\"\r\n :src=\"sheep.$url.static('/static/img/shop/share/share_poster.png')\"\r\n mode=\"\"\r\n />\r\n <text class=\"share-title\">生成海报</text>\r\n </button>\r\n\r\n <!-- 操作 ③:生成链接 -->\r\n <button\r\n v-if=\"shareConfig.methods.includes('link')\"\r\n class=\"share-item share-btn ss-flex-col ss-col-center\"\r\n @tap=\"onShareByCopyLink\"\r\n >\r\n <image\r\n class=\"share-img\"\r\n :src=\"sheep.$url.static('/static/img/shop/share/share_link.png')\"\r\n mode=\"\"\r\n />\r\n <text class=\"share-title\">复制链接</text>\r\n </button>\r\n </view>\r\n <view class=\"share-foot ss-flex ss-row-center ss-col-center\" @tap=\"closeShareModal\">\r\n 取消\r\n </view>\r\n </view>\r\n </su-popup>\r\n\r\n <!-- 分享海报,对应操作 ② -->\r\n <canvas-poster\r\n ref=\"SharePosterRef\"\r\n :show=\"state.showPosterModal\"\r\n :shareInfo=\"shareInfo\"\r\n @close=\"state.showPosterModal = false\"\r\n />\r\n </view>\r\n</template>\r\n<script setup>\r\n/**\r\n * 分享弹窗\r\n */\r\nimport { ref, unref, reactive, computed } from 'vue'\r\nimport sheep from '@/sheep'\r\nimport canvasPoster from './canvas-poster/index.vue'\r\nimport { closeShareModal, showAuthModal } from '@/sheep/hooks/useModal'\r\n\r\nconst show = computed(() => sheep.$store('modal').share)\r\nconst shareConfig = computed(() => sheep.$store('app').platform.share)\r\nconst SharePosterRef = ref('')\r\n\r\nconst props = defineProps({\r\n shareInfo: {\r\n type: Object,\r\n default() {},\r\n },\r\n})\r\n\r\nconst state = reactive({\r\n showShareGuide: false, // H5 的指引\r\n showPosterModal: false, // 海报弹窗\r\n})\r\n\r\n// 操作 ②:生成海报分享\r\nconst onShareByPoster = () => {\r\n closeShareModal()\r\n if (!sheep.$store('user').isLogin) {\r\n showAuthModal()\r\n return\r\n }\r\n console.log(props.shareInfo)\r\n unref(SharePosterRef).getPoster()\r\n state.showPosterModal = true\r\n}\r\n\r\n// 操作 ①:直接转发分享\r\nconst onShareByForward = () => {\r\n closeShareModal()\r\n\r\n // #ifdef H5\r\n