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

wecomjsdk

v1.0.2

Published

企业微信官方jwxwork sdk CommonJS版

Downloads

109

Readme

企业微信jwxwork sdk npm版

基于官网jssdk文件修改,方便在webpack等环境使用

微信jssdk源码:https://res.wx.qq.com/open/js/jweixin-1.6.0.js

企业微信jwxwork sdk源码(需要引入上面的微信jssdk): https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js

企业微信jwxwork sdk源码(不需要引入上面的微信jssdk):https://res.wx.qq.com/wwopen/js/jsapi/jweixin-1.0.0.js

企业微信jssdk官方文档:https://work.weixin.qq.com/api/doc/90000/90136/90515

安装

npm i wecomjsdk

使用

    import wx from 'wecomjsdk';

    // 注入微信jssdk权限验证配置
    wx.config({
        beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
        debug: process.env.NODE_ENV === 'development' && DEBUG, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
        appId: $store.state.corpId, // 必填,企业微信的corpID
        timestamp: '', // 必填,生成签名的时间戳
        nonceStr: '', // 必填,生成签名的随机串
        signature: '', // 必填,签名,见附录1
        jsApiList: ['invoke'], // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
    });
    // 配置成功后在回调里处理企业微信agentConfig
    wx.ready(() => {
        // 注入企业微信jssdk权限验证配置
        wx.agentConfig({
            corpid: '', // 必填,企业微信的corpid,必须与当前登录的企业一致
            agentid: '', // 必填,企业微信的应用id (e.g. 1000247)
            timestamp: '', // 必填,生成签名的时间戳
            nonceStr: '', // 必填,生成签名的随机串
            signature: '',// 必填,签名,见附录-JS-SDK使用权限签名算法
            jsApiList: ['selectExternalContact'], //必填
            success: function(res) {
                // 回调
            },
            fail: function(res) {
                if(res.errMsg.indexOf('function not exist') > -1){
                    alert('版本过低请升级')
                }
            }
        });
    })