68 lines
2.5 KiB
HTML
68 lines
2.5 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<link rel="stylesheet" href="/layui/css/layui.css">
|
||
</head>
|
||
<table class="layui-hide" id="giftList" lay-filter="followTable"></table>
|
||
|
||
<body>
|
||
|
||
</body>
|
||
<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>
|
||
var roomId = getParam("roomId");
|
||
var videoId = getParam("videoId");
|
||
var giftName = getParam("giftName");
|
||
|
||
layui.use(function () {
|
||
var laytpl = layui.laytpl;
|
||
var table = layui.table;
|
||
|
||
|
||
table.render({
|
||
elem: '#giftList',
|
||
url: '/live/gift/info/item?roomId=' + roomId + "&videoId=" + videoId + "&giftName=" + giftName,
|
||
height: 'full',
|
||
totalRow: false, // 开启合计行
|
||
page: false,
|
||
response: {
|
||
statusCode: 100 // 重新规定成功的状态码为 200,table 组件默认为 0
|
||
},
|
||
parseData: function (res) {
|
||
return {
|
||
"code": res.status, //解析接口状态
|
||
"msg": res.message, //解析提示文本
|
||
"data": res.data, //解析数据列表
|
||
"count": res.count
|
||
};
|
||
},
|
||
cols: [[
|
||
{ type: 'checkbox', fixed: 'left' },
|
||
{ field: 'icon', title: '礼物', width: 80, templet: '<div><image src="" onerror="showImage(\'{{= d.icon }}\',this);" style="width: 30px;height: 30px;"></div>' },
|
||
{ field: 'gift_id', title: '礼物ID', width: 80, sort: true },
|
||
{ field: 'sender_name', title: '用户名', width: 150, sort: true, templet: '<div><a href="https://space.bilibili.com/{{= d.sender_uid}}" target="_blank">{{= d.sender_name}}</a>' },
|
||
{ field: 'sender_face', title: '用户头像', width: 80, templet: '<div><image src="" onerror="showImage(\'{{= d.sender_face }}\',this);" style="width: 30px;height: 30px;"></div>' },
|
||
{ field: 'gift_num', title: '数量', width: 80, sort: true },
|
||
{ field: 'price', title: '价值(电池)', width: 80, sort: true },
|
||
{ field: 'sql_time', title: '时间', width: 180 }
|
||
]],
|
||
done: function () {
|
||
onDone()
|
||
},
|
||
error: function (res, msg) {
|
||
console.log(res, msg)
|
||
}
|
||
});
|
||
function onDone() {
|
||
|
||
}
|
||
|
||
})
|
||
</script> |