Commit deeef8ab by 肖康

x

parent 11e7d75a
......@@ -406,7 +406,7 @@ html {
.view {
position : absolute;
bottom : 1.8rem;
bottom : 0.5rem;
left : 0;
right : 0;
margin : 0 auto;
......@@ -424,7 +424,7 @@ html {
top : 0;
width : 100%;
height : 100%;
background : rgba(49, 156, 216, 0.5);
background : rgba(49, 156, 216, 0.7);
border-radius : 50%;
-webkit-animation : scale-three 1s ease infinite;
animation : scale-three 1s ease infinite;
......@@ -446,7 +446,10 @@ html {
top : 6.5rem;
width : 0.5rem;
height: 0.5rem;
.twinkle {
animation-delay:1s
}
}
/**中国北京**/
......@@ -455,6 +458,9 @@ html {
top : 5.2rem;
width : .3rem;
height: .3rem;
.twinkle {
animation-delay:2s
}
}
......@@ -464,7 +470,9 @@ html {
top : 5.9rem;
width : .2rem;
height: .2rem;
.twinkle {
animation-delay:3s
}
}
/**中国武汉**/
......@@ -473,7 +481,9 @@ html {
top : 6rem;
width : .1rem;
height: .1rem;
.twinkle {
animation-delay:4s
}
}
/**中国江苏**/
......@@ -529,6 +539,9 @@ html {
height : 0.3rem;
background-color: #c0d9ff;
border-radius : 50%;
.twinkle {
animation-delay:2s
}
}
.star2 {
......@@ -539,6 +552,9 @@ html {
height : 0.4rem;
background-color: #c0d9ff;
border-radius : 50%;
.twinkle {
animation-delay:1s
}
}
.star3 {
......@@ -639,6 +655,9 @@ html {
height : 0.1rem;
background-color: #c0d9ff;
border-radius : 50%;
.twinkle {
animation-delay:6s
}
}
.star13 {
......@@ -659,6 +678,9 @@ html {
height : 0.3rem;
background-color: #c0d9ff;
border-radius : 50%;
.twinkle {
animation-delay:3s
}
}
.star15 {
......@@ -676,9 +698,11 @@ html {
@keyframes scale-three {
0% {
transform: scale(1);
background : rgba(49, 156, 216, 0.7);
}
100% {
transform: scale(1.3);
transform: scale(2);
background : rgba(49, 156, 216, 0.2);
}
}
\ No newline at end of file
......@@ -353,20 +353,25 @@
<script type="text/javascript">
var charts = {
date: "",
api: window.location.host == "btv.ichunt.com" ? "https://api.ichunt.com" : "http://api.liexin.com",
init: function () {
charts.date()
charts.scrollRank("#notes_txt");
charts.scrollRank("#notes_txt2");
charts.getData();
//一天更新数据一次
setInterval(function(){
charts.getData();
},86400000)
setInterval(function () {
history.go(0)
}, 86400000)
setInterval(function () {
charts.randomAnimate()
}, 10000)
},
getData: function () {
$.ajax({
type: "GET",
url: "http://api.liexin.com/bigtv/api/bigTv",
url: charts.api + "/bigtv/api/bigTv",
data: { date: charts.date },
dataType: 'json',
success: function (data) {
......@@ -374,46 +379,58 @@
charts.numberScroll(data);
var daily_order_list = data.daily_order || []
var daily_search_list = data.daily_search || []
charts.rankData(daily_search_list,daily_order_list)
charts.rankData(daily_search_list, daily_order_list)
}
});
},
//随机动画
randomAnimate() {
var comma_separator_number_step = $.animateNumber.numberStepFactories.separator(',');
console.log(1)
var radm_num = Math.floor(Math.random() * ($(".row li .t1").length - 0)) + 0;
var num_=Number($($(".row li .t1")[radm_num]).attr("numbers"))
$($(".row li .t1")[radm_num]).prop('number', Math.ceil(num_ / 2)).animateNumber({
number: num_,
numberStep: comma_separator_number_step
},500);
},
rankData: function (daily_search_list, daily_order_list) {
var html1 = "", html2 = "";
for (var i = 0; i < daily_search_list.length; i++) {
var key_=Object.keys(daily_search_list[i])[0]
var value_=Object.values(daily_search_list[i])[0]
var key_ = Object.keys(daily_search_list[i])[0]
var value_ = Object.values(daily_search_list[i])[0]
if (i <= 2) {
$('.data-left .ranking .i' + (i + 1) + '').html('<span class="p1">' + (i + 1) + '</span><span class="p2">' + key_ + '</span><span>' + value_ + '</span>')
} else {
html1 += '<li class="row verCenter">'
html1 += ' <span class="p1">'+(i+4)+'</span>'
html1 += '<span class="p2">'+key_+'</span>'
html1 += '<span>'+value_+'</span></li>'
html1 += ' <span class="p1">' + (i + 1)+ '</span>'
html1 += '<span class="p2">' + key_ + '</span>'
html1 += '<span>' + value_ + '</span></li>'
}
}
$(".data-left .list").html(html1)
for (var i = 0; i < daily_order_list.length; i++) {
var key_=Object.keys(daily_order_list[i])[0]
var value_=Object.values(daily_order_list[i])[0]
var key_ = Object.keys(daily_order_list[i])[0]
var value_ = Object.values(daily_order_list[i])[0]
if (i <= 2) {
$('.data-right .ranking .i' + (i + 1) + '').html('<span class="p1">' + (i + 1) + '</span><span class="p2">' + key_ + '</span><span>' + value_ + '</span>')
} else {
html1 += '<li class="row verCenter">'
html1 += ' <span class="p1">'+(i+4)+'</span>'
html1 += '<span class="p2">'+key_+'</span>'
html1 += '<span>'+value_+'</span></li>'
html2 += '<li class="row verCenter">'
html2 += ' <span class="p1">' + (i + 1) + '</span>'
html2 += '<span class="p2">' + key_ + '</span>'
html2 += '<span>' + value_ + '</span></li>'
}
}
$(".data-right .list").html(html1)
$(".data-right .list").html(html2)
},
numberScroll: function (data) {
var comma_separator_number_step = $.animateNumber.numberStepFactories.separator(',');
$(".row li .t1").each(function () {
var id_name = $(this).attr("id");
if ($(this).text() != data[id_name]) {
$(this).prop('number', $(this).text()).animateNumber({
$(this).attr("numbers", data[id_name]).prop('number', $(this).text()).animateNumber({
number: data[id_name],
numberStep: comma_separator_number_step
}, 1000);
......@@ -465,6 +482,7 @@
},
scrollRank: function (ele) {
//滚动数据展示模块
return
var $notesTxt = $(ele);
if ($notesTxt.find("li").length < 7) {
return
......
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