Rumah  >  Artikel  >  hujung hadapan web  >  使用jQuery与vue如何实现拖动验证码功能

使用jQuery与vue如何实现拖动验证码功能

亚连
亚连asal
2018-06-08 18:10:172166semak imbas

本篇文章主要给大家分享jQuery与vue分别实现超级简单的绿色拖动验证码功能以及代码实例,需要的朋友学习下吧。

jquery的绿色拖动验证功能

在网上看到了一个这样的问题:那种像拖动滑块匹配图形的验证方式是怎么实现的?。

突然想到实现一个简单绿色拖动验证码的功能,在网上搜了下,有一个用jquery实现的该功能代码。

体验地址:http://yanshi.sucaihuo.com/jquery/8/897/demo/

其CSS代码:

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

HTML代码结构:

<center style="margin-top: 100px">
  <p id="drag"></p>
</center>

JS调用方式:

$(&#39;#drag&#39;).drag();

JS实现代码:

(function($){
  $.fn.drag = function(options){
    var x, drag = this, isMove = false, defaults = {
    };
    var options = $.extend(defaults, options);
    //添加背景,文字,滑块
    var html = &#39;<p class="drag_bg"></p>&#39;+
          &#39;<p class="drag_text" onselectstart="return false;" unselectable="on">拖动滑块验证</p>&#39;+
          &#39;<p class="handler handler_bg"></p>&#39;;
    this.append(html);
    
    var handler = drag.find(&#39;.handler&#39;);
    var drag_bg = drag.find(&#39;.drag_bg&#39;);
    var text = drag.find(&#39;.drag_text&#39;);
    var maxWidth = drag.width() - handler.width(); //能滑动的最大间距
    
    //鼠标按下时候的x轴的位置
    handler.mousedown(function(e){
      isMove = true;
      x = e.pageX - parseInt(handler.css(&#39;left&#39;), 10);
    });
    
    //鼠标指针在上下文移动时,移动距离大于0小于最大间距,滑块x轴位置等于鼠标移动距离
    $(document).mousemove(function(e){
      var _x = e.pageX - x;
      if(isMove){
        if(_x > 0 && _x <= maxWidth){
          handler.css({&#39;left&#39;: _x});
          drag_bg.css({&#39;width&#39;: _x});
        }else if(_x > maxWidth){ //鼠标指针移动距离达到最大时清空事件
          dragOk();
        }
      }
    }).mouseup(function(e){
      isMove = false;
      var _x = e.pageX - x;
      if(_x < maxWidth){ //鼠标松开时,如果没有达到最大距离位置,滑块就返回初始位置
        handler.css({&#39;left&#39;: 0});
        drag_bg.css({&#39;width&#39;: 0});
      }
    });
    
    //清空事件
    function dragOk(){
      handler.removeClass(&#39;handler_bg&#39;).addClass(&#39;handler_ok_bg&#39;);
      text.text(&#39;验证通过&#39;);
      drag.css({&#39;color&#39;: &#39;#fff&#39;});
      handler.unbind(&#39;mousedown&#39;);
      $(document).unbind(&#39;mousemove&#39;);
      $(document).unbind(&#39;mouseup&#39;);
    }
  };
})(jQuery);

VUE的绿色拖动验证功能

HTML结构:

<template>
  <p id="drag">
    <p class="drag_bg weui-btn_primary" :style="{width:curW+&#39;px&#39;}"></p>
    <p class="drag_text" onselectstart="return false;" unselectable="on":class="[isDragOk ? &#39;whitecolor&#39;:&#39;&#39;]">{{text}}</p>
    <p class="handler" :style="{left:curW+&#39;px&#39;}" :class="[isDragOk ? &#39;handler_ok_bg&#39;:&#39;handler_bg&#39;]"></p>
  </p>
</template>

CSS代码:

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

JS代码:

<script>
export default{
  name:&#39;slider&#39;,
  props:{
    
  },
  data(){
    return{
      curW:0,
      isMove:false, //是否在运动
      isDragOk:false, //是否拖动成功
      maxWidth:0, //拖动的最大宽度
      element:{},
      text:&#39;拖动滑块验证&#39;,
      currentPos:{
        x: 0,
        y: 0
      }
    }
  },
  created(){
    
  },
  mounted () {
    var self = this;
    this.element = document.querySelector(&#39;.handler&#39;);
    this.getMaxWidth();
    window.addEventListener(&#39;resize&#39;,function(){self.getMaxWidth()});
    window.addEventListener(&#39;orientationchange&#39;,function(){self.getMaxWidth()});
    
    
     this.element.addEventListener(&#39;touchstart&#39;,self.touchstartFun,false);
    document.querySelector(&#39;body&#39;).addEventListener(&#39;touchmove&#39;,self.touchmoveFun,false);
    document.querySelector(&#39;body&#39;).addEventListener(&#39;touchend&#39;,self.touchendFun,false);
    
    this.element.addEventListener(&#39;mousedown&#39;,self.touchstartFun,false);
    document.querySelector(&#39;body&#39;).addEventListener(&#39;mousemove&#39;,self.touchmoveFun,false);
    document.querySelector(&#39;body&#39;).addEventListener(&#39;mouseup&#39;,self.touchendFun,false);
    
    (function drawAnimate() {
      if( self.curW <= self.maxWidth){
        window.requestAnimFrame(drawAnimate,1000/60);
        self.curW = self.currentPos.x;
      }else{
        self.curW = self.currentPos.x = self.maxWidth;
      }
    })();
  },
  watch:{
    
  },
  methods:{
    touchstartFun(e){
      if(this.isDragOk){
         e.preventDefault();
         return;
       }
      this.isMove = true;
      this.curW = this.currentPos.x = this.getCurrentPosition(e).x;
    },
    touchmoveFun(e){
      if(this.isMove && this.curW > 0 && this.curW < this.maxWidth){
        this.currentPos.x = this.getCurrentPosition(e).x;
      }
      else if(this.isMove && this.curW >= this.maxWidth){
        this.curW = this.currentPos.x = this.maxWidth;
        this.isDragOk = true;
        this.text = "验证通过";
      }
    },
    touchendFun(e){
      this.isMove = false;
      if(this.curW < this.maxWidth){
        this.curW = this.currentPos.x = 0;
      }
    },
    
    getCurrentPosition(event){
      var xPos, yPos, rect;
      rect = document.getElementById(&#39;drag&#39;).getBoundingClientRect();
      //event = event.originalEvent;
      //判断是touch,还是鼠标事件
      if (event.type.indexOf(&#39;touch&#39;) !== -1) {
        xPos = event.touches[0].clientX - rect.left;
        yPos = event.touches[0].clientY - rect.top;
      }
      
      //鼠标事件
      else {
        xPos = event.clientX - rect.left;
        yPos = event.clientY - rect.top;
      }
      return {
        x: xPos,
        y: yPos
      }
    },
    getMaxWidth(){
      this.maxWidth = document.querySelector("#drag").clientWidth - document.querySelector(".handler").scrollWidth;
    }
  }
}
</script>

页面引用方式:

<slider></slider>

上面是我整理给大家的,希望今后会对大家有帮助。

相关文章:

在vue-cli中如何配置babel配置文件

如何使用babel安装配置教程

在Nodejs下使用gm裁剪在合成图片

Atas ialah kandungan terperinci 使用jQuery与vue如何实现拖动验证码功能. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!

Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn