vue仿淘宝滑动验证码功能(样式模仿)


Posted in Javascript onDecember 10, 2019

我们知道验证码的目的 是为了验证到底是人还是机器。

淘宝滑动验证码会采集用户的操作数据,环境数据等等,通过算法加密成一个字符串,提交到服务器分析,判断是不是人工在操作。

我这里写的只是模仿了样式,并没有进行那些复杂的操作,所以并不安全(不能判断人还是机器)。

因为touch事件和mouse事件不同,和获取clientX在移动端和pc端也不同!!!所以分两端

下面有PC端和移动端!!!(2019-03-12更新)

本文基于vue,引入下面组件 可以直接使用

1、实际效果

vue仿淘宝滑动验证码功能(样式模仿)

vue仿淘宝滑动验证码功能(样式模仿)

2、PC端!!! vue组件(下面是一个vue组件,可以引入直接使用)

<template>
  <div class="drag" ref="dragDiv">
    <div class="drag_bg"></div>
    <div class="drag_text">{{confirmWords}}</div>
    <div ref="moveDiv" @mousedown="mousedownFn($event)" :class="{'handler_ok_bg':confirmSuccess}" class="handler handler_bg" style="position: absolute;top: 0px;left: 0px;"></div>
  </div>
</template>

<script>
  export default {
    data(){
      return {
        beginClientX:0,      /*距离屏幕左端距离*/
        mouseMoveStata:false,   /*触发拖动状态 判断*/
        maxwidth:'',        /*拖动最大宽度,依据滑块宽度算出来的*/
        confirmWords:'拖动滑块验证',  /*滑块文字*/
        confirmSuccess:false      /*验证成功判断*/
      }
    },
    methods: {
      mousedownFn:function (e) {
        if(!this.confirmSuccess){
          e.preventDefault && e.preventDefault();  //阻止文字选中等 浏览器默认事件
          this.mouseMoveStata = true;
          this.beginClientX = e.clientX;
        }
      },    //mousedoen 事件
      successFunction(){
        this.confirmSuccess = true
        this.confirmWords = '验证通过';
        if(window.addEventListener){
          document.getElementsByTagName('html')[0].removeEventListener('mousemove',this.mouseMoveFn);
          document.getElementsByTagName('html')[0].removeEventListener('mouseup',this.moseUpFn);
        }else {
          document.getElementsByTagName('html')[0].removeEventListener('mouseup',()=>{});
        }
        document.getElementsByClassName('drag_text')[0].style.color = '#fff'
        document.getElementsByClassName('handler')[0].style.left = this.maxwidth + 'px';
        document.getElementsByClassName('drag_bg')[0].style.width = this.maxwidth + 'px';
      },        //验证成功函数
      mouseMoveFn(e){
        if(this.mouseMoveStata){
          let width = e.clientX - this.beginClientX;
          if(width>0 && width<=this.maxwidth){
            document.getElementsByClassName('handler')[0].style.left = width + 'px';
            document.getElementsByClassName('drag_bg')[0].style.width = width + 'px';
          }else if(width>this.maxwidth){
            this.successFunction();
          }
        }
      },          //mousemove事件
      moseUpFn(e){
        this.mouseMoveStata = false;
        var width = e.clientX - this.beginClientX;
        if(width<this.maxwidth){
          document.getElementsByClassName('handler')[0].style.left = 0 + 'px';
          document.getElementsByClassName('drag_bg')[0].style.width = 0 + 'px';
        }
      }            //mouseup事件
    },
    mounted(){
      this.maxwidth = this.$refs.dragDiv.clientWidth - this.$refs.moveDiv.clientWidth;
      document.getElementsByTagName('html')[0].addEventListener('mousemove',this.mouseMoveFn);
      document.getElementsByTagName('html')[0].addEventListener('mouseup',this.moseUpFn)
    }
  }
</script>

<style scoped>
  .drag{
    position: relative;
    background-color: #e8e8e8;
    width: 100%;
    height: 34px;
    line-height: 34px;
    text-align: center;
  }
  .handler{
    width: 40px;
    height: 32px;
    border: 1px solid #ccc;
    cursor: move;
  }
  .handler_bg{
    background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d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C5paWQ6NDlBRDI3NjRGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDphNWEzMWNhMC1hYmViLTQxNWEtYTEwZS04Y2U5NzRlN2Q4YTEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+k+sHwwAAASZJREFUeNpi/P//PwMyKD8uZw+kUoDYEYgloMIvgHg/EM/ptHx0EFk9I8wAoEZ+IDUPiIMY8IN1QJwENOgj3ACo5gNAbMBAHLgAxA4gQ5igAnNJ0MwAVTsX7IKyY7L2UNuJAf+AmAmJ78AEDTBiwGYg5gbifCSxFCZoaBMCy4A4GOjnH0D6DpK4IxNSVIHAfSDOAeLraJrjgJp/AwPbHMhejiQnwYRmUzNQ4VQgDQqXK0ia/0I17wJiPmQNTNBEAgMlQIWiQA2vgWw7QppBekGxsAjIiEUSBNnsBDWEAY9mEFgMMgBk00E0iZtA7AHEctDQ58MRuA6wlLgGFMoMpIG1QFeGwAIxGZo8GUhIysmwQGSAZgwHaEZhICIzOaBkJkqyM0CAAQDGx279Jf50AAAAAABJRU5ErkJggg==") no-repeat center;
  }
  .drag_bg{
    background-color: #7ac23c;
    height: 34px;
    width: 0px;
  }
  .drag_text{
    position: absolute;
    top: 0px;
    width: 100%;text-align: center;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    -o-user-select:none;
    -ms-user-select:none;
  }
