biliob/Web/html/body/user.html

107 lines
3.4 KiB
HTML
Raw Normal View History

2024-10-29 18:29:56 +08:00
<!DOCTYPE html>
<html lang="zh-CN">
2024-11-01 18:21:57 +08:00
2024-10-29 18:29:56 +08:00
<head>
2024-11-01 18:21:57 +08:00
<meta charset="utf-8">
2024-11-08 18:12:02 +08:00
<title>用户中心</title>
2024-11-01 18:21:57 +08:00
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/layui/css/layui.css">
2024-10-29 18:29:56 +08:00
</head>
2024-11-01 18:21:57 +08:00
<body class="layui-bg-gray">
<div id="header"></div>
2024-11-08 18:12:02 +08:00
<table class="layui-hide" id="roomList" lay-filter="roomTable"></table>
2024-11-01 18:21:57 +08:00
<script src="/js/jquery-3.2.1.js"></script>
<script src="/js/CommonConfig.js"></script>
2024-11-08 18:12:02 +08:00
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
<button class="layui-btn layui-btn-sm" onclick="createRoom()">添加新账号</button>
</div>
</script>
<script type="text/html" id="toolDemo">
<div class="layui-clear-space">
<a class="layui-btn layui-btn-xs" lay-event="edit">删除</a>
</div>
</script>
2024-11-01 18:21:57 +08:00
<script>
headerModel = 4;
2024-10-29 18:29:56 +08:00
$('#header').load("/html/header.html");
2024-11-08 18:12:02 +08:00
function createUser() {
layer.open({
type: 2,
title: "添加新房间",
area: ['600px', '500px'],
content: '/html/ui/createConfig.html?roomId='
});
}
function refreshCookie(data){
console.log(data)
}
2024-11-01 18:21:57 +08:00
</script>
2024-11-08 18:12:02 +08:00
<script src="/layui/layui.js"></script>
<script src="/js/jquery-3.2.1.js"></script>
<script src="/js/CommonConfig.js"></script>
<script src="/js/httpUtils.js"></script>
2024-11-01 18:21:57 +08:00
<script>
// loadHeader($('#header').get(0))
layui.use(function () {
var dropdown = layui.dropdown;
var layer = layui.layer;
2024-11-08 18:12:02 +08:00
var table = layui.table;
table.render({
elem: '#roomList',
url: '/user/list',
toolbar: '#toolbarDemo',
totalRow: true, // 开启合计行
page: true,
response: {
statusCode: 100 // 重新规定成功的状态码为 200table 组件默认为 0
},
parseData: function (res) {
return {
"code": res.status, //解析接口状态
"msg": res.message, //解析提示文本
"data": res.data, //解析数据列表
"count": res.count
};
},
cols: [[
{ type: 'checkbox', fixed: 'left' },
{ field: 'uid', title: 'UID', width: 150, sort: true, fixed: 'left', templet: '<div><a href="https://space.bilibili.com/{{= d.uid}}" target="_blank">{{= d.uid}}</a>' },
{ field: 'uname', title: '用户名', width: 150, fixed: 'left' },
{ field: 'face', title: '头像', width: 80, templet: '<div><image src="" onerror="showImage(\'{{= d.face }}\',this);" style="width: 30px;height: 30px;"></div>' },
{ field: 'status', title: '状态', width: 150,templet:'<div> {{= d.status}} <button class="layui-btn layui-btn-xs" onclick="refreshCookie(\'{{= d.uid }}\')">刷新cookie</button>'},
{ field: 'sql_time', title: '添加时间', width: 190 },
{ fixed: "right", title: "操作", width: 80, align: "center", toolbar: "#toolDemo" }
]],
done: function () {
},
error: function (res, msg) {
console.log(res, msg)
}
});
2024-11-01 18:21:57 +08:00
});
</script>
<style>
</style>
</body>
2024-10-30 18:27:37 +08:00
2024-10-29 18:29:56 +08:00
</html>