Showing
3 changed files
with
20 additions
and
15 deletions
@@ -14,11 +14,11 @@ const _formatTime = (a, b) => { | @@ -14,11 +14,11 @@ const _formatTime = (a, b) => { | ||
14 | if (judge === 1) { | 14 | if (judge === 1) { |
15 | status = b ? '预告明日' : '明天'; | 15 | status = b ? '预告明日' : '明天'; |
16 | } else if (judge > 1) { | 16 | } else if (judge > 1) { |
17 | - status = b ? `${(time.getMonth() + 1)}.${time.getDate()}` : `${(time.getMonth() + 1)}月${time.getDate()}日`; | 17 | + status = b ? `${(time.getMonth() + 1)}.${time.getDate()} ` : `${(time.getMonth() + 1)}月${time.getDate()}日`; |
18 | } else { | 18 | } else { |
19 | status = b ? '预告' : '今天'; | 19 | status = b ? '预告' : '今天'; |
20 | } | 20 | } |
21 | - return `${status} ${time.getHours() < 10 ? '0' + time.getHours() : time.getHours()} | 21 | + return `${status}${time.getHours() < 10 ? '0' + time.getHours() : time.getHours()} |
22 | :${time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()}`; | 22 | :${time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()}`; |
23 | }; | 23 | }; |
24 | 24 | ||
@@ -40,7 +40,7 @@ const _getBestList = () => { | @@ -40,7 +40,7 @@ const _getBestList = () => { | ||
40 | code: 200, | 40 | code: 200, |
41 | cache: false | 41 | cache: false |
42 | }).then(result => { | 42 | }).then(result => { |
43 | - let list = result.data; | 43 | + let list = result.data || []; |
44 | 44 | ||
45 | for (let item of list) { | 45 | for (let item of list) { |
46 | switch (item.living) { | 46 | switch (item.living) { |
@@ -59,7 +59,7 @@ const _getBestList = () => { | @@ -59,7 +59,7 @@ const _getBestList = () => { | ||
59 | // 格式化时间 | 59 | // 格式化时间 |
60 | item.starting_time = _formatTime(item.starting_time, true); | 60 | item.starting_time = _formatTime(item.starting_time, true); |
61 | } | 61 | } |
62 | - return result.data ? result.data : []; | 62 | + return result.data || []; |
63 | }); | 63 | }); |
64 | }; | 64 | }; |
65 | 65 | ||
@@ -69,7 +69,7 @@ const _getLivingList = () => { | @@ -69,7 +69,7 @@ const _getLivingList = () => { | ||
69 | code: 200, | 69 | code: 200, |
70 | cache: false | 70 | cache: false |
71 | }).then(result => { | 71 | }).then(result => { |
72 | - return result.data ? result.data : []; | 72 | + return result.data || []; |
73 | }); | 73 | }); |
74 | }; | 74 | }; |
75 | 75 | ||
@@ -79,12 +79,12 @@ const _getPrelivingList = () => { | @@ -79,12 +79,12 @@ const _getPrelivingList = () => { | ||
79 | code: 200, | 79 | code: 200, |
80 | cache: false | 80 | cache: false |
81 | }).then(result => { | 81 | }).then(result => { |
82 | - let list = result.data; | 82 | + let list = result.data || []; |
83 | 83 | ||
84 | for (let item of list) { | 84 | for (let item of list) { |
85 | item.starting_time = _formatTime(item.starting_time); | 85 | item.starting_time = _formatTime(item.starting_time); |
86 | } | 86 | } |
87 | - return result.data ? result.data : []; | 87 | + return result.data || []; |
88 | }); | 88 | }); |
89 | }; | 89 | }; |
90 | 90 | ||
@@ -94,7 +94,7 @@ const _getRecordList = () => { | @@ -94,7 +94,7 @@ const _getRecordList = () => { | ||
94 | code: 200, | 94 | code: 200, |
95 | cache: false | 95 | cache: false |
96 | }).then(result => { | 96 | }).then(result => { |
97 | - return result.data ? result.data : []; | 97 | + return result.data || []; |
98 | }); | 98 | }); |
99 | }; | 99 | }; |
100 | 100 |
@@ -16,4 +16,4 @@ $('.swiper-container').each(function() { | @@ -16,4 +16,4 @@ $('.swiper-container').each(function() { | ||
16 | pagination: $(this).closest('.banner-top').find('.pagination-inner').get(0) | 16 | pagination: $(this).closest('.banner-top').find('.pagination-inner').get(0) |
17 | }); | 17 | }); |
18 | } | 18 | } |
19 | -}); | ||
19 | +}); |
@@ -30,13 +30,13 @@ $border: #e0e0e0; | @@ -30,13 +30,13 @@ $border: #e0e0e0; | ||
30 | top: 30px; | 30 | top: 30px; |
31 | left: 30px; | 31 | left: 30px; |
32 | height: 35px; | 32 | height: 35px; |
33 | - padding: 0 10px; | 33 | + padding: 2px 10px 0; |
34 | border: 1px solid $white; | 34 | border: 1px solid $white; |
35 | border-radius: 20px; | 35 | border-radius: 20px; |
36 | color: $white; | 36 | color: $white; |
37 | font-size: 22px; | 37 | font-size: 22px; |
38 | text-align: center; | 38 | text-align: center; |
39 | - line-height: 35px; | 39 | + line-height: 1.5; |
40 | } | 40 | } |
41 | 41 | ||
42 | .living { | 42 | .living { |
@@ -47,10 +47,11 @@ $border: #e0e0e0; | @@ -47,10 +47,11 @@ $border: #e0e0e0; | ||
47 | width: 70px; | 47 | width: 70px; |
48 | background: $red; | 48 | background: $red; |
49 | border-radius: 20px; | 49 | border-radius: 20px; |
50 | + padding-top: 2px; | ||
50 | color: $white; | 51 | color: $white; |
51 | font-size: 22px; | 52 | font-size: 22px; |
52 | text-align: center; | 53 | text-align: center; |
53 | - line-height: 35px; | 54 | + line-height: 1.5; |
54 | } | 55 | } |
55 | 56 | ||
56 | .rec-info { | 57 | .rec-info { |
@@ -87,12 +88,14 @@ $border: #e0e0e0; | @@ -87,12 +88,14 @@ $border: #e0e0e0; | ||
87 | display: inline-block; | 88 | display: inline-block; |
88 | height: 26px; | 89 | height: 26px; |
89 | width: 86px; | 90 | width: 86px; |
90 | - font-size: 18px; | 91 | + font-size: 17.9px; |
91 | background: $black; | 92 | background: $black; |
92 | margin-left: 10px; | 93 | margin-left: 10px; |
94 | + padding-top: 2px; | ||
93 | border-radius: 20px; | 95 | border-radius: 20px; |
94 | color: $white; | 96 | color: $white; |
95 | text-align: center; | 97 | text-align: center; |
98 | + line-height: 1.5; | ||
96 | } | 99 | } |
97 | 100 | ||
98 | .rec-tag { | 101 | .rec-tag { |
@@ -186,10 +189,11 @@ $border: #e0e0e0; | @@ -186,10 +189,11 @@ $border: #e0e0e0; | ||
186 | width: 70px; | 189 | width: 70px; |
187 | background: $red; | 190 | background: $red; |
188 | border-radius: 20px; | 191 | border-radius: 20px; |
192 | + padding-top: 2px; | ||
189 | color: $white; | 193 | color: $white; |
190 | font-size: 22px; | 194 | font-size: 22px; |
191 | text-align: center; | 195 | text-align: center; |
192 | - line-height: 35px; | 196 | + line-height: 1.5; |
193 | } | 197 | } |
194 | 198 | ||
195 | .main-intro { | 199 | .main-intro { |
@@ -284,8 +288,9 @@ $border: #e0e0e0; | @@ -284,8 +288,9 @@ $border: #e0e0e0; | ||
284 | width: 70px; | 288 | width: 70px; |
285 | border: 1px solid $black; | 289 | border: 1px solid $black; |
286 | border-radius: 20px; | 290 | border-radius: 20px; |
291 | + padding-top: 2px; | ||
287 | font-size: 22px; | 292 | font-size: 22px; |
288 | - line-height: 35px; | 293 | + line-height: 1.5; |
289 | text-align: center; | 294 | text-align: center; |
290 | color: $black; | 295 | color: $black; |
291 | } | 296 | } |
-
Please register or login to post a comment