1.2.1 • Published 2 years ago

@kydev/verification-code v1.2.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

接口

// 获取验证码信息 - 接口返回.
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");
});
1.2.1

2 years ago

1.2.0

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago