This commit is contained in:
2020-12-02 16:33:04 +08:00
parent 52ee8e95ac
commit 5cafb95ee0
10 changed files with 14 additions and 21 deletions

View File

@@ -161,20 +161,13 @@ export default defineComponent({
console.log(index)
share().then((res: any)=>{
console.log(res)
let url = "";
if(index == 1){
const url = `https://service.weibo.com/share/share.php?url=${res.shareUrl}&appkey=2754574056&language=zh_cn&pic=${res.shareImg}&searchPic=true&title=${res.shareTitle}`
window.open(url, "_blank")
url = `https://service.weibo.com/share/share.php?url=${res.shareUrl}&appkey=2754574056&language=zh_cn&pic=${res.shareImg}&searchPic=true&title=${res.shareTitle}`
}else {
window.FB.ui({
method: 'share',
href: res.shareUrl,
quote: res.shareTitle
}, function(response: any){
console.log(response)
});
url = `https://www.facebook.com/sharer/sharer.php?%20u=${res.shareUrl}&t=${res.shareTitle}`
}
window.open(url, "_blank")
})
}
return{