|
@@ -41,6 +41,7 @@ import { Icon, Toast, GoodsAction, GoodsActionIcon, GoodsActionButton } from 'va
|
|
|
import Recharge from '@/components/Recharge.vue'
|
|
|
import sharePop from '@/components/SharePopup.vue'
|
|
|
import { MixinTop } from '@/utils/mixin-top'
|
|
|
+import { weChatShare } from '@/utils/wxShare'
|
|
|
const pdfjsLib = require('pdfjs-dist/build/pdf.js')
|
|
|
const pdfjsViewer = require('pdfjs-dist/web/pdf_viewer.js')
|
|
|
|
|
@@ -120,12 +121,21 @@ export default class extends Vue {
|
|
|
window.removeEventListener('scroll', this.watchPage)
|
|
|
}
|
|
|
|
|
|
+ async getShareUrl () {
|
|
|
+ const { data } = await this.getShare({ docId: this.docIds })
|
|
|
+ this.links = data.url || location.href
|
|
|
+ // 注册微信sdk
|
|
|
+ weChatShare({
|
|
|
+ config: {
|
|
|
+ title: this.detailData.docName,
|
|
|
+ desc: this.detailData.docSummary,
|
|
|
+ url: this.links
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
shared () {
|
|
|
;(this.$refs.shares as any).show = true
|
|
|
- this.getShare({ docId: this.docIds }).then((res: any) => {
|
|
|
- console.log(res)
|
|
|
- this.links = res.data
|
|
|
- })
|
|
|
}
|
|
|
|
|
|
// updateText (type: any, value = '') {
|
|
@@ -208,6 +218,7 @@ export default class extends Vue {
|
|
|
this.buyShow()
|
|
|
}
|
|
|
this.collectd = res.data.collect
|
|
|
+ this.getShareUrl()
|
|
|
})
|
|
|
this.getCoin({ B: true }).then((res: any) => {
|
|
|
console.log(res.data.data)
|