forked from kidgrow-microservices-platform

kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/system/user_form.html
@@ -1,6 +1,7 @@
<!-- user表单弹窗 -->
<form id="user-form" lay-filter="user-form" class="layui-form model-form">
    <input name="id" type="hidden"/>
    <input name="type" type="hidden" value="BACKEND"/>
    <div class="layui-form-item">
        <label class="layui-form-label">账号</label>
        <div class="layui-input-block">
@@ -53,7 +54,7 @@
        // 获取所有角色
        layer.load(2);
        admin.req('api-user/allRoles', {}, function (data) {
        admin.req('api-user/findByMap', {}, function (data) {
            layer.closeAll('loading');
            if (0 == data.code) {
                // 渲染多选下拉框
@@ -76,7 +77,7 @@
                    formSelects.value('roleId', rds);
                }
            } else {
                layer.msg('获取角色失败', {icon: 2, time: 500});
                layer.msg('获取角色失败', {icon: 2, time: 2000});
            }
        }, 'GET');
@@ -85,11 +86,11 @@
            layer.load(2);
            admin.req('api-user/users/saveOrUpdate', JSON.stringify(data.field), function (data) {
                layer.closeAll('loading');
                if (data.code == 0) {
                    layer.msg(data.msg, {icon: 1, time: 500});
                if (data.code == 0) {
                    layer.alert("用户添加成功,默认密码为:"+data.data.password, {icon: 1});
                    admin.finishPopupCenter();
                } else {
                    layer.msg(data.msg, {icon: 2, time: 500});
                    layer.msg(data.msg, {icon: 2, time: 2000});
                }
            }, "POST");
            return false;