From 2c416f80593e22c83c69107282e34c3330d7e8ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sun, 19 Mar 2023 11:47:41 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E6=82=A8=E5=B7=B2=E5=8A=A0=E5=85=A5=20to?= =?UTF-8?q?=20workbench?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/user.go | 4 ++-- .../dashboard/workbench/components/WorkbenchHeader.vue | 10 +++++++++- frontend/vben/types/store.d.ts | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/backend/user.go b/backend/user.go index b91dea5..268e33c 100644 --- a/backend/user.go +++ b/backend/user.go @@ -29,7 +29,7 @@ type getUserInfoResult struct { Desc string `json:"desc"` HomePath string `json:"homePath"` Roles []role `json:"roles"` - Date string `json:"date"` + Date int64 `json:"date"` Last string `json:"last"` Contact string `json:"contact"` } @@ -65,7 +65,7 @@ func getUserInfo(token string) (*getUserInfoResult, error) { return "/dashboard/workbench" }(), Roles: []role{{RoleName: user.Role.Nick(), Value: user.Role.String()}}, - Date: time.Unix(user.Date, 0).Format(chineseDateLayout), + Date: user.Date, Last: time.Unix(user.Last, 0).Format(chineseDateLayout), Contact: hideContact(user.Cont), }, nil diff --git a/frontend/vben/src/views/dashboard/workbench/components/WorkbenchHeader.vue b/frontend/vben/src/views/dashboard/workbench/components/WorkbenchHeader.vue index 5854550..0a94935 100644 --- a/frontend/vben/src/views/dashboard/workbench/components/WorkbenchHeader.vue +++ b/frontend/vben/src/views/dashboard/workbench/components/WorkbenchHeader.vue @@ -15,9 +15,13 @@ {{ userinfo.desc }}