Mowgli

Mowgli VIP4

135飞吻 2017-8-9 加入 来自海淀

(这个人懒得留下签名)

Mowgli 最近的提问

Mowgli 最近的回答

  • 2018-12-7 11:57:43打开tab 刷新页面数据中回答:

    @丨末

    写了个扩展方法 [嘻嘻]

    /**
    * 关闭当前页并刷新指定页
    * @param path 指定刷新或打开的路径
    * @param isReopen 1= 强制打开 | 其他=无操作
    */
    closeAndReload = function(path, isReopen) {
    var currPath = location.pathname;
    var topDoc = layui.$(window.top.document);

    if (path && topDoc.find("li[lay-id^='" + path + "']").length) {
    // 获取页面名称
    var name = topDoc.find(".layui-nav-item [lay-href^='" + path + "']").text();

    window.parent.layui.index.openTabsPage(path, name);
    var iframe = window.parent.layui.admin.tabsBody(window.parent.layui.admin.tabsPage.index).find(".layadmin-iframe");
    iframe[0].contentWindow.location.reload(true);
    }else if(isReopen){
    var name = topDoc.find(".layui-nav-item [lay-href^='" + path + "']").text();
    window.parent.layui.index.openTabsPage(path, name);
    }

    var layid = topDoc.find("li[lay-id^='" + currPath + "']").attr('lay-id');
    window.parent.layui.element.tabDelete('layadmin-layout-tabs', layid);
    }
  • 2018-12-7 11:57:5打开tab 刷新页面数据中回答:

    写了个扩展方法 [嘻嘻]

    /**
    * 关闭当前页并刷新指定页
    * @param path 指定刷新或打开的路径
    * @param isReopen 1= 强制打开 | 其他=无操作
    */
    closeAndReload = function(path, isReopen) {
    var currPath = location.pathname;
    var topDoc = layui.$(window.top.document);

    if (path && topDoc.find("li[lay-id^='" + path + "']").length) {
    // 获取页面名称
    var name = topDoc.find(".layui-nav-item [lay-href^='" + path + "']").text();

    window.parent.layui.index.openTabsPage(path, name);
    var iframe = window.parent.layui.admin.tabsBody(window.parent.layui.admin.tabsPage.index).find(".layadmin-iframe");
    iframe[0].contentWindow.location.reload(true);
    }else if(isReopen){
    var name = topDoc.find(".layui-nav-item [lay-href^='" + path + "']").text();
    window.parent.layui.index.openTabsPage(path, name);
    }

    var layid = topDoc.find("li[lay-id^='" + currPath + "']").attr('lay-id');
    window.parent.layui.element.tabDelete('layadmin-layout-tabs', layid);
    }
  • 2017-12-1 17:19:15手机模式怎么设置中回答:

    [泪] 你那边可以吗
  • 2017-12-1 17:0:48手机模式怎么设置中回答:

    <!DOCTYPE html>

    <html>
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <title>@ViewBag.Title</title>


    <link href="~/Content/layui/css/layui.css" rel="stylesheet" />
    </head>
    <body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">
    <div class="layui-header header">
    <div class="layui-main">
    @*Logo描述*@
    <div class="layui-logo">
    九山管理后台
    </div>

    <ul class="layui-nav layui-layout-left">
    <li class="layui-nav-item"><a href="/">首页</a></li>
    <li class="layui-nav-item">
    <a href="javascript:;">相关链接</a>
    <dl class="layui-nav-child">
    <dd><a target="_blank" href="http://sj.93966.net/Business/Home/Index">商家店铺</a></dd>
    </dl>
    </li>
    </ul>
    @*登录用户信息*@
    <ul class="layui-nav layui-layout-right">
    <li class="layui-nav-item">
    <a href="javascript:;">
    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
    贤心
    </a>
    <dl class="layui-nav-child">
    <dd><a target="_blank" href="http://login.m.93966.net/Account/ForgotPassword/">修改密码</a></dd>
    </dl>
    </li>
    <li class="layui-nav-item"><a href="http://logout.93966.net/?ReturnUrl='@Bm.Admin.Common.PageHepler.GetWebSite()'">注销</a></li>
    </ul>
    </div>
    </div>

    <div class="layui-side layui-bg-black ">
    <div class="layui-side-scroll">
    <!-- 左侧导航区域(可配合layui已有的垂直导航) -->
    <ul class="layui-nav layui-nav-tree" lay-filter="test">
    <li class="layui-nav-item layui-nav-itemed">
    <a class="" href="javascript:;">所有商品</a>
    <dl class="layui-nav-child">
    <dd><a href="javascript:;">列表一</a></dd>
    <dd><a href="javascript:;">列表二</a></dd>
    <dd><a href="javascript:;">列表三</a></dd>
    <dd><a href="">超链接</a></dd>
    </dl>
    </li>
    <li class="layui-nav-item">
    <a href="javascript:;">解决方案</a>
    <dl class="layui-nav-child">
    <dd><a href="javascript:;">列表一</a></dd>
    <dd><a href="javascript:;">列表二</a></dd>
    <dd><a href="">超链接</a></dd>
    </dl>
    </li>
    <li class="layui-nav-item"><a href="">云市场</a></li>
    <li class="layui-nav-item"><a href="">发布商品</a></li>
    </ul>
    </div>
    </div>

    <div class="layui-body">
    <!-- 内容主体区域 -->
    <div style="padding: 15px;">
    @RenderBody()
    </div>
    </div>
    </div>
    @*<div class="site-tree-mobile layui-hide">
    <i class="layui-icon"></i>
    </div>
    <div class="site-mobile-shade"></div>*@
    <script src="~/Content/layui/layui.all.js"></script>
    <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    </body>
    </html>


    把文件路径改成你的
  • 2017-12-1 16:42:50手机模式怎么设置中回答:

    @Hbeat-快乐学习 已经加上了 还是不行 其他的js代码需要添加吗