php管理和接口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
1.5 KiB

define(["jquery", "easy-admin"], function ($, ea) {
let init = {
table_elem: '#currentTable',
table_render_id: 'currentTableRenderId',
index_url: 'user.userpointslog/index',
};
let LogController = {
index: function () {
ea.table.render({
init: init,
toolbar: [
'refresh'
],
cols: [[
{type: "checkbox"},
{field: 'id', width: 80, title: 'ID'},
{field: 'username', width: 100, title: '用户名'},
{field: 'avatar', width: 140, title: '用户头像', search: false, templet: ea.table.image},
{field: 'value', width: 120, title: '变动积分', templet: function (d) {
if (d.value > 0) {
return '<button type="button" class="layui-btn layui-btn-xs layui-btn-danger">+'+d.value+'</button>';
} else {
return '<button type="button" class="layui-btn layui-btn-xs">'+d.value+'</button>';
}
}},
{field: 'create_time', width: 160, title: '创建时间', search: 'range'},
{field: 'describe', minWidth: 80, title: '描述/说明', search: false},
{field: 'remark', minWidth: 80, title: '备注', search: false}
]],
});
ea.listen();
}
};
return LogController;
});