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

htkpublish-app-bridge

v1.0.3

Published

app与H5交互

Readme

htkpublish-app-bridge

H5通过WebView容器与Native交互

采用ES6标准打包的js库

install

npm官网安装源

npm install htkpublish-app-bridge --save

JS 前端调用

导入头文件

import PublishAppBridge from 'htkpublish-app-bridge';

应用

  • 是否为发行APP环境
PublishAppBridge.isAppEnv((info) => {
  console.log('app环境信息', info);  
  // app环境信息 {"isApp":true,"appVersion":"1.0.0","appEnv":"pro"}(pro=生产环境;dev=开发环境;test=测试环境)
});
  • 重新登录
PublishAppBridge.tokenInvalid();
  • 网页关闭
PublishAppBridge.pageClose();
  • APP本地数据保存
PublishAppBridge.appStorageSave(strKey, strVal);
  • APP本地数据删除
PublishAppBridge.appStorageRemove(strKey);
  • APP本地数据查询
PublishAppBridge.appStorageGet(key, (val) => {
  console.log('取值结果:' + val);
});
  • 进入发卡流程
PublishAppBridge.navCardIssueFlow("ETC办理记录id", (issueRet) => {
  console.log("发卡结果:" + issueRet); // 发卡结果:SUCCESS/FAILED/CANCEL
});
  • 进入OBU发行流程
PublishAppBridge.navObuIssueFlow("ETC办理记录id", (issueRet) => {
  console.log("发行结果:" + issueRet); // 发行结果:SUCCESS/FAILED/CANCEL
});
  • 进入OBU激活流程
PublishAppBridge.navObuActivateFlow("ETC办理记录id", (activateRet) => {
  console.log("激活结果:" + activateRet);  // 激活结果:SUCCESS/FAILED/CANCEL
});
  • 进入OBU解绑流程
PublishAppBridge.navUnBindFlow((unBindRet) => {
  console.log("解绑结果:" + unBindRet);  // 解绑结果:SUCCESS/FAILED/CANCEL
});

更新说明

v1.0.3(2021/10/13)

  1. 新增“进入OBU解绑流程”方法;

v1.0.2(2021/10/3)

  1. “进入发卡流程”方法增加结果回调(发卡成功/发卡失败/发卡取消);
  2. “进入OBU发行流程”方法增加结果回调(发行成功/发行失败/发行取消);
  3. “进入OBU激活流程”方法增加结果回调(激活成功/激活失败/激活取消);

v1.0.1(2021/9/27)

  1. 新增“进入发卡流程”交互方法;
  2. 新增“进入OBU发行流程”交互方法;
  3. 新增“进入OBU激活流程”交互方法;

v1.0.0(2021/9/10)

  1. 提供H5与Native-WebView容器之间的通讯交互方法;