|
@@ -42,7 +42,7 @@ |
|
@@ -42,7 +42,7 @@ |
42
|
手机号
|
42
|
手机号
|
43
|
</div>
|
43
|
</div>
|
44
|
<div class="log_two_input_contant">
|
44
|
<div class="log_two_input_contant">
|
45
|
- <input type="text" placeholder="请输入手机号" value="{$data.phone}" maxlength="11" id="phone" onblur="checkPhone()" />
|
45
|
+ <input type="text" placeholder="请输入手机号" value="{$data.phone}" maxlength="11" id="phone" />
|
46
|
</div>
|
46
|
</div>
|
47
|
</div>
|
47
|
</div>
|
48
|
|
48
|
|
|
@@ -50,24 +50,43 @@ |
|
@@ -50,24 +50,43 @@ |
50
|
|
50
|
|
51
|
<!-- 保存 -->
|
51
|
<!-- 保存 -->
|
52
|
<div class="log_two_bottom_btn log_third_btn">
|
52
|
<div class="log_two_bottom_btn log_third_btn">
|
53
|
- <a href="log_first.html">保存</a>
|
53
|
+ <a class="save">保存</a>
|
54
|
</div>
|
54
|
</div>
|
55
|
<script src="__TMPL__/public/assets/js/jquery.js"></script>
|
55
|
<script src="__TMPL__/public/assets/js/jquery.js"></script>
|
56
|
<script src="__TMPL__/public/assets/js/base.js"></script>
|
56
|
<script src="__TMPL__/public/assets/js/base.js"></script>
|
57
|
|
57
|
|
58
|
<script>
|
58
|
<script>
|
59
|
function checkPhone() {
|
59
|
function checkPhone() {
|
60
|
- var name = $('#name').val();
|
|
|
61
|
- if(name == ''){
|
|
|
62
|
- alert("姓名不能为空");
|
|
|
63
|
- return false
|
|
|
64
|
- }
|
|
|
65
|
- var phone = document.getElementById('phone').value;
|
|
|
66
|
- if(!(/^1[34578]\d{9}$/.test(phone))) {
|
|
|
67
|
- alert("手机号码有误,请重填");
|
|
|
68
|
- return false;
|
|
|
69
|
- }
|
60
|
+
|
70
|
}
|
61
|
}
|
|
|
62
|
+ $('.save').click(function(){
|
|
|
63
|
+ var name = $('#name').val();
|
|
|
64
|
+ if(name == ''){
|
|
|
65
|
+ alert("姓名不能为空");
|
|
|
66
|
+ return false
|
|
|
67
|
+ }
|
|
|
68
|
+ var phone = document.getElementById('phone').value;
|
|
|
69
|
+ if(!(/^1[34578]\d{9}$/.test(phone))) {
|
|
|
70
|
+ alert("手机号码有误,请重填");
|
|
|
71
|
+ return false;
|
|
|
72
|
+ }
|
|
|
73
|
+ $.ajax({
|
|
|
74
|
+ url:"{:url('information_save')}",
|
|
|
75
|
+ type:"GET",
|
|
|
76
|
+ data:{'name':name,'phone':phone},
|
|
|
77
|
+ success:function(res){
|
|
|
78
|
+ if(res.code == 1){
|
|
|
79
|
+ alert(res.msg);
|
|
|
80
|
+ window.location.href = "{:url('share/index')}";
|
|
|
81
|
+ }else{
|
|
|
82
|
+ alert(res.msg);
|
|
|
83
|
+ }
|
|
|
84
|
+ },
|
|
|
85
|
+ error:function(res){
|
|
|
86
|
+ alert('与服务器断开连接');
|
|
|
87
|
+ }
|
|
|
88
|
+ })
|
|
|
89
|
+ })
|
71
|
</script>
|
90
|
</script>
|
72
|
</body>
|
91
|
</body>
|
73
|
|
92
|
|