@fastweb/wechat-share_common

1.1.1 • 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"//分享图标
}

/@fastweb/wechat-share_common/

    Package Sidebar

    Install

    npm i @fastweb/wechat-share_common

    Weekly Downloads

    0

    Version

    1.1.1

    License

    ISC

    Last publish

    Collaborators

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