add.html
5.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>添加同行人</title>
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
<script type="text/javascript" src="__TMPL__/static/js/base.js"></script>
<link rel="stylesheet" type="text/css" href="__TMPL__/static/assets/css/weui.min.css" />
<link rel="stylesheet" type="text/css" href="__TMPL__/static/assets/css/swiper-3.4.2.min.css" />
<link rel="stylesheet" type="text/css" href="http://at.alicdn.com/t/font_773803_3se1rq7vwl5.css" />
<script type="text/javascript" src="__TMPL__/static/assets/font/iconfont.js">
</script>
<link rel="stylesheet" href="__TMPL__/static/css/common.css" />
<link rel="stylesheet" href="__TMPL__/static/css/addlPartner.css" />
</head>
<body>
<ul class="list">
<li>
<span class="real">真实姓名</span>
<input class="add name" placeholder="请填写真实姓名" />
</li>
<li class=''>
<span class="real">性别</span>
<div class="sexs">
<div class="circle_left circles" data-sex="1">
<img src="__TMPL__/static/images/circle1.png" alt="" />
<div class="woman">女</div>
</div>
<div class="circle_right circles" data-sex="0">
<img src="__TMPL__/static/images/circle.png" alt="" />
<div class="man">男</div>
</div>
</div>
</li>
<li>
<span class="real">手机号</span>
<input type="text" placeholder="请填写手机号码" class="add tel" />
</li>
<li>
<span class="real">微信号码</span>
<input type="text" placeholder="请填写微信号码" class="add weixin" />
</li>
<li>
<span class="real">身份证号</span>
<input type="text" placeholder="请填写身份证号" class="add zfzid" />
</li>
</ul>
<!--====底部=====-->
<footer class="foot ok">
保存
</footer>
<div id="toast" style='display: none;'>
<div class="weui-mask_transparent"></div>
<div class="weui-toast">
<!--<i class="weui-icon-success-no-circle weui-icon_toast"></i>-->
<p class="weui-toast__content">已完成</p>
</div>
</div>
</body>
<script type="text/javascript" src="__TMPL__/static/assets/js/jquery-2.1.0.js"></script>
<script type="text/javascript" src="__TMPL__/static/assets/js/common.js"></script>
<script type='text/javascript' src='__TMPL__/static/assets/js/Augly_Verification.js'></script>
<script>
var sex=1;
$('.circles').click(function () {
sex = $(this).attr('data-sex');
});
$(function() {
$('.ok').click(function() {
if($('.name').val() == '') {
toast('请填入您的姓名');
} else if($('.tel').val() == '') {
toast('请输入电话号码');
} else if(!AuglyTest_phone.test($('.tel').val())) {
toast('电话号码格式不正确');
} else if($('.weixin').val() == '') {
toast('请输入微信号码');
} else if($('.zfzid').val() == '') {
toast('请输入身份证号');
} else if(!AuglyTest_ID.test($('.zfzid').val())) {
toast('身份证号输入不正确');
} else {
$.ajax({
url:"{:url('Escort/add')}",
data:{
name:$('.name').val(),
tel:$('.tel').val(),
identity:$('.zfzid').val(),
wechat:$('.weixin').val(),
sex:sex
},
type:"POST",
dataType:"JSON",
success: function () {
window.location.href="{:url('Escort/_list')}";
}
})
}
})
var $abs = $('.sexs .circle_left div.circle_iput');
$('.circle_left').click(function(){
$(this).find('.circle_black').css('background','#656565');
$(this).find('.circle_black').css('opacity','1');
$('.circle_right').find('.circle_black').css('background','#fff');
$('.circle_right').find('.circle_black').css('opacity','0');
});
$('.circle_right').click(function(){
$(this).find('.circle_black').css('background','#656565');
$(this).find('.circle_black').css('opacity','1');
$('.circle_left').find('.circle_black').css('background','#fff');
$('.circle_left').find('.circle_black').css('opacity','0');
});
$('.check').click(function(){
$(this).addClass('active').siblings().removeClass('active')
})
$('.circles img').click(function(event) {
$(this).attr("src", "/themes/simpleboot3/static/images/circle1.png");
$(this).parents('.circles').siblings().find('img').attr("src", "/themes/simpleboot3/static/images/circle.png");
});
})
</script>
</html>