uclean-share-plugin
v0.0.30
Published
分享插件
Downloads
35
Readme
分享插件
uclean-share-plugin
插件安装与卸载
卸载插件
npm uninstall uclean-share-plugin
安装插件
npm install uclean-share-plugin
在android/app/src/main/java/com/ujing/franchisee/MainActivity.java 的init方法中增加 add( UcleanSharePlugin.class );
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
// Additional plugins you've installed go here
// Ex: add(TotallyAwesomePlugin.class);
add( UcleanSharePlugin.class );
}});
js调用方法
分享第三方平台
const { UcleanSharePlugin } = Capacitor.Plugins;
const result = await UcleanSharePlugin.openSharePlatform({
type: number,
contentType: number,
title: String,
description: String,
thumb: String,
url: String
});
参数
{
type: number, //分享类型 1:微信好友 2:微信朋友圈
contentType: number, //分享内容类型 1:文本 2:图片 3:网页
title: String, //分享标题
description: String, //分享内容
thumb: String, //分享图片url
url: String //分享链接
}
返回值格式
{
errorCode: String,
errorMessage: string
}
其他方法以及object具体参数,参考文档:https://ujing.yuque.com/sw_dev/native/salqeo