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

haigeekuplus

v0.0.17

Published

基于uplusApi的二次封装

Readme

haigeekuplus

使用方式

使用方式一:
npm i haigeekuplus
import Haigeekuplus from 'haigeekuplus'

const HaigeekuplusInstance = Haigeekuplus.getInstance({

    deviceId,

    appType(smart-wxApplet/smart-App,可以为空)

})
使用方式二:
在index.html页面中使用script标签引入组件打包后的文件haigeekUplus.js,使用方法:window.HaigeekUplus
const HaigeekuplusInstance = window.Haigeekuplus.getInstance({

    deviceId,

    appType(smart-wxApplet/smart-App,可以为空)

})

方法及参数

| 方法 | 方法介绍 | 参数 | 返回数据 | | ---- | ---- | ---- | ---- | | executeCmd | 下发指令 | cmdList,数组类型,数据需包含name,value字段 | 返回Promise实例,下发成功返回retCode;下发失败,返回{ status: '000001', type: 'executeCmdFail' } | | addNetStateEventListener | 监听手机网络状态 | callback,回调函数,函数参数——对象类型 | 无 | | removeNetStateEventListener | 移除手机网络状态 | key,非必传参数 | 无 | | upVdnModuleGoToPage | 跳转页面(其他的H5页面) | url,页面地址,必传 | 返回Promise实例 | | closeDetailPage | 关闭H5所在的webview | 无 | 无 | | androidPhysicalBtForBack | 屏蔽物理按键返回 | process:是否开启屏蔽, cb:监听到返回动作后执行的方法, key:标识 | 无 | | addResumeEventListener | 开启容器进入前台的监听 | cb:监听到动作后的回调, key:标识 | 无 | | removeResumeEventListener | 移除容器进入前台的监听 | key:标识 | 无 | | gioTrackWithVariable | 埋点方法(带参数) | eventId:标识, variable:参数 | 无 | | gioTrack | 埋点方法(无参数) | eventId:标识 | 无 | | getStatusBarHeight | 获取移动端页面的状态栏高度 | 无 | 返回Promise实例,获取成功返回Object;获取失败,返回{ status: '000001', type: 'executeCmdFail' } | | getUserInfo | 获取用户信息 | 无 | 返回Promise实例,获取成功返回Object;获取失败,返回{ status: '000001', type: 'executeCmdFail' } | | getLocation | 获取所在城市的定位信息 | 无 | 返回Promise实例,获取成功返回Object;获取失败,返回{ status: '000001', type: 'executeCmdFail' } | | getDeviceInfoById | 获取设备信息(产品编码、typeId、型号信息、用户id等) | 无 | 返回Promise实例,获取成功返回Object;获取失败,返回{ status: '000001', type: 'executeCmdFail' } | | attachPromise | 监听设备底板功能 | cb:回调函数,参数包含mac, baseInfo, attributes | 无 | | getOauthData | 获取用户鉴权信息 | 无 | 返回Promise实例,获取成功返回Object;获取失败,返回{ status: '000001', type: 'executeCmdFail' } | | getAppInfo | 获取APP信息 | 无 | 返回Promise实例,获取成功返回Object;获取失败,返回{ status: '000001', type: 'executeCmdFail' } | | getCommonHeaders | 获取接口请求的headers信息 | url:接口地址 | 返回Promise实例,获取成功返回Object | | signRequest | 带签名的请求方法,可以基于此方法自行封装具体的请求方法 | 对象类型,{ url, headers, body, method, signType, transform = true } | 返回Promise实例,请求成功返回Object,请求失败返回错误信息 | | post | post请求 | 对象类型,{ url, data = {}, signType = 'SHA256', base = '', extraHeader = {} } | 返回Promise实例,请求成功返回Object,请求失败返回错误信息 | | get | get请求 | 对象类型,{ url, signType = 'SHA256', base = '', extraHeader = {} } | 返回Promise实例,请求成功返回Object,请求失败返回错误信息 |

开发说明

修改完代码需要执行npm install

修改package.json中的版本号,默认累加