src/ZKEACMS.WebHost/Views/Shared/EditorTemplates/ImageCaptcha.cshtml
(完整代码) 1KB@model String
@{
bool useImageCaptcha = applicationSettingService.Get(SettingKeys.UseImageCaptcha, "true") == "true";
if (useImageCaptcha)
{
Style.Reqiured("captcha").AtHead();
Script.Reqiured("captcha").AtFoot();
}
var descriptor = ViewData.ModelMetadata.GetViewDescriptor();
Dictionary<string, object> properties;
if (descriptor != null)
{
properties = descriptor?.ToHtmlProperties();
}
else
{
properties = new Dictionary<string, object>();
properties["class"] = "form-control";
properties["placeholder"] = L("Captcha").Text;
}
}
@inject IApplicationSettingService applicationSettingService
@if (useImageCaptcha)
{
<table class="captcha-container">
<tbody>
<tr>
<td>
@Html.TextBox("", Model, properties)
</td>
<td>
<a class="image-captcha" href="javascript:void(0)" data-captcha="@Url.Action("Image", "Captcha")">
<img src="@Url.Action("Image", "Captcha")" />
</a>
</td>
</tr>
</tbody>
</table>
}
else
{
@Html.Hidden("","Captcha")
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。