yoka-captcha-wxapp
v0.1.7
Published
行为验证码(微信小程序版本)
Readme
行为验证码(微信小程序版本)
其他版本
https://filteradmin.sanguosha.com/apidocs/captcha/dev/resource.html
安装
安装依赖
npm install yoka-captcha-wxapp --registry=http://npm.sgs.com/构建 npm
微信小程序 ide 上选择 工具 -> 构建 npm, miniprogram_npm 目录下会生成 yoka-captcha-wxapp 文件内容
*.json 添加组件路径
{
"usingComponents": {
"verify": "/miniprogram_npm/yoka-captcha-wxapp"
}
}wxml 页面使用
<verify
wx:if="{{true}}"
bind:success="success"
mode="pop"
captchaType="blockPuzzle"
appid="111111"
/>参数说明
| 参数 | 类型 | 默认值 | 必填 | 说明 | | ----------- | -------- | ------------------------------------------- | ---- | ---------------------------------------------------------- | | success | Function | | 是 | 验证成功回调 | | mode | String | | 是 | 在页面显示类型,"pop":弹出框;"fixed":页面; | | captchaType | String | | 是 | 验证码类型,"blockPuzzle":滑动校验;"clickWord":点击文字校验 | | appid | String | | 是 | 应用 id,需要申请 | | apiUrl | String | https://openapi.sanguosha.com/captcha/check | 否 | 接口 url |
