Browse Source

上传

master
前端-胡立永 4 months ago
parent
commit
c09d0af8d5
1 changed files with 18 additions and 8 deletions
  1. +18
    -8
      mixins/share.js

+ 18
- 8
mixins/share.js View File

@ -1,3 +1,6 @@
import { mapState } from 'vuex'
export default {
data() {
return {
@ -9,21 +12,28 @@ export default {
}
}
},
computed : {
...mapState(['userInfo', 'configList']),
},
// 定义全局分享
// 1.发送给朋友
onShareAppMessage(res) {
return {
title: this.share.title,
path: this.share.path,
imageUrl: this.share.imageUrl,
let o = {
...this.share,
}
if(this.userInfo.id){
o.path = this.share.path + '?shareId=' + this.userInfo.id
}
return o
},
//2.分享到朋友圈
onShareTimeline(res) {
return {
title: this.share.title,
path: this.share.path,
imageUrl: this.share.imageUrl,
let o = {
...this.share,
}
if(this.userInfo.id){
o.path = this.share.path + '?shareId=' + this.userInfo.id
}
return o
},
}

Loading…
Cancel
Save