From b80fbf5ab8b90c711ed503caf6dbd90a02041a2f Mon Sep 17 00:00:00 2001 From: xiejiahao <422618910@qq.com> Date: Sat, 19 Mar 2022 22:03:07 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=AB=98=E4=BA=AE=EF=BC=8C?= =?UTF-8?q?=E6=97=A9=E4=B8=8A=E5=A5=BD=E4=B8=AD=E5=8D=88=E5=A5=BD=E6=99=9A?= =?UTF-8?q?=E4=B8=8A=E5=A5=BD=E8=87=AA=E5=8A=A8=E5=88=A4=E6=96=AD=EF=BC=8C?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=BF=9B=E5=BA=A6=E5=9B=9B=E8=88=8D=E4=BA=94?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/layout/components/Navbar.vue | 13 ++++++++++++- src/views/layout/components/Sidebar/index.vue | 5 ++--- src/views/xm/XmOverview2.vue | 5 ++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/views/layout/components/Navbar.vue b/src/views/layout/components/Navbar.vue index 84b4a1e0..9c5c5e2f 100644 --- a/src/views/layout/components/Navbar.vue +++ b/src/views/layout/components/Navbar.vue @@ -31,7 +31,7 @@
- 早上好,{{userInfo.username}} + {{getTimeStatus}},{{userInfo.username}}
@@ -119,6 +119,7 @@ import Screenfull from '@/components/Screenfull' import LangSelect from '@/components/LangSelect' import ThemePicker from '@/components/ThemePicker'; import NoticeMsgBar from '@/components/NoticeMsgBar' +import dayjs from 'dayjs' //import selectShopLocationBySysDept from '@/views/mdp/app/selectShopLocationBySysDept/selectShopLocationBySysDept'; export default { @@ -204,6 +205,16 @@ export default { } }) return myShops + }, + getTimeStatus() { + let hour = dayjs().hour(); + let msg = '早上好'; + if(hour >= 13 || hour <= 18) { + msg = '下午好'; + }else if (hour >= 19 || hour <= 24){ + msg = '晚上好'; + } + return msg; } }, methods: { diff --git a/src/views/layout/components/Sidebar/index.vue b/src/views/layout/components/Sidebar/index.vue index 2b9b58e9..fc8774a2 100644 --- a/src/views/layout/components/Sidebar/index.vue +++ b/src/views/layout/components/Sidebar/index.vue @@ -11,7 +11,7 @@ text-color="rgba(255,255,255,.6)" active-text-color="#409EFF" > - + @@ -38,11 +38,10 @@ export default {