@fastweb/wechat-share

2.0.0 • Public • Published

微信分享 Build Status npm


微信分享到好友 朋友圈 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"//分享图标
}

Dependencies (1)

Dev Dependencies (26)

Package Sidebar

Install

npm i @fastweb/wechat-share

Weekly Downloads

2

Version

2.0.0

License

ISC

Last publish

Collaborators

  • yuer
  • tellmepz
  • lkfu
  • hughgr
  • yuhonyon
  • deandai