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

@forzoom/tourye_jssdk

v0.0.5

Published

TouryeApp JSBridge

Downloads

4

Readme

说明

陶冶户外app所使用的jssdk,功能包括分享、支付

App接入指南

查看App接入指南

API

  1. 分享注册
    1. onMenuShareWXTimeline(res: ShareData) 微信朋友圈分享
    2. onMenuShareWXMessage(res: ShareData) 微信好友分享
    3. onMenuShareQQ(res: ShareData) QQ好友分享
    4. onMenuShareQzone(res: ShareData) QQ空间分享
    5. onMenuShareWeibo(res: ShareData) 微博分享
  2. 支付调用
    1. chooseWXPay(res: WXPayData) 微信支付

关于回调

  1. 回调函数保存在window.ty
  2. 回调函数在被调用后不会被清除

数据格式

interface ShareData {
    title: string; // 主标题
    desc: string; // 副标题
    imgUrl: string; // 图片链接
    link: string; // 分享链接
    success?(); // 成功回调函数
}

interface WXPayData {
    appId: string; // 应用id
    partnerId: string; // 商户id
    timestamp: number; // 时间戳
    nonceStr: string; // 随机字符串
    prepayId: string; // 预支付id
    package: string; // 固定Sign=WXPay
    signType: string; // 签名类型
    paySign: string; // 签名
    success?(res); // 成功回调函数
    cancel?(res); // 取消回到函数
    fail?(res); // 失败回调函数
}

interface CallbackResponse {
    key: string;
}

Roadmap

  1. 禁用启用分享设置
  2. 版本控制
  3. TY的定义失败(考虑单独定义)

关于版本控制

web端存储一个版本,app端对于jssdk的支持是另外一个版本, web端函数存储app端的一部分版本信息,用来控制web端请求