
Security News
The AI Industry Is Betting on Open Weights
An open letter signed by 50 companies, from NVIDIA and Microsoft to Mistral and Hugging Face, urges Washington not to restrict open weight AI.
if-captcha
Advanced tools
npm install if-captcha
//main.js
import IfCaptcha from 'if-captcha'
app.use(IfCaptcha)
setup中使用
import {useCaptcha} from 'if-captcha'
setup(){
let $ = useCaptcha();
const captcha = async () => {
let res = await $.verify({
captchaGetUrl: '/captcha/get',
captchaCheckUrl: '/captcha/check',
});
if(res) {
alert('验证成功')
} else {
alert('验证失败')
}
}
return {
captcha
};
}
//main.js
import IfCaptcha from 'if-captcha'
Vue.use(IfCaptcha)
async captcha(){
let res = await this.$ifCaptcha.verify({
captchaGetUrl: '/captcha/get',
captchaCheckUrl: '/captcha/check',
});
if(res) {
alert('验证成功')
} else {
alert('验证失败')
}
}
| param | type | default | desc |
|---|---|---|---|
| captchaType | String: 'blockPuzzle' | 'clickWord' | 'blockPuzzle' | 模块类型 |
| captchaGetUrl | String | '/captcha/get' | 获取图片内容 |
| captchaCheckUrl | String | '/captcha/check' | 检查验证结果 |
| params | Object | {} | 检查结果额外的传参 |
返回 {captchaVerification}
captchaGetUrl: async function({ captchaType }){
return {
originalImageBase64, //验证码背景 base64
jigsawImageBase64, //验证滑块的背景 base64
token, // 后端返回的唯一toke
secretKey // 端返回的ASE加密key
}
}
captchaCheckUrl: async function(payload){
// const { captchaType, pointJson, token, params } = payload // 插件返回的关键数据,你可以扩充该数据
return {
repCode // 成功则返回 repCode:"0000"
}
}
FAQs
安全验证滑块服务插件(Vue2/Vue3)
The npm package if-captcha receives a total of 29 weekly downloads. As such, if-captcha popularity was classified as not popular.
We found that if-captcha demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Security News
An open letter signed by 50 companies, from NVIDIA and Microsoft to Mistral and Hugging Face, urges Washington not to restrict open weight AI.

Security News
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.

Research
/Security News
A large-scale campaign abused GitHub Actions in compromised repositories to exploit CVE-2026-41940 in cPanel and WHM and steal server credentials.