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

ameng-test

v0.0.2

Published

轻POS插件的对接包。

Readme

Lite POS Plugin Mate

轻POS插件的对接包。

安装步骤

1. 初始化项目

如果项目中还没有 package.json 文件,需要先初始化:

在项目终端输入:

npm init

按提示填写相关信息,生成 package.json 文件。

2. 安装依赖

安装轻pos插件所需的 npm 包:

npm install lite-pos-wx-plugin-mate

安装完成后,确保自己项目目录中存在 node_modules 文件夹。如果没有的话,重启微信开发工具。

3. 构建 npm 包

将安装的包构建到小程序可用的目录:

# 在微信开发者工具中点击 "工具" -> "构建 npm"

构建完成后,确保项目目录中存在 miniprogram_npm 文件夹。

使用说明

1. 配置轻pos插件

在项目的 app.json 中声明需要使用的插件:

{
  "plugins": {
    "lite-pos-plugin": {
      "version": "x.x.x",
      "provider": "xxxxxx",
      "export": "miniprogram_npm/lite-pos-wx-plugin-mate/utils.js"
    }
  }
}

2. B2B 支付配置

2.1 版本要求

确保使用的版本包为指定版本>=1.3.0

2.2 添加微信认证插件

在 app.json 中添加微信认证插件配置:

{
  "plugins": {
    "wx-auth-plugin": {
      "version": "latest",
      "provider": "wx69b7451feb427f0e"
    },
    "lite-pos-plugin": {
      "version": "x.x.x",
      "provider": "xxxxxx",
      "export": "miniprogram_npm/lite-pos-wx-plugin-mate/utils.js"
    }
  }
}

2.3 创建微信认证页面

  1. 创建页面文件,例如:/pages/wxAuth/wxAuth

  2. 页面的JSON:

{
  "usingComponents": {
    "wxb2b-authBridge": "/miniprogram_npm/wx-ui-components/components/auth-bridge/index"
  }
}
  1. 页面 WXML 中使用组件:
<wxb2b-authBridge></wxb2b-authBridge>

2.4 跳转收银台需新增参数

在跳转到收银台时,需要新增 wxauth_url参数、b2b_pay_key参数:

wx.navigateTo({
  url: `plugin://lite-pos-plugin/cashierV2?token=${token}&appid=${appid}&openid=${openid}&wxauth_url=${encodeURIComponent("/pages/wxAuth/wxAuth")}&b2b_pay_key=${b2bPayKey}`
})
跳转参数说明

| 参数名 | 必填 | 说明 | |--------|------|------| | wxauth_url | 是 | 2.3 中创建的页面的 path | | b2b_pay_key | 是 | base64 编码后的微信小程序的 session_key,具体技术询问收钱吧技术支持 |

注意事项

  1. 确保已正确安装和构建 npm 包
  2. 检查插件版本号是否正确
  3. 确保页面路径配置正确
  4. 注意参数传递的完整性

许可证

MIT