<!DOCTYPE html>
<html lang="en">
<head>
    {T "mem","head",TPLID}
    <link rel="stylesheet" href="/res/mem/css/resetPassword.css" media="all">
</head>
<body>
<div class="restPassword-page">
    <div class="layui-tab layui-tab-brief" lay-filter="component-tabs-hash">
        <ul class="layui-tab-title">
            <li class="layui-this" lay-id="11">密码重置</li>
        </ul>
        <div class="layui-tab-content" style="margin:0;padding:0;">
            <div class="findPassword-info">
                <div class="password-info-3 _show">
                    <span class="title-text">当前密码</span>
                    <input type="password" name="old_password" lay-verify="password" autocomplete="off" placeholder="请输入账号" class="layui-input">
                    <span class="title-text">新密码</span>
                    <input type="password" name="new_password" lay-verify="password" autocomplete="off" placeholder="请输入账号" class="layui-input">
                    <span class="title-text">确认新密码</span>
                    <input type="password" name="new_password2" lay-verify="password" autocomplete="off" placeholder="请输入账号" class="layui-input margin_bot">
                    <button class="layui-btn layui-btn-radius _green password-info-but" id="btn">重置</button>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script src="res/static/layuiadmin/layui/layui.js"></script>
<script>
layui.config({
    base: 'res/static/layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index','layer'], function(){
      $ = layui.$
      ,layer = layui.layer;
    $("#btn").on('click', function(){
        var old_password = $('[name="old_password"]').val();
        var new_password = $('[name="new_password"]').val();
        var new_password2 = $('[name="new_password2"]').val();
        $.getJSON('index.php?m=mem&f=password&v=resetpassword', {"newPassword":new_password,"newPassword2":new_password2,"password":old_password}, function (data) {
                if (data.code == 200) {
                    layer.msg(data.msg, {icon: 1});
                } else {
                    layer.msg(data.msg, {icon: 2});
                }
            });

    });
  });
</script>
</html>