index.js 852 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // uniapp -> 小程序分享能力
  2. export default {
  3. data() {
  4. return {
  5. //设置默认的分享参数
  6. share: {
  7. share_title: '快报嗨享平台',
  8. share_path: '/pages/index/index',
  9. share_imageUrl: '',
  10. share_desc: '',
  11. share_content: ''
  12. }
  13. }
  14. },
  15. onShareAppMessage(res) {
  16. return {
  17. // title: this.share.share_title,
  18. // path: this.share.share_path,
  19. // imageUrl: this.share.share_imageUrl,
  20. // desc: this.share.share_desc,
  21. // content: this.share.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. //分享到朋友圈
  36. onShareTimeline(res) {
  37. return {
  38. // title: this.share.share_title,
  39. // type: 0,
  40. // summary: "",
  41. }
  42. },
  43. }