瑶都万能墙
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
815 B

10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
  1. import { mapState } from 'vuex'
  2. export default {
  3. data() {
  4. return {
  5. // 默认的全局分享内容
  6. share: {
  7. title: '瑶都万能墙',
  8. path: '/pages/index/index', // 全局分享的路径,比如 首页
  9. // imageUrl: '/static/image/login/logo.png', // 全局分享的图片(可本地可网络)
  10. }
  11. }
  12. },
  13. computed : {
  14. ...mapState(['userInfo', 'configList']),
  15. },
  16. // 定义全局分享
  17. // 1.发送给朋友
  18. onShareAppMessage(res) {
  19. let o = {
  20. ...this.share,
  21. }
  22. if(this.userInfo.id){
  23. o.path = this.share.path + '?shareId=' + this.userInfo.id
  24. }
  25. return o
  26. },
  27. //2.分享到朋友圈
  28. onShareTimeline(res) {
  29. let o = {
  30. ...this.share,
  31. }
  32. if(this.userInfo.id){
  33. o.path = this.share.path + '?shareId=' + this.userInfo.id
  34. }
  35. return o
  36. },
  37. }