import QRCode1 from 'qrcodejs2'shareTo(types) {//types分享的类型var title, imageUrl, url, description//获取文章标题title = this.kvr.workInfo.name//获取网页中内容的第一张图片地址作为分享图imageUrl = this.kvr.workInfo.cover//获取当前网页urlurl = process.env.VUE_APP_TOUR + '/?id=' + this.kvr.workInfo.id//获取网页描述description = this.kvr.workInfo.descriptionif (types == 'qzone') {window.open('https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' + encodeURIComponent(url) + '&sharesource=qzone&title=' + title + '&pics=' + imageUrl + '&summary=' + description)}if (types == 'sina') {window.open('http://service.weibo.com/share/share.php?url=' + encodeURIComponent(url) + '&sharesource=weibo&title=' + title + '&pic=' + imageUrl)}if (types == 'wechat') {if (this.$refs.qrcode) {this.$refs.qrcode.innerHTML = ''}this.wechatShareVisible = truethis.$nextTick(() => {this.qrcode = new QRCode1(this.$refs.qrcode, {width: 135,height: 135,text: url,})})}},