src/ZKEACMS.SpiderLog/Views/SpiderLog/VisitLog.cshtml

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

@using ZKEACMS.SpiderLog.Models
@model IEnumerable<SearchEngineVisitLog>
@{
    var first = Model.FirstOrDefault();
}

@if (first != null)
{
    <div class="panel panel-default">
        <div class="panel-heading">@first.Name</div>
        <table class="panel-body table table-bordered table-hover logs">
            @foreach (var item in Model)
            {
                <tr data-href="#@item.Url">
                    <td width="40" align="center">
                        <a href="@item.Url" target="_blank" class="glyphicon glyphicon-eye-open"></a>
                    </td>
                    <td>
                        <a href="#@item.Url" class="filter">@item.Url</a>
                    </td>
                    <td width="180">
                        @item.VisitAt.ToString("yyyy/MM/dd HH:mm:ss")
                    </td>
                </tr>
            }
        </table>
    </div>
}

@using (Script.AtFoot())
{
    <script type="text/javascript">
        if (window.location.hash) {
            var logTable = $(".logs");
            var target = window.location.hash;
            logTable.find("tr").each(function () {
                if ($(this).data("href") != target) {
                    $(this).addClass("hide");
                }
            });
        }

        $(function () {
            $(document).on("click", ".filter", function () {
                var logTable = $(".logs");
                if (window.location.hash) {
                    logTable.find("tr").removeClass("hide");
                    window.location.hash = '';
                    return false;
                } else {
                    var target = $(this).attr("href");
                    logTable.find("tr").each(function () {
                        if ($(this).data("href") != target) {
                            $(this).addClass("hide");
                        }
                    });
                    return true;
                }
            });
        });
后面还有 2 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。