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

equity-sdk

v0.0.9

Published

和多惠APP电渠登录组件

Downloads

9

Readme

equity-sdk

equity-sdk封装了和多惠客户端基础能力,提供给第三方嵌入和多惠客户端的 H5使用。

使用方式

1、引入库

npm install equity-sdk --save 或者
yarn add equity-sdk

2、ES6 调用方式

import HDH from "equity-sdk";

if(HDH.isApp()) {
    ...
}

3、普通调用方式

if(HDH.isApp()) {
    ...
}

API介绍

1、方法

代码示例:

if(HDH.isApp()) {
    ...
}
  • Props

| 属性名 | 说明 | 类型 | 默认值 | |-------|---------------|-----|-----| |isAPP|是否在和多惠客户端|Boolean|false| |isAndroid|是否在和多惠安卓客户端|Boolean|false| |isIOS|是否在和多惠iOS客户端|Boolean|false|

  • Methods

| 方法名 | 说明 | 请求参数 | 请求参数说明 | |-------|---------------|---------|---------------| |isApp|页面是否嵌入在和多惠客户端|-|-| |isSupport|是否支持和多惠客户端单点|-|-| |closePage|关闭页面|-|-| |openPage|新开页面|Object|{url: String,页面地址,title?: 页面标题needLogin?:是否需要单点,默认为:false}| |login|用户登录,弹出登录界面,用户登录成功后,会重新单点登录本页面|Object|{forceLogin?: Boolean,是否强制登录,默认 false,表示如果已经成功登录,不会弹出登录界面success?: Function,登录成功回调函数failure?:登录失败回调函数}| |logout|用户退出|Object|{success?: Function,登录成功回调函数failure?:Function,登录失败回调函数}| |reload|重新加载页面,如果没有登录,弹出登录界面,登录成功后,会重新单点登录本页面|Object|{success?: Function,登录成功回调函数failure?:Function,登录失败回调函数}| |navigation|导航,打开系统导航软件对目标地址进行导航|Object|{name: 地方名称longitude: 经度latitude: 纬度success?: Function,登录成功回调函数failure?:Function,登录失败回调函数}| |getLocation|获取定位,坐标系为百度BD09|Object|{success?: Function,登录成功回调函数failure?:登录失败回调函数}| |getToken|获取大网令牌|Object|{success?: Function,登录成功回调函数failure?:Function,登录失败回调函数}| |saveImage|保存图片至手机本地|Object|{data: String,图片base64值type?:String,图片格式fileName:String,图片名称success?: Function,登录成功回调函数failure?:Function,登录失败回调函数}| |emit|发布自定义事件|eventName: String,事件名称...params: String,动态参数|——| |on|监听自定义事件|eventName: String,事件名称callback: Function,事件函数|——| |once|监听一次自定义事件|eventName: String,事件名称callback: Function,事件函数|——| |off|取消自定义事件监听|eventName: String|——|

  • Events

| 事件名 | 说明| |-------|---------------| |page-resume|和多惠客户端页面激活时,触发该事件|