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.

37 lines
707 B

1 week ago
  1. const imageUrl='https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/share/share.png';
  2. export default {
  3. data() {
  4. return {
  5. //设置默认的分享参数
  6. share: {
  7. title: '猫妈狗爸',
  8. path: '/pages/index',
  9. imageUrl: imageUrl,
  10. desc: '猫妈狗爸',
  11. content: '猫妈狗爸'
  12. }
  13. }
  14. },
  15. onShareAppMessage(res) {
  16. return {
  17. title: this.share.title,
  18. path: this.share.path,
  19. imageUrl: this.share.imageUrl,
  20. desc: this.share.desc,
  21. content: this.share.content,
  22. success(res) {
  23. uni.showToast({
  24. title: '分享成功'
  25. })
  26. },
  27. fail(res) {
  28. uni.showToast({
  29. title: '分享失败',
  30. icon: 'none'
  31. })
  32. }
  33. }
  34. },
  35. onShareTimeline() {},
  36. }