update 调整数据库

update superchat信息
This commit is contained in:
2024-11-30 14:43:08 +08:00
parent 1bfca68514
commit dad4bcff15
9 changed files with 257 additions and 237 deletions

View File

@@ -242,21 +242,22 @@
var chartView = null;
function initChart(roomId, videoId) {
getVideoGiftInfo(roomId, videoId)
.then(data => {
if (data.status != 100) {
.then(json => {
if (json.status != 100) {
return
}
var lables = [];
var values = [];
data.data.guardInfo.forEach(item => {
json.data.guardInfo.forEach(item => {
lables.push(item.gift_name + "\n" + item.total_price + "¥")
values.push(item.total_num)
});
data.data.giftInfo.forEach(item => {
json.data.giftInfo.forEach(item => {
lables.push(item.gift_name + "\n" + item.total_price + "¥")
values.push(item.total_gift_num)
});
setChart(lables, values, data)
setChart(lables, values, json)
initSC(json.data.superChat)
})
}
@@ -364,7 +365,6 @@
getDanmu(getParam('roomId'), videoId, page)
.then(data => {
if (page === 0) {
initSC(data.data.superChat)
$('#danmuSize').get(0).innerHTML = data.data.danmuCount;
barrageRenderer.setBarrages(data.data.danmu)
} else {