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'); - // } }; // 操作 ①:直接转发分享