# 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: {Type: String, Default: N/A, Description: 分享的标题 } desc: {Type: String, Default: N/A, Description: 分享的文本内容 } imgUrl: {Type: String, Default: N/A, Description: 分享的图片链接 } link: {Type: String, Default: N/A, Description: 分享的跳转链接 } msgType: { //^5.10.0Type: String, Default: web ,Description: web 图文 / img 图片(为 img 时,imgurl 为分享图片的链接)} | 请求参数 |
# 参数代码示例
let params = {
type: "wx",
title: "分享的标题",
desc: "分享描述的内容",
imgUrl: "图片路径",
type: "链接"
}
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
# 接口调用示例
let params = params
this.$bridge
.shareMsg(params)
.then(res => {
this.$toast(res)
})
.catch(err => {
this.$toast(err)
})
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9