shareMsg 分享功能,直接触发分享(微信,QQ,微博等)

shareMsg

分享功能,直接触发分享(微信,QQ,微博等)

#请求参数

Prop Type Required Default Description
param Object Y {} 属性: type:{ Type: String, Default: N/A, Description: wx 微信分享 qq QQ分享 sms 短信分享 weibo 微博分享 qzone QQ空间 wxTimeline 微信朋友圈 (分享类型) } title: desc: imgUrl: link: msgType:{ //^5.10.0 Type: String, Default: web, Description: web 图文 / img图片(为 img 时,imgurl 为分享图片的链接) } 请求参数

#参数代码示例

    let params = { 
      type: "wx",
      title: "分享的标题",
      desc: "分享描述的内容",
      imgUrl: "图片路径",
      type: "链接"
    }

#接口调用示例

let params = params
this.$bridge
  .shareMsg(params)
  .then(res => {
    this.$toast(res)
  })
  .catch(err => {
    this.$toast(err)
  })
posted on 2024-12-18 09:22  AtlasLapetos  阅读(24)  评论(0)    收藏  举报