d7eb2b3b by 任超

style:搜索

1 parent c8df1970
......@@ -93,25 +93,9 @@
display: inline-block;
color: #4A4A4A;
}
.personInfo li .verCode {
font-style: normal;
width: 90px;
height: 16px;
line-height: 16px;
border-radius: 2px;
border: 1px solid #0091FF;
font-size: 12px;
color: #0091FF;
display: inline-block;
position: relative;
right: -20px;
top: -10px;
cursor: pointer;
text-align: center;
}
.verificationCode input {
width: 280px;
width: 350px;
display: inline-block;
}
.query_criteria {
......@@ -155,4 +139,17 @@
}
.disabled{
cursor: auto;
}
.verCode {
border: 1px solid #DEDEDE;
border-radius: 2px;
cursor: pointer;
text-align: center!important;
height: 36px;
line-height: 36px;
display: inline-block;
margin-left: 10px;
}
.codeInput {
width: 225px!important;
}
\ No newline at end of file
......
......@@ -25,24 +25,33 @@ function fetchDataReview() {
return false;
});
});
$('.verCode').click(function() {
var time = 10;
settime($(this));
function settime(obj) {
if (time == 0) {
$(obj).attr('disabled', false);
$(obj).html("点击获取验证码");
time = 60;
return;
} else {
$(obj).attr('disabled', true);
$(obj).html(time + "秒后重新发送");
time--;
}
setTimeout(function () {
settime(obj)
var timer = "";
var nums = 60;
var validCode = true;//定义该变量是为了处理后面的重复点击事件
$('.verCode').click(function () {
var code = $(this);
if (validCode) {
validCode = false;
yanzheng()
timer = setInterval(function () {
yanzheng()
}, 1000)
}
function yanzheng() {
if (nums > 0) {
nums--;
code.text(nums + "秒后重新发送");
code.addClass("layui-btn-disabled");
}
else {
clearInterval(timer);
nums = 60;//重置回去
validCode = true;
code.removeClass("layui-btn-disabled");
code.text("发送验证码");
}
}
})
}
// 初始化数据
......
......@@ -55,7 +55,6 @@
<li>
<span>手机号:</span>
<p>187789798798</p>
<button type="button" name="button" class="verCode">点击获取验证码</button>
</li>
<li>
<span>身份证号:</span>
......@@ -64,7 +63,8 @@
</ul>
<div class="verificationCode">
<span>验证码:</span>
<input type="tel" placeholder="请输入验证码" class="layui-input">
<input type="tel" placeholder="请输入验证码" class="layui-input codeInput">
<button type="button" class="layui-btn layui-btn-primary verCode">获取验证码</button>
</div>
<div class="verificationCode marginTop20">
<span>受理编号:</span>
......
......@@ -54,7 +54,6 @@
<li>
<span>手机号:</span>
<p>187789798798</p>
<button type="button" name="button" class="verCode">点击获取验证码</button>
</li>
<li>
<span>身份证号:</span>
......@@ -64,6 +63,7 @@
<div class="verificationCode">
<span>验证码:</span>
<input type="tel" placeholder="请输入验证码" class="layui-input">
<button type="button" class="layui-btn layui-btn-primary verCode">获取验证码</button>
</div>
<div class="query_criteria">
<label class="layui-form-label query_criteria_title">不动产证书号:</label>
......
......@@ -56,7 +56,6 @@
<li>
<span>手机号:</span>
<p>187789798798</p>
<button type="button" name="button" class="verCode">点击获取验证码</button>
</li>
<li>
<span>身份证号:</span>
......@@ -65,7 +64,8 @@
</ul>
<div class="verificationCode">
<span>验证码:</span>
<input type="tel" placeholder="请输入验证码" class="layui-input">
<input type="tel" placeholder="请输入验证码" class="layui-input codeInput">
<button type="button" class="layui-btn layui-btn-primary verCode">获取验证码</button>
</div>
<div class="query_criteria">
<label class="layui-form-label query_criteria_title">不动产证书号:</label>
......
......@@ -55,7 +55,6 @@
<li>
<span>手机号:</span>
<p>187789798798</p>
<button type="button" name="button" class="verCode">点击获取验证码</button>
</li>
<li>
<span>身份证号:</span>
......@@ -64,7 +63,8 @@
</ul>
<div class="verificationCode">
<span>验证码:</span>
<input type="tel" placeholder="请输入验证码" class="layui-input">
<input type="tel" placeholder="请输入验证码" class="layui-input codeInput">
<button type="button" class="layui-btn layui-btn-primary verCode">获取验证码</button>
</div>
<div class="verificationCode marginTop20">
<span>受理编号:</span>
......
......@@ -55,7 +55,6 @@
<li>
<span>手机号:</span>
<p>187789798798</p>
<button type="button" name="button" class="verCode">点击获取验证码</button>
</li>
<li>
<span>身份证号:</span>
......@@ -64,7 +63,8 @@
</ul>
<div class="verificationCode">
<span>验证码:</span>
<input type="tel" placeholder="请输入验证码" class="layui-input">
<input type="tel" placeholder="请输入验证码" class="layui-input codeInput">
<button type="button" class="layui-btn layui-btn-primary verCode">获取验证码</button>
</div>
<div class="verificationCode marginTop20">
<span>合同备案编号:</span>
......