-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd_user.html
188 lines (181 loc) · 5.68 KB
/
add_user.html
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Amaze UI Admin index Examples</title>
<meta name="description" content="这是一个 index 页面">
<meta name="keywords" content="index">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="icon" type="image/png" href="assets/i/favicon.png">
<link rel="apple-touch-icon-precomposed" href="assets/i/[email protected]">
<meta name="apple-mobile-web-app-title" content="Amaze UI" />
<link rel="stylesheet" href="assets/css/amazeui.min.css"/>
<link rel="stylesheet" href="assets/css/admin.css">
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/app.js"></script>
<style type="text/css">
body,#main{
width:98%;
margin:0 auto;
margin-bottom:50px;
background-color: #fff;
}
#form{
width: 100%;
height: 100%;
position: relative;
margin:0 auto;
}
.name,.price,.flavor,.batching,.integral,.exchange,.change,.photo{
width:100%;
line-height: 50px;
padding:15px;
box-sizing: initial;
border:1px solid #ddd;
border-top:none;
}
.photo{
height:240px;
line-height: 240px;
}
.name>span,.price>span,.photo>span,.flavor>span,.batching>span,.integral>span,.exchange>span,.change>span{
display: inline-block;
width: 15%;
height: 50px;
line-height: 50px;
font-size: 16px;
text-align: center;
}
.name>input,.price>input,.photo>input,.flavor>input,.batching>input,.integral>input,.exchange>input,.change>input{
width:10%;
height: 30px;
border-radius: 5px;
border:1px solid #ddd;
}
#photo{
display: inline-block;
}
#sub{
background-color: #fff;
border:1px solid #333;
color: #333;
margin: 20px;
margin-left:20px;
}
.add_flavor{
background-color: #4aaa4a;
display: inline-block;
border-radius: 10px;
width:120px;
}
.add_flavor img{
width:30px;
height: 30px;
border-radius: 50%;
}
.add_flavor span:last-child{
display: inline-block;
line-height: 30px;
text-align: center;
font-size: 12px;
}
</style>
</head>
<body>
<!--[if lte IE 9]><p class="browsehappy">升级你的浏览器吧! <a href="http://se.360.cn/" target="_blank">升级浏览器</a>以获得更好的体验!</p><![endif]-->
</head>
<body>
<div class="admin-biaogelist" >
<div class="listbiaoti am-cf">
<ul class="am-icon-flag on">添加用户</ul>
<dl class="am-icon-home" style="float: right;">
当前位置: 首页 > <a href="shop_management.html" target="iframe">用户管理</a> >添加用户
</dl>
</div>
<div id="main">
<form action="" id="form">
<div class="name">
<span>手机号</span>
<input type="text" id="name" placeholder="" value="">
</div>
<div class="price">
<span>验证码:</span>
<input type="text" id="price" placeholder="" value="">
<button type="button" class="am-btn" id="getCode">获取验证码</button>
</div>
<button type="button" class="am-btn" id="sub">添加用户</button>
</form>
</div>
</div>
<!-- 上传图片加载 -->
<div class="am-modal am-modal-loading am-modal-no-btn" tabindex="-1" id="my-modal-loading">
<div class="am-modal-dialog">
<div class="am-modal-hd">正在载入...</div>
<div class="am-modal-bd">
<span class="am-icon-spinner am-icon-spin"></span>
</div>
</div>
</div>
<script src="js/demo.js"></script>
<script type="text/javascript">
// 获取验证码
$("#getCode").click(function(){
var phone=$("#name")[0].value;
console.log(phone)
if($(this)[0].innerText=="获取验证码"){
$.ajax({
url:" https://myyouta.com/mzXL/User/messageVerification/",
data:{
phone:phone
},
success:function(res){
console.log(res)
if(res.code==100000){
$("#price")[0].value=res.data[0].VerificationCode;
var i=60;
setInterval(function (){
if(i>0){
i--;
$("#getCode")[0].innerText=i+"秒后可再次获取"
}else{
$("#getCode")[0].innerText="获取验证码"
}
},1000)
}
}
})
}
})
$("#sub").click(function(){
var phone=$("#name")[0].value;
var messageVerification=$("#price")[0].value;
$.ajax({
url:"https://myyouta.com/mzXL/User/LoginAddUser",
data:{
phone:phone,
messageVerification:messageVerification
},
success:function(res){
if(res.code==100000){
alert("添加成功")
window.location.href="user_file.html"
}
}
})
})
</script>
<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/polyfill/rem.min.js"></script>
<script src="assets/js/polyfill/respond.min.js"></script>
<script src="assets/js/amazeui.legacy.js"></script>
<![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<script src="assets/js/amazeui.min.js"></script>
<!--<![endif]-->
</body>
</html>