Appearance
分享相关
介绍
shareUrl:直接分享内容到第三方平台。 showMoreSheet:导航栏顶部更多功能,目前支持分享、重新加载页面
目录
分享
接口名称
TrinaPlugin shareUrl
示例
js
window.cordova.exec(
(data) => {
console.log("成功", data);
},
(err) => {
console.log("失败", err);
},
"TrinaPlugin",
"shareUrl",
[
{
shareLink: "https://download-app.trinablue.com/#/promote",
shareTitle: "分享标题",
shareInfo: "分享内容",
shareIcon: "https://download-app.trinablue.com/static/images/logo.png",
},
]
);
API
入参
| 参数 | 必传 | 类型 | 默认值 | 说明 |
|---|---|---|---|---|
| shareLink | 是 | string | 无 | 分享链接 |
| shareTitle | 是 | string | 无 | 分享标题 |
| shareInfo | 是 | string | 无 | 分享内容 |
| shareIcon | 是 | string | 无 | 分享图标 |
出参
成功返回:
string文本说明(分享平台名称)失败返回: JSON 数据
参数 必传 类型 说明 shareMedia 是 string分享平台名称 error 是 string错误信息
更多功能
接口名称
TrinaPlugin showMoreSheet
示例
js
window.cordova.exec(
(data) => {
console.log("成功", data);
},
(err) => {
console.log("失败", err);
},
"TrinaPlugin",
"showMoreSheet",
[
{
shareLink: "https://download-app.trinablue.com/#/promote",
shareTitle: "分享标题",
shareInfo: "分享内容",
shareIcon: "https://download-app.trinablue.com/static/images/logo.png",
},
]
);
API
入参
数组,第一个元素为分享内容
| 参数 | 必传 | 类型 | 默认值 | 说明 |
|---|---|---|---|---|
| shareLink | 是 | string | 无 | 分享链接 |
| shareTitle | 是 | string | 无 | 分享标题 |
| shareInfo | 是 | string | 无 | 分享内容 |
| shareIcon | 是 | string | 无 | 分享图标 |
出参
- 成功返回:
Bool