From 58db003d4e9e4ab9753499cb08690db7224bbb79 Mon Sep 17 00:00:00 2001 From: "lenovo008\\lenovo" Date: Mon, 12 Aug 2024 11:19:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=80=E8=AF=B7=E6=B5=B7=E6=8A=A5=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../s-share-modal/s-share-modal.vue | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/yudao-mall-uniapp-master/sheep/components/s-share-modal/s-share-modal.vue b/yudao-mall-uniapp-master/sheep/components/s-share-modal/s-share-modal.vue index ea7e632..464b8c0 100644 --- a/yudao-mall-uniapp-master/sheep/components/s-share-modal/s-share-modal.vue +++ b/yudao-mall-uniapp-master/sheep/components/s-share-modal/s-share-modal.vue @@ -68,6 +68,7 @@ import sheep from '@/sheep'; import canvasPoster from './canvas-poster/index.vue'; import { closeShareModal, showAuthModal } from '@/sheep/hooks/useModal'; +import { getWxaQrcode } from './canvas-poster/poster/index.js'; const show = computed(() => sheep.$store('modal').share); const shareConfig = computed(() => sheep.$store('app').platform.share); @@ -87,8 +88,18 @@ // 操作 ②:生成海报分享 const onShareByPoster = async () => { + const res = await getWxaQrcode(); + const isHave = res.slice(-5) + if (isHave === ",null") { + console.log(res, 'q'); + uni.showToast({ + title: '无权推广', + duration: 2000, + icon: 'none' + }) + return + } closeShareModal(); - console.log(sheep.$store('user').isLogin,'sheep$store(user)isLogin111111111111') if (!sheep.$store('user').isLogin) { showAuthModal(); console.log('打开授权弹框11111111111111111') @@ -97,20 +108,6 @@ console.log(props.shareInfo,'1111'); unref(SharePosterRef).getPoster(); state.showPosterModal = true; - // const res = await unref(SharePosterRef).getPoster(); - // console.log(res,'不知名方法海报getPoster1111111111111111111'); - // const isHave = res[3].src.slice(-5) - // console.log(isHave,'isHave判断什么存在11111111111111111'); - // if (isHave===",null"){ - // uni.showToast({ - // title: '无权推广', - // duration: 2000, - // icon: 'none' - // }) - // }else{ - // state.showPosterModal = true; - // console.log('改变showPosterModal的值为true,应是显示弹框11111111111111111'); - // } }; // 操作 ①:直接转发分享