Commit e6128d18 by libai

测试

parent f351d765
Showing with 11 additions and 5 deletions
......@@ -68,11 +68,11 @@
</body>
<script src="lib/jquery-3.1.1.min.js"></script>
<script>
$.ajax({
url:'http://httest.comm.yazhai.co/statshow/getviewdata.html',
function dataGet(){
$.ajax({
url:'http://ht2.comm.ishuaji.cn/statshow/getviewdata.html',
dataType:'JSON',
success:function(data){
console.log('电视屏幕大数据',data)
//新增
$(".tv-left-box1 .tv-left-p2").text(data.result[0].num)
if(data.result[0].day>=0)$(".tv-left-box1 .tv-left-p3").html('日<img src="images/top1.png" alt=""><span>'+data.result[0].day+'%</span>')
......@@ -98,7 +98,7 @@
if(data.result[2].month>=0)$(".tv-left-box3 .tv-left-p5").html('月<img src="images/top1.png" alt=""><span>'+data.result[2].month+'%</span>')
else $(".tv-left-box3 .tv-left-p5").html('月<img src="images/top2.png" alt=""><span style="color:#3FF4A7">'+data.result[2].month+'%</span>')
//在线人数
$(".tv-right-content1").html('用户 <span>'+data.result[4].num+'</span>')
$(".tv-right-content1").html('用户 <span>'+data.uid_count+'</span>')
if(data.result[4].day>=0)$(".tv-right-ul1 li").eq(0).html('日 <img src="images/top1.png" alt=""> <span>'+data.result[4].day+'%</span>')
else $(".tv-right-ul1 li").eq(0).html('日 <img src="images/top2.png" alt=""> <span style="color:#3FF4A7">'+data.result[4].day+'%</span>')
if(data.result[4].week>=0)$(".tv-right-ul1 li").eq(1).html('日 <img src="images/top1.png" alt=""> <span>'+data.result[4].week+'%</span>')
......@@ -106,7 +106,7 @@
if(data.result[4].month>=0)$(".tv-right-ul1 li").eq(2).html('日 <img src="images/top1.png" alt=""> <span>'+data.result[4].month+'%</span>')
else $(".tv-right-ul1 li").eq(2).html('日 <img src="images/top2.png" alt=""> <span style="color:#3FF4A7">'+data.result[4].month+'%</span>')
//主播人数
$(".tv-right-content2").html('主播 <span>'+data.result[5].num+'</span>')
$(".tv-right-content2").html('主播 <span>'+data.room_count+'</span>')
if(data.result[5].day>=0)$(".tv-right-ul2 li").eq(0).html('日 <img src="images/top1.png" alt=""> <span>'+data.result[5].day+'%</span>')
else $(".tv-right-ul2 li").eq(0).html('日 <img src="images/top2.png" alt=""> <span style="color:#3FF4A7">'+data.result[5].day+'%</span>')
if(data.result[5].week>=0)$(".tv-right-ul2 li").eq(1).html('日 <img src="images/top1.png" alt=""> <span>'+data.result[5].week+'%</span>')
......@@ -123,6 +123,12 @@
else $(".tv-right-ul3 li").eq(2).html('日 <img src="images/top2.png" alt=""> <span style="color:#3FF4A7">'+data.result[3].month+'%</span>')
}
})
}
dataGet()
setInterval(function() {
dataGet()
}, 8000);
$(".my-time").html(''+timeGet()[0]+'年'+timeGet()[1]+'月'+timeGet()[2]+'日 &nbsp;&nbsp;&nbsp;'+timeGet()[3]+':'+timeGet()[4]+'')
var betEnd = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), 00, 00, 00).getTime();
var barNum=Math.floor(((new Date()-betEnd)/'86400000')*100)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment