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

yj-sdk

v1.1.0

Published

yj-sdk

Downloads

1

Readme

yj-sdk

咨询部分

step1:npm 安装yj-sdk

npm i yj-sdk

step2:使用config方法,提供idPi或token以供crm接口调用

const YJSDK = require('yj-sdk')
YJSDK.config({
    env:'test',   //test pre prod
    //传idPi或者token,传idpi会调用获取token,用于请求头添加token
    token:"93008dee83cd47609f5ea4688a2d3750",   
    consult:{
        chatType:"",  //聊天类型 1:单聊 2:群聊
        idPi: "ff808081767420550176744eacea006f",
        sysUserId: "609cbda715b2490aa2d0d9e1",// 医生id
        userType:"2",  //发起会话方式 1:用户发起  2:医生发起
    }
})
      

step3:调用开始咨询接口方法(内部已经判断了h5和小程序环境)

YJSDK.consult.startConsult()

支付部分

step1:npm 安装yj-sdk

npm i yj-sdk

step2:使用config方法,提供idPi或token以供crm接口调用

const YJSDK = require('yj-sdk')
YJSDK.config({
    env:'test',   //test pre prod
    //传idPi或者token,传idpi会调用获取token,用于请求头添加token
    token:"93008dee83cd47609f5ea4688a2d3750",   
    pay: {
        createOrder: {
            idPi: 'ff8080817e763737017e765c190300cb',  
            idProduct: 'ff8080817d311dc7017d314980ec0034', // 产品id
            jumpUrl: '', // 要跳转的页面,如果是进行权益抵扣,也就是payWay= 99的时候可以不填
            orderType: 10, // 订单类型
            payWay: 3,  // 支付方式 2:支付宝、3:微信、6:钱包支付、7:建行龙支付、99:权益抵扣
            payAmount: '0.01', // 支付金额
            productNum: 1, // 商品数量
            purchaserOutUid: localStorage.getItem("openId") || null, // 微信openId
            extInfo: { // 扩展信息  "giveFlag":"赠送标记,0:不赠送、1:赠送" 目前只对视频医生有效
                giveFlag: '0',
                mobilerg: ''
            }
        },
        miniProgram: true // 是否使用原生支付小程序
    }
})
      

step3:调用开始支付接口方法(内部已经判断了h5和小程序环境)

YJSDK.pay.startPay()