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

virsical-jssdk

v0.3.6

Published

Virsical 3.0 JS SDK

Downloads

5

Readme

Virsical 3.0 JS SDK

npm license-mit

build

yarn webpack

deploy

npm publish

install

npm install virsical-jssdk --save

调用

import virsical from 'virsical-jssdk';

概述

此JS-SDK是威思客移动办公门户提供给第三方H5应用开发者使用的,可帮助运行于威思客APP内的H5网页获得更多的高级特性。通过使用此JS-SDK,第三方H5应用开发者可快捷地在手机中使用统一认证、拍照、选图、语音、位置、扫一扫等原生手机系统的能力,以此可有效提升用户体验。

Web API

virsical.config({
    debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来。
    client_id: '', // 必填,第三方应用接入ID
    client_secret: // 必填,第三方应用接入秘钥
});
virsical.login({
    success: function (res) {
	var info = res.info; // 返回用户信息json
	alert("Login success" + "-" + info);
    },
	fail: function (res) {
        var msg = res.msg; // 失败原因
	var code = res.code; //失败编码
    }
});
virsical.captureQR({
	success: function (res) {
		alert("url:" + res.url);
	},
	fail: function (res) {
		var msg = res.msg; // 失败原因
		var code = res.code; //失败编码
		alert("fail" + "-" + msg + "-" + code);
}
});

App API

  • config

    识别符:vsk3browser://config

    参数:clientid、clientsecret、[debug]

    callback:

     configReady(),配置成功后调用
     configError(msg, code),配置失败后调用。msg: 异常信息,code,异常代码。
  • login

    callback:

      loginResult(result, json, cd, mg), 登录成功后回调。
      	result: 0成功,否则失败。
      	json: 成功返回的数据。
      	cd:状态码。
      	mg:成功或失败的信息。
  • 扫描二维码

    识别符:vsk3browser://captureqr

    callback:

      captureQRResult(result, url, cd, mg)
      	result: 0 成功,否则失败。
      	url: 扫描成功后回传的url.
      	cd: 扫描失败的code
      	mg: 扫描失败的message