实现业务需求:
官网设置分享功能,微信和qq使用的二维码识别出网站,使用手机浏览器分享功能,新浪博客和贴吧使用a标签
问题描述:
<a @click="microblog()"/>//也可以直接使用href跳转,因为我这有动态获取的东西直接使用点击事件方便
microblog(picurl){
var microblog=
'http://v.t.sina.com.cn/share/share.php?title='+this.list.title+'&url='+ window.location.href+'&content=utf-8&sourceUrl='+window.location.href+'&pic='+picurl;
window.open(microblog,'newwindow');
},
postBar() {
var postBar=
'http://tieba.baidu.com/f/commit/share/openShareApi?title='+this.list.title+'&url='+ window.location.href+'&content=utf-8&sourceUrl='+window.location.href;
window.open(postBar,'newwindow');
}