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

gd-signature-c

v1.0.9

Published

<!-- * @Author: your name * @Date: 2020-06-10 09:31:36 * @LastEditTime: 2020-08-18 14:17:28 * @LastEditors: 韩振东 * @Description: In User Settings Edit * @FilePath: \test\README.md --> ### 插件说明 - umd模块化规范

Readme

插件说明

  • umd模块化规范

插件依赖(动态加载,如果用户环境有这两个插件,则不加载)

  • jq
  • pdf.js
使用方法
  • 标签引用
<script src="https://cdn.jsdelivr.net/npm/gd-signature"></script> 
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gd-signature/dist/static/css/index.css">
  • npm包
 # 模块化引入
 npm i gd-signature -S
  • 使用方式
import GDsignature from 'gd-signature' // const GDsignature = require('gd-signature')
import 'gd-signature/dist/static/css/index.css'
  • 自定义主题
import GDsignature from 'gd-signature' // const GDsignature = require('gd-signature')
import 'gd-signature/dist/static/css/index.less'

html下修改主题使用方式

<script src="xxx/main.bundle.js"></script>
    <link rel="stylesheet/less" type="text/css" type="less" href="xxx/static/css/index.less">
    <script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.5.3/less.min.js"></script>
    <script>
        less.modifyVars({
            '@--color-primary': '#DE2921'//主题修改为红色
        });
    </script>
  • 3: 实例化插件
var baseUrl = 'http://123.129.207.18:9111/app-server-paas' // 使用者内得业务api地址 用来获取token和sign
var signature = new GDsignature.manual({
baseUrl: 'https://open.aiosign.com/api', // paas-api接口 写死这个地址就好
auto_close:true,// 签章成功后是否自动关闭签章 默认falase
showClose: false, // 是否显示关闭按钮,默认为true
VerifyCode:true, // 是否开启签章验证码校验,默认为true
authSign: false, //使用认证服务器签章-默认为false
authBaseUrl: 'http://192.168.2.199:8099/', //认证服务器地址-authSign为true时必须传
flowId: '744918968410198016', //认证服务器需要的流程id-authSign为true时必须传
// 本实例用得axios 用户可根据自己需要使用$.ajax或者fetch
 // getToken方法返回一个promise  reslove()为token得值
getToken() {
    return new Promise((reslove, reject) => {
    axios
        .post(`${baseUrl}/getToken`)
        .then(res => {
            reslove(res.data.data.access_token)
        })
        .catch(err => {
            reject()
        })
    })
},

// 本实例用得axios 用户可根据自己需要使用$.ajax或者fetch
// getSign方法返回一个promise  reslove()为sign得值
getSign(body) {
    return new Promise((reslove, reject) => {
    axios
        .post(`${baseUrl}/getSign`, body.data, {
        headers: {
            Authentication: body.token
        }
        })
        .then(res => {
            reslove(res.data.data.sign)
        })
        .catch(err => {
            console.log(err)
            reject()
        })
    })
}
})
  • 4: 调用插件api开始签章
// 用户可根据自己业务场景 (例:点击某个按钮之后 调用下面方法)
signature.start({
    preview: true, 是否预览模式,默认为签章模式
    contract_id: contract_id, // 合同id
    user_id: userId,// 用户id
    success: function(res) {
        console.log(res) // 签章成功回调
    },
    error: function(err) {
        console.log(err) // 签章失败回调
    }
})
  • 5: 拒签操作
// 用户可根据自己业务场景-扩展拒签操作-
signature.start({
    preview: true, 是否预览模式,默认为签章模式
    contract_id: contract_id, // 合同id
    user_id: userId,// 用户id
    success: function(res) {
        console.log(res) // 签章成功回调
    },
    //加入此回调,证明业务需要拒签,需要自己业务实现
    refuseSign: function(re) {
                console.log('re', re);
    },
    error: function(err) {
        console.log(err) // 签章失败回调
    }
})