//获取验证码
var wait = 60;
function time(o) {
if(wait == 0) {
o.removeAttribute("disabled");
o.value = "获取验证码";
wait = 60;
} else {
o.setAttribute("disabled", true);
o.value = "重新发送(" + wait + ")";
o.style.backgroundColor = '';
wait--;
setTimeout(function() {
time(o)
},
1000)
}
}
$("#btn").click(function() {
var phone1 = $("#phone1").val();
if(phone1.length == 11) {
time(this);
var json = {
phone:phone1
}
var param = {
form:JSON.stringify(json)
}
$.ajax({
url: "https://ttcf.cheleu.com/api/h5sms.do",
type: 'post',
dataType: "json",
data:param,
success: function(data) {
mui.toast("验证码已发送,请注意查收。");
}
});
}else {
mui.toast("请输入正确的手机号");
}
})
//点击确定按钮、
$(".determine").click(function(){
var phone1 = $("#phone1").val();
var code = $("#code").val();
if(phone1 == ''){
mui.toast("请输入正确的手机号!");
}else if(code=='' || code.length !=4 || code == undefined){
mui.toast("请输入正确的验证码!");
return
}
var json = {
phone:phone1,
code:code,
type:4,
spare1:teil,
}
var param = {
form:JSON.stringify(json)
}
$.ajax({
url: "https://ttcf.cheleu.com/api/user/shareRegister.do",
type: 'post',
dataType: "json",
data:param,
success: function(data) {
if(data.result==0){
window.location.href="AppDownload.html"
}else {
mui.toast("请输入正确的验证码!");
return
}
},
});
})

  

最新文章

  1. VIew-CoordinatorLayout 笔记
  2. 用VBox虚拟机安装Android 屏幕90度翻转竖屏设置
  3. linux查找进程,查找僵死进程,查找僵死进程并自动杀掉
  4. C#如何自定义DataGridViewColumn来显示TreeView
  5. 斐波那契数列PHP非递归数组实现
  6. 数据库mysql的基本命令
  7. 关于Liferay所有的能够进行自定义和扩展的东西的总结
  8. Android Handler与多线程
  9. 微信开放框架-UCToo
  10. CDockablePane 关闭的问题
  11. SQL索引--基础理论
  12. thinkphp系列:类的自动加载是如何设计的
  13. YAML详解
  14. AES加密的S盒和逆S盒的推导代码备份(C实现)
  15. 设置python环境变量
  16. jquery 获得下拉框的值《转》
  17. 验证 Googlebot (检查是否为真的Google机器人)
  18. 20145104张家明 《Java程序设计》第10周学习总结
  19. Apache JMeter2.13 实战
  20. nagios-4.0.8 安装部署

热门文章

  1. 自然语言处理NLP学习笔记三:使用Django做一个NLP的Web站点
  2. Cisco 三层交换机划分VLan与普通路由器连接配置
  3. Interceptors - 拦截器
  4. AI 资源帖
  5. GIT命令总结,so easy
  6. (已解决)Could not open '/var/lib/nova/mnt/*/volume-*': Permission denied
  7. spring笔记3路径跳转
  8. Hadoop三种架构介绍及搭建
  9. Thinkphp6框架学习:($this->error()undefined)Call to undefined method app\index\controller\Admin::error()
  10. 从入门到自闭之python三大器--装饰器进阶