64 lines
2.6 KiB
HTML
64 lines
2.6 KiB
HTML
{layout name="manager/layout" /}
|
|
<div class="layuimini-container location-operate-page">
|
|
<div class="layuimini-main">
|
|
<div class="layui-form layuimini-form">
|
|
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">用户名</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" class="layui-input" disabled value="{$item['username'] ?? ''}">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label required">旧密码</label>
|
|
<div class="layui-input-block">
|
|
<input type="password" name="old-password" class="layui-input" lay-verify="required" lay-reqtext="旧密码不能为空" placeholder="请输入旧密码">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label required">新密码</label>
|
|
<div class="layui-input-block">
|
|
<input type="password" name="password" class="layui-input" lay-verify="required" lay-reqtext="新密码不能为空" placeholder="请输入新密码">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label required">确认密码</label>
|
|
<div class="layui-input-block">
|
|
<input type="password" name="password_confirm" class="layui-input" lay-verify="required" lay-reqtext="确认密码不能为空" placeholder="请输入确认密码">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="layui-form-item">
|
|
<div class="layui-input-block">
|
|
<button class="layui-btn layui-btn-normal" data-url="/manager/member/my-password" lay-submit lay-filter="savePassword">确认保存</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
layui.use(['jquery', 'form', 'layer', 'miniTab'], function () {
|
|
let form = layui.form,
|
|
layer = layui.layer,
|
|
miniTab = layui.miniTab,
|
|
$ = layui.jquery;
|
|
|
|
//监听提交
|
|
form.on('submit(savePassword)', function (data) {
|
|
let url = $(data.elem).data('url');
|
|
$.post(url, data.field, function (res) {
|
|
layer.msg(res.msg);
|
|
if (res.code === 0) {
|
|
setTimeout(function () {
|
|
//关闭当前弹出层
|
|
miniTab.deleteCurrentByIframe();
|
|
}, 1000)
|
|
}
|
|
});
|
|
return false;
|
|
});
|
|
})
|
|
</script> |