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

@tslib/qy-wx-lib

v0.0.3

Published

TypeScript weixin

Downloads

3

Readme

qyWxLib 企业微信公共库

  • 仅封装与企业微信服务器通信接口函数
  • 不提供 db、log 等操作

一、用法

  1. 先在主工程 index.ts 中创建微信服务
  2. 然后在其他文件中可以直接调用库文件接口函数
// 主工程中创建
import wx from '@tslib/qy-wx-lib';
import wxCfg from './cfg.school.wx';
wx.createWx(wxCfg);
// 调用接口
import wx from '@tslib/qy-wx-lib';
await wx.getWxUser().userFromCode();

二、提供的接口

1. wxLib

  • makeWeixinAuthUrl: 微信认证进行跳转的 url

2. wxMsg 发送应用消息

  • sendText: 发送文本消息
  • sendImage: 发送图片消息

3. wxUser 用户管理

  • userFromCode: 通过 code 获取用户信息

4. wsTxl 通讯录

  • deptCreate: 创建部门
  • deptUpdate: 更新部门
  • deptDept: 删除部门
  • getUserInfoById: 通过 id 获取用户信息
  • userCreate: 创建成员
  • userUpdate: 更新成员
  • userDel: 批量删除成员
  • userSimpleList: 通过部门 id,获取部门成员列表(简单信息)
  • userList: 通过部门 id,获取部门成员列表(详情)

三、开发调试方法

1、调试主工程

  • 将本地 html 的 webpack 的应用端口映射到与服务器的 nginx 对应响应端口上,
  • webpack 自动将请求转到本地 server 上
端口映射
ssh -CvNR 7001:127.0.0.1:本地html端口 [email protected]

2、修改库文件时

vscode 单独打开 qyWxLib,开启 tsc 监视任务

// 启动调试主程序 test
DEBUG=* node dist/test/index.js