Merge pull request 'fix : 修改首页提示' (#839) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/839
This commit is contained in:
2024-10-14 04:17:25 +00:00

View File

@@ -527,16 +527,20 @@ const getTimePeriod=()=>{
const hour = now.getHours(); const hour = now.getHours();
// 根据小时数判断时间段 // 根据小时数判断时间段
if (hour >= 0 && hour < 6) { if (hour >= 6 && hour <= 8) {
return '夜深了'; return "早晨";
} else if (hour >= 6 && hour < 12) { } else if (hour >= 8 && hour < 11) {
return '早上好'; return "上午好";
} else if (hour >= 12 && hour < 18) { } else if (hour >= 11 && hour <= 13) {
return '中午好'; return "中午好";
} else if (hour >= 18 && hour < 22) { } else if (hour >= 14 && hour < 18) {
return '下午好'; return "下午好";
} else if (hour >= 22 && hour < 24) { } else if (hour >= 18 && hour < 22) {
return '晚上好'; return "晚上好";
} else if (hour >= 23 || hour <= 1) {
return "午夜好";
} else if (hour > 1&& hour <= 5) {
return "夜深了";
} }
} }
const handleTodoList = (type) => { const handleTodoList = (type) => {