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

quec-wx-sdk-dev

v1.0.0

Published

微信小程序1.1.2

Downloads

8

Readme

微信小程序SDK

将公司通讯层底层接口统一封装,可发布到私仓,且可通过npm方式,供其他微信项目或插件使用的工具包集合。
服务名称:quec-wx-sdk
适用于微信小程序端。

一、功能列表

| 功能模块 | 功能说明 | 实现版本 | | ---------------------------- | --------------------------- | ---------------------- | | 用户模块 | 微信一键登录 | 1.0.0 | | 用户模块 | 我的-个人信息-展示、修改头像、修改昵称 | 1.0.0 | | 用户模块 | 我的-系统设置-注销账号、退出登录 | 1.0.0 | | 用户模块 | 我的-关于我们-服务协议、用户协议、当前版本 | 1.0.0 |

二、用户模块

1、接口/属性

设置网络请求基础信息(httpConfig.js)

| 接口名称|说明|默认值| 示例代码 | | :-------- | :------- | :-------- | :-------- | | setBaseURL('url')|设置接口请求基础Url|http://192.168.25.64:30006/ | httpConfig.setBaseURL(url) | | setUserDomain('domain')|设置用户域|C.DM.29772.1 |httpConfig.setUserDomain(domain) | | setUserDomainSecret('domain')|设置用户域密钥|FPDko3tiB5HgTJhpHaUjpsYNGKbEHfjkqe2u8pB8gtKp|httpConfig.setUserDomainSecret(domain)|

API请求接口 (httpUser.js)

| 接口名称 | 说明 | 示例代码 | | :-----------| :------------| :-------------- | | wxLogin(data) | 微信一键登录 | httpUser.wxLogin(data) | | userLogout(data) | 退出登录 | httpUser.userLogout(data) | | userDelete(data) | 注销账户 | httpUser.userDelete(data) | | getUserInfo(data) | 查询用户信息 | httpUser.getUserInfo(data) | | setUserInfo(data) | 修改用户信息 | httpUser.setUserInfo(data) | | refreshToken(data) | 刷新token | httpUser.refreshToken(data) | | validToken(data) | 验证token是否有效 | httpUser.validToken(data) |

备注:
1) 如果Content-Type 为application/x-www-form-urlencoded;charset=UTF-8,在对应API请求接口中,请传isFormat: 1,例如:
  /*
   * 修改用户信息接口
   */
  static async setUserInfo (data) {
    return await request(urlConst.setUserInfo, {
      data: data,
      method: "PUT",
      isFormat: 1
    })
  }
2) 如需清空token、刷新token值,在对应的API请求接口中,请传isDelete: 1,例如:
  /*
  * 退出登录
  */
  static async userLogout (data) {
    return await request(urlConst.userLogout, {
      data: data,
      method: "DELETE",
      isDelete: 1
    })
  }
存储类 (storeUser.js)

| 接口名称 | 说明 | 示例代码 | | :----------- | :------------| :-----------| | getTokenKey() | 获取登录token的Key | storeUser.getTokenKey() | | getToken() | 获取登录token值 | storeUser.getToken() | | setToken(token) | 设置登录token | storeUser.setToken(token) | | removeToken() | 删除登录token(无参) | storeUser.removeToken() | | removeTokenByKey(key) | 删除登录token(token的Key) | storeUser.removeTokenByKey(key) | | getRefreshKey() | 获取刷新token的Key | storeUser.getRefreshKey() | | getRefreshToken() | 获取刷新token值 | storeUser.getRefreshToken() | | setRefreshToken(token) | 设置刷新token值 | storeUser.setRefreshToken(token) | | removeRefreshToken() | 删除刷新token(无参) | storeUser.removeRefreshToken() | | removeRefreshTokenByKey(refreshTokenKey) | 删除刷新token(刷新token的Key) | storeUser.removeRefreshTokenByKey(refreshTokenKey) |

接口提示语 (lang.js)

| 接口名称 | 说明 | 示例代码 | | :----------- | :------------| :-----------| | setCodeLang(obj) | 设置接口返回code提示语 | lang.setCodeLang(obj) | | getCodeLang() | 获取接口返回code提示语(应用于request.js中) | lang.getCodeLang() |

三、对外暴露模块

import httpConfig from './http/config/httpConfig.js'
import httpUser from './http/module/httpUser.js'
import httpDevice from './http/module/httpDevice.js'
import storeUser from './store/storeUser.js'
import codeConst from './http/config/codeConst.js'

export default {
  httpConfig,
  httpUser,
  httpDevice,
  storeUser,
  codeConst
}

四、安装和引用

安装
npm install quec-wx-sdk --save

引用

import wxsdk from 'quec-wx-sdk'

let params = {
  appId: '',
  authorizedMobliePhone: true,
  authorizedUserInfo: true,
  wxCode: '',
  wxUserInfoDecrypData: {},
  params.random = '',
  wxPhoneDecryptData:{}
}
wxsdk.httpUser.wxLogin(data).then((res) => {
  if (res.code === 200) {
    console.log("res success:" + JSON.stringify(res))
    //处理成功的逻辑
  }
}, (fail) => {
  console.log("res fail:" + JSON.stringify(fail))
  ////处理失败的逻辑
})

五、底层依赖

  "dependencies": {
     "crypto-js": "^4.1.1",
     "js-md5": "^0.7.3""
  }