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 🙏

© 2024 – Pkg Stats / Ryan Hefner

weixin-toolkit

v1.0.2

Published

轻松使用微信 js-sdk!ez access to wechat js functions with wechat js sdk centre service

Downloads

28

Readme

weixin-sharelink

Build Status Build Status Build Status

An ez access to wechat js sdk.

Best for frontend and backend isolation env in enterprises or orgnizations wechat development.

You need a centre service handling tasks: secret key store, access token keep and renew, signature computed and so on.

The service could be designed as an open api so that Access-Control-Allow-Origin, Access-Control-Allow-Headers, Access-Control-Allow-Methods might be set for CORS. Consequencely, access control strategies should be added.

轻松使用微信官方 js sdk

适用于前后分离的企业或者组织团体。
需后端中控服务配合。
中控服务需完成保存密钥,维护 token,生成签名等功能。

中控服务可以设计成开放 API。需要添加相关的 CORS 与 访问策略。

notice

  • The first param is centre control service param. Here it should be sent by axios after querystring handled. That means content-type is application/x-www-form-urlencoded.
  • The second is jsApiList, for example ["updateAppMessageShareData", "chooseImage"].
  • Optional The third is debug for js sdk, default false.
  • Optional The forth param. If set 'json', axios acts defaultly, that is content-type is application/json.
  • 第一个参数是发送到中控服务的参数。默认发送的 content-typeapplication/x-www-form-urlencoded.
  • 第二个是 jsApiList, 例如 ["updateAppMessageShareData", "chooseImage"].
  • 第三个可选参数是 js sdk debug, 默认 false.
  • 第四个可选参数,如果设置为 'json',将使用 axios 的默认行为,content-typeapplication/json

tips

Wechat official API doc

useage

install
npm i -S weixin-sharelink

for commonjs and ts

import { WeixinToolkit } from 'weixin-toolkit';

new wxtk = WeixinToolkit(
    // centre control service param
    {
        url: "<centre service url>",
        params: <centre servic post params>
    },

    // string[]...
    ["updateAppMessageShareData", "chooseImage"],

    // optional, default false
    // true,

    // optional param, if your centre control service require json data
    // 'json'
)

wxtk.wx.chooseImage({...})

link

Looking for centre service?
Weixin sdk js centre service
Looking for openbox-using wechat share? Weixin shareLink