90 lines
3.5 KiB
HTML
90 lines
3.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="renderer" content="webkit">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<title>欢迎页</title>
|
|
<link rel="stylesheet" href="../../static/frame/layui/css/layui.css">
|
|
<link rel="stylesheet" href="../../static/frame/static/css/style.css">
|
|
<link rel="icon" href="../../static/frame/static/image/code.png">
|
|
</head>
|
|
<body class="body">
|
|
|
|
|
|
<div class="layui-row layui-col-space10 my-index-main">
|
|
|
|
<form class="layui-form"> <!-- 提示:如果你不想用form,你可以换成div等任何一个普通元素 -->
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">旧密码</label>
|
|
<div class="layui-input-block">
|
|
<input type="password" name="oldpass" placeholder="" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">新密码</label>
|
|
<div class="layui-input-block">
|
|
<input type="password" name="newpass" placeholder="" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">重复新密码</label>
|
|
<div class="layui-input-block">
|
|
<input type="password" name="renewpass" placeholder="" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<div class="layui-input-block">
|
|
<button class="layui-btn" lay-submit lay-filter="">立即提交</button>
|
|
<button type="password" class="layui-btn layui-btn-primary">重置</button>
|
|
</div>
|
|
</div>
|
|
<!-- 更多表单结构排版请移步文档左侧【页面元素-表单】一项阅览 -->
|
|
</form>
|
|
</div>
|
|
|
|
|
|
<script src="../../static/jquery-3.3.1.js"></script>
|
|
<script type="text/javascript" src="../../static/frame/layui/layui.js"></script>
|
|
<script type="text/javascript" src="../../static/js/index.js"></script>
|
|
<script type="text/javascript" src="../../static/frame/echarts/echarts.min.js"></script>
|
|
<script type="text/javascript">
|
|
var adlist = '';
|
|
|
|
layui.use(['form', 'element', 'layer', 'vip_tab'], function () {
|
|
// 打开选项卡
|
|
$('.my-nav-btn').on('click', function () {
|
|
if ($(this).attr('data-href')) {
|
|
vipTab.add($(this), '<i class="layui-icon">' + $(this).find("button").html() + '</i>' + $(this).find('p:last-child').html(), $(this).attr('data-href'));
|
|
}
|
|
});
|
|
var form = layui.form;
|
|
|
|
form.on('submit', function (data) {
|
|
var loading = layer.load();
|
|
$.ajax({
|
|
url: '../ajax.php?mod=changepassword',
|
|
type: 'POST',
|
|
dataType: 'html',
|
|
data: 'oldpass=' + data.field.oldpass + '&newpass=' + data.field.newpass + '&renewpass=' + data.field.renewpass,
|
|
success: function (data) {
|
|
layer.close(loading);
|
|
layer.msg(data);
|
|
},
|
|
error: function (data) {
|
|
layer.close(loading);
|
|
layer.msg('请求失败' + data);
|
|
}
|
|
})
|
|
|
|
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
</script>
|
|
</body>
|
|
</html> |