From 264467d627af9d16b77f2302104d13f4208b2c30 Mon Sep 17 00:00:00 2001 From: Marvin Date: Wed, 16 Aug 2023 21:37:11 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E7=99=BB=E5=BD=95=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=90=8D=E7=A7=B0=E6=98=BE=E7=A4=BA=EF=BC=88=E5=8F=B3?= =?UTF-8?q?=E4=B8=8A=E8=A7=92=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AMESCoreStudio.Web/Controllers/HomeController.cs | 3 +++ AMESCoreStudio.Web/Views/Home/Framework.cshtml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/AMESCoreStudio.Web/Controllers/HomeController.cs b/AMESCoreStudio.Web/Controllers/HomeController.cs index d5cdccc8..8406eadc 100644 --- a/AMESCoreStudio.Web/Controllers/HomeController.cs +++ b/AMESCoreStudio.Web/Controllers/HomeController.cs @@ -61,6 +61,9 @@ namespace AMESCoreStudio.Web.Controllers HttpContext.Request.Cookies.TryGetValue("UserID", out userID); if (userID != null) { + var user_info = await _sysApi.GetUserInfo(int.Parse(userID)); + ViewData["UserName"] = user_info[0].UserName; + if (int.Parse(userID.ToString()) >= 0) { int user_id = int.Parse(userID.ToString()); diff --git a/AMESCoreStudio.Web/Views/Home/Framework.cshtml b/AMESCoreStudio.Web/Views/Home/Framework.cshtml index b5268663..ad0d943a 100644 --- a/AMESCoreStudio.Web/Views/Home/Framework.cshtml +++ b/AMESCoreStudio.Web/Views/Home/Framework.cshtml @@ -61,7 +61,7 @@
  • - @ViewData["Name"] + @ViewData["UserName"]
    退出