From 124236ba52f6dd5c5720bb2fe20e312c3df9bb28 Mon Sep 17 00:00:00 2001 From: Anyon Date: Mon, 7 Mar 2022 13:08:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E6=9D=BF=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/view/auth/index.html | 5 +++-- app/admin/view/base/index.html | 5 +++-- app/admin/view/user/index.html | 10 +++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/admin/view/auth/index.html b/app/admin/view/auth/index.html index 47b7924ee..d4849fa0d 100644 --- a/app/admin/view/auth/index.html +++ b/app/admin/view/auth/index.html @@ -37,9 +37,10 @@ // 数据状态切换操作 layui.form.on('switch(StatusSwitchRoleTable)', function (obj) { - $.form.load("{:url('state')}", {id: obj.value, status: obj.elem.checked > 0 ? 1 : 0}, 'post', function (ret) { + var data = {id: obj.value, status: obj.elem.checked > 0 ? 1 : 0}; + $.form.load("{:url('state')}", data, 'post', function (ret) { if (ret.code < 1) $.msg.error(ret.info, 3, function () { - $('#RoleTable').trigger('reload'); // 操作异常时重载数据 + $('#RoleTable').trigger('reload'); }); return false; }, false); diff --git a/app/admin/view/base/index.html b/app/admin/view/base/index.html index 949407dc3..f8bb17c4d 100644 --- a/app/admin/view/base/index.html +++ b/app/admin/view/base/index.html @@ -48,9 +48,10 @@ // 数据状态切换操作 layui.form.on('switch(StatusSwitch)', function (obj) { - $.form.load("{:url('state')}", {id: obj.value, status: obj.elem.checked > 0 ? 1 : 0}, 'post', function (ret) { + var data = {id: obj.value, status: obj.elem.checked > 0 ? 1 : 0}; + $.form.load("{:url('state')}", data, 'post', function (ret) { if (ret.code < 1) $.msg.error(ret.info, 3, function () { - $('#BaseTable').trigger('reload'); // 操作异常时重载数据 + $('#BaseTable').trigger('reload'); }); return false; }, false); diff --git a/app/admin/view/user/index.html b/app/admin/view/user/index.html index c7a96b819..c2660021f 100644 --- a/app/admin/view/user/index.html +++ b/app/admin/view/user/index.html @@ -44,11 +44,11 @@ { field: 'headimg', title: '头像', width: 60, align: 'center', templet: function (d) { if (!d.headimg) return ''; - return layui.laytpl('
').render(d); + return layui.laytpl('
').render(d); } }, - {field: 'username', title: '登录账号', minWidth: 110, templet: '
{{d.username||"-"}}
'}, - {field: 'nickname', title: '用户名称', minWidth: 110, templet: '
{{d.nickname||"-"}}
'}, + {field: 'username', title: '登录账号', minWidth: 100, templet: '
{{d.username||"-"}}
'}, + {field: 'nickname', title: '用户名称', minWidth: 100, templet: '
{{d.nickname||"-"}}
'}, /* {notempty name='bases'} */ { field: 'usertype', title: '角色身份', minWidth: 140, sort: true, templet: function (d) { @@ -60,7 +60,7 @@ // {field: 'contact_mail', title: '联系邮箱', minWidth: 80, templet: '
{{d.contact_mail||"-"}}
'}, // {field: 'contact_phone', title: '联系电话', minWidth: 80, templet: '
{{d.contact_phone||"-"}}
'}, {field: 'status', title: '账号状态', align: 'center', minWidth: 110, templet: '#StatusSwitchTpl'}, - {field: 'login_num', title: '登录次数', align: 'center', minWidth: 80, sort: true}, + {field: 'login_num', title: '登录次数', align: 'center', minWidth: 100, sort: true}, {field: 'login_at', title: '最后登录', align: 'center', minWidth: 170, sort: true}, {field: 'create_at', title: '创建时间', align: 'center', minWidth: 170, sort: true}, {toolbar: '#toolbar', title: '操作面板', align: 'center', minWidth: 160, fixed: 'right'} @@ -91,7 +91,7 @@