租房小程序前端代码
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.

46 lines
1.0 KiB

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