Socket
Socket
Sign inDemoInstall

dfws-react-ali-captcha

Package Overview
Dependencies
2
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dfws-react-ali-captcha

东方网升 react 阿里云验证码


Version published
Weekly downloads
100
increased by5.26%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

东方网升 react 版本上传组件

发布

  1. 更改package.json版本
  2. yarn run build
  3. npm publish 注:镜像源需切换回NPM官方源

链接

  • 更新日志

示例

  • yarn
  • yarn start

使用之前

该组件依赖于react,使用之前请配置react。

何时使用

  • 需要阿里云验证码。

API

<script type="text/javascript" src="https://o.alicdn.com/captcha-frontend/aliyunCaptcha/AliyunCaptcha.js"></script>
<Captcha 
    SceneId="xxx" 
    prefix="xxx" 
    captchaVerifyCallback={captchaVerifyCallback}
/>

upload props

参数说明类型默认值
SceneId场景ID。根据步骤二新建验证场景后,您可以在验证码场景列表,获取该场景的场景IDstring-
prefix身份标。开通阿里云验证码2.0后,您可以在控制台概览页面的实例基本信息卡片区域,获取身份标string-
mode验证码模式。popup表示要集成的验证码模式为弹出式。无需修改string-
captchaVerifyCallback业务请求(带验证码校验)回调函数async function-
onBizResultCallback业务请求结果回调函数function-
slideStyle滑块验证码样式,支持自定义宽度和高度,单位为px。其中,width最小值为320 pxobject-
language语言string-

返回值

captchaVerifyCallback 请求参数:由验证码脚本回调的验证参数,不需要做任何处理,直接传给服务端即可 返回参数:字段名固定,captchaResult为必选;如无业务验证场景时,bizResult为可选

参考文档

阿里云验证码2.0

Keywords

FAQs

Last updated on 23 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc