iSendMsg - 移动端发送短信验证码倒计时效果的插件

  • jQuery isendMsg Plugin for mobile
  • send SMS verification code plugin for mobile
  • version: 1.1.0
  • Requires jQuery v2.0 or later
  • Copyright 2017 Abao
  • Project repository: https://github.com/duanxb/isendmsg

Intro

IsendMsg to meet the needs of mobile-side SMS verification code generated, to solve the project to all the SMS verification code needs, and contains some special needs, such as adding graphics verification code, add a custom sign token and so on.

IsendMsg is mainly composed of functions:

  • No graphics verification code mode
  • Turn on the graphics verification code mode
  • Mobile phone number regular verification
  • Customize the countdown string
  • Some callback functions are convenient for more flexible calls and are available in existing development projects

Show

isendmsgdemo.gif

Tips

  • You can make full use of callback to do anything.
  • Please make sure to read the guide and use it correctly.

Params intro

参数 说明
phoneId ID of the fill input of the mobile. Required
url Send message Api Required
timeOut Send the countdown after the success of the default 60S. Optional
countText After sending successfully, the countdown button appears on the text, default: "{n} s" Optional
captcha Whether to open the graphics verification code, the default does not open: false. Optional
captchaUrl When opening the graphics verification code, set the address of the graphic verification code. Optional
sign Customizable rules Encrypted string tokens are passed to the background to prevent others from attacking the SMS interface. Optional
beforeSend Send a verification code before the implementation of the function, if return false, then stop sending.
success After sending successfully, execute the callback function.
error After sending a failed function, execute the callback function

Authors

  • For questions and issues please use THIS WAY

iSendMsg - 移动端发送短信验证码倒计时效果的插件

自我介绍

IsendMsg为满足移动端短信验证码的需求而生的,解决项目中给所有的短信验证码需求,并包含一些特殊的需求,比如添加图形验证码、添加自定义sign令牌等等。

isendMsg主要是功能组成:

  • 无图形验证码模式
  • 开启图形验证码模式
  • 手机号规则性验证
  • 自定义倒计时字符串
  • 一些回调函数,方便更加灵活的调用和适用于现有的开发项目中

Tips

  • 可以充分利用callback,对返回的结果执行相应操作;
  • 自定义规则的加密字符串令牌传到后台,用于防止别人攻击短信接口;

Params intro

参数 说明
phoneId 所属手机号码文本框的ID。 必填
url 后台发送短信的接口链接。 必填
timeOut 发送成功后的倒计时,默认60S。 可选
countText 发送成功后,倒计时按钮上显示的文字,默认:"{n}S"。 可选
captcha 是否开启图形验证码,默认不开启:false。 可选
captchaUrl 当开启图形验证码时,设置获取图形验证码图片的地址。 可选
sign 可自定义规则的加密字符串令牌传到后台,用于防止别人攻击短信接口。可选
beforeSend 发送验证码之前,执行的函数,若return false,则阻止继续发送。
success 发送成功后,执行的函数。
error 发送失败后,执行的函数。

Authors

  • 如果你遇到了什么神bug,请发起 ISSUE 联系我 ~
  • 致力于前端开发,一起努力中……
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 昨天好不容易调整好了状态,让自己从自卑的阴影中做出来,但你今天却又重新陷进去了。 今天因为下了雨,心情也因...
    whb3246阅读 110评论 1 1
  • 积攒已久的怒火 只在一瞬间 水珠丢向滚烫的油 迎接它的 是难以抗拒的爆燃 …… 人们在愤怒的时候 总会去做一些看似...
    慵懒的图书管理员阅读 120评论 0 2
  • 高二英语组:王莹 张永辉 图片:郑铭伟 2017年9月14日,淮滨高中English Club(英语俱乐部)正式成...
    lisa莹阅读 517评论 0 1
  • 这几天为高三的孩子在外面租房子,好辛苦的搬家。心里琐事塞得满满的,一点也没有灵气。不知道能写点什么?也没有写作的基...
    紫云燕阅读 914评论 0 0