|
|
@@ -17,7 +17,7 @@
|
|
|
<div class="mobile-share-box" v-if="showShare">
|
|
|
<div class="share-area">
|
|
|
<ul>
|
|
|
- <li class="share-item">
|
|
|
+ <li class="share-item" @click="shareWeChat">
|
|
|
<img src="/images/mobile/@2x/share/weChat@2x.png" alt="">
|
|
|
<span>微信</span>
|
|
|
</li>
|
|
|
@@ -25,7 +25,7 @@
|
|
|
<img src="/images/mobile/@2x/share/QQ@2x.png" alt="">
|
|
|
<span>QQ</span>
|
|
|
</li>
|
|
|
- <li class="share-item">
|
|
|
+ <li class="share-item" @click="shareWeibo">
|
|
|
<img src="/images/mobile/@2x/share/sina@2x.png" alt="">
|
|
|
<span>微博</span>
|
|
|
</li>
|
|
|
@@ -117,6 +117,16 @@
|
|
|
} else {
|
|
|
this.showDefaultAddr = true
|
|
|
}
|
|
|
+ },
|
|
|
+ shareWeibo: function () {
|
|
|
+ let _shareUrl = 'http://v.t.sina.com.cn/share/share.php?&appkey=895033136' // 真实的appkey,必选参数
|
|
|
+ _shareUrl += '&url=' + encodeURIComponent(document.location) // 参数url设置分享的内容链接|默认当前页location,可选参数
|
|
|
+ _shareUrl += '&title=' + encodeURIComponent(document.title) // 参数title设置分享的标题|默认当前页标题,可选参数
|
|
|
+ _shareUrl += '&source=' + encodeURIComponent('')
|
|
|
+ _shareUrl += '&sourceUrl=' + encodeURIComponent('')
|
|
|
+ _shareUrl += '&content=' + 'utf-8' // 参数content设置页面编码gb2312|utf-8,可选参数
|
|
|
+ _shareUrl += '&pic=' + encodeURIComponent('') // 参数pic设置图片链接|默认为空,可选参数
|
|
|
+ window.open(_shareUrl, '_blank', 'width=' + 300 + ',height=' + 300 + ',top=' + 300 + ',left=' + 300 + ',toolbar=no,menubar=no,scrollbars=no, resizable=1,location=no,status=0')
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -148,6 +158,6 @@
|
|
|
color:#fff;
|
|
|
}
|
|
|
.mobile-header i{
|
|
|
- font-size:.32rem;
|
|
|
+ font-size:.4rem;
|
|
|
}
|
|
|
</style>
|