...
|
...
|
@@ -26,7 +26,7 @@ |
|
|
姓名
|
|
|
</div>
|
|
|
<div class="log_two_input_contant">
|
|
|
<input type="text" placeholder="请输入姓名" />
|
|
|
<input type="text" placeholder="请输入姓名" id="name" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="log_two_input_one">
|
...
|
...
|
@@ -34,7 +34,7 @@ |
|
|
手机号
|
|
|
</div>
|
|
|
<div class="log_two_input_contant">
|
|
|
<input style="width:3rem" type="text" placeholder="请输入手机号" maxlength="11" name="phone" />
|
|
|
<input style="width:3rem" type="text" placeholder="请输入手机号" maxlength="11" name="phone" id="phone" />
|
|
|
</div>
|
|
|
<div class="log_two_input_btn">
|
|
|
<input type="button" class="btn" id="code" value="获取验证码" onclick="codeButton()">
|
...
|
...
|
@@ -45,7 +45,7 @@ |
|
|
输入验证码
|
|
|
</div>
|
|
|
<div class="log_two_input_contant">
|
|
|
<input type="text" placeholder="请输入验证码" />
|
|
|
<input type="text" placeholder="请输入验证码" id="mycode" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="log_two_input_one">
|
...
|
...
|
@@ -53,7 +53,7 @@ |
|
|
身份证号
|
|
|
</div>
|
|
|
<div class="log_two_input_contant">
|
|
|
<input type="text" placeholder="请输入身份证号" />
|
|
|
<input type="text" placeholder="请输入身份证号" id="id_num" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -99,12 +99,44 @@ |
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 保存 -->
|
|
|
<div class="log_two_bottom_btn">
|
|
|
<a href="log_first.html">保存</a>
|
|
|
<div class="log_two_bottom_btn" onclick="auditadd()">
|
|
|
保存
|
|
|
</div>
|
|
|
<script src="__TMPL__/public/assets/js/jquery.js"></script>
|
|
|
<script src="__TMPL__/public/assets/js/base.js"></script>
|
|
|
<script>
|
|
|
/**
|
|
|
*保存提交审核信息
|
|
|
*/
|
|
|
function auditadd(){
|
|
|
if($('#name').val() == ''){
|
|
|
alert('姓名不能为空');
|
|
|
}else if($('#phone').val() == ''){
|
|
|
alert('手机号不能为空');
|
|
|
}else if($('#mycode').val() == ''){
|
|
|
alert('验证码不能为空');
|
|
|
}else if($('#id_num').val() == ''){
|
|
|
alert('身份证号不能为空');
|
|
|
}else{
|
|
|
name = $('#name').val();
|
|
|
phone = $('#phone').val();
|
|
|
code = $('#mycode').val();
|
|
|
id_num = $('#id_num').val();
|
|
|
img0 = $('#img0')[0].src;
|
|
|
img1 = $('#img1')[0].src;
|
|
|
$.post("{:url('Personalcenter/add_audit')}",{name:name,phone:phone,code:code,id_num:id_num,img0:img0,img1:img1},function(data){
|
|
|
if(data == 3){
|
|
|
alert('验证码错误');
|
|
|
}else if(data == 2){
|
|
|
alert('提交失败');
|
|
|
}else if(data == 1){
|
|
|
window.location.href = "{:url('Personalcenter/personal_center')}";
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
<script>
|
|
|
// 上传图片
|
|
|
function addImg(file) {
|
|
|
console.log(file.files);
|
...
|
...
|
@@ -141,25 +173,29 @@ |
|
|
//短信验证码
|
|
|
function codeButton() {
|
|
|
phone = $("input[name='phone']").val();
|
|
|
$.post("{:url('Personalcenter/send_message')}",{phone:phone},function(data){
|
|
|
if(data){
|
|
|
var code = $("#code");
|
|
|
code.attr("disabled", "disabled");
|
|
|
setTimeout(function() {
|
|
|
code.css("opacity", "0.8");
|
|
|
}, 1000)
|
|
|
var time = 60;
|
|
|
var set = setInterval(function() {
|
|
|
code.val("(" + --time + ")秒后重新获取");
|
|
|
}, 1000);
|
|
|
setTimeout(function() {
|
|
|
code.attr("disabled", false).val("重新获取验证码");
|
|
|
clearInterval(set);
|
|
|
}, 60000);
|
|
|
}else{
|
|
|
alert('发送失败!');
|
|
|
}
|
|
|
});
|
|
|
if(phone == ''){
|
|
|
alert('手机号不能为空');
|
|
|
}else{
|
|
|
$.post("{:url('Personalcenter/send_message')}",{phone:phone},function(data){
|
|
|
if(data){
|
|
|
var code = $("#code");
|
|
|
code.attr("disabled", "disabled");
|
|
|
setTimeout(function() {
|
|
|
code.css("opacity", "0.8");
|
|
|
}, 1000)
|
|
|
var time = 60;
|
|
|
var set = setInterval(function() {
|
|
|
code.val("(" + --time + ")秒后重新获取");
|
|
|
}, 1000);
|
|
|
setTimeout(function() {
|
|
|
code.attr("disabled", false).val("重新获取验证码");
|
|
|
clearInterval(set);
|
|
|
}, 60000);
|
|
|
}else{
|
|
|
alert('发送失败!');
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
}
|
|
|
</script>
|
...
|
...
|
|