...
|
...
|
@@ -42,7 +42,7 @@ |
|
|
手机号
|
|
|
</div>
|
|
|
<div class="log_two_input_contant">
|
|
|
<input type="text" placeholder="请输入手机号" value="{$data.phone}" maxlength="11" id="phone" onblur="checkPhone()" />
|
|
|
<input type="text" placeholder="请输入手机号" value="{$data.phone}" maxlength="11" id="phone" />
|
|
|
</div>
|
|
|
</div>
|
|
|
|
...
|
...
|
@@ -50,24 +50,43 @@ |
|
|
|
|
|
<!-- 保存 -->
|
|
|
<div class="log_two_bottom_btn log_third_btn">
|
|
|
<a href="log_first.html">保存</a>
|
|
|
<a class="save">保存</a>
|
|
|
</div>
|
|
|
<script src="__TMPL__/public/assets/js/jquery.js"></script>
|
|
|
<script src="__TMPL__/public/assets/js/base.js"></script>
|
|
|
|
|
|
<script>
|
|
|
function checkPhone() {
|
|
|
var name = $('#name').val();
|
|
|
if(name == ''){
|
|
|
alert("姓名不能为空");
|
|
|
return false
|
|
|
}
|
|
|
var phone = document.getElementById('phone').value;
|
|
|
if(!(/^1[34578]\d{9}$/.test(phone))) {
|
|
|
alert("手机号码有误,请重填");
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
$('.save').click(function(){
|
|
|
var name = $('#name').val();
|
|
|
if(name == ''){
|
|
|
alert("姓名不能为空");
|
|
|
return false
|
|
|
}
|
|
|
var phone = document.getElementById('phone').value;
|
|
|
if(!(/^1[34578]\d{9}$/.test(phone))) {
|
|
|
alert("手机号码有误,请重填");
|
|
|
return false;
|
|
|
}
|
|
|
$.ajax({
|
|
|
url:"{:url('information_save')}",
|
|
|
type:"GET",
|
|
|
data:{'name':name,'phone':phone},
|
|
|
success:function(res){
|
|
|
if(res.code == 1){
|
|
|
alert(res.msg);
|
|
|
window.location.href = "{:url('share/index')}";
|
|
|
}else{
|
|
|
alert(res.msg);
|
|
|
}
|
|
|
},
|
|
|
error:function(res){
|
|
|
alert('与服务器断开连接');
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
</script>
|
|
|
</body>
|
|
|
|
...
|
...
|
|