1111 < body >
1212 < header id ="header ">
1313 < h3 class ="header-title "> 新冠肺炎(2019-nCov)疫情</ h3 >
14- < div class ="header-info header-info-l "> 数据来源:丁香园< small > (前往 < a href ="https://github.com/leafcoder " target ="_blank " style ="color: #FFFFFF; "> leafcoder/django-covid19</ a > )</ small > </ div >
14+ < div class ="header-info header-info-l "> 数据来源:丁香园< small > (前往 < a href ="https://github.com/leafcoder/django-covid19 " target ="_blank " style ="color: #FFFFFF; "> leafcoder/django-covid19</ a > )</ small > </ div >
1515 < div class ="header-info header-info-r "> 时间:< span id ="nowDate "> </ span > < small > (每隔1分钟自动刷新)</ small > </ div >
1616 </ header >
1717
@@ -30,41 +30,47 @@ <h3 class="chart-title">现存确诊数排行前 10 位的国家</h3>
3030 </ div >
3131 < div class ="flex-cell flex-cell-c " style ="padding-right:0; ">
3232 < div class ="chart-wrapper ">
33- < h3 class ="chart-title "> 统计数据 </ h3 >
33+ < h3 class ="chart-title "> 国内外统计数据 </ h3 >
3434 < div class ="chart-div chart-done ">
3535 < table class ="data-t ">
3636 < tr >
3737 < th > < img src ="img/icon-01.png " /> </ th >
3838 < td >
39+ < p > 较昨日 < span id ="internationalCurrentConfirmedIncr "> 0</ span > </ p >
3940 < p > < span id ="internationalCurrentConfirmedCount "> 0</ span > </ p >
40- < p > 国外现存确认 </ p >
41+ < p > 国外现存确诊 </ p >
4142 </ td >
4243 < th > < img src ="img/icon-02.png " /> </ th >
4344 < td >
45+ < p > 较昨日 < span id ="domesticCurrentConfirmedIncr "> 0</ span > </ p >
4446 < p > < span id ="domesticCurrentConfirmedCount "> 0</ span > </ p >
45- < p > 中国现存确认 </ p >
47+ < p > 中国现存确诊 </ p >
4648 </ td >
4749 </ tr >
4850 < tr >
4951 < th > < img src ="img/icon-03.png " /> </ th >
5052 < td >
53+ < p > 较昨日 < span id ="internationalConfirmedIncr "> 0</ span > </ p >
5154 < p > < span id ="internationalConfirmedCount "> 0</ span > </ p >
5255 < p > 国外累计确诊</ p >
5356 </ td >
5457 < th > < img src ="img/icon-04.png " /> </ th >
5558 < td >
59+ < p > 较昨日 < span id ="domesticConfirmedIncr "> 0</ span > </ p >
5660 < p > < span id ="domesticConfirmedCount "> 0</ span > </ p >
5761 < p > 中国累计确诊</ p >
5862 </ td >
5963 </ tr >
6064 < tr >
6165 < th > < img src ="img/icon-05.png " /> </ th >
6266 < td >
67+ < p > 较昨日 < span id ="internationalDeadIncr "> 0</ span > </ p >
6368 < p > < span id ="internationalDeadCount "> 0</ span > </ p >
6469 < p > 国外死亡人数</ p >
6570 </ td >
6671 < th > < img src ="img/icon-06.png " /> </ th >
6772 < td >
73+ < p > 较昨日 < span id ="domesticDeadIncr "> 0</ span > </ p >
6874 < p > < span id ="domesticDeadCount "> 0</ span > </ p >
6975 < p > 中国死亡人数</ p >
7076 </ td >
@@ -129,13 +135,41 @@ <h3 class="chart-title">各国累计确诊占比</h3>
129135 url : "http://111.231.75.86:8000/api/statistics/latest" ,
130136 dataType : "json"
131137 } ) . done ( function ( data ) {
132- //console.log('Data: ', data);
133138 rollNum ( "internationalConfirmedCount" , 0 , data . internationalStatistics . confirmedCount ) ;
134139 rollNum ( "internationalDeadCount" , 0 , data . internationalStatistics . deadCount ) ;
135140 rollNum ( "internationalCurrentConfirmedCount" , 0 , data . internationalStatistics . currentConfirmedCount ) ;
136141 rollNum ( "domesticConfirmedCount" , 0 , data . domesticStatistics . confirmedCount ) ;
137142 rollNum ( "domesticDeadCount" , 0 , data . domesticStatistics . deadCount ) ;
138143 rollNum ( "domesticCurrentConfirmedCount" , 0 , data . domesticStatistics . currentConfirmedCount ) ;
144+ if ( data . internationalStatistics . confirmedIncr > 0 )
145+ $ ( "#internationalConfirmedIncr" ) . html ( '+' + data . internationalStatistics . confirmedIncr )
146+ else
147+ $ ( "#internationalConfirmedIncr" ) . html ( data . internationalStatistics . confirmedIncr )
148+ ;
149+ if ( data . internationalStatistics . deadIncr > 0 )
150+ $ ( "#internationalDeadIncr" ) . html ( '+' + data . internationalStatistics . deadIncr )
151+ else
152+ $ ( "#internationalDeadIncr" ) . html ( data . internationalStatistics . deadIncr ) ;
153+
154+ if ( data . internationalStatistics . currentConfirmedIncr > 0 )
155+ $ ( "#internationalCurrentConfirmedIncr" ) . html ( '+' + data . internationalStatistics . currentConfirmedIncr )
156+ else
157+ $ ( "#internationalCurrentConfirmedIncr" ) . html ( data . internationalStatistics . currentConfirmedIncr ) ;
158+
159+ if ( data . domesticStatistics . confirmedIncr > 0 )
160+ $ ( "#domesticConfirmedIncr" ) . html ( '+' + data . domesticStatistics . confirmedIncr )
161+ else
162+ $ ( "#domesticConfirmedIncr" ) . html ( data . domesticStatistics . confirmedIncr )
163+ ;
164+ if ( data . domesticStatistics . deadIncr > 0 )
165+ $ ( "#domesticDeadIncr" ) . html ( '+' + data . domesticStatistics . deadIncr )
166+ else
167+ $ ( "#domesticDeadIncr" ) . html ( data . domesticStatistics . deadIncr )
168+ ;
169+ if ( data . domesticStatistics . currentConfirmedIncr > 0 )
170+ $ ( "#domesticCurrentConfirmedIncr" ) . html ( '+' + data . domesticStatistics . currentConfirmedIncr )
171+ else
172+ $ ( "#domesticCurrentConfirmedIncr" ) . html ( data . domesticStatistics . currentConfirmedIncr )
139173 } ) . fail ( function ( jqXHR , textStatus ) {
140174 console . log ( "Ajax Error: " , textStatus ) ;
141175 } ) ;
0 commit comments