1、手机端网页项目是用vue做的。
2、找到是百度社会化分享插件。
3、引入报错
4、请问怎么解决
引用文字
<template>
<div class="list">
<!--<div class="item" v-for="item in 10" :key="item">商品详情{{item}}{{$store.state.num}}</div>-->
<div class="bdsharebuttonbox">
<a href="#" class="bds_more" data-cmd="more"></a>
<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
<a href="#" class="bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a>
<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a>
<a href="#" class="bds_douban" data-cmd="douban" title="分享到豆瓣网"></a>
</div>
</div>
</template>
<script>
export default {
data(){
return {
list:[]
}
},
methods:{
initFn(){
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)[0][(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
},
},
mounted(){
this.initFn()
}
}
</script>
去掉with