没找到问题 , 我重新创建了自定义的登录页面 问题解决了
from 和 input 元素都不存在
是的,注释了 @if (Model.EnableLocalLogin) 依然无法加载出账号密码框
@page @using Microsoft.AspNetCore.Mvc.Localization @using Volo.Abp.Account.Localization @using Volo.Abp.Account.Settings @using Volo.Abp.Account.Web.Pages.Account; @using Volo.Abp.AspNetCore.Mvc.UI.Theming; @using Volo.Abp.Identity; @using Volo.Abp.Settings @model Volo.Abp.Account.Web.Pages.Account.LoginModel @inject IHtmlLocalizer<AccountResource> L @inject IThemeManager ThemeManager @inject Volo.Abp.Settings.ISettingProvider SettingProvider
@{ Layout = ThemeManager.CurrentTheme.GetAccountLayout(); }
@section scripts { <abp-script-bundle name="@typeof(LoginModel).FullName"> <abp-script src="/Pages/Account/Login.js" /> </abp-script-bundle> }
@if (Model.ShowRequireMigrateSeedMessage) { <div class="alert alert-danger"> <h4 class="alert-heading">@L["RequireMigrateSeedTitle"]</h4> <p>@L["RequireMigrateSeedMessage"]</p> </div> }
<div class="card mt-3 shadow-sm rounded"> <div class="card-body p-5"> <h4>@L["Login"]</h4> @* @if (await SettingProvider.IsTrueAsync(AccountSettingNames.IsSelfRegistrationEnabled)) { <strong> @L["CreateANewAccount"] <a href="@Url.Page("./Register", new { returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash })" class="text-decoration-none">@L["Register"]</a> </strong> } @ @ @if (Model.EnableLocalLogin) { *@ <form method="post" class="mt-4"> <!-- 租户选择 (新增自定义租户选择) --> <div class="mb-3"> <label asp-for="LoginInput.TenantName" class="form-label">@L["Tenant"]</label> <select asp-for="LoginInput.TenantName" asp-items="@(new SelectList(Model.TenantList, "Name", "DisplayName", Model.LoginInput.TenantName))" class="form-select"> <option value=""> </option> </select> <span asp-validation-for="LoginInput.TenantName" class="text-danger"></span> </div> <div class="mb-3"> <label asp-for="LoginInput.UserNameOrEmailAddress" class="form-label">@L["UserNameOrEmailAddress"]</label> <input asp-for="LoginInput.UserNameOrEmailAddress" class="form-control" /> <span asp-validation-for="LoginInput.UserNameOrEmailAddress" class="text-danger"></span> </div>
<div class="mb-3">
<label asp-for="LoginInput.Password" class="form-label">@L["Password"]</label>
<div class="input-group">
<input type="password" class="form-control" autocomplete="new-password" maxlength="@IdentityUserConsts.MaxPasswordLength" asp-for="LoginInput.Password" />
<button class="btn btn-secondary" type="button" id="PasswordVisibilityButton"><i class="fa fa-eye-slash" aria-hidden="true"></i></button>
</div>
<span asp-validation-for="LoginInput.Password"></span>
</div>
<abp-row>
<abp-column>
<abp-input asp-for="LoginInput.RememberMe" label="@L["RememberMe"].Value" class="mb-4" />
</abp-column>
<abp-column class="text-end">
<a href="@Url.Page("./ForgotPassword", new { returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash })">@L["ForgotPassword"]</a>
</abp-column>
</abp-row>
<div class="d-grid gap-2">
<abp-button type="submit" button-type="Primary" name="Action" value="Login" class="btn-lg mt-3">@L["Login"]</abp-button>
@if (Model.ShowCancelButton)
{
<abp-button type="submit" button-type="Secondary" formnovalidate="formnovalidate" name="Action" value="Cancel" class="btn-lg mt-3">@L["Cancel"]</abp-button>
}
</div>
</form>
@* } *@
<!-- 保留 ReturnUrl / ReturnUrlHash -->
<input type="hidden" asp-for="@Model.ReturnUrl" value="https://localhost:4200" />
<input type="hidden" asp-for="@Model.ReturnUrlHash" value=""/>
@* @if (Model.VisibleExternalProviders.Any())
{
<div class="mt-2">
<h5>@L["OrLoginWith"]</h5>
<form asp-page="./Login" asp-page-handler="ExternalLogin" asp-route-returnUrl="@Model.ReturnUrl" asp-route-returnUrlHash="@Model.ReturnUrlHash" method="post">
@foreach (var provider in Model.VisibleExternalProviders)
{
<button type="submit" class="btn btn-primary m-1" name="provider" value="@provider.AuthenticationScheme" title="@L["LogInUsingYourProviderAccount", provider.DisplayName]">@provider.DisplayName</button>
}
</form>
</div>
} *@
@if (!Model.EnableLocalLogin && !Model.VisibleExternalProviders.Any())
{
<div class="alert alert-warning">
<strong>@L["InvalidLoginRequest"]</strong>
@L["ThereAreNoLoginSchemesConfiguredForThisClient"]
</div>
}
</div>
</div>
客户环境上需要使用UAT账号,无法提供在线的URL
我目前用的是ABP商业版9.3.1的版本
"QRSPC.BaseSetService.Localization.BaseSetServiceResource": { "texts": { "Permission:Books": "Books", "Permission:BaseSetService": "基础设置", "Permission:Create": "创建", "Permission:Edit": "编辑", "Permission:Delete": "删除", "Books": "Books", "NewBook": "New Book", "Book": "Book", "Menu:Books": "Books", "SeeAdvancedFilters": "Filters", "DeleteConfirmationMessage": "Are you sure you want to delete this record?", "AreYouSure": "Are you sure?", "Search": "Search", "Pick": "Pick", "Actions": "Actions", "SuccessfullyDeleted": "Successfully deleted", "ExportToExcel": "导出Excel", "AllItemsAreSelected": "所有'{0}'项都被选中.", "OneItemOnThisPageIsSelected": "1 item on this page is selected", "NumberOfItemsOnThisPageAreSelected": "All {0} items on this page are selected", "SelectAllItems": "选择所有项", "ClearSelection": "清除选择", "DeleteAllRecords": "Are you sure you want to delete all records?", "DeleteSelectedRecords": "Are you sure you want to delete {0} record(s)?", "UploadFailedMessage": "Upload Failed: Unsupported file format or file size too large. Please ensure the file meets the required format and size limits, and try again.", "DownloadSelectedFile": "Download selected file", "RemoveSelectedFile": "Remove selected file", "Filters": "过滤", "BName": "B Name", "BCode": "B Code", "BMemo": "B Memo", "MinBName": "Min B Name", "MinBCode": "Min B Code", "MinBMemo": "Min B Memo", "MaxBName": "Max B Name", "MaxBCode": "Max B Code", "MaxBMemo": "Max B Memo", "BookDetails": "Book Details", "NewBookDetail": "New Book Detail", "BookDetail": "Book Detail", "Menu:BookDetails": "Book Details", "BDetailName": "B Detail Name", "BDetailCode": "B Detail Code", "MinBDetailName": "Min B Detail Name", "MinBDetailCode": "Min B Detail Code", "MaxBDetailName": "Max B Detail Name", "MaxBDetailCode": "Max B Detail Code", "Permission:BookDetails": "Book Details", "Permission:WorkStationSettings": "工位", "WorkStationSettings": "工位", "NewWorkStationSetting": "新建工位", "WorkStationSetting": "工位", "Menu:WorkStationSettings": "工位", "WorkStationSettingBaseCode": "工位编号", "WorkStationSettingBaseName": "工位名称", "BaseSetService": "基础设置" }, "baseResources": [ "AbpValidation", "AbpUi" ] }, 这是basesetservice中文资源包加载失败时https://spc-msa-sit.sungrow.cn/api/abp/application-localization?cultureName=zh-Hans&onlyDynamics=false 接口返回的bastsetService的资源数据与解决方案中的不一致 是redis的问题吗
好的 我先试试 谢谢您