11
11
< body >
12
12
< header id ="header ">
13
13
< 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 >
15
15
< div class ="header-info header-info-r "> 时间:< span id ="nowDate "> </ span > < small > (每隔1分钟自动刷新)</ small > </ div >
16
16
</ header >
17
17
@@ -30,41 +30,47 @@ <h3 class="chart-title">现存确诊数排行前 10 位的国家</h3>
30
30
</ div >
31
31
< div class ="flex-cell flex-cell-c " style ="padding-right:0; ">
32
32
< div class ="chart-wrapper ">
33
- < h3 class ="chart-title "> 统计数据 </ h3 >
33
+ < h3 class ="chart-title "> 国内外统计数据 </ h3 >
34
34
< div class ="chart-div chart-done ">
35
35
< table class ="data-t ">
36
36
< tr >
37
37
< th > < img src ="img/icon-01.png " /> </ th >
38
38
< td >
39
+ < p > 较昨日 < span id ="internationalCurrentConfirmedIncr "> 0</ span > </ p >
39
40
< p > < span id ="internationalCurrentConfirmedCount "> 0</ span > </ p >
40
- < p > 国外现存确认 </ p >
41
+ < p > 国外现存确诊 </ p >
41
42
</ td >
42
43
< th > < img src ="img/icon-02.png " /> </ th >
43
44
< td >
45
+ < p > 较昨日 < span id ="domesticCurrentConfirmedIncr "> 0</ span > </ p >
44
46
< p > < span id ="domesticCurrentConfirmedCount "> 0</ span > </ p >
45
- < p > 中国现存确认 </ p >
47
+ < p > 中国现存确诊 </ p >
46
48
</ td >
47
49
</ tr >
48
50
< tr >
49
51
< th > < img src ="img/icon-03.png " /> </ th >
50
52
< td >
53
+ < p > 较昨日 < span id ="internationalConfirmedIncr "> 0</ span > </ p >
51
54
< p > < span id ="internationalConfirmedCount "> 0</ span > </ p >
52
55
< p > 国外累计确诊</ p >
53
56
</ td >
54
57
< th > < img src ="img/icon-04.png " /> </ th >
55
58
< td >
59
+ < p > 较昨日 < span id ="domesticConfirmedIncr "> 0</ span > </ p >
56
60
< p > < span id ="domesticConfirmedCount "> 0</ span > </ p >
57
61
< p > 中国累计确诊</ p >
58
62
</ td >
59
63
</ tr >
60
64
< tr >
61
65
< th > < img src ="img/icon-05.png " /> </ th >
62
66
< td >
67
+ < p > 较昨日 < span id ="internationalDeadIncr "> 0</ span > </ p >
63
68
< p > < span id ="internationalDeadCount "> 0</ span > </ p >
64
69
< p > 国外死亡人数</ p >
65
70
</ td >
66
71
< th > < img src ="img/icon-06.png " /> </ th >
67
72
< td >
73
+ < p > 较昨日 < span id ="domesticDeadIncr "> 0</ span > </ p >
68
74
< p > < span id ="domesticDeadCount "> 0</ span > </ p >
69
75
< p > 中国死亡人数</ p >
70
76
</ td >
@@ -129,13 +135,41 @@ <h3 class="chart-title">各国累计确诊占比</h3>
129
135
url : "http://111.231.75.86:8000/api/statistics/latest" ,
130
136
dataType : "json"
131
137
} ) . done ( function ( data ) {
132
- //console.log('Data: ', data);
133
138
rollNum ( "internationalConfirmedCount" , 0 , data . internationalStatistics . confirmedCount ) ;
134
139
rollNum ( "internationalDeadCount" , 0 , data . internationalStatistics . deadCount ) ;
135
140
rollNum ( "internationalCurrentConfirmedCount" , 0 , data . internationalStatistics . currentConfirmedCount ) ;
136
141
rollNum ( "domesticConfirmedCount" , 0 , data . domesticStatistics . confirmedCount ) ;
137
142
rollNum ( "domesticDeadCount" , 0 , data . domesticStatistics . deadCount ) ;
138
143
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 )
139
173
} ) . fail ( function ( jqXHR , textStatus ) {
140
174
console . log ( "Ajax Error: " , textStatus ) ;
141
175
} ) ;
0 commit comments