# shareMsg

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

# 调用方式

shareMsg(params)
1

返回 Promise,使用 then/catch 或 await 处理结果。 接收单个业务参数;是否需要传参按下方参数表约定,无业务参数时可省略。具体字段及返回数据由宿主原生约定。

# 请求参数

Prop Type Required Default Description
-- Object N 分享参数
-type String N 分享类型,wx表示微信分享,qq表示qq分享,sms表示短信分享,weibo表示新浪微博,qzone表示QQ空间,wxTimeline表示微信朋友圈
-title String N 分享的标题
-desc String N 分享的文本内容
-imgUrl String N 分享的图片链接
-link String N 分享的跳转链接

# 接口调用示例

this.$bridge.shareMsg(params);
1

# 返回参数

  • 成功时返回
Prop Type Default Description
errorCode Number N/A
shareType String N/A 分享类型,weibo,wx,wxTimeline,qq,qzone,image,sms
  • 失败时返回
Prop Type Default Description
errorCode Number N/A 错误码
errorMsg String N/A 错误消息