Socket
Socket
Sign inDemoInstall

dxy-wechat-share

Package Overview
Dependencies
2
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dxy-wechat-share

丁香园前端微信分享组件


Version published
Weekly downloads
5
increased by400%
Maintainers
2
Install size
938 kB
Created
Weekly downloads
 

Readme

Source

dxy-wechat-share

npm npm

丁香园前端微信分享组件

使用方法

1. 使用 npm 安装

安装

$ npm install dxy-wechat-share --save

使用
var dxy_wechat_share = require('dxy-wechat-share');
dxy_wechat_share(options);

2. 通过 <script> 直接引用

引用
<script src="jquery.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
<script src="dxy-wechat-share.min.js"></script>
使用
var dxy_wechat_share = require('dxy-wechat-share');    // 此时 dxy_wechat_share 为全局变量
dxy_wechat_share(options);

API

dxy_wechat_share(options);

options:

  • debug: Boolean, 启用debug模式, 默认为false

  • title: String, 分享显示的标题, 默认为页面title

  • desc: String, 分享显示的描述, 默认为页面title

  • link: String, 分享链接, 默认为当前链接

  • imgUrl: String, 分享显示的图片

  • success: Object, 分享成功回调函数

  • cancel: Object, 取消分享回调函数

配置

配置信息API: 全局变量 window.wx_share

Keywords

FAQs

Last updated on 29 Dec 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc