npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@fxss5201/wx-qq-share

v0.1.4

Published

wx-qq-share定制微信、qq分享

Readme

wx-qq-share

定制微信,手机QQ,QQ空间APP内的分享内容。

示例:示例,此示例暂时只提供QQ和QQ空间分享(微信需要配置参数)。

代码参照http://open.mobile.qq.com/api/component/share,修改点如下:

  1. 将微信改为采用最新版1.4.0,并加入updateAppMessageShareDataupdateTimelineShareData方法;
  2. 增加wxUrl参数,微信分享链接时该链接域名或路径必须与当前页面对应的公众号JS安全域名一致即可,但手机QQ限制分享URL必须与页面URL同一域名,否则设置不生效,所以此处增加单独设置微信分享链接,仅在微信APP分享时会优先采用;
  3. 增加typedataUrl参数,用于设置onMenuShareAppMessage可使用;
  4. 支持import引用。

更多关于微信设置的请参照微信官方文档

用法

使用模块加载器

npm install --save-dev @fxss5201/wx-qq-share
import { setShareInfo } from '@fxss5201/wx-qq-share'

setShareInfo({
  title: 'wx-qq-share定制微信、qq分享', // 分享标题
  summary: '定制微信,手机QQ,QQ空间APP内的分享内容。定制微信,手机QQ,QQ空间APP内的分享内容。', // 分享内容
  pic: 'http://www.fxss5201.cn/wx-qq-share/share.jpg', // 分享图片
  url: 'http://www.fxss5201.cn/wx-qq-share/', // 分享链接
  // wxUrl: '', // 微信分享链接时该链接域名或路径必须与当前页面对应的公众号JS安全域名一致即可
  // 但手机QQ限制分享URL必须与页面URL同一域名,否则设置不生效,所以此处增加单独设置微信分享链接,微信分享会优先采用
  type: '', // 分享类型,music、video或link,不填默认为link
  dataUrl: '', // 如果type是music或video,则要提供数据链接,默认为空
  // 微信权限验证配置信息,若不在微信传播,可忽略
  WXconfig: {
    swapTitleInWX: true, // 是否标题内容互换(仅朋友圈,因朋友圈内只显示标题)
    appId: appId, // 公众号的唯一标识
    timestamp: timestamp, // 生成签名的时间戳
    nonceStr: nonceStr, // 生成签名的随机串
    signature: signature // 签名
  }
})

script 引入

wx-qq-share 下载 wx-qq-share.umd.min.js 文件

<script src="js/wx-qq-share.umd.min.js"></script>
<script>
setShareInfo({
  title: '定制微信、qq分享title', // 分享标题
  summary: '定制微信、qq分享title定制微信、qq分享title', // 分享内容
  pic: 'http://www.fxss5201.cn/project/share-test/img/share.jpg', // 分享图片
  url: 'http://www.fxss5201.cn/project/share-test/', // 分享链接
})
</script>