1.shareTextQQFriend
功能
分享文本或网址到QQ好友
定义
WadeMobile.shareTextQQFriend(content)
参数
参数名称 | 参数类型 | 参数描述 | 参数备注 |
---|---|---|---|
content | string | 分享的文本或者网址 | 必填 |
范例
var text = $("#shareText").val();
WadeMobile.shareTextQQFriend(text);
备注
无
2.shareTextWeChatFriend
功能
分享文本或者网址到微信好友
定义
WadeMobile.shareTextWeChatFriend(content)
参数
参数名称 | 参数类型 | 参数描述 | 参数备注 |
---|---|---|---|
content | string | 分享的文本或者网址 | 必填 |
范例
var text = $("#shareText").val();
WadeMobile.shareTextWeChatFriend(text);
备注
无
3.shareFileQQFriend
功能
分享文件到QQ好友
定义
WadeMobile.shareFileQQFriend(type,content)
参数
参数名称 | 参数类型 | 参数描述 | 参数备注 |
---|---|---|---|
type | int | 分享文件的类型,0:图片,1:音频,2:视频 | 必填 |
content | string | 文件的本地路径 | 必填 |
范例
var imgPathType = 0;
var musicPathType = 1;
var videoPathType = 2;
var imgPath = "/storage/emulated/0/share/img.png";
var musicPath = "/storage/emulated/0/share/music.mp3";
var videoPath = "/storage/emulated/0/share/video.mp4";
WadeMobile.shareFileQQFriend(imgPathType,imgPath);//分享图片
WadeMobile.shareFileQQFriend(musicPathType,musicPath);//分享音频
WadeMobile.shareFileQQFriend(videoPathType,videoPath);//分享视频
备注
无
4.shareFileWeChatFriend
功能
分享文件到微信好友
定义
WadeMobile.shareFileWeChatFriend(type,comtent)
参数
参数名称 | 参数类型 | 参数描述 | 参数备注 |
---|---|---|---|
type | int | 分享文件的类型,0:图片,1:音频,2:视频 | 必填 |
content | string | 文件的本地路径 | 必填 |
范例
var imgPathType = 0;
var musicPathType = 1;
var videoPathType = 2;
var imgPath = "/storage/emulated/0/share/img.png";
var musicPath = "/storage/emulated/0/share/music.mp3";
var videoPath = "/storage/emulated/0/share/video.mp4";
WadeMobile.shareFileWeChatFriend(imgPathType,imgPath);//分享图片
WadeMobile.shareFileWeChatFriend(musicPathType,musicPath);//分享音频
WadeMobile.shareFileWeChatFriend(videoPathType,videoPath);//分享视频
备注
无
5.shareTextMore
功能
调用系统分享文本或网址
定义
WadeMobile.shareTextMore(content)
参数
参数名称 | 参数类型 | 参数描述 | 参数备注 |
---|---|---|---|
content | string | 分享的文本或者网址 | 必填 |
范例
var text = $("#shareText").val();
WadeMobile.shareTextMore(text);
备注
无
6.shareFileMore
功能
调用系统分享文件
定义
WadeMobile.shareFileMore(type,comtent)
参数
参数名称 | 参数类型 | 参数描述 | 参数备注 |
---|---|---|---|
type | int | 分享文件的类型,0:图片,1:音频,2:视频 | 必填 |
content | string | 文件的本地路径 | 必填 |
范例
var imgPathType = 0;
var musicPathType = 1;
var videoPathType = 2;
var imgPath = "/storage/emulated/0/share/img.png";
var musicPath = "/storage/emulated/0/share/music.mp3";
var videoPath = "/storage/emulated/0/share/video.mp4";
WadeMobile.shareFileMore(imgPathType,imgPath);//分享图片
WadeMobile.shareFileMore(musicPathType,musicPath);//分享音频
WadeMobile.shareFileMore(videoPathType,videoPath);//分享视频
备注
无
7.shareWebpageWechatFriend
功能 利用微信分享SDK将网页链接分享到微信好友,能附带原App的信息(例:App名,AppLogo)
定义
IpuMobile.shareWebpageWechatFriend(params);
参数 |参数名称|参数类型|参数描述|参数备注| |------|------|-----|------| |title||链接标题|| |link|String|链接Url|| |imgUrl|String|链接简介图片|| |desc|String|链接描述||
范例
var params = new $.DataMap();
params.put("title", "IPU秀");
params.put('link', 'http://www.aiipu.com');
params.put('imgUrl', 'http://www.icontuku.com/png/phone-set-full/phone204.png');
params.put('desc', '基于Hybrid开发模式的移动应用开发框架,集Native App良好用户交互体验优势和Web App低成本、跨平台的优势于一身的开发模式');
$("#wechatFriendWeb").click(function() {
IpuMobile.shareWebpageWechatFriend(params);
});
备注
1.需要依赖微信分享SDK 2.需要在微信开发平台申请App_Id,则需要通过官方审核,微信开发平台:https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Resource_Center_Homepage.html;
8.shareWebpageWechatTimeline
功能 利用微信分享SDK将网页链接分享到微信朋友圈,能附带原App的信息(例:App名,AppLogo)
定义
IpuMobile.shareWebpageWechatTimeline(params);
参数
参数名称 | 参数类型 | 参数描述 | 参数备注 |
---|---|---|---|
title | String | 标题 | |
link | String | 链接地址 | |
imgUrl | String | 链接简介图片 | |
desc | String | 链接描述 |
范例
var params = new $.DataMap();
params.put("title", "IPU秀");
params.put('link', 'http://www.aiipu.com');
params.put('imgUrl', 'http://www.icontuku.com/png/phone-set-full/phone204.png');
params.put('desc', '基于Hybrid开发模式的移动应用开发框架,集Native App良好用户交互体验优势和Web App低成本、跨平台的优势于一身的开发模式');
$("#wechatTimeline").click(function() {
IpuMobile.shareWebpageWechatTimeline(params);
});
备注
同7备注