diff --git a/projects/Infrastructure/Views/Shared/EditorTemplates/Object.cshtml b/projects/Infrastructure/Views/Shared/EditorTemplates/Object.cshtml index d6982858..f3f9c749 100644 --- a/projects/Infrastructure/Views/Shared/EditorTemplates/Object.cshtml +++ b/projects/Infrastructure/Views/Shared/EditorTemplates/Object.cshtml @@ -84,6 +84,10 @@ + @if (AfterSubmit) + { + @(await Html.PartialAsync("_AfterSubmit", Model as object)) + } diff --git a/projects/Infrastructure/Web/Mvc/Razor/MyRazorPage.cs b/projects/Infrastructure/Web/Mvc/Razor/MyRazorPage.cs index 5f09ab8f..294fcb0f 100644 --- a/projects/Infrastructure/Web/Mvc/Razor/MyRazorPage.cs +++ b/projects/Infrastructure/Web/Mvc/Razor/MyRazorPage.cs @@ -42,7 +42,11 @@ namespace Infrastructure.Web.Mvc.Razor get { return this.ViewData["BackUrl"] as string; } set { this.ViewData["BackUrl"] = value; } } - + public bool AfterSubmit + { + get { return (bool)(this.ViewData["DisableBackUrl"] ?? false); } + set { this.ViewData["DisableBackUrl"] = value; } + } public bool HasPermission(params string[] permissions) { var result = false; diff --git a/projects/Platform/Views/Account/Login.cshtml b/projects/Platform/Views/Account/Login.cshtml index 10453e1d..aec4e74f 100644 --- a/projects/Platform/Views/Account/Login.cshtml +++ b/projects/Platform/Views/Account/Login.cshtml @@ -1,18 +1,17 @@ -@model LoginModel +@model LoginModel @{ Layout = "/Views/Shared/_Layout.cshtml"; DisableBackUrl = true; + AfterSubmit = true; HtmlTitle = ViewContext.ViewData.ModelMetadata.ModelType.GetDisplayName(); var providers = this.Context.GetExternalProvidersAsync().Result; } @Html.EditorForModel() -? @foreach (var scheme in providers) {
} \ No newline at end of file diff --git a/projects/Platform/Views/Account/_AfterSubmit.cshtml b/projects/Platform/Views/Account/_AfterSubmit.cshtml new file mode 100644 index 00000000..5a9d21d1 --- /dev/null +++ b/projects/Platform/Views/Account/_AfterSubmit.cshtml @@ -0,0 +1 @@ +忘记密码? \ No newline at end of file diff --git a/projects/Platform/db.sql b/projects/Platform/db.sql index 979bfc3a..8eb0dc12 100644 --- a/projects/Platform/db.sql +++ b/projects/Platform/db.sql @@ -229,6 +229,7 @@ CREATE TABLE `iot_IoTGateway` ( `IsOnline` tinyint(1) NOT NULL, `Image` longtext CHARACTER SET utf8mb4 NULL, `Version` longtext CHARACTER SET utf8mb4 NULL, + `Password` longtext CHARACTER SET utf8mb4 NULL, `DisplayOrder` int NOT NULL, `Hidden` tinyint(1) NOT NULL, `BuildingId` char(36) NULL,