add 视频页面

update 用户管理
This commit is contained in:
2024-11-18 18:27:49 +08:00
parent 6e2cea8186
commit b15d1c917f
25 changed files with 780 additions and 135 deletions

View File

@@ -31,22 +31,48 @@
$('#header').load("/html/header.html");
function createUser() {
layer.open({
type: 2,
title: "添加新房间",
area: ['600px', '500px'],
content: '/html/ui/createConfig.html?roomId='
layer.open({
type: 2,
title: "添加新房间",
area: ['600px', '500px'],
content: '/html/ui/createConfig.html?roomId='
});
});
}
function refreshCookie(data){
function refreshCookie(data) {
console.log(data)
}
function createRoom() {
login()
.then(data => {
if (data.status === 300) {
layer.open({
type: 1, // page 层类型
area: ['320px', '400px'],
title: '打开B站客户端扫码登陆',
shade: 0.6, // 遮罩透明度
shadeClose: false, // 点击遮罩区域,关闭弹层
maxmin: true, // 允许全屏最小化
anim: 1, // 0-6 的动画形式,-1 不开启
content: '<div style="padding: 32px;text-align: center;" id="qrdiv">登陆后刷新</div>',
success: function (layero, index, that) {
new QRCode(document.getElementById("qrdiv"), data.data.qrcode);
}
});
} else if (data.status === 301) {
setTimeout(() => {
createRoom()
}, 100);
}
})
}
</script>
<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>
<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>
<script src="/js/qrcode.min.js"></script>
<script>
@@ -55,41 +81,41 @@
var dropdown = layui.dropdown;
var layer = layui.layer;
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)
}
});
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)
}
});