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

cordova.plugin.ths.znxl

v1.1.6

Published

基于智能小鹿APP,形成插件

Readme

简介

智能小鹿浮窗插件cordova.plugin.ths.znxl,实现浮窗展示与隐藏功能

安装

安装ThsJtVoiceWake插件

cordova plugin add cordova.plugin.ths.znxl 
或
npm i cordova.plugin.ths.znxl

插件方法说明

cordova.plugins.ThsZNXL.startDialog(url, isReload,successCallback, errorCallback)

描述

打开弹窗

参数

  • url: 加载页面地址
  • isReload: 默认传递false,当地址变化时,需要重新加载时,改变该参数为true
  • param 字符串,弹窗传入参数,加载的H5页面可以通过H5的方法获取
  • successCallback: 回调函数,成功回调
  • errorCallback: 回调函数,失败回调

返回值

示例

cordova.plugins.ThsZNXL.startDialog('http://192.168.2.188:5173/',false, "xxxxx,sssda", (success: string)=>{
        console.log(success);
      },(error: string)=>{
        console.log(error);
      });

cordova.plugins.ThsZNXL.closeDialog(successCallback, errorCallback)

描述

关闭弹窗

参数

  • successCallback: 回调函数,成功回调
  • errorCallback: 回调函数,失败回调

返回值

示例

cordova.plugins.ThsZNXL.closeDialog((success: string)=>{
        console.log(success);
      },(error: string)=>{
        console.log(error);
      });

cordova.plugins.ThsZNXL.stopWindowService(successCallback, errorCallback)

描述

停止浮窗服务

参数

  • successCallback: 回调函数,成功回调
  • errorCallback: 回调函数,失败回调

返回值

示例

cordova.plugins.ThsZNXL.stopWindowService((success: string)=>{
        console.log(success);
      },(error: string)=>{
        console.log(error);
      });

cordova.plugins.ThsZNXL.startWindowService(successCallback, errorCallback)

描述

启动智能小鹿的弹窗服务,默认服务已经启动,不需要再次启动,只有通过stopWindowService手动停止服务后如果需要再次启动服务,才需要调用该方法

参数

  • successCallback: 回调函数,成功回调
  • errorCallback: 回调函数,失败回调

返回值

示例

cordova.plugins.ThsZNXL.startWindowService((success: string)=>{
        console.log(success);
      },(error: string)=>{
        console.log(error);
      });

嵌入H5页面方法说明

showToast

描述

显示toast提示信息

参数

  • message: 要显示的提示信息

返回值

示例

ThsJsBridge.showToast('Hello World');

sendDataToWebView

描述

向主应用以post Message方式向H5页面发送数据

参数

  • data: 要发送的数据

返回值

示例

ThsJsBridge.sendDataToWebView('Hello World');

closeWindow

描述

关闭当前窗口

参数

返回值

示例

ThsJsBridge.closeWindow();

closeActivity

描述

关闭当前窗口,已废弃,请使用 closeWindow方法代替

参数

返回值

示例

ThsJsBridge.closeActivity();

showWindow

描述

打开窗口

参数

  • url: 要打开的页面地址
  • isReload: 默认传递false,当地址变化时,需要重新加载时,改变该参数为true

返回值

示例

ThsJsBridge.showWindow('http://192.168.2.188:5173/',false);

stopWindowService

描述

停止窗口服务

参数

返回值

示例

ThsJsBridge.stopWindowService();

getParamsData

描述

获取启动参数

参数

返回值

启动参数

示例

ThsJsBridge.getParamsData();