60 lines
2.6 KiB
HTML
60 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" 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="text" name="nickname" lay-verify="required" lay-reqtext="昵称不能为空" placeholder="请输入昵称" value="{$item.nickname ?? ''}" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label required">手机号</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" name="mobile" lay-verify="required" lay-reqtext="手机号不能为空" placeholder="请输入手机号" value="{$item.mobile ?? ''}" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item layui-form-text">
|
|
<label class="layui-form-label">备注信息</label>
|
|
<div class="layui-input-block">
|
|
<textarea name="remark" class="layui-textarea" placeholder="请输入备注信息">{$item.remark ?? ''}</textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="layui-form-item">
|
|
<div class="layui-input-block">
|
|
<button class="layui-btn layui-btn-normal" data-url="/manager/member/profile?id={$item.id}" lay-submit lay-filter="saveProfile">确认保存</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(saveProfile)', 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> |