shareMixin.js 668 B

1234567891011121314151617181920212223242526272829
  1. import Vue from 'vue'
  2. const shareMixin = {
  3. data() {
  4. return {
  5. staticUrl: this.global.staticUrl,
  6. }
  7. },
  8. onShareAppMessage(res) {
  9. //分享转发
  10. if (res.from === 'button') {
  11. // 来自页面内转发按钮
  12. }
  13. return {
  14. title: '联合丽格集采商城',
  15. path: 'pages/tabBar/home/index',
  16. imageUrl: `${this.staticUrl}icon_share_home@2x.png`
  17. }
  18. },
  19. // 分享朋友圈
  20. onShareTimeline() {
  21. return {
  22. title: '联合丽格集采商城',
  23. path: 'pages/tabBar/home/index',
  24. imageUrl: `${this.staticUrl}icon_share_home@2x.png`
  25. }
  26. }
  27. }
  28. export default shareMixin