-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlog.html
176 lines (159 loc) · 6.31 KB
/
log.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
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6 lt8"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7 lt8"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8 lt8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="zh" class="no-js"> <!--<![endif]-->
<head>
<meta charset="UTF-8" />
<!-- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="css/mine/demo.css" />
<link rel="stylesheet" type="text/css" href="css/mine/style_log.css" />
<link rel="stylesheet" type="text/css" href="css/mine/animate-custom.css" />
<link rel="stylesheet" type="text/css" href="css/common.css"/>
<script src="svg/iconfont.js" type="text/javascript" charset="utf-8"></script>
<style>
.icon {
width: 35px;
height: 35px;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
</style>
<script type="text/javascript">
if(window.localStorage){
var un = localStorage.getItem("username");
var pas = localStorage.getItem("password");
//alert(un+pas);
}else{alert("浏览不支持localStorage")}
</script>
</head>
<body>
<div class="container">
<section>
<div id="container_demo" style="margin-top: 80px" >
<!-- <a class="hiddenanchor" id="toregister"></a>
<a class="hiddenanchor" id="tologin"></a> -->
<div id="wrapper">
<div id="login" class="animate form">
<h1 class="word">登陆</h1>
<p>
<label for="username" class="uname" data-icon="u" > 请输入您的帐号 </label>
<input id="username" name="username" required="required" type="text" placeholder="mynumber" />
</p>
<p>
<label for="password" class="youpasswd" data-icon="p"> 请输入您的密码 </label>
<input id="password" name="password" required="required" type="password" placeholder="eg. X8df!90EO" />
</p>
<p class="keeplogin">
<input type="checkbox" name="loginkeeping" id="loginkeeping" value="loginkeeping" />
<label for="loginkeeping">记住密码</label>
</p>
<p class="login button" >
<input style="text-align: center;" id="submit" value="登陆" />
</p>
<p class="change_link" style="text-align: center;color: bsteelblue;font-size: 20px;">
还未注册?
<br>
请选择注册身份
<!-- <a href="reg.html" class="to_register">点击注册</a> -->
</p>
<div class="id_choose" style="left: 10px;" >
<a class="mui-tab-item" style="background: none;" href="reg_doctor.html">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-yisheng"></use>
</svg>
<span class="mui-tab-label"><h4 style="color:#066A75;">我是医生</h4></span>
</a>
</div>
<div class="id_choose" style="left: 50%;margin-left: -70px;" >
<a class="mui-tab-item" style="background: none;" href="reg_patient.html">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-bingren"></use>
</svg>
<span class="mui-tab-label"><h4 style="color:#066A75">我是病人</h4></span>
</a>
</div>
<div class="id_choose" style="right: 50px;" onclick="openFam()">
<a class="mui-tab-item" style="background: none;" href="reg_family.html">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-jiashu"></use>
</svg>
<span class="mui-tab-label"><h4 style="color:#066A75">我是家属</h4></span>
</a>
</div>
</div>
</div>
</div>
</section>
</div>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
<script src="js/jquery-1.11.0.min.js" type="text/javascript" charset="utf-8"></script>
<script>
$(document).ready(function () {
$("#submit").click(function(){
var username = $("#username").val();
var password = $("#password").val();
if(window.localStorage){
var un = document.getElementById("username").value;
var pas = document.getElementById("password").value;
localStorage.setItem("username",un);
localStorage.setItem("password",pas);
}else{alert("浏览不支持localStorage")}
var username = $("#username").val();
var password = $("#password").val();
$.ajax({
url:"http://203.195.148.111:8080/index/index/login",
withCredentials:true,
data: {username:username, password:password},
success: function(data){
if(data==1){
alert("用户名不存在");
}else if(data==2){
alert("密码错误");
}else if(data==5){
alert("登陆成功!祝您早日康复");
window.location.href = "index.html";
}else if(data==6){
alert("登陆成功!您的身份为:医生");
//此处从abnormal→msg
window.location.href = "doctor_patient_head.html";
}else if(data==7){
alert("登陆成功!");
window.location.href = "family_main_head.html";
}
},
error: function(data){
alert("连接失败,请检查手机网络")
}
});
});
})
</script>
</body>
<script type="text/javascript">
function openDoc(){
mui.openWindow({
url : 'reg_doctor.html',
extras :
{}
});
}
function openFam(){
mui.openWindow({
url : 'reg_family.html',
extras :
{}
});
}
function openPat(){
mui.openWindow({
url : 'reg_patient.html',
extras :
{}
});
}
</script>
</html>