mirror of
https://github.com/201206030/novel-plus.git
synced 2025-04-26 17:20:52 +00:00
feat: 后台会员管理
This commit is contained in:
parent
c76df15a7f
commit
57eca58b24
@ -1,6 +1,6 @@
|
||||
CREATE TABLE `website_info`
|
||||
(
|
||||
id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
name varchar(50) NOT NULL COMMENT '网站名',
|
||||
domain varchar(50) NOT NULL COMMENT '网站域名',
|
||||
keyword varchar(50) NOT NULL COMMENT 'SEO关键词',
|
||||
@ -8,10 +8,10 @@ CREATE TABLE `website_info`
|
||||
qq varchar(20) NOT NULL COMMENT '站长QQ',
|
||||
logo varchar(200) NOT NULL COMMENT '网站logo图片(默认)',
|
||||
logo_dark varchar(200) NOT NULL COMMENT '网站logo图片(深色)',
|
||||
create_time datetime null comment '创建时间',
|
||||
create_user_id bigint null comment '创建人ID',
|
||||
update_time datetime null comment '更新时间',
|
||||
update_user_id bigint null comment '更新人ID',
|
||||
create_time datetime null comment '创建时间',
|
||||
create_user_id bigint null comment '创建人ID',
|
||||
update_time datetime null comment '更新时间',
|
||||
update_user_id bigint null comment '更新人ID',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='网站信息表';
|
||||
@ -64,3 +64,16 @@ INSERT INTO sys_role_menu (role_id, menu_id)
|
||||
VALUES (1, 314);
|
||||
INSERT INTO sys_role_menu (role_id, menu_id)
|
||||
VALUES (1, 315);
|
||||
|
||||
|
||||
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num, gmt_create, gmt_modified)
|
||||
VALUES (400, 0, '会员管理', '', '', 0, 'fa fa-vcard', 9, null, null);
|
||||
|
||||
INSERT
|
||||
INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
VALUES (401, 400, '会员列表', 'novel/user', 'novel:user:user', '1', 'fa', '6');
|
||||
|
||||
INSERT INTO sys_role_menu (role_id, menu_id)
|
||||
VALUES (1, 400);
|
||||
INSERT INTO sys_role_menu (role_id, menu_id)
|
||||
VALUES (1, 401);
|
@ -59,88 +59,47 @@ function load() {
|
||||
return arguments[2] + 1;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '主键'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'username',
|
||||
title: '登录名'
|
||||
},
|
||||
{
|
||||
field: 'username',
|
||||
title: '手机号'
|
||||
},
|
||||
{
|
||||
field: 'nickName',
|
||||
title: '昵称'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'password',
|
||||
title: '登录密码'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'nickName',
|
||||
title: '昵称'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'userPhoto',
|
||||
title: '用户头像'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'userSex',
|
||||
title: '用户性别,0:男,1:女'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'accountBalance',
|
||||
title: '账户余额'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'status',
|
||||
title: '用户状态,0:正常'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'updateTime',
|
||||
title: '更新时间'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
field: 'id',
|
||||
align: 'center',
|
||||
{
|
||||
field: 'userSex',
|
||||
title: '用户性别',
|
||||
formatter: function (value, row, index) {
|
||||
var d = '<a class="btn btn-primary btn-sm ' + s_detail_h + '" href="#" mce_href="#" title="详情" onclick="detail(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-file"></i></a> ';
|
||||
var e = '<a class="btn btn-primary btn-sm ' + s_edit_h + '" href="#" mce_href="#" title="编辑" onclick="edit(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-edit"></i></a> ';
|
||||
var r = '<a class="btn btn-warning btn-sm ' + s_remove_h + '" href="#" title="删除" mce_href="#" onclick="remove(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-remove"></i></a> ';
|
||||
return d + e + r;
|
||||
return value === 0 ? '男' : value === 1 ? '女' : '未知';
|
||||
}
|
||||
}]
|
||||
},
|
||||
|
||||
{
|
||||
field: 'accountBalance',
|
||||
title: '账户余额',
|
||||
formatter: function (value, row, index) {
|
||||
return "¥" + value / 100;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '注册时间'
|
||||
}
|
||||
|
||||
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
function reLoad() {
|
||||
$('#exampleTable').bootstrapTable('refresh');
|
||||
}
|
||||
|
||||
function add() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
@ -151,6 +110,7 @@ function add() {
|
||||
content: prefix + '/add' // iframe的url
|
||||
});
|
||||
}
|
||||
|
||||
function detail(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
@ -161,6 +121,7 @@ function detail(id) {
|
||||
content: prefix + '/detail/' + id // iframe的url
|
||||
});
|
||||
}
|
||||
|
||||
function edit(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
@ -171,6 +132,7 @@ function edit(id) {
|
||||
content: prefix + '/edit/' + id // iframe的url
|
||||
});
|
||||
}
|
||||
|
||||
function remove(id) {
|
||||
layer.confirm('确定要删除选中的记录?', {
|
||||
btn: ['确定', '取消']
|
||||
@ -195,6 +157,7 @@ function remove(id) {
|
||||
|
||||
function resetPwd(id) {
|
||||
}
|
||||
|
||||
function batchRemove() {
|
||||
var rows = $('#exampleTable').bootstrapTable('getSelections'); // 返回所有选择的行,当没有选择的记录时,返回一个空数组
|
||||
if (rows.length == 0) {
|
||||
|
@ -7,30 +7,6 @@
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-body">
|
||||
<div class="fixed-table-toolbar">
|
||||
<div class="columns pull-left">
|
||||
<button shiro:hasPermission="novel:user:add" type="button"
|
||||
class="btn btn-primary" onclick="add()">
|
||||
<i class="fa fa-plus" aria-hidden="true"></i>添加
|
||||
</button>
|
||||
<button shiro:hasPermission="novel:user:batchRemove" type="button"
|
||||
class="btn btn-danger"
|
||||
onclick="batchRemove()">
|
||||
<i class="fa fa-trash" aria-hidden="true"></i>删除
|
||||
</button>
|
||||
</div>
|
||||
<div class="columns pull-right">
|
||||
<button class="btn btn-success" onclick="reLoad()">查询</button>
|
||||
</div>
|
||||
|
||||
<form id="searchForm">
|
||||
<div class="columns pull-right col-md-2">
|
||||
<input id="id" name="id" type="text" class="form-control"
|
||||
placeholder="主键">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<table id="exampleTable" data-mobile-responsive="true">
|
||||
</table>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user