</style>

3、移动端!!! vue组件(下面是一个vue组件,可以引入直接使用)

<template>
  <div class="drag" ref="dragDiv">
    <div class="drag_bg"></div>
    <div class="drag_text">{{confirmWords}}</div>
    <div ref="moveDiv" @touchstart="mousedownFn($event)" :class="{'handler_ok_bg':confirmSuccess}" class="handler handler_bg" style="position: absolute;top: 0px;left: 0px;"></div>
  </div>
</template>

<script>
  export default {
    data(){
      return {
        beginClientX:0,      /*距离屏幕左端距离*/
        mouseMoveStata:false,   /*触发拖动状态 判断*/
        maxwidth:'',        /*拖动最大宽度,依据滑块宽度算出来的*/
        confirmWords:'拖动滑块验证',  /*滑块文字*/
        confirmSuccess:false      /*验证成功判断*/
      }
    },
    methods: {
      mousedownFn:function (e) {
        if(!this.confirmSuccess){
          e.preventDefault && e.preventDefault();  //阻止文字选中等 浏览器默认事件
          this.mouseMoveStata = true;
          this.beginClientX = e.changedTouches[0].clientX;
        }
      },    //mousedoen 事件
      successFunction(){
        this.confirmSuccess = true
        this.confirmWords = '验证通过';
        if(window.addEventListener){
          document.getElementsByTagName('html')[0].removeEventListener('touchmove',this.mouseMoveFn);
          document.getElementsByTagName('html')[0].removeEventListener('touchend',this.moseUpFn);
        }else {
          document.getElementsByTagName('html')[0].removeEventListener('touchend',()=>{});
        }
        document.getElementsByClassName('drag_text')[0].style.color = '#fff'
        document.getElementsByClassName('handler')[0].style.left = this.maxwidth + 'px';
        document.getElementsByClassName('drag_bg')[0].style.width = this.maxwidth + 'px';
      },        //验证成功函数
      mouseMoveFn(e){
        if(this.mouseMoveStata){
          let width = e.changedTouches[0].clientX - this.beginClientX;
          if(width>0 && width<=this.maxwidth){
            document.getElementsByClassName('handler')[0].style.left = width + 'px';
            document.getElementsByClassName('drag_bg')[0].style.width = width + 'px';
          }else if(width>this.maxwidth){
            this.successFunction();
          }
        }
      },          //mousemove事件
      moseUpFn(e){
        this.mouseMoveStata = false;
        var width = e.changedTouches[0].clientX - this.beginClientX;
        if(width<this.maxwidth){
          document.getElementsByClassName('handler')[0].style.left = 0 + 'px';
          document.getElementsByClassName('drag_bg')[0].style.width = 0 + 'px';
        }
      }            //mouseup事件
    },
    mounted(){
      this.maxwidth = this.$refs.dragDiv.clientWidth - this.$refs.moveDiv.clientWidth;
      document.getElementsByTagName('html')[0].addEventListener('touchmove',this.mouseMoveFn);
      document.getElementsByTagName('html')[0].addEventListener('touchend',this.moseUpFn)
    }
  }
</script>

<style scoped>
  .drag{
    position: relative;
    background-color: #e8e8e8;
    width: 100%;
    height: 34px;
    line-height: 34px;
    text-align: center;
  }
  .handler{
    width: 40px;
    height: 32px;
    border: 1px solid #ccc;
    cursor: move;
  }
  .handler_bg{
    background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQt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iA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+k+sHwwAAASZJREFUeNpi/P//PwMyKD8uZw+kUoDYEYgloMIvgHg/EM/ptHx0EFk9I8wAoEZ+IDUPiIMY8IN1QJwENOgj3ACo5gNAbMBAHLgAxA4gQ5igAnNJ0MwAVTsX7IKyY7L2UNuJAf+AmAmJ78AEDTBiwGYg5gbifCSxFCZoaBMCy4A4GOjnH0D6DpK4IxNSVIHAfSDOAeLraJrjgJp/AwPbHMhejiQnwYRmUzNQ4VQgDQqXK0ia/0I17wJiPmQNTNBEAgMlQIWiQA2vgWw7QppBekGxsAjIiEUSBNnsBDWEAY9mEFgMMgBk00E0iZtA7AHEctDQ58MRuA6wlLgGFMoMpIG1QFeGwAIxGZo8GUhIysmwQGSAZgwHaEZhICIzOaBkJkqyM0CAAQDGx279Jf50AAAAAABJRU5ErkJggg==") no-repeat center;
  }
  .drag_bg{
    background-color: #7ac23c;
    height: 34px;
    width: 0px;
  }
  .drag_text{
    position: absolute;
    top: 0px;
    width: 100%;text-align: center;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    -o-user-select:none;
    -ms-user-select:none;
  }
</style>

总结

以上所述是小编给大家介绍的vue仿淘宝滑动验证码功能,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对三水点靠木网站的支持!
如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!

Javascript 相关文章推荐
判断控件是否已加载完成的代码
Feb 24 Javascript
基于Jquery制作的幻灯片图集效果打包下载
Feb 12 Javascript
使用js检测浏览器是否支持html5中的video标签的方法
Mar 12 Javascript
jquery中获得元素尺寸和坐标的方法整理
May 18 Javascript
修改js confirm alert 提示框文字的简单实例
Jun 10 Javascript
AngularJS 中的事件详解
Jul 28 Javascript
Vue.js 2.0中select级联下拉框实例
Mar 06 Javascript
详解Node.js中path模块的resolve()和join()方法的区别
Oct 29 Javascript
利用Promise自定义一个GET请求的函数示例代码
Mar 20 Javascript
详解从vue-loader源码分析CSS Scoped的实现
Sep 23 Javascript
JavaScript如何判断input数据类型
Feb 06 Javascript
React如何使用axios请求数据并把数据渲染到组件
Aug 05 Javascript
vue实现随机验证码功能(完整代码)
Dec 10 #Javascript
vue实现短信验证码登录功能(流程详解)
Dec 10 #Javascript
基于vue实现图片验证码倒计时60s功能
Dec 10 #Javascript
使用Bootstrap做一个朝代历史表
Dec 10 #Javascript
JS实现拼图游戏
Jan 29 #Javascript
Vue的transition-group与Virtual Dom Diff算法的使用
Dec 09 #Javascript
Vue实现渲染数据后控制滚动条位置(推荐)
Dec 09 #Javascript
You might like
删除无限级目录与文件代码共享
2006/07/12 PHP
深入理解PHP中的Session和Cookie
2013/06/21 PHP
php获取bing每日壁纸示例分享
2014/02/25 PHP
php实现微信公众平台账号自定义菜单类
2014/12/02 PHP
PHP命令行执行整合pathinfo模拟定时任务实例
2016/08/12 PHP
php生成无限栏目树
2017/03/16 PHP
jQuery EasyUI 开源插件套装 完全替代ExtJS
2010/03/24 Javascript
js设置cookie过期当前时间减去一秒相当于立即过期
2014/09/04 Javascript
通过JS动态创建一个html DOM元素并显示
2014/10/15 Javascript
Node.js中常规的文件操作总结
2016/10/13 Javascript
WEB开发之注册页面验证码倒计时代码的实现
2016/12/15 Javascript
纯js实现图片匀速淡入淡出效果
2017/08/22 Javascript
浅谈Vue 初始化性能优化
2017/08/31 Javascript
让 babel webpack vue 配置文件支持智能提示的方法
2019/06/22 Javascript
JavaScript算法学习之冒泡排序和选择排序
2019/11/02 Javascript
python在windows和linux下获得本机本地ip地址方法小结
2015/03/20 Python
简洁的十分钟Python入门教程
2015/04/03 Python
Python selenium如何设置等待时间
2016/09/15 Python
对python 多线程中的守护线程与join的用法详解
2019/02/18 Python
基于python二叉树的构造和打印例子
2019/08/09 Python
pycharm运行程序时看不到任何结果显示的解决
2020/02/21 Python
使用Keras实现Tensor的相乘和相加代码
2020/06/18 Python
如何教少儿学习Python编程
2020/07/10 Python
Python接口自动化测试框架运行原理及流程
2020/11/30 Python
利用HTML5的新特点实现图片文件异步上传
2014/05/29 HTML / CSS
制定岗位职责的原则
2013/11/08 职场文书
化学教师自荐信范文
2013/12/28 职场文书
动漫专业高职生职业生涯规划书
2014/02/15 职场文书
水利专业大学生职业生涯规划书范文
2014/09/17 职场文书
夫妻房产协议书的格式
2014/10/11 职场文书
2014年图书室工作总结
2014/12/09 职场文书
售后服务承诺函格式
2015/01/21 职场文书
2015年信息宣传工作总结
2015/05/26 职场文书
开业典礼致辞
2015/07/29 职场文书
Python insert() / append() 用法 Leetcode实战演示
2021/03/31 Python
Apache Hudi的多版本清理服务彻底讲解
2022/03/31 Servers