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

@yidun/swan-ne-captcha

v1.0.1

Published

易盾验证码百度小程序版组件

Downloads

6

Readme

易盾验证码用户使用文档--百度小程序组件

易盾验证码百度小程序版组件

引入

在根目录执行下述命令

  npm install @yidun/swan-ne-captcha

在页面或组件的 json 文件中声明引组件

{
  "usingComponents": {
    "ne-captcha": "path-to-component/ne-captcha/index"
  }
}

使用

<view>
  <ne-captcha
    id="captcha"
    captcha-id="yourCaptchaID"
    width="320rpx"
    bindinit="handleInit"></ne-captcha>
  <view>
    <button bindtap="openCaptcha">点击验证</button>
  </view>
</view>
Page({
  handleInit () {
    console.log('验证码初始化成功')
  },
  openCaptcha () {
    this.selectComponent('#neCaptcha').popup()
  }
})

配置项

| 可配项 | 类型 | 默认值 | 描述 | |--------|-------|----------|-------| | captchaId | String | 无 | 验证码ID | | lang | String | 'zh-CN' | 语言 | | width | String | 'auto' | 验证码弹框宽度,接受单位'rpx'/'px'/'rem'/'%' | | captchaType | String | 无 | 配置验证码类型 | | customStyles | Object | null | 自定义验证码样式,包含imagePanel/controlBar/gap/popTitle/popPadding,详情查看下面 | **注意:**小程序的超时设置可在app.json全局配置

customStyles

  • imagePanel
    • borderRadius(String): imagePanel的圆角大小
  • controlBar
    • borderRadius(String): controlBar的圆角大小
    • height(String): controlBar的高度
  • gap: imagePanel和controlBar的间隔
  • popTitle
    • height(String): 弹框头部高度
  • popPadding(String): 弹框体内边距

事件

| 事件名 | 参数 | 描述 | |-------|------|------| | error | 无 | 验证码配置失败 | | init | 无 | 验证码配置成功(初始化)| | ready | 无 | 验证码准备就绪 | | verify | err,validate | 验证码验证完成 | | close | 无 | 验证码弹框准备关闭 |

组件方法

  • popup: 展示验证码(支持非智能无感知验证码调用此方法)
  • verify: 展示验证码(仅支持智能无感知验证码调用此方法)
  • reset: 重置验证码,获取新的验证信息

域名

  1. 服务器域名:c.dun.163yun.com、c.dun.163.com
  2. 图片域名:necaptcha.nosdn.127.net、nos.netease.com