邀请海报权限

main
lenovo008\lenovo 3 months ago
parent f0292fb476
commit 58db003d4e

@ -68,6 +68,7 @@
import sheep from '@/sheep'; import sheep from '@/sheep';
import canvasPoster from './canvas-poster/index.vue'; import canvasPoster from './canvas-poster/index.vue';
import { closeShareModal, showAuthModal } from '@/sheep/hooks/useModal'; import { closeShareModal, showAuthModal } from '@/sheep/hooks/useModal';
import { getWxaQrcode } from './canvas-poster/poster/index.js';
const show = computed(() => sheep.$store('modal').share); const show = computed(() => sheep.$store('modal').share);
const shareConfig = computed(() => sheep.$store('app').platform.share); const shareConfig = computed(() => sheep.$store('app').platform.share);
@ -87,8 +88,18 @@
// //
const onShareByPoster = async () => { 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(); closeShareModal();
console.log(sheep.$store('user').isLogin,'sheep$store(user)isLogin111111111111')
if (!sheep.$store('user').isLogin) { if (!sheep.$store('user').isLogin) {
showAuthModal(); showAuthModal();
console.log('打开授权弹框11111111111111111') console.log('打开授权弹框11111111111111111')
@ -97,20 +108,6 @@
console.log(props.shareInfo,'1111'); console.log(props.shareInfo,'1111');
unref(SharePosterRef).getPoster(); unref(SharePosterRef).getPoster();
state.showPosterModal = true; state.showPosterModal = true;
// const res = await unref(SharePosterRef).getPoster();
// console.log(res,'getPoster1111111111111111111');
// const isHave = res[3].src.slice(-5)
// console.log(isHave,'isHave11111111111111111');
// if (isHave===",null"){
// uni.showToast({
// title: '广',
// duration: 2000,
// icon: 'none'
// })
// }else{
// state.showPosterModal = true;
// console.log('showPosterModaltrue11111111111111111');
// }
}; };
// //

Loading…
Cancel
Save