Giter Club home page Giter Club logo

verificationcode's Introduction

(C#)滑块验证码

image

VerificationCode简介

用户拖动滑块完成时完成校验,支持PC端及移动端。并在后台保存用户校验过程的时间、精度、滑动轨迹等信息。
输出的验证码为JSON格式,其中大图片是将原图裁剪成横向10份纵向2分共20张图片随机混淆拼接而成的,原图通过在前端移位还原,混淆信息带在JSON上
JSON格式说明:
    errcode:状态码
    y:裁剪的小图相对左上角的y轴坐标
    array:验证码图片混淆规律
    imgx:验证码图片宽度
    imgy:验证码图片高度
    small:裁剪的小图片
    normal:验证码混淆后的图片
**兼容信息:**兼容主流浏览器,iPhone端的Safari、QQ内置浏览器、微信内置浏览器、Android端主流浏览器

JSON格式示例

{
  "errcode": 0,
  "y": 189,
  "array": "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19",
  "imgx": 300,
  "imgy": 300,
  "small": "data:image/jpg;base64,/...",
  "normal":"data:image/jpg;base64,/..."
}

使用示例

$("#__Verification").slide({
    imgspec: "200*100",
    successCallBack: function () {
        console.log("success");
        alert('你已通过验证!');
    }
});

verificationcode's People

Contributors

eatage avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.