@fastweb/wechat-share_common
v1.1.1
Published
微信分享
Downloads
6
Keywords
Readme
微信分享
微信分享到好友 朋友圈 qq
安装
ems:
cnpm i @fastweb/wechat-share -S
common:
cnpm i @fastweb/wechat-share_common -S
用法
import WechatShare from '@fastweb/wechat-share';
let shareData={
"link": location.href,
"title": "糖友春季饮食攻略",
"desc": "让我们一品春天的味道",
"content": "让我们一品春天的味道",
"imageUrl": "http://static.91jkys.com/newactivity/dist/chunjiyinshi/img/share.jpg"
};
let wshare=new WechatShare(shareData,successFn,cancelFn);
wshare.initShare();
方法
initShare 初始化分享
setShare(shareData,successFn,cancelFn) 重置分享内容及回调
shareData
{
"link": location.href,//分享链接
"title": "糖友春季饮食攻略",//标题
"desc": "让我们一品春天的味道",//分享正文
"content": "让我们一品春天的味道",//分享正文
"imageUrl": "http://static.91jkys.com/newactivity/dist/chunjiyinshi/img/share.jpg"//分享图标
}