Commit 96c4e2f9 by 肖康

x

parent deeef8ab
Showing with 8 additions and 4 deletions
...@@ -390,10 +390,13 @@ ...@@ -390,10 +390,13 @@
console.log(1) console.log(1)
var radm_num = Math.floor(Math.random() * ($(".row li .t1").length - 0)) + 0; var radm_num = Math.floor(Math.random() * ($(".row li .t1").length - 0)) + 0;
var num_=Number($($(".row li .t1")[radm_num]).attr("numbers")) var num_=Number($($(".row li .t1")[radm_num]).attr("numbers"))
if(num_>0){
$($(".row li .t1")[radm_num]).prop('number', Math.ceil(num_ / 2)).animateNumber({ $($(".row li .t1")[radm_num]).prop('number', Math.ceil(num_ / 2)).animateNumber({
number: num_, number: num_,
numberStep: comma_separator_number_step numberStep: comma_separator_number_step
},500); },500);
}
}, },
rankData: function (daily_search_list, daily_order_list) { rankData: function (daily_search_list, daily_order_list) {
var html1 = "", html2 = ""; var html1 = "", html2 = "";
...@@ -441,18 +444,18 @@ ...@@ -441,18 +444,18 @@
date: function () { date: function () {
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000);
charts.date = day1.getFullYear() + "-" + (day1.getMonth() + 1) + "-" + day1.getDate(); charts.date = day1.getFullYear() + "-" + ((day1.getMonth() + 1)<10?('0'+(day1.getMonth() + 1)):(day1.getMonth() + 1) )+ "-" + ((day1.getDate()<10?('0'+day1.getDate()):day1.getDate()));
var week = new Array("日", "一", "二", "三", "四", "五", "六"); var week = new Array("日", "一", "二", "三", "四", "五", "六");
var now = new Date(); var now = new Date();
var year = now.getFullYear(); var year = now.getFullYear();
var month = now.getMonth() + 1; var month = now.getMonth() + 1;
var day = now.getDate(); var day = now.getDate();
var weekDay = now.getDay(); var weekDay = now.getDay();
$("#indexDate").html("今天是:" + year + "年" + month + "月" + day + "日" + "&nbsp;" + week[weekDay]); $("#indexDate").html("今天是:" + year + "年" + (month<10)?('0'+month):month + "月" + day + "日" + "&nbsp;" + week[weekDay]);
$("#year").text(year); $("#year").text(year);
$("#month").text(month); $("#month").text((month<10)?('0'+month):month);
$("#day").text(day); $("#day").text((day<10)?('0'+day):day);
$("#week").text(week[weekDay]); $("#week").text(week[weekDay]);
$.ajax({ $.ajax({
url: "http://wthrcdn.etouch.cn/weather_mini?city=深圳", url: "http://wthrcdn.etouch.cn/weather_mini?city=深圳",
...@@ -476,6 +479,7 @@ ...@@ -476,6 +479,7 @@
var s = myDate.getSeconds(); var s = myDate.getSeconds();
if (s < 10) { if (s < 10) {
s = "0" + s s = "0" + s
} }
$("#time").html(h + ":" + m + ":" + s); $("#time").html(h + ":" + m + ":" + s);
}, 1000) }, 1000)
......
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