New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@kydev/verification-code

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kydev/verification-code

滑动拼图验证码

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
4
Created
Source

接口

// 获取验证码信息 - 接口返回.
result: {
  bg: "https://cdn-public.knowyourself.cc/2022/03/01/621d9167a9ee4.png",
  dg: "https://cdn-public.knowyourself.cc/2022/03/01/621d9167d977b.png",
  id: "628dbab0a3d4a",
  y: 396,
}

// 提交验证码信息.
// 参数.
params: {
  x: "",
  y: "",
  id: "" 验证码id
}
// 返回结果.
result: {
  code: "" // 继续进行下一步的校验.
}

使用

import verificationCode from "@kydev/verification-code"
// el根节点
const verification = new verificationCode(el, {
  getUrl: "", // 获取验证码信息 接口URL.
  postUrl: "", // 提交验证码信息 接口URL.
  api: axios // 接口请求方式.
})

// 验证成功返回的code
verification.codeCallBack().then((code) => {
  console.log(code, "返回的code");
});

FAQs

Package last updated on 27 May 2022

Did you know?

Socket

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