|
|
@ -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 |
|
|
|
}, |
|
|
|
} |