|
|
@@ -1,10 +1,10 @@ |
|
|
|
<template> |
|
|
|
<!-- 系统时间 --> |
|
|
|
<div class="section_item fl section_item_aside_fl"> |
|
|
|
<div class="section_item fl section_item_aside_fl" v-if="cnName"> |
|
|
|
<h1>{{ nowTime }}</h1> |
|
|
|
<div> |
|
|
|
<span class="nowshijian">{{ nowDate }}</span> |
|
|
|
<span class="nowshijian">{{ welcome }}</span> |
|
|
|
<span class="nowshijian">{{ welcome }}{{cnName}}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
@@ -38,13 +38,13 @@ export default { |
|
|
|
this.nowTime = commonJs.getTime(); |
|
|
|
var time = this.nowTime.substring(0, 2); |
|
|
|
if (time < 12 && time > 0) { |
|
|
|
this.welcome = "上午好! " + this.cnName; |
|
|
|
this.welcome = "上午好! "; |
|
|
|
} else if (time == 12) { |
|
|
|
this.welcome = "中午好! " + this.cnName; |
|
|
|
this.welcome = "中午好! "; |
|
|
|
} else if (time > 12 && time > 20) { |
|
|
|
this.welcome = "晚上好,注意休息! " + this.cnName; |
|
|
|
this.welcome = "晚上好,注意休息! "; |
|
|
|
} else if (time > 12 && time < 20) { |
|
|
|
this.welcome = "下午好!" + this.cnName; |
|
|
|
this.welcome = "下午好!"; |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|