-
Notifications
You must be signed in to change notification settings - Fork 1
/
passwordChange.html
99 lines (88 loc) · 3.3 KB
/
passwordChange.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
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>密码修改页面</title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link href="css/mui.min.css" rel="stylesheet" />
<link href="css/passwordChange.css" rel="stylesheet" />
<script src="js/mui.min.js"></script>
<script type="text/javascript">
mui.init();
mui('body').on('tap','a',function(){
window.top.location.href=this.href;
});
</script>
<script type="text/javascript" src="js/jquery-2.1.0.js"></script>
<script type="text/javascript" src="js/passwordChange.js"></script>
<script type="text/javascript">
var a = location.href;
var getUrlParam = function(a){
var reg = new RegExp("(^|&)"+ a +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r!=null)
return unescape(r[2]);
return null;
};
function change(){
var user = {"userId":getUrlParam('data'),"password":$("#pswd").val()}
$.ajax({
type:"post",
url:"http://192.168.1.102:8080/beijiao/app/changepswd",
async:true,
data:user,
dataType:"json",
success:function(data,status){
if(data.result=="success"){
alert("成功")
}
if(data.result=="SamePswd"){
alert("新旧密码不能相同")
}
if(data.result=="fail"){
alert("失败")
}
},
error : function(data,status,e){
alert("失败");
}
});
}
</script>
</head>
<body>
<!-- 主页面容器 -->
<div class="mui-inner-wrap">
<!-- 头部(从左到右:侧滑按钮、标题、搜索框)-->
<header id="head" class="mui-bar mui-bar-nav">
<a id="back" href="tab-personal.html"><button type="button" class="mui-btn mui-btn-primary mui-btn-outlined">返回</button></a>
<h1 id="head_title" class="mui-title">密码修改</h1>
</header>
<!--正文部分-->
<div class="mui-content mui-scroll-wrapper">
<div class="mui-scroll">
<div id="passwordChange">
<form class="mui-input-group">
<div class="mui-input-row">
<label>原始密码</label>
<input type="password" class="mui-input-clear" placeholder="请输入原始密码">
</div>
<div class="mui-input-row">
<label>新密码</label>
<input type="password" class="mui-input-clear" placeholder="请输入新密码">
</div>
<div class="mui-input-row">
<label>确认新密码</label>
<input type="password" id="pswd" class="mui-input-clear" placeholder="请重新输入新密码">
</div>
<div class="mui-button-row">
<button id="ensure" type="button" class="mui-btn mui-btn-primary" onclick="change()">确认</button>
<a href="tab-personal.html"><button id="cansel" type="button" class="mui-btn mui-btn-danger" >取消</button></a>
</div>
</form>
</div>
</div>
</div>
</div>
</body>
</html>