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 🙏

© 2024 – Pkg Stats / Ryan Hefner

hd-jssdk

v1.0.5

Published

**说明:** 海带app|海带小程序 内嵌h5API

Downloads

6

Readme

hd-jssdk

说明: 海带app|海带小程序 内嵌h5API

Project setup

yarn install

Compiles and hot-reloads for development

yarn serve

API

getEnv()

获取本地环境

| 适用平台 | |-----| | app、小程序 |

getUserInfo()

获取登录信息

| 适用平台 | |-----| | app、小程序 |

changeTitle(title)

修改标题 title: String

| 适用平台 | |-----| | app |

openPage(params)

params: Object

| 名称 | 类型 | 是否必填 | 描述 | 适用平台 | |-----|--------|--------|--------|------| | route | String | no | 路由 | app | | url | String | no | 页面路径 | 小程序 | | switchTab | Boolean | no | 是否是tab页 | 小程序 | | redirectTo | Boolean | no | 同小程序redirectTo | 小程序 | | extras | object | no | 页面参数 | app、小程序 |

app常用route及对应extras:

| 路由id | 名称 | 常用参数(extras) | |-----|--------|--------| | Goods | 商品列表 | keyword | | WebViewPage | h5装修模板页 | url |

小程序常用url及对应extras:

| url | 名称 | 常用参数(extras) | |-----|--------|--------| | /pages/goodsDetail/goodsDetail | 商品详情 | goodsId | | /package-goods/goodsList/goodsList | 商品列表 | keyword |

goBack()

页面回退

| 适用平台 | |-----| | app、小程序 |

call(num)

num: String

| 适用平台 | |-----| | app |

downLoad(params)

params: Object

| 名称 | 类型 | 是否必填 | 描述 | |-----|--------|--------|--------| | url | String | no | 同saveToGallery |

| 适用平台 | |-----| | app |

statisticEventTrig(params)

友盟埋点 params: Object

| 名称 | 类型 | 是否必填 | |-----|--------|--------| | statisticId | String | yes | | param | Object | no |

| 适用平台 | |-----| | app |

saveToGallery(params)

保存至相册 params: Object

| 名称 | 类型 | 是否必填 | 描述 | |-----|--------|--------|-------| | images | Array | yes | 线上图片地址(支持mp4|MP4|mp3|MP3|mov|MOV格式的视频)|

| 适用平台 | |-----| | app |

share()

params: Object

| 名称 | 类型 | 是否必填 | 描述 | |-----|--------|--------|-------| | ex | String | yes | WXSceneTimeline:分享到朋友圈 WXSceneSession:分享到微信好友| | shareImage | String | yes | 图片地址(支持本地图片) |

| 适用平台 | |-----| | app |

备注: 由于微信web-view组件的bindmessage事件无法实时调用。需要用的微信API的地方可判断本地环境后直接调用微信JSSDK接口