Skip to content

Commit c51757a

Browse files
committed
1、修复小雨图标不能展示的问题;2、给天气预报的日期备注今天;3、优化评论文章的日志记录位置;
1 parent 9395f0f commit c51757a

File tree

3 files changed

+306
-248
lines changed

3 files changed

+306
-248
lines changed

src/components/MainPage/AboutMe.vue

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269
class="BlogStatistic weathContent"
270270
>
271271
<div class="BlogStatisticItem borderRight" v-for="(item,i) in weathArray" v-bind:key="i">
272-
<div class="weathWeek">{{ item.week }}</div>
272+
<div class="weathWeek" v-html="item.week"></div>
273273
<!-- <div class="weathDay">11月23日</div> -->
274274
<div class="weathDay">{{ item.date }}</div>
275275
<div class="weathIcon">
@@ -356,13 +356,15 @@ export default {
356356
weathArray = dataObj.forecasts[0].casts,
357357
week;
358358
359-
console.log(dataObj);
360-
console.log(weekJson);
361-
362359
that.city = dataObj.forecasts[0].city;
363360
if(weathArray.length > 0){
364-
weathArray.forEach(function(item){
365-
item.week = weekJson[item.week];
361+
weathArray.forEach(function(item,i){
362+
if(i == 0){
363+
item.week = weekJson[item.week] + '<span style="font-size:0.5rem">(今天)</span>';
364+
}else{
365+
item.week = weekJson[item.week];
366+
}
367+
366368
item.date = item.date.split('-')[1] + '' + item.date.split('-')[2] + "";
367369
item.dayweatherIcon = weathJson[item.dayweather];
368370
});

0 commit comments

Comments
 (0)