mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-04-09 18:41:28 +08:00
layui 2.10
This commit is contained in:
@@ -365,6 +365,7 @@
|
||||
<Content Include="Views\Shared\_FlowForm.cshtml" />
|
||||
<Content Include="Views\Shared\_Form.cshtml" />
|
||||
<Content Include="Views\Home\Main.cshtml" />
|
||||
<Content Include="Views\Shared\_Layout.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
|
||||
@@ -1,88 +1,50 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
@section header{
|
||||
<link rel="stylesheet" href="/css/user.css" media="all" />
|
||||
}
|
||||
|
||||
<!-- #section:basics/content.breadcrumbs -->
|
||||
<div class="breadcrumbs" id="breadcrumbs">
|
||||
<ul class="breadcrumb">
|
||||
<li>
|
||||
<i class="ace-icon fa fa-home home-icon"></i>
|
||||
<a href="#">分类管理</a>
|
||||
</li>
|
||||
<li class="active">列表</li>
|
||||
</ul><!-- /.breadcrumb -->
|
||||
</div>
|
||||
|
||||
<!-- /section:basics/content.breadcrumbs -->
|
||||
<div class="page-content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<div class="widget-box widget-color-blue">
|
||||
<div class="widget-header">
|
||||
</div>
|
||||
<div class="widget-body">
|
||||
<div class="widget-main">
|
||||
<ul id="orgtree" class="ztree" style="width: 100%"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="widget-box widget-color-blue">
|
||||
<div class="widget-header">
|
||||
@Html.Action("MenuHeader", "Home")
|
||||
</div>
|
||||
<div class="widget-body gridwidth">
|
||||
<div class="widget-main">
|
||||
<div class="row">
|
||||
<div class="col-md-12 ">
|
||||
<table id="maingrid"></table>
|
||||
<div id="grid-pager"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<blockquote class="layui-elem-quote news_search">
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" value="" placeholder="请输入关键字" class="layui-input search_input">
|
||||
</div>
|
||||
<a class="layui-btn search_btn">查询</a>
|
||||
</div>
|
||||
</div><!-- /.page-content -->
|
||||
<!--编辑对话框-->
|
||||
<div id="editDlg" style="display: none">
|
||||
<div class="col-xs-12">
|
||||
<form class="form-horizontal" id="editForm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right" for=""> 名称 </label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="Name" check-type="required" v-model="Name"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right" for=""> 排序号 </label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="SortNo" check-type="required" v-model="SortNo" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right" for=""> 上级分类</label>
|
||||
<div class="col-sm-9">
|
||||
<input id="ParentName" type="text" v-model="ParentName" />
|
||||
<input id="ParentId" type="hidden" v-model="ParentId" />
|
||||
<div id="menuContent" class="menuContent" style="display: none;">
|
||||
<ul id="org" class="ztree"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div class="layui-inline">
|
||||
<a class="layui-btn layui-btn-normal usersAdd_btn">添加用户</a>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<a class="layui-btn layui-btn-danger batchDel">批量删除</a>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-form-mid layui-word-aux"> 本页面刷新后除新添加的文章外所有操作无效,关闭页面所有数据重置</div>
|
||||
</div>
|
||||
</blockquote>
|
||||
<div class="layui-form users_list">
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="50">
|
||||
<col>
|
||||
<col width="18%">
|
||||
<col width="8%">
|
||||
<col width="12%">
|
||||
<col width="12%">
|
||||
<col width="18%">
|
||||
<col width="15%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose" id="allChoose"></th>
|
||||
<th>登录名</th>
|
||||
<th>邮箱</th>
|
||||
<th>性别</th>
|
||||
<th>会员等级</th>
|
||||
<th>会员状态</th>
|
||||
<th>最后登录时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="users_content"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script src="~/BllScripts/grid.js"></script>
|
||||
<script src="~/BllScripts/parentTree.js"></script>
|
||||
<script src="~/BllScripts/categoryManager.js"></script>
|
||||
<script src="~/BllScripts/jqEvent.js"></script>
|
||||
<div id="page"></div>
|
||||
<script type="text/javascript" src="../../layui/layui.js"></script>
|
||||
<script type="text/javascript" src="allUsers.js"></script>
|
||||
@@ -1,4 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
@@ -1,151 +1,143 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>首页--OpenAuth.Net</title>
|
||||
<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">
|
||||
<link rel="stylesheet" href="/layui/css/layui.css" media="all" />
|
||||
<link rel="stylesheet" href="//at.alicdn.com/t/font_tnyc012u2rlwstt9.css" media="all" />
|
||||
@section header
|
||||
{
|
||||
<link rel="stylesheet" href="/css/main.css" media="all" />
|
||||
</head>
|
||||
<body class="childrenBody">
|
||||
<div class="panel_box row">
|
||||
<div class="panel col">
|
||||
<a href="javascript:;" data-url="page/message/message.html">
|
||||
<div class="panel_icon">
|
||||
<i class="layui-icon" data-icon=""></i>
|
||||
</div>
|
||||
<div class="panel_word newMessage">
|
||||
<span></span>
|
||||
<cite>新消息</cite>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="panel col">
|
||||
<a href="javascript:;" data-url="page/user/allUsers.html">
|
||||
<div class="panel_icon" style="background-color:#FF5722;">
|
||||
<i class="iconfont icon-dongtaifensishu" data-icon="icon-dongtaifensishu"></i>
|
||||
</div>
|
||||
<div class="panel_word userAll">
|
||||
<span></span>
|
||||
<cite>新增人数</cite>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="panel col">
|
||||
<a href="javascript:;" data-url="page/user/allUsers.html">
|
||||
<div class="panel_icon" style="background-color:#009688;">
|
||||
<i class="layui-icon" data-icon=""></i>
|
||||
</div>
|
||||
<div class="panel_word userAll">
|
||||
<span></span>
|
||||
<cite>用户总数</cite>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="panel col">
|
||||
<a href="javascript:;" data-url="page/img/images.html">
|
||||
<div class="panel_icon" style="background-color:#5FB878;">
|
||||
<i class="layui-icon" data-icon=""></i>
|
||||
</div>
|
||||
<div class="panel_word imgAll">
|
||||
<span></span>
|
||||
<cite>图片总数</cite>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="panel col">
|
||||
<a href="javascript:;" data-url="page/news/newsList.html">
|
||||
<div class="panel_icon" style="background-color:#F7B824;">
|
||||
<i class="iconfont icon-wenben" data-icon="icon-wenben"></i>
|
||||
</div>
|
||||
<div class="panel_word waitNews">
|
||||
<span></span>
|
||||
<cite>待审核文章</cite>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="panel col max_panel">
|
||||
<a href="javascript:;" data-url="page/news/newsList.html">
|
||||
<div class="panel_icon" style="background-color:#2F4056;">
|
||||
<i class="iconfont icon-text" data-icon="icon-text"></i>
|
||||
</div>
|
||||
<div class="panel_word allNews">
|
||||
<span></span>
|
||||
<em>文章总数</em>
|
||||
<cite>文章列表</cite>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<blockquote class="layui-elem-quote explain">
|
||||
<p>本模板基于Layui实现,支持除LayIM外所有的Layui组件。
|
||||
<a href="http://layim.layui.com/" target="_blank" class="layui-btn layui-btn-mini">前往获取LayIM授权</a>
|
||||
<a href="https://git.oschina.net/layuicms/layuicms" target="_blank" class="layui-btn layui-btn-mini layui-btn-danger">码云下载</a><a href="https://github.com/BrotherMa/layuiCMS" target="_blank" class="layui-btn layui-btn-mini layui-btn-danger">GitHub下载</a>
|
||||
<span style="color:#1E9FFF;">郑重提示:为方便所有人查看demo,所有操作无效,请知悉</span></p>
|
||||
<p>开发文档地址:<a class="layui-btn layui-btn-mini" target="_blank" href="http://www.layui.com/doc">点此跳转</a>
|
||||
<a class="layui-btn layui-btn-mini layui-btn-danger" target="_blank" href="http://fly.layui.com/case/u/3198216">我要收藏</a>
|
||||
技术交流QQ群:
|
||||
<span style="color:#f00;">注:【本框架仅作为学习交流使用,如需用作商业用途,请联系作者授权,谢谢】</span></p>
|
||||
</blockquote>
|
||||
<div class="row">
|
||||
<div class="sysNotice col">
|
||||
<blockquote class="layui-elem-quote title">更新日志</blockquote>
|
||||
<div class="layui-elem-quote layui-quote-nm">
|
||||
<h3># v4.0(颠覆) - 2017-09-20</h3>
|
||||
<p>* 引入layui 2.02,这是有史以来最酷的Openauth.net</p>
|
||||
<p>* 全面优化数据结构</p>
|
||||
<p>* 全面优化流程引擎</p>
|
||||
}
|
||||
<div class="panel_box row">
|
||||
<div class="panel col">
|
||||
<a href="javascript:;" data-url="page/message/message.html">
|
||||
<div class="panel_icon">
|
||||
<i class="layui-icon" data-icon=""></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sysNotice col">
|
||||
<blockquote class="layui-elem-quote title">系统基本参数</blockquote>
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="150">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>当前版本</td>
|
||||
<td class="version"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>开发作者</td>
|
||||
<td class="author"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>网站首页</td>
|
||||
<td class="homePage"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>服务器环境</td>
|
||||
<td class="server"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>数据库版本</td>
|
||||
<td class="dataBase"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>最大上传限制</td>
|
||||
<td class="maxUpload"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>当前用户权限</td>
|
||||
<td class="userRights"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="panel_word newMessage">
|
||||
<span></span>
|
||||
<cite>新消息</cite>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="panel col">
|
||||
<a href="javascript:;" data-url="page/user/allUsers.html">
|
||||
<div class="panel_icon" style="background-color:#FF5722;">
|
||||
<i class="iconfont icon-dongtaifensishu" data-icon="icon-dongtaifensishu"></i>
|
||||
</div>
|
||||
<div class="panel_word userAll">
|
||||
<span></span>
|
||||
<cite>新增人数</cite>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="panel col">
|
||||
<a href="javascript:;" data-url="page/user/allUsers.html">
|
||||
<div class="panel_icon" style="background-color:#009688;">
|
||||
<i class="layui-icon" data-icon=""></i>
|
||||
</div>
|
||||
<div class="panel_word userAll">
|
||||
<span></span>
|
||||
<cite>用户总数</cite>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="panel col">
|
||||
<a href="javascript:;" data-url="page/img/images.html">
|
||||
<div class="panel_icon" style="background-color:#5FB878;">
|
||||
<i class="layui-icon" data-icon=""></i>
|
||||
</div>
|
||||
<div class="panel_word imgAll">
|
||||
<span></span>
|
||||
<cite>图片总数</cite>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="panel col">
|
||||
<a href="javascript:;" data-url="page/news/newsList.html">
|
||||
<div class="panel_icon" style="background-color:#F7B824;">
|
||||
<i class="iconfont icon-wenben" data-icon="icon-wenben"></i>
|
||||
</div>
|
||||
<div class="panel_word waitNews">
|
||||
<span></span>
|
||||
<cite>待审核文章</cite>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="panel col max_panel">
|
||||
<a href="javascript:;" data-url="page/news/newsList.html">
|
||||
<div class="panel_icon" style="background-color:#2F4056;">
|
||||
<i class="iconfont icon-text" data-icon="icon-text"></i>
|
||||
</div>
|
||||
<div class="panel_word allNews">
|
||||
<span></span>
|
||||
<em>文章总数</em>
|
||||
<cite>文章列表</cite>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<blockquote class="layui-elem-quote explain">
|
||||
<p>官方博客:<a href="http://www.cnblogs.com/yubaolee/">http://www.cnblogs.com/yubaolee/</a> </p>
|
||||
<p>
|
||||
admin/test两个账号只分配了部分模块/部门,系统完整模块/部门情况请直接在登录界面点击“以开发者账号登陆”
|
||||
</p>
|
||||
<p>
|
||||
<span style="color: #1E9FFF;">郑重提示:为安全起见,关闭了所有修改请求,如想体验完整功能可搭建本地环境,并将version置为空字符串</span>
|
||||
</p>
|
||||
<p>
|
||||
<a href="https://git.oschina.net/yubaolee/OpenAuth.Net" target="_blank" class="layui-btn layui-btn-mini layui-btn-danger">项目地址</a>
|
||||
<a class="layui-btn layui-btn-mini" target="_blank" href="https://www.w3cschool.cn/openauthdotnet/e8931tly.html">在线文档</a>
|
||||
<a class="layui-btn layui-btn-mini layui-btn-danger" target="_blank" href="http://git.oschina.net/yubaolee/OpenAuth.Net/stargazers">喜欢就Star一下吧</a>
|
||||
<span style="color: #f00;">注:【本框架仅作为学习交流使用,如需用作商业用途,请联系作者授权,谢谢】</span>
|
||||
</p>
|
||||
<p>技术交流QQ群:【1号:】484498493 【2号:】626433139</p>
|
||||
</blockquote>
|
||||
<div class="row">
|
||||
<div class="sysNotice col">
|
||||
<blockquote class="layui-elem-quote title">更新日志</blockquote>
|
||||
<div class="layui-elem-quote layui-quote-nm">
|
||||
<h3># v4.0(颠覆) - 2017-09-20</h3>
|
||||
<p>* 引入layui 2.10,这是有史以来最酷的Openauth.net</p>
|
||||
<p>* 全面优化数据结构</p>
|
||||
<p>* 全面优化流程引擎</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sysNotice col">
|
||||
<blockquote class="layui-elem-quote title">系统基本参数</blockquote>
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="150">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>当前版本</td>
|
||||
<td class="version"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>开发作者</td>
|
||||
<td class="author"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>网站首页</td>
|
||||
<td class="homePage"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>服务器环境</td>
|
||||
<td class="server"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>数据库版本</td>
|
||||
<td class="dataBase"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>最大上传限制</td>
|
||||
<td class="maxUpload"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>当前用户权限</td>
|
||||
<td class="userRights"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript" src="/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/js/main.js"></script>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>登录--OpenAuth.Net模板</title>
|
||||
<title>登录--OpenAuth.Net</title>
|
||||
<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">
|
||||
@@ -13,23 +16,18 @@
|
||||
<link rel="stylesheet" href="../../css/login.css" media="all" />
|
||||
</head>
|
||||
<body>
|
||||
<video class="video-player" preload="auto" autoplay="autoplay" loop="loop" data-height="1080" data-width="1920" height="1080" width="1920">
|
||||
<source src="login.mp4" type="video/mp4">
|
||||
<!-- 此视频文件为支付宝所有,在此仅供样式参考,如用到商业用途,请自行更换为其他视频或图片,否则造成的任何问题使用者本人承担,谢谢 -->
|
||||
</video>
|
||||
<div class="video_mask"></div>
|
||||
<div class="login">
|
||||
<h1>layuiCMS-管理登录</h1>
|
||||
<h1>Openauth.net-管理登录</h1>
|
||||
<form class="layui-form">
|
||||
<div class="layui-form-item">
|
||||
<input class="layui-input" name="username" placeholder="用户名" lay-verify="required" type="text" autocomplete="off">
|
||||
<input class="layui-input" name="username" value="admin" placeholder="用户名" lay-verify="required" type="text" autocomplete="off">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<input class="layui-input" name="password" placeholder="密码" lay-verify="required" type="password" autocomplete="off">
|
||||
<input class="layui-input" name="password" value="admin" placeholder="密码" lay-verify="required" type="password" autocomplete="off">
|
||||
</div>
|
||||
<div class="layui-form-item form_code">
|
||||
<input class="layui-input" name="code" placeholder="验证码" lay-verify="required" type="text" autocomplete="off">
|
||||
<div class="code"><img src="../../images/code.jpg" width="116" height="36"></div>
|
||||
<input class="layui-input" name="code" value="jgmrj" placeholder="验证码" lay-verify="required" type="text" autocomplete="off">
|
||||
<div class="code"><img src="/images/code.jpg" width="116" height="36"></div>
|
||||
</div>
|
||||
<button class="layui-btn login_btn" lay-submit="" lay-filter="login">登录</button>
|
||||
</form>
|
||||
|
||||
19
OpenAuth.Mvc/Views/Shared/_Layout.cshtml
Normal file
19
OpenAuth.Mvc/Views/Shared/_Layout.cshtml
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>用户总数--layui后台管理模板</title>
|
||||
<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">
|
||||
<link rel="stylesheet" href="/layui/css/layui.css" media="all" />
|
||||
<link rel="stylesheet" href="//at.alicdn.com/t/font_tnyc012u2rlwstt9.css" media="all" />
|
||||
@RenderSection("header")
|
||||
</head>
|
||||
<body class="childrenBody">
|
||||
@RenderBody()
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,3 +1,3 @@
|
||||
@{
|
||||
Layout =null;
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
.layui-flow-more{ clear: both; margin-top: 20px; }
|
||||
#Images li{ width:19%; margin:0.5% 0.5%; float: left; overflow:hidden;}
|
||||
#Images li img{ width:100%; }
|
||||
#Images li .operate{ display: block; height: 40px; width:100%; background:#f4f5f9; }
|
||||
#Images li .operate .check{ float:left; margin-left:11px; height:18px; padding:11px 0; }
|
||||
#Images li .operate .img_del{ float:right; margin:7px 11px 0 0; font-size: 22px; cursor:pointer; }
|
||||
#Images li .operate .img_del:hover{ color:#f00; }
|
||||
|
||||
/*适配*/
|
||||
@media screen and (max-width:1050px){
|
||||
/*用户信息*/
|
||||
#Images li{ width:24%;}
|
||||
}
|
||||
@media screen and (max-width: 750px){
|
||||
/*用户信息*/
|
||||
#Images li{ width:49%;}
|
||||
}
|
||||
@media screen and (max-width:432px){
|
||||
/*用户信息*/
|
||||
#Images li{ width:99%;}
|
||||
.layui-flow-more{ clear: both; margin-top: 20px; }
|
||||
#Images li{ width:19%; margin:0.5% 0.5%; float: left; overflow:hidden;}
|
||||
#Images li img{ width:100%; }
|
||||
#Images li .operate{ display: block; height: 40px; width:100%; background:#f4f5f9; }
|
||||
#Images li .operate .check{ float:left; margin-left:11px; height:18px; padding:11px 0; }
|
||||
#Images li .operate .img_del{ float:right; margin:7px 11px 0 0; font-size: 22px; cursor:pointer; }
|
||||
#Images li .operate .img_del:hover{ color:#f00; }
|
||||
|
||||
/*适配*/
|
||||
@media screen and (max-width:1050px){
|
||||
/*用户信息*/
|
||||
#Images li{ width:24%;}
|
||||
}
|
||||
@media screen and (max-width: 750px){
|
||||
/*用户信息*/
|
||||
#Images li{ width:49%;}
|
||||
}
|
||||
@media screen and (max-width:432px){
|
||||
/*用户信息*/
|
||||
#Images li{ width:99%;}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
body{overflow:hidden;}
|
||||
|
||||
.video-player{background-color: transparent;display: block;position: absolute;z-index: 1;top:0;}
|
||||
.video_mask{ width:100%; height:100%; position:absolute; left:0; top:0; z-index:90; background-color:rgba(0,0,0,0.5); }
|
||||
.login{ height:260px;width:260px;padding: 20px;background-color:rgba(0,0,0,0.5);border-radius: 4px;position:absolute;left: 50%;top: 50%; margin:-150px 0 0 -150px;z-index:99;}
|
||||
.login h1{ text-align:center; color:#fff; font-size:24px; margin-bottom:20px; }
|
||||
.form_code{ position:relative; }
|
||||
.form_code .code{ position:absolute; right:0; top:1px; cursor:pointer; }
|
||||
body{overflow:hidden;}
|
||||
|
||||
.video-player{background-color: transparent;display: block;position: absolute;z-index: 1;top:0;}
|
||||
.video_mask{ width:100%; height:100%; position:absolute; left:0; top:0; z-index:90; background-color:rgba(0,0,0,0.5); }
|
||||
.login{ height:260px;width:260px;padding: 20px;background-color:rgba(0,0,0,0.5);border-radius: 4px;position:absolute;left: 50%;top: 50%; margin:-150px 0 0 -150px;z-index:99;}
|
||||
.login h1{ text-align:center; color:#fff; font-size:24px; margin-bottom:20px; }
|
||||
.form_code{ position:relative; }
|
||||
.form_code .code{ position:absolute; right:0; top:1px; cursor:pointer; }
|
||||
.login_btn{ width:100%; }
|
||||
@@ -1,188 +1,188 @@
|
||||
/*公共样式*/
|
||||
.main_body{ min-width:320px; }
|
||||
.layui-elem-quote.title{ padding:10px 15px; margin-bottom:0; }
|
||||
.layui-tab-more{ position: relative; z-index: 99; background:#fff; }
|
||||
.layui-layer-tab .layui-layer-title span.layui-layer-tabnow{ height:42px !important; }
|
||||
.layui-layer-tab .layui-layer-title span{ min-width:45px !important; }
|
||||
.marg0{ margin:0; }
|
||||
/*模拟加载层图标样式*/
|
||||
.layui-layer-dialog .layui-layer-content .layui-layer-ico16{ background-size:100% 100% !important; }
|
||||
|
||||
/*样式改变的过渡*/
|
||||
.showMenu .layui-body,.showMenu .layui-footer,.showMenu.layui-layout-admin .layui-side,.logo,.top_menu .layui-nav-item[pc],.component,.top_menu .layui-nav-item[mobile],.layui-nav,.layui-layout-admin .layui-main,.site-mobile .layui-side,.layui-layout-admin .layui-side,.site-mobile .site-tree-mobile,.layui-body,.layui-layout-admin .layui-footer,.layui-layout-admin .layui-side,.panel,.panel .panel_icon i{ transition: all 0.3s ease-in-out;-webkit-transition: all 0.3s ease-in-out;-o-transition: all 0.3s ease-in-out;-moz-transition: all 0.3s ease-in-out;-ms-transition: all 0.3s ease-in-out; }
|
||||
|
||||
|
||||
.showMenu.layui-layout-admin .layui-side{ left:-200px; }
|
||||
.showMenu .layui-body,.showMenu .layui-footer{ left:0; }
|
||||
.layui-layout-admin .layui-main{ margin:0; }
|
||||
.logo{ color: #fff; float: left; line-height:60px; font-size:20px; padding:0 25px; text-align: center; width:150px;}
|
||||
.hideMenu{ float:left; width:20px; height:20px; margin:15px 15px 0 0; font-size:17px; text-align:center; padding:5px 5px; color:#fff; background-color:#1AA094; }
|
||||
.hideMenu:hover{ color:#fff; }
|
||||
.weather{ color:#fff; float:left; margin:15px 0 0 50px;}
|
||||
.component{ float: left; width:200px; height:30px; margin-top: 15px; position: relative;}
|
||||
.component .layui-input{ height:30px; line-height: 30px; font-size:12px; border:none; transition: all 0.3s; }
|
||||
.component .layui-input:focus{ background:#fff; color:#000; }
|
||||
.component .layui-form-select dl{ top:33px; background:#fff; }
|
||||
.component .layui-form-select .layui-edge,.top_menu .layui-nav-item[mobile]{ display:none; }
|
||||
.component .layui-icon{ position: absolute; right:8px; top:8px; color:#000; }
|
||||
|
||||
/*顶部右侧导航*/
|
||||
.layui-nav .layui-nav-item>a{ color:#fff; }
|
||||
.top_menu{ position:absolute; right:0; background:none }
|
||||
.top_menu.layui-nav .layui-this:after{ width:0px; }
|
||||
.top_menu.layui-nav .layui-this,.closeBox.layui-nav .layui-this{ background-color:transparent; }
|
||||
.top_menu.layui-nav .layui-this a,.closeBox.layui-nav .layui-this a{ color:#c2c2c2; }
|
||||
.top_menu.layui-nav dd.layui-this a,.closeBox.layui-nav dd.layui-this a{ color:#333; }
|
||||
.top_menu.layui-nav .layui-nav-child a:hover,.closeBox.layui-nav .layui-nav-child a:hover{ color:#fff; background-color:#5FB878; }
|
||||
.top_menu .iconfont{ font-size: 14px !important; }
|
||||
.top_menu .layui-nav-bar{ top:60px !important; background-color:rgba(0,0,0,0.7) }
|
||||
|
||||
/*左侧用户头像*/
|
||||
.layui-nav{ background-color:inherit !important; }
|
||||
.layui-layout-admin .layui-side{ left:0; }
|
||||
.user-photo{width: 200px; height: 120px; padding-top: 15px; padding-bottom: 5px;}
|
||||
.user-photo a.img{ display: block; width: 76px; height: 76px; margin: 0 auto; margin-bottom: 15px;}
|
||||
.user-photo a.img img{ display: block; border: none; width: 100%; height: 100%; border-radius: 50%; -webkit-border-radius: 50%; -moz-border-radius: 50%; border: 4px solid #44576b;}
|
||||
.user-photo p{ display: block; width: 100%; height: 25px; color: #ffffff; text-align: center; font-size: 12px; white-space: nowrap;line-height: 25px; overflow: hidden;}
|
||||
/*左侧导航重定义*/
|
||||
.layui-nav-item a cite{ padding:0 5px; }
|
||||
.layui-side-scroll{ height:auto; }
|
||||
.layui-nav-tree .layui-nav-child a{ padding-left: 40px; }
|
||||
.layui-nav-tree .layui-nav-child a:hover{ background-color:#4E5465; }
|
||||
.layui-nav-tree .layui-nav-child dd.layui-this a:hover{ background-color:#009688; }
|
||||
|
||||
/*右侧body*/
|
||||
#top_tabs_box{ padding-right:138px; height:40px; border-bottom:1px solid #e2e2e2; }
|
||||
#top_tabs{ position: absolute; border-bottom:none;}
|
||||
/*多窗口页面操作下拉*/
|
||||
.closeBox{ position:absolute; right:0; background-color:#fff !important; color:#000; border-left:1px solid #e2e2e2; border-bottom:1px solid #e2e2e2; }
|
||||
.closeBox .layui-nav-item{ line-height:40px; }
|
||||
.closeBox .layui-nav-item a,.closeBox .layui-nav-item a:hover{ color:#000; }
|
||||
.closeBox .layui-nav-more{ top:17px; }
|
||||
.closeBox .layui-nav-mored{ top:11px; }
|
||||
.closeBox .layui-nav-child{ top:42px; left:-12px; }
|
||||
.closeBox .layui-nav-bar{ display:none; }
|
||||
.closeBox .icon-caozuo{ font-size: 20px; position:absolute; top:1px; left:-2px; }
|
||||
|
||||
.layui-body{overflow:hidden; border-top:5px solid #1AA094;border-left:2px solid #1AA094;}
|
||||
.layui-tab-content{ height:100%; padding:0; }
|
||||
.layui-tab-item{ position: absolute; top: 41px; bottom:0; left: 0; right: 0; padding: 0; margin: 0; -webkit-overflow-scrolling:touch; overflow:auto;}
|
||||
.layui-tab-title .layui-this{ background-color:#18A093;}
|
||||
.layui-tab-title .layui-this:after{ border:none; }
|
||||
.layui-tab-title li cite{ font-style: normal; padding-left:5px; }
|
||||
.layui-tab-card .layui-tab-title{background-color: #ffffff}
|
||||
.layui-tab-card .layui-tab-title .layui-this{background-color: #f2f2f2}
|
||||
.clildFrame.layui-tab-content{ padding-right: 0; }
|
||||
.clildFrame.layui-tab-content iframe{ width: 100%; height:100%; border:none; min-width: 320px; position:absolute; }
|
||||
/*main.html*/
|
||||
.row,.col,.panel_word,.panel_icon{ box-sizing:border-box; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; -o-box-sizing:border-box;}
|
||||
.row{ margin-left:-10px; overflow:hidden;display: flex; flex-wrap: wrap;}
|
||||
.col{ padding-left:10px;}
|
||||
.panel{float: left; text-align: center; width:16.666%; min-width:210px; margin-bottom: 10px;}
|
||||
.panel_box a{display:block; background-color:#f2f2f2; border-radius:5px; overflow:hidden; }
|
||||
.panel_icon{ width:40%; display: inline-block; padding:22px 0; background-color:#54ade8;float:left;}
|
||||
.panel_icon i{ font-size:3em; color:#fff;}
|
||||
.panel a:hover .panel_icon i{ display:inline-block; transform:rotate(360deg); -webkit-transform:rotate(360deg); -moz-transform:rotate(360deg); -o-transform:rotate(360deg); -ms-transform:rotate(360deg);}
|
||||
.panel_word{ width:60%; display: inline-block; float:right; margin-top: 22px; }
|
||||
.panel_word span{ font-size:25px; display:block; height:30px; line-height:30px; }
|
||||
.allNews em{ font-style:normal; font-size:16px;display: block; }
|
||||
.panel_box a .allNews cite{ display:none; }
|
||||
.panel_box a cite{ font-size:16px; display: block; font-style:normal; }
|
||||
.sysNotice{ width:50%; float: left; }
|
||||
.sysNotice .layui-elem-quote{ line-height:26px; position: relative;}
|
||||
.sysNotice .layui-table{ margin-top:0; border-left:5px solid #e2e2e2; }
|
||||
.sysNotice .title .icon-new1{ position: absolute; top:8px; margin-left: 10px; color:#f00; font-size:25px; }
|
||||
.explain .layui-btn{ margin:5px 5px 5px 0; }
|
||||
|
||||
/*打开页面动画*/
|
||||
.layui-tab-item.layui-show{ animation:moveTop 1s; -webkit-animation:moveTop 1s; animation-fill-mode:both; -webkit-animation-fill-mode:both; }
|
||||
@keyframes moveTop{
|
||||
0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);}
|
||||
100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);}
|
||||
}
|
||||
@-o-keyframes moveTop{
|
||||
0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);}
|
||||
100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);}
|
||||
}
|
||||
@-moz-keyframes moveTop{
|
||||
0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);}
|
||||
100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);}
|
||||
}
|
||||
@-webkit-keyframes moveTop{
|
||||
0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);}
|
||||
100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);}
|
||||
}
|
||||
|
||||
/*锁屏*/
|
||||
.admin-header-lock{width: 320px; height: 170px; padding: 20px; position: relative; text-align: center;}
|
||||
.admin-header-lock-img{width: 60px; height: 60px; margin: 0 auto;}
|
||||
.admin-header-lock-img img{width: 60px; height: 60px; border-radius: 100%;}
|
||||
.admin-header-lock-name{color: #009688;margin: 8px 0 15px 0;}
|
||||
.input_btn{ overflow: hidden; margin-bottom: 10px; }
|
||||
.admin-header-lock-input{width: 170px; color: #fff;background-color: #009688; float: left; margin:0 10px 0 40px; border:none;}
|
||||
.admin-header-lock-input::-webkit-input-placeholder {color:#fff;}
|
||||
.admin-header-lock-input::-moz-placeholder {color:#fff;}
|
||||
.admin-header-lock-input::-ms-input-placeholder {color:#fff;}
|
||||
.admin-header-lock-input:-moz-placeholder {color:#fff;}
|
||||
#unlock{ float: left; }
|
||||
#lock-box p{ color:#e60000; }
|
||||
|
||||
/*换肤*/
|
||||
.skins_box{ padding:10px 34px 0; }
|
||||
.skinBtn{ text-align:right; }
|
||||
/*橙色*/
|
||||
.orange .layui-layout-admin .layui-header{ background-color:orange!important; }
|
||||
.orange .layui-bg-black{ background-color:#e47214!important; }
|
||||
/*蓝色*/
|
||||
.blue .layui-layout-admin .layui-header{ background-color:#3396d8!important; }
|
||||
.blue .layui-bg-black,.blue .hideMenu{ background-color:#146aa2!important; }
|
||||
/*藏青*/
|
||||
.cyan .layui-layout-admin .layui-header{ background-color:#2F4056!important; }
|
||||
.cyan .layui-bg-black, .cyan .hideMenu{ background-color:#2F4056!important; }
|
||||
|
||||
/*自定义*/
|
||||
.skinCustom{ visibility:hidden; }
|
||||
.skinCustom input{ width:48%; margin:5px 2% 5px 0; float:left; }
|
||||
|
||||
.orange .layui-nav-tree .layui-nav-child a,.blue .layui-nav-tree .layui-nav-child a{ color:#fff; }
|
||||
.orange .top_menu.layui-nav .layui-nav-more,.blue .top_menu.layui-nav .layui-nav-more{border-color:#fff transparent transparent !important;}
|
||||
.orange .top_menu.layui-nav-itemed .layui-nav-more,.orange .top_menu.layui-nav .layui-nav-mored,.blue .top_menu.layui-nav-itemed .layui-nav-more,.blue .top_menu.layui-nav .layui-nav-mored{border-color:transparent transparent #fff !important;}
|
||||
|
||||
/*底部*/
|
||||
.footer{ text-align: center; line-height:44px;border-left: 2px solid #1AA094;}
|
||||
|
||||
|
||||
/*响应式*/
|
||||
@media screen and (max-width:1282px){
|
||||
.panel{ width:33.3333%; }
|
||||
}
|
||||
@media screen and (max-width:1050px){
|
||||
.layui-nav.top_menu .layui-nav-item a{ padding:0 10px; }
|
||||
/*天气信息*/
|
||||
.weather[pc]{ display: none !important; }
|
||||
.sysNotice{ width:100%; }
|
||||
.component{ width:165px; }
|
||||
}
|
||||
@media screen and (max-width: 750px){
|
||||
.logo{ padding:0;}
|
||||
.top_menu .layui-nav-item[pc],.component,.site-mobile .site-tree-mobile{ display: none !important; }
|
||||
.top_menu .layui-nav-item.showNotice[pc]{ display:inline-block !important; }
|
||||
.top_menu .layui-nav-item[mobile]{ display:inline-block; }
|
||||
.layui-nav.top_menu,.layui-nav.top_menu .layui-nav-item a{ padding:0 10px; }
|
||||
.layui-layout-admin .layui-main{ margin-right: 0; }
|
||||
.hideMenu{ display:none; }
|
||||
/*左侧导航*/
|
||||
.layui-layout-admin .layui-side{ left:-260px; }
|
||||
.site-mobile .layui-side{ left: 0; z-index:9999; }
|
||||
.site-tree-mobile {display: block!important; position: fixed; z-index: 100000; bottom: 15px; left: 15px; width: 50px; height: 50px; line-height: 50px; border-radius: 2px; text-align: center; background-color: rgba(0,0,0,.7); color: #fff;}
|
||||
.site-mobile .site-mobile-shade { content: ''; position: fixed; top: 0; bottom: 0; left: 0; right: 0; background-color: rgba(0,0,0,.8); z-index: 999;}
|
||||
|
||||
/*layui-body*/
|
||||
.panel{ width:50%; }
|
||||
|
||||
.layui-body,.layui-layout-admin .layui-footer{ left:0; }
|
||||
}
|
||||
@media screen and (max-width:432px){
|
||||
.top_menu .layui-nav-item.showNotice[pc]{ display:none !important; }
|
||||
.panel{ width:100%; }
|
||||
}
|
||||
/*公共样式*/
|
||||
.main_body{ min-width:320px; }
|
||||
.layui-elem-quote.title{ padding:10px 15px; margin-bottom:0; }
|
||||
.layui-tab-more{ position: relative; z-index: 99; background:#fff; }
|
||||
.layui-layer-tab .layui-layer-title span.layui-layer-tabnow{ height:42px !important; }
|
||||
.layui-layer-tab .layui-layer-title span{ min-width:45px !important; }
|
||||
.marg0{ margin:0; }
|
||||
/*模拟加载层图标样式*/
|
||||
.layui-layer-dialog .layui-layer-content .layui-layer-ico16{ background-size:100% 100% !important; }
|
||||
|
||||
/*样式改变的过渡*/
|
||||
.showMenu .layui-body,.showMenu .layui-footer,.showMenu.layui-layout-admin .layui-side,.logo,.top_menu .layui-nav-item[pc],.component,.top_menu .layui-nav-item[mobile],.layui-nav,.layui-layout-admin .layui-main,.site-mobile .layui-side,.layui-layout-admin .layui-side,.site-mobile .site-tree-mobile,.layui-body,.layui-layout-admin .layui-footer,.layui-layout-admin .layui-side,.panel,.panel .panel_icon i{ transition: all 0.3s ease-in-out;-webkit-transition: all 0.3s ease-in-out;-o-transition: all 0.3s ease-in-out;-moz-transition: all 0.3s ease-in-out;-ms-transition: all 0.3s ease-in-out; }
|
||||
|
||||
|
||||
.showMenu.layui-layout-admin .layui-side{ left:-200px; }
|
||||
.showMenu .layui-body,.showMenu .layui-footer{ left:0; }
|
||||
.layui-layout-admin .layui-main{ margin:0; }
|
||||
.logo{ color: #fff; float: left; line-height:60px; font-size:20px; padding:0 25px; text-align: center; width:150px;}
|
||||
.hideMenu{ float:left; width:20px; height:20px; margin:15px 15px 0 0; font-size:17px; text-align:center; padding:5px 5px; color:#fff; background-color:#1AA094; }
|
||||
.hideMenu:hover{ color:#fff; }
|
||||
.weather{ color:#fff; float:left; margin:15px 0 0 50px;}
|
||||
.component{ float: left; width:200px; height:30px; margin-top: 15px; position: relative;}
|
||||
.component .layui-input{ height:30px; line-height: 30px; font-size:12px; border:none; transition: all 0.3s; }
|
||||
.component .layui-input:focus{ background:#fff; color:#000; }
|
||||
.component .layui-form-select dl{ top:33px; background:#fff; }
|
||||
.component .layui-form-select .layui-edge,.top_menu .layui-nav-item[mobile]{ display:none; }
|
||||
.component .layui-icon{ position: absolute; right:8px; top:8px; color:#000; }
|
||||
|
||||
/*顶部右侧导航*/
|
||||
.layui-nav .layui-nav-item>a{ color:#fff; }
|
||||
.top_menu{ position:absolute; right:0; background:none }
|
||||
.top_menu.layui-nav .layui-this:after{ width:0px; }
|
||||
.top_menu.layui-nav .layui-this,.closeBox.layui-nav .layui-this{ background-color:transparent; }
|
||||
.top_menu.layui-nav .layui-this a,.closeBox.layui-nav .layui-this a{ color:#c2c2c2; }
|
||||
.top_menu.layui-nav dd.layui-this a,.closeBox.layui-nav dd.layui-this a{ color:#333; }
|
||||
.top_menu.layui-nav .layui-nav-child a:hover,.closeBox.layui-nav .layui-nav-child a:hover{ color:#fff; background-color:#5FB878; }
|
||||
.top_menu .iconfont{ font-size: 14px !important; }
|
||||
.top_menu .layui-nav-bar{ top:60px !important; background-color:rgba(0,0,0,0.7) }
|
||||
|
||||
/*左侧用户头像*/
|
||||
.layui-nav{ background-color:inherit !important; }
|
||||
.layui-layout-admin .layui-side{ left:0; }
|
||||
.user-photo{width: 200px; height: 120px; padding-top: 15px; padding-bottom: 5px;}
|
||||
.user-photo a.img{ display: block; width: 76px; height: 76px; margin: 0 auto; margin-bottom: 15px;}
|
||||
.user-photo a.img img{ display: block; border: none; width: 100%; height: 100%; border-radius: 50%; -webkit-border-radius: 50%; -moz-border-radius: 50%; border: 4px solid #44576b;}
|
||||
.user-photo p{ display: block; width: 100%; height: 25px; color: #ffffff; text-align: center; font-size: 12px; white-space: nowrap;line-height: 25px; overflow: hidden;}
|
||||
/*左侧导航重定义*/
|
||||
.layui-nav-item a cite{ padding:0 5px; }
|
||||
.layui-side-scroll{ height:auto; }
|
||||
.layui-nav-tree .layui-nav-child a{ padding-left: 40px; }
|
||||
.layui-nav-tree .layui-nav-child a:hover{ background-color:#4E5465; }
|
||||
.layui-nav-tree .layui-nav-child dd.layui-this a:hover{ background-color:#009688; }
|
||||
|
||||
/*右侧body*/
|
||||
#top_tabs_box{ padding-right:138px; height:40px; border-bottom:1px solid #e2e2e2; }
|
||||
#top_tabs{ position: absolute; border-bottom:none;}
|
||||
/*多窗口页面操作下拉*/
|
||||
.closeBox{ position:absolute; right:0; background-color:#fff !important; color:#000; border-left:1px solid #e2e2e2; border-bottom:1px solid #e2e2e2; }
|
||||
.closeBox .layui-nav-item{ line-height:40px; }
|
||||
.closeBox .layui-nav-item a,.closeBox .layui-nav-item a:hover{ color:#000; }
|
||||
.closeBox .layui-nav-more{ top:17px; }
|
||||
.closeBox .layui-nav-mored{ top:11px; }
|
||||
.closeBox .layui-nav-child{ top:42px; left:-12px; }
|
||||
.closeBox .layui-nav-bar{ display:none; }
|
||||
.closeBox .icon-caozuo{ font-size: 20px; position:absolute; top:1px; left:-2px; }
|
||||
|
||||
.layui-body{overflow:hidden; border-top:5px solid #1AA094;border-left:2px solid #1AA094;}
|
||||
.layui-tab-content{ height:100%; padding:0; }
|
||||
.layui-tab-item{ position: absolute; top: 41px; bottom:0; left: 0; right: 0; padding: 0; margin: 0; -webkit-overflow-scrolling:touch; overflow:auto;}
|
||||
.layui-tab-title .layui-this{ background-color:#18A093;}
|
||||
.layui-tab-title .layui-this:after{ border:none; }
|
||||
.layui-tab-title li cite{ font-style: normal; padding-left:5px; }
|
||||
.layui-tab-card .layui-tab-title{background-color: #ffffff}
|
||||
.layui-tab-card .layui-tab-title .layui-this{background-color: #f2f2f2}
|
||||
.clildFrame.layui-tab-content{ padding-right: 0; }
|
||||
.clildFrame.layui-tab-content iframe{ width: 100%; height:100%; border:none; min-width: 320px; position:absolute; }
|
||||
/*main.html*/
|
||||
.row,.col,.panel_word,.panel_icon{ box-sizing:border-box; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; -o-box-sizing:border-box;}
|
||||
.row{ margin-left:-10px; overflow:hidden;display: flex; flex-wrap: wrap;}
|
||||
.col{ padding-left:10px;}
|
||||
.panel{float: left; text-align: center; width:16.666%; min-width:210px; margin-bottom: 10px;}
|
||||
.panel_box a{display:block; background-color:#f2f2f2; border-radius:5px; overflow:hidden; }
|
||||
.panel_icon{ width:40%; display: inline-block; padding:22px 0; background-color:#54ade8;float:left;}
|
||||
.panel_icon i{ font-size:3em; color:#fff;}
|
||||
.panel a:hover .panel_icon i{ display:inline-block; transform:rotate(360deg); -webkit-transform:rotate(360deg); -moz-transform:rotate(360deg); -o-transform:rotate(360deg); -ms-transform:rotate(360deg);}
|
||||
.panel_word{ width:60%; display: inline-block; float:right; margin-top: 22px; }
|
||||
.panel_word span{ font-size:25px; display:block; height:30px; line-height:30px; }
|
||||
.allNews em{ font-style:normal; font-size:16px;display: block; }
|
||||
.panel_box a .allNews cite{ display:none; }
|
||||
.panel_box a cite{ font-size:16px; display: block; font-style:normal; }
|
||||
.sysNotice{ width:50%; float: left; }
|
||||
.sysNotice .layui-elem-quote{ line-height:26px; position: relative;}
|
||||
.sysNotice .layui-table{ margin-top:0; border-left:5px solid #e2e2e2; }
|
||||
.sysNotice .title .icon-new1{ position: absolute; top:8px; margin-left: 10px; color:#f00; font-size:25px; }
|
||||
.explain .layui-btn{ margin:5px 5px 5px 0; }
|
||||
|
||||
/*打开页面动画*/
|
||||
.layui-tab-item.layui-show{ animation:moveTop 1s; -webkit-animation:moveTop 1s; animation-fill-mode:both; -webkit-animation-fill-mode:both; }
|
||||
@keyframes moveTop{
|
||||
0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);}
|
||||
100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);}
|
||||
}
|
||||
@-o-keyframes moveTop{
|
||||
0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);}
|
||||
100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);}
|
||||
}
|
||||
@-moz-keyframes moveTop{
|
||||
0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);}
|
||||
100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);}
|
||||
}
|
||||
@-webkit-keyframes moveTop{
|
||||
0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);}
|
||||
100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);}
|
||||
}
|
||||
|
||||
/*锁屏*/
|
||||
.admin-header-lock{width: 320px; height: 170px; padding: 20px; position: relative; text-align: center;}
|
||||
.admin-header-lock-img{width: 60px; height: 60px; margin: 0 auto;}
|
||||
.admin-header-lock-img img{width: 60px; height: 60px; border-radius: 100%;}
|
||||
.admin-header-lock-name{color: #009688;margin: 8px 0 15px 0;}
|
||||
.input_btn{ overflow: hidden; margin-bottom: 10px; }
|
||||
.admin-header-lock-input{width: 170px; color: #fff;background-color: #009688; float: left; margin:0 10px 0 40px; border:none;}
|
||||
.admin-header-lock-input::-webkit-input-placeholder {color:#fff;}
|
||||
.admin-header-lock-input::-moz-placeholder {color:#fff;}
|
||||
.admin-header-lock-input::-ms-input-placeholder {color:#fff;}
|
||||
.admin-header-lock-input:-moz-placeholder {color:#fff;}
|
||||
#unlock{ float: left; }
|
||||
#lock-box p{ color:#e60000; }
|
||||
|
||||
/*换肤*/
|
||||
.skins_box{ padding:10px 34px 0; }
|
||||
.skinBtn{ text-align:right; }
|
||||
/*橙色*/
|
||||
.orange .layui-layout-admin .layui-header{ background-color:orange!important; }
|
||||
.orange .layui-bg-black{ background-color:#e47214!important; }
|
||||
/*蓝色*/
|
||||
.blue .layui-layout-admin .layui-header{ background-color:#3396d8!important; }
|
||||
.blue .layui-bg-black,.blue .hideMenu{ background-color:#146aa2!important; }
|
||||
/*藏青*/
|
||||
.cyan .layui-layout-admin .layui-header{ background-color:#2F4056!important; }
|
||||
.cyan .layui-bg-black, .cyan .hideMenu{ background-color:#2F4056!important; }
|
||||
|
||||
/*自定义*/
|
||||
.skinCustom{ visibility:hidden; }
|
||||
.skinCustom input{ width:48%; margin:5px 2% 5px 0; float:left; }
|
||||
|
||||
.orange .layui-nav-tree .layui-nav-child a,.blue .layui-nav-tree .layui-nav-child a{ color:#fff; }
|
||||
.orange .top_menu.layui-nav .layui-nav-more,.blue .top_menu.layui-nav .layui-nav-more{border-color:#fff transparent transparent !important;}
|
||||
.orange .top_menu.layui-nav-itemed .layui-nav-more,.orange .top_menu.layui-nav .layui-nav-mored,.blue .top_menu.layui-nav-itemed .layui-nav-more,.blue .top_menu.layui-nav .layui-nav-mored{border-color:transparent transparent #fff !important;}
|
||||
|
||||
/*底部*/
|
||||
.footer{ text-align: center; line-height:44px;border-left: 2px solid #1AA094;}
|
||||
|
||||
|
||||
/*响应式*/
|
||||
@media screen and (max-width:1282px){
|
||||
.panel{ width:33.3333%; }
|
||||
}
|
||||
@media screen and (max-width:1050px){
|
||||
.layui-nav.top_menu .layui-nav-item a{ padding:0 10px; }
|
||||
/*天气信息*/
|
||||
.weather[pc]{ display: none !important; }
|
||||
.sysNotice{ width:100%; }
|
||||
.component{ width:165px; }
|
||||
}
|
||||
@media screen and (max-width: 750px){
|
||||
.logo{ padding:0;}
|
||||
.top_menu .layui-nav-item[pc],.component,.site-mobile .site-tree-mobile{ display: none !important; }
|
||||
.top_menu .layui-nav-item.showNotice[pc]{ display:inline-block !important; }
|
||||
.top_menu .layui-nav-item[mobile]{ display:inline-block; }
|
||||
.layui-nav.top_menu,.layui-nav.top_menu .layui-nav-item a{ padding:0 10px; }
|
||||
.layui-layout-admin .layui-main{ margin-right: 0; }
|
||||
.hideMenu{ display:none; }
|
||||
/*左侧导航*/
|
||||
.layui-layout-admin .layui-side{ left:-260px; }
|
||||
.site-mobile .layui-side{ left: 0; z-index:9999; }
|
||||
.site-tree-mobile {display: block!important; position: fixed; z-index: 100000; bottom: 15px; left: 15px; width: 50px; height: 50px; line-height: 50px; border-radius: 2px; text-align: center; background-color: rgba(0,0,0,.7); color: #fff;}
|
||||
.site-mobile .site-mobile-shade { content: ''; position: fixed; top: 0; bottom: 0; left: 0; right: 0; background-color: rgba(0,0,0,.8); z-index: 999;}
|
||||
|
||||
/*layui-body*/
|
||||
.panel{ width:50%; }
|
||||
|
||||
.layui-body,.layui-layout-admin .layui-footer{ left:0; }
|
||||
}
|
||||
@media screen and (max-width:432px){
|
||||
.top_menu .layui-nav-item.showNotice[pc]{ display:none !important; }
|
||||
.panel{ width:100%; }
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
.selectMsg{ width:110px; margin-right: 15px; }
|
||||
|
||||
.msg_info,.msg_time,.msg_reply,.msg_opr{min-height:50px; text-align:center;}
|
||||
.msg_info{text-align:left; position: relative; }
|
||||
.msg_info>img{ position: absolute; left:10px; top:10px; cursor:pointer; }
|
||||
.msg_info .user_info{ padding-left:55px; line-height:25px; }
|
||||
.msg_info .user_info h2{ color:#222; cursor:pointer; }
|
||||
.msg_info .user_info h2:hover{ color:#1AA094;}
|
||||
.msg_info .user_info p{ color:#8d8d8d; }
|
||||
.msg_reply{ color:#e15f63; }
|
||||
|
||||
/*回复*/
|
||||
.replay_edit{ overflow: hidden; margin-bottom:20px; }
|
||||
.selectMsg{ width:110px; margin-right: 15px; }
|
||||
|
||||
.msg_info,.msg_time,.msg_reply,.msg_opr{min-height:50px; text-align:center;}
|
||||
.msg_info{text-align:left; position: relative; }
|
||||
.msg_info>img{ position: absolute; left:10px; top:10px; cursor:pointer; }
|
||||
.msg_info .user_info{ padding-left:55px; line-height:25px; }
|
||||
.msg_info .user_info h2{ color:#222; cursor:pointer; }
|
||||
.msg_info .user_info h2:hover{ color:#1AA094;}
|
||||
.msg_info .user_info p{ color:#8d8d8d; }
|
||||
.msg_reply{ color:#e15f63; }
|
||||
|
||||
/*回复*/
|
||||
.replay_edit{ overflow: hidden; margin-bottom:20px; }
|
||||
.replay_edit a{margin-top: 10px; width:100px; float:right;}
|
||||
@@ -1,6 +1,6 @@
|
||||
.news_search{ padding:10px 10px; }
|
||||
.layui-table,.layui-table th{ text-align:center; }
|
||||
.news_list .layui-form-switch{ margin-top:0; }
|
||||
|
||||
/*分页*/
|
||||
.news_search{ padding:10px 10px; }
|
||||
.layui-table,.layui-table th{ text-align:center; }
|
||||
.news_list .layui-form-switch{ margin-top:0; }
|
||||
|
||||
/*分页*/
|
||||
#page{ text-align:right; }
|
||||
@@ -1,24 +1,24 @@
|
||||
form input.layui-input[disabled]{ background:#f2f2f2; color:#595963!important; }
|
||||
.user_left{ width:45%; float: left; margin:20px 0 0 5%; }
|
||||
.user_right{ width:25%; float: left; margin:20px 0 0 5%; text-align: center; }
|
||||
.user_right p{ margin:10px 0 25px; font-size: 12px; text-align: center; color: #FF5722;}
|
||||
.user_right img#userFace{ width:200px; height:200px; }
|
||||
.layui-table,.layui-table th{ text-align:center; }
|
||||
.userAddress.layui-form-item .layui-input-inline{ width:23%; }
|
||||
.userAddress.layui-form-item .layui-input-inline:last-child{ margin-right:0; }
|
||||
/*用户列表*/
|
||||
#page{ text-align:right; }
|
||||
|
||||
/*修改密码*/
|
||||
.changePwd{ width:30%; margin:3% 0 0 5%; }
|
||||
|
||||
|
||||
/*适配*/
|
||||
@media screen and (max-width:1050px){
|
||||
/*用户信息*/
|
||||
.user_left,.user_right,.changePwd{ width:100%; float:none; margin-left: 0; }
|
||||
.user_right{ margin-bottom: 20px; }
|
||||
}
|
||||
@media screen and (max-width:450px){
|
||||
.userAddress.layui-form-item .layui-input-inline{ width:auto; }
|
||||
form input.layui-input[disabled]{ background:#f2f2f2; color:#595963!important; }
|
||||
.user_left{ width:45%; float: left; margin:20px 0 0 5%; }
|
||||
.user_right{ width:25%; float: left; margin:20px 0 0 5%; text-align: center; }
|
||||
.user_right p{ margin:10px 0 25px; font-size: 12px; text-align: center; color: #FF5722;}
|
||||
.user_right img#userFace{ width:200px; height:200px; }
|
||||
.layui-table,.layui-table th{ text-align:center; }
|
||||
.userAddress.layui-form-item .layui-input-inline{ width:23%; }
|
||||
.userAddress.layui-form-item .layui-input-inline:last-child{ margin-right:0; }
|
||||
/*用户列表*/
|
||||
#page{ text-align:right; }
|
||||
|
||||
/*修改密码*/
|
||||
.changePwd{ width:30%; margin:3% 0 0 5%; }
|
||||
|
||||
|
||||
/*适配*/
|
||||
@media screen and (max-width:1050px){
|
||||
/*用户信息*/
|
||||
.user_left,.user_right,.changePwd{ width:100%; float:none; margin-left: 0; }
|
||||
.user_right{ margin-bottom: 20px; }
|
||||
}
|
||||
@media screen and (max-width:450px){
|
||||
.userAddress.layui-form-item .layui-input-inline{ width:auto; }
|
||||
}
|
||||
@@ -1,266 +1,266 @@
|
||||
/*
|
||||
@Author: 请叫我马哥
|
||||
@Time: 2017-04
|
||||
@Tittle: tab
|
||||
@Description: 点击对应按钮添加新窗口
|
||||
*/
|
||||
var tabFilter,menu=[],liIndex,curNav,delMenu;
|
||||
layui.define(["element","jquery"],function(exports){
|
||||
var element = layui.element,
|
||||
$ = layui.jquery,
|
||||
layId,
|
||||
Tab = function(){
|
||||
this.tabConfig = {
|
||||
closed : true,
|
||||
openTabNum : undefined, //最大可打开窗口数量
|
||||
tabFilter : "bodyTab", //添加窗口的filter
|
||||
url : undefined //获取菜单json地址
|
||||
}
|
||||
};
|
||||
|
||||
//获取二级菜单数据
|
||||
Tab.prototype.render = function() {
|
||||
var url = this.tabConfig.url;
|
||||
$.get(url,function(data){
|
||||
//显示左侧菜单
|
||||
if($(".navBar").html() == ''){
|
||||
var _this = this;
|
||||
$(".navBar").html(navBar(data)).height($(window).height()-245);
|
||||
element.init(); //初始化页面元素
|
||||
$(window).resize(function(){
|
||||
$(".navBar").height($(window).height()-245);
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//参数设置
|
||||
Tab.prototype.set = function(option) {
|
||||
var _this = this;
|
||||
$.extend(true, _this.tabConfig, option);
|
||||
return _this;
|
||||
};
|
||||
|
||||
//通过title获取lay-id
|
||||
Tab.prototype.getLayId = function(title){
|
||||
$(".layui-tab-title.top_tab li").each(function(){
|
||||
if($(this).find("cite").text() == title){
|
||||
layId = $(this).attr("lay-id");
|
||||
}
|
||||
})
|
||||
return layId;
|
||||
}
|
||||
//通过title判断tab是否存在
|
||||
Tab.prototype.hasTab = function(title){
|
||||
var tabIndex = -1;
|
||||
$(".layui-tab-title.top_tab li").each(function(){
|
||||
if($(this).find("cite").text() == title){
|
||||
tabIndex = 1;
|
||||
}
|
||||
})
|
||||
return tabIndex;
|
||||
}
|
||||
|
||||
//右侧内容tab操作
|
||||
var tabIdIndex = 0;
|
||||
Tab.prototype.tabAdd = function(_this){
|
||||
if(window.sessionStorage.getItem("menu")){
|
||||
menu = JSON.parse(window.sessionStorage.getItem("menu"));
|
||||
}
|
||||
var that = this;
|
||||
var closed = that.tabConfig.closed,
|
||||
openTabNum = that.tabConfig.openTabNum;
|
||||
tabFilter = that.tabConfig.tabFilter;
|
||||
if(_this.attr("target") == "_blank"){
|
||||
window.location.href = _this.attr("data-url");
|
||||
}else{
|
||||
var title = '';
|
||||
if(_this.find("i.iconfont,i.layui-icon").attr("data-icon") != undefined){
|
||||
if(_this.find("i.iconfont").attr("data-icon") != undefined){
|
||||
title += '<i class="iconfont '+_this.find("i.iconfont").attr("data-icon")+'"></i>';
|
||||
}else{
|
||||
title += '<i class="layui-icon">'+_this.find("i.layui-icon").attr("data-icon")+'</i>';
|
||||
}
|
||||
}
|
||||
//已打开的窗口中不存在
|
||||
if(that.hasTab(_this.find("cite").text()) == -1 && _this.siblings("dl.layui-nav-child").length == 0 && _this.attr("data-url")){
|
||||
if($(".layui-tab-title.top_tab li").length == openTabNum){
|
||||
layer.msg('只能同时打开'+openTabNum+'个选项卡哦。不然系统会卡的!');
|
||||
return;
|
||||
}
|
||||
tabIdIndex++;
|
||||
title += '<cite>'+_this.find("cite").text()+'</cite>';
|
||||
title += '<i class="layui-icon layui-unselect layui-tab-close" data-id="'+tabIdIndex+'">ဆ</i>';
|
||||
element.tabAdd(tabFilter, {
|
||||
title : title,
|
||||
content :"<iframe src='"+_this.attr("data-url")+"' data-id='"+tabIdIndex+"'></frame>",
|
||||
id : new Date().getTime()
|
||||
})
|
||||
//当前窗口内容
|
||||
var curmenu = {
|
||||
"icon" : _this.find("i.iconfont").attr("data-icon")!=undefined ? _this.find("i.iconfont").attr("data-icon") : _this.find("i.layui-icon").attr("data-icon"),
|
||||
"title" : _this.find("cite").text(),
|
||||
"href" : _this.attr("data-url"),
|
||||
"layId" : new Date().getTime()
|
||||
}
|
||||
menu.push(curmenu);
|
||||
window.sessionStorage.setItem("menu",JSON.stringify(menu)); //打开的窗口
|
||||
window.sessionStorage.setItem("curmenu",JSON.stringify(curmenu)); //当前的窗口
|
||||
element.tabChange(tabFilter, that.getLayId(_this.find("cite").text()));
|
||||
that.tabMove(); //顶部窗口是否可滚动
|
||||
}else{
|
||||
//当前窗口内容
|
||||
var curmenu = {
|
||||
"icon" : _this.find("i.iconfont").attr("data-icon")!=undefined ? _this.find("i.iconfont").attr("data-icon") : _this.find("i.layui-icon").attr("data-icon"),
|
||||
"title" : _this.find("cite").text(),
|
||||
"href" : _this.attr("data-url")
|
||||
}
|
||||
window.sessionStorage.setItem("curmenu",JSON.stringify(curmenu)); //当前的窗口
|
||||
element.tabChange(tabFilter, that.getLayId(_this.find("cite").text()));
|
||||
that.tabMove(); //顶部窗口是否可滚动
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//顶部窗口移动
|
||||
Tab.prototype.tabMove = function(){
|
||||
$(window).on("resize",function(){
|
||||
var topTabsBox = $("#top_tabs_box"),
|
||||
topTabsBoxWidth = $("#top_tabs_box").width(),
|
||||
topTabs = $("#top_tabs"),
|
||||
topTabsWidth = $("#top_tabs").width(),
|
||||
tabLi = topTabs.find("li.layui-this"),
|
||||
top_tabs = document.getElementById("top_tabs");;
|
||||
|
||||
if(topTabsWidth > topTabsBoxWidth){
|
||||
if(tabLi.position().left > topTabsBoxWidth || tabLi.position().left+topTabsBoxWidth > topTabsWidth){
|
||||
topTabs.css("left",topTabsBoxWidth-topTabsWidth);
|
||||
}else{
|
||||
topTabs.css("left",-tabLi.position().left);
|
||||
}
|
||||
//拖动效果
|
||||
var flag = false;
|
||||
var cur = {
|
||||
x:0,
|
||||
y:0
|
||||
}
|
||||
var nx,dx,x ;
|
||||
function down(){
|
||||
flag = true;
|
||||
var touch ;
|
||||
if(event.touches){
|
||||
touch = event.touches[0];
|
||||
}else {
|
||||
touch = event;
|
||||
}
|
||||
cur.x = touch.clientX;
|
||||
dx = top_tabs.offsetLeft;
|
||||
}
|
||||
function move(){
|
||||
var self=this;
|
||||
window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
|
||||
if(flag){
|
||||
var touch ;
|
||||
if(event.touches){
|
||||
touch = event.touches[0];
|
||||
}else {
|
||||
touch = event;
|
||||
}
|
||||
nx = touch.clientX - cur.x;
|
||||
x = dx+nx;
|
||||
if(x > 0){
|
||||
x = 0;
|
||||
}else{
|
||||
if(x < topTabsBoxWidth-topTabsWidth){
|
||||
x = topTabsBoxWidth-topTabsWidth;
|
||||
}else{
|
||||
x = dx+nx;
|
||||
}
|
||||
}
|
||||
top_tabs.style.left = x +"px";
|
||||
//阻止页面的滑动默认事件
|
||||
document.addEventListener("touchmove",function(){
|
||||
event.preventDefault();
|
||||
},false);
|
||||
}
|
||||
}
|
||||
//鼠标释放时候的函数
|
||||
function end(){
|
||||
flag = false;
|
||||
}
|
||||
//pc端拖动效果
|
||||
topTabs.on("mousedown",down);
|
||||
topTabs.on("mousemove",move);
|
||||
$(document).on("mouseup",end);
|
||||
//移动端拖动效果
|
||||
topTabs.on("touchstart",down);
|
||||
topTabs.on("touchmove",move);
|
||||
topTabs.on("touchend",end);
|
||||
}else{
|
||||
//移除pc端拖动效果
|
||||
topTabs.off("mousedown",down);
|
||||
topTabs.off("mousemove",move);
|
||||
topTabs.off("mouseup",end);
|
||||
//移除移动端拖动效果
|
||||
topTabs.off("touchstart",down);
|
||||
topTabs.off("touchmove",move);
|
||||
topTabs.off("touchend",end);
|
||||
topTabs.removeAttr("style");
|
||||
return false;
|
||||
}
|
||||
}).resize();
|
||||
}
|
||||
|
||||
$("body").on("click",".top_tab li",function(){
|
||||
//切换后获取当前窗口的内容
|
||||
var curmenu = '';
|
||||
var menu = JSON.parse(window.sessionStorage.getItem("menu"));
|
||||
curmenu = menu[$(this).index()-1];
|
||||
if($(this).index() == 0){
|
||||
window.sessionStorage.setItem("curmenu",'');
|
||||
}else{
|
||||
window.sessionStorage.setItem("curmenu",JSON.stringify(curmenu));
|
||||
if(window.sessionStorage.getItem("curmenu") == "undefined"){
|
||||
//如果删除的不是当前选中的tab,则将curmenu设置成当前选中的tab
|
||||
if(curNav != JSON.stringify(delMenu)){
|
||||
window.sessionStorage.setItem("curmenu",curNav);
|
||||
}else{
|
||||
window.sessionStorage.setItem("curmenu",JSON.stringify(menu[liIndex-1]));
|
||||
}
|
||||
}
|
||||
}
|
||||
element.tabChange(tabFilter,$(this).attr("lay-id")).init();
|
||||
// new Tab().tabMove();
|
||||
})
|
||||
|
||||
//删除tab
|
||||
$("body").on("click",".top_tab li i.layui-tab-close",function(){
|
||||
//删除tab后重置session中的menu和curmenu
|
||||
liIndex = $(this).parent("li").index();
|
||||
var menu = JSON.parse(window.sessionStorage.getItem("menu"));
|
||||
//获取被删除元素
|
||||
delMenu = menu[liIndex-1];
|
||||
var curmenu = window.sessionStorage.getItem("curmenu")=="undefined" ? undefined : window.sessionStorage.getItem("curmenu")=="" ? '' : JSON.parse(window.sessionStorage.getItem("curmenu"));
|
||||
if(JSON.stringify(curmenu) != JSON.stringify(menu[liIndex-1])){ //如果删除的不是当前选中的tab
|
||||
// window.sessionStorage.setItem("curmenu",JSON.stringify(curmenu));
|
||||
curNav = JSON.stringify(curmenu);
|
||||
}else{
|
||||
if($(this).parent("li").length > liIndex){
|
||||
window.sessionStorage.setItem("curmenu",curmenu);
|
||||
curNav = curmenu;
|
||||
}else{
|
||||
window.sessionStorage.setItem("curmenu",JSON.stringify(menu[liIndex-1]));
|
||||
curNav = JSON.stringify(menu[liIndex-1]);
|
||||
}
|
||||
}
|
||||
menu.splice((liIndex-1), 1);
|
||||
window.sessionStorage.setItem("menu",JSON.stringify(menu));
|
||||
element.tabDelete("bodyTab",$(this).parent("li").attr("lay-id")).init();
|
||||
new Tab().tabMove();
|
||||
})
|
||||
|
||||
var bodyTab = new Tab();
|
||||
exports("bodyTab",function(option){
|
||||
return bodyTab.set(option);
|
||||
});
|
||||
/*
|
||||
@Author: 请叫我马哥
|
||||
@Time: 2017-04
|
||||
@Tittle: tab
|
||||
@Description: 点击对应按钮添加新窗口
|
||||
*/
|
||||
var tabFilter,menu=[],liIndex,curNav,delMenu;
|
||||
layui.define(["element","jquery"],function(exports){
|
||||
var element = layui.element,
|
||||
$ = layui.jquery,
|
||||
layId,
|
||||
Tab = function(){
|
||||
this.tabConfig = {
|
||||
closed : true,
|
||||
openTabNum : undefined, //最大可打开窗口数量
|
||||
tabFilter : "bodyTab", //添加窗口的filter
|
||||
url : undefined //获取菜单json地址
|
||||
}
|
||||
};
|
||||
|
||||
//获取二级菜单数据
|
||||
Tab.prototype.render = function() {
|
||||
var url = this.tabConfig.url;
|
||||
$.get(url,function(data){
|
||||
//显示左侧菜单
|
||||
if($(".navBar").html() == ''){
|
||||
var _this = this;
|
||||
$(".navBar").html(navBar(data)).height($(window).height()-245);
|
||||
element.init(); //初始化页面元素
|
||||
$(window).resize(function(){
|
||||
$(".navBar").height($(window).height()-245);
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//参数设置
|
||||
Tab.prototype.set = function(option) {
|
||||
var _this = this;
|
||||
$.extend(true, _this.tabConfig, option);
|
||||
return _this;
|
||||
};
|
||||
|
||||
//通过title获取lay-id
|
||||
Tab.prototype.getLayId = function(title){
|
||||
$(".layui-tab-title.top_tab li").each(function(){
|
||||
if($(this).find("cite").text() == title){
|
||||
layId = $(this).attr("lay-id");
|
||||
}
|
||||
})
|
||||
return layId;
|
||||
}
|
||||
//通过title判断tab是否存在
|
||||
Tab.prototype.hasTab = function(title){
|
||||
var tabIndex = -1;
|
||||
$(".layui-tab-title.top_tab li").each(function(){
|
||||
if($(this).find("cite").text() == title){
|
||||
tabIndex = 1;
|
||||
}
|
||||
})
|
||||
return tabIndex;
|
||||
}
|
||||
|
||||
//右侧内容tab操作
|
||||
var tabIdIndex = 0;
|
||||
Tab.prototype.tabAdd = function(_this){
|
||||
if(window.sessionStorage.getItem("menu")){
|
||||
menu = JSON.parse(window.sessionStorage.getItem("menu"));
|
||||
}
|
||||
var that = this;
|
||||
var closed = that.tabConfig.closed,
|
||||
openTabNum = that.tabConfig.openTabNum;
|
||||
tabFilter = that.tabConfig.tabFilter;
|
||||
if(_this.attr("target") == "_blank"){
|
||||
window.location.href = _this.attr("data-url");
|
||||
}else{
|
||||
var title = '';
|
||||
if(_this.find("i.iconfont,i.layui-icon").attr("data-icon") != undefined){
|
||||
if(_this.find("i.iconfont").attr("data-icon") != undefined){
|
||||
title += '<i class="iconfont '+_this.find("i.iconfont").attr("data-icon")+'"></i>';
|
||||
}else{
|
||||
title += '<i class="layui-icon">'+_this.find("i.layui-icon").attr("data-icon")+'</i>';
|
||||
}
|
||||
}
|
||||
//已打开的窗口中不存在
|
||||
if(that.hasTab(_this.find("cite").text()) == -1 && _this.siblings("dl.layui-nav-child").length == 0 && _this.attr("data-url")){
|
||||
if($(".layui-tab-title.top_tab li").length == openTabNum){
|
||||
layer.msg('只能同时打开'+openTabNum+'个选项卡哦。不然系统会卡的!');
|
||||
return;
|
||||
}
|
||||
tabIdIndex++;
|
||||
title += '<cite>'+_this.find("cite").text()+'</cite>';
|
||||
title += '<i class="layui-icon layui-unselect layui-tab-close" data-id="'+tabIdIndex+'">ဆ</i>';
|
||||
element.tabAdd(tabFilter, {
|
||||
title : title,
|
||||
content :"<iframe src='"+_this.attr("data-url")+"' data-id='"+tabIdIndex+"'></frame>",
|
||||
id : new Date().getTime()
|
||||
})
|
||||
//当前窗口内容
|
||||
var curmenu = {
|
||||
"icon" : _this.find("i.iconfont").attr("data-icon")!=undefined ? _this.find("i.iconfont").attr("data-icon") : _this.find("i.layui-icon").attr("data-icon"),
|
||||
"title" : _this.find("cite").text(),
|
||||
"href" : _this.attr("data-url"),
|
||||
"layId" : new Date().getTime()
|
||||
}
|
||||
menu.push(curmenu);
|
||||
window.sessionStorage.setItem("menu",JSON.stringify(menu)); //打开的窗口
|
||||
window.sessionStorage.setItem("curmenu",JSON.stringify(curmenu)); //当前的窗口
|
||||
element.tabChange(tabFilter, that.getLayId(_this.find("cite").text()));
|
||||
that.tabMove(); //顶部窗口是否可滚动
|
||||
}else{
|
||||
//当前窗口内容
|
||||
var curmenu = {
|
||||
"icon" : _this.find("i.iconfont").attr("data-icon")!=undefined ? _this.find("i.iconfont").attr("data-icon") : _this.find("i.layui-icon").attr("data-icon"),
|
||||
"title" : _this.find("cite").text(),
|
||||
"href" : _this.attr("data-url")
|
||||
}
|
||||
window.sessionStorage.setItem("curmenu",JSON.stringify(curmenu)); //当前的窗口
|
||||
element.tabChange(tabFilter, that.getLayId(_this.find("cite").text()));
|
||||
that.tabMove(); //顶部窗口是否可滚动
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//顶部窗口移动
|
||||
Tab.prototype.tabMove = function(){
|
||||
$(window).on("resize",function(){
|
||||
var topTabsBox = $("#top_tabs_box"),
|
||||
topTabsBoxWidth = $("#top_tabs_box").width(),
|
||||
topTabs = $("#top_tabs"),
|
||||
topTabsWidth = $("#top_tabs").width(),
|
||||
tabLi = topTabs.find("li.layui-this"),
|
||||
top_tabs = document.getElementById("top_tabs");;
|
||||
|
||||
if(topTabsWidth > topTabsBoxWidth){
|
||||
if(tabLi.position().left > topTabsBoxWidth || tabLi.position().left+topTabsBoxWidth > topTabsWidth){
|
||||
topTabs.css("left",topTabsBoxWidth-topTabsWidth);
|
||||
}else{
|
||||
topTabs.css("left",-tabLi.position().left);
|
||||
}
|
||||
//拖动效果
|
||||
var flag = false;
|
||||
var cur = {
|
||||
x:0,
|
||||
y:0
|
||||
}
|
||||
var nx,dx,x ;
|
||||
function down(){
|
||||
flag = true;
|
||||
var touch ;
|
||||
if(event.touches){
|
||||
touch = event.touches[0];
|
||||
}else {
|
||||
touch = event;
|
||||
}
|
||||
cur.x = touch.clientX;
|
||||
dx = top_tabs.offsetLeft;
|
||||
}
|
||||
function move(){
|
||||
var self=this;
|
||||
window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
|
||||
if(flag){
|
||||
var touch ;
|
||||
if(event.touches){
|
||||
touch = event.touches[0];
|
||||
}else {
|
||||
touch = event;
|
||||
}
|
||||
nx = touch.clientX - cur.x;
|
||||
x = dx+nx;
|
||||
if(x > 0){
|
||||
x = 0;
|
||||
}else{
|
||||
if(x < topTabsBoxWidth-topTabsWidth){
|
||||
x = topTabsBoxWidth-topTabsWidth;
|
||||
}else{
|
||||
x = dx+nx;
|
||||
}
|
||||
}
|
||||
top_tabs.style.left = x +"px";
|
||||
//阻止页面的滑动默认事件
|
||||
document.addEventListener("touchmove",function(){
|
||||
event.preventDefault();
|
||||
},false);
|
||||
}
|
||||
}
|
||||
//鼠标释放时候的函数
|
||||
function end(){
|
||||
flag = false;
|
||||
}
|
||||
//pc端拖动效果
|
||||
topTabs.on("mousedown",down);
|
||||
topTabs.on("mousemove",move);
|
||||
$(document).on("mouseup",end);
|
||||
//移动端拖动效果
|
||||
topTabs.on("touchstart",down);
|
||||
topTabs.on("touchmove",move);
|
||||
topTabs.on("touchend",end);
|
||||
}else{
|
||||
//移除pc端拖动效果
|
||||
topTabs.off("mousedown",down);
|
||||
topTabs.off("mousemove",move);
|
||||
topTabs.off("mouseup",end);
|
||||
//移除移动端拖动效果
|
||||
topTabs.off("touchstart",down);
|
||||
topTabs.off("touchmove",move);
|
||||
topTabs.off("touchend",end);
|
||||
topTabs.removeAttr("style");
|
||||
return false;
|
||||
}
|
||||
}).resize();
|
||||
}
|
||||
|
||||
$("body").on("click",".top_tab li",function(){
|
||||
//切换后获取当前窗口的内容
|
||||
var curmenu = '';
|
||||
var menu = JSON.parse(window.sessionStorage.getItem("menu"));
|
||||
curmenu = menu[$(this).index()-1];
|
||||
if($(this).index() == 0){
|
||||
window.sessionStorage.setItem("curmenu",'');
|
||||
}else{
|
||||
window.sessionStorage.setItem("curmenu",JSON.stringify(curmenu));
|
||||
if(window.sessionStorage.getItem("curmenu") == "undefined"){
|
||||
//如果删除的不是当前选中的tab,则将curmenu设置成当前选中的tab
|
||||
if(curNav != JSON.stringify(delMenu)){
|
||||
window.sessionStorage.setItem("curmenu",curNav);
|
||||
}else{
|
||||
window.sessionStorage.setItem("curmenu",JSON.stringify(menu[liIndex-1]));
|
||||
}
|
||||
}
|
||||
}
|
||||
element.tabChange(tabFilter,$(this).attr("lay-id")).init();
|
||||
// new Tab().tabMove();
|
||||
})
|
||||
|
||||
//删除tab
|
||||
$("body").on("click",".top_tab li i.layui-tab-close",function(){
|
||||
//删除tab后重置session中的menu和curmenu
|
||||
liIndex = $(this).parent("li").index();
|
||||
var menu = JSON.parse(window.sessionStorage.getItem("menu"));
|
||||
//获取被删除元素
|
||||
delMenu = menu[liIndex-1];
|
||||
var curmenu = window.sessionStorage.getItem("curmenu")=="undefined" ? undefined : window.sessionStorage.getItem("curmenu")=="" ? '' : JSON.parse(window.sessionStorage.getItem("curmenu"));
|
||||
if(JSON.stringify(curmenu) != JSON.stringify(menu[liIndex-1])){ //如果删除的不是当前选中的tab
|
||||
// window.sessionStorage.setItem("curmenu",JSON.stringify(curmenu));
|
||||
curNav = JSON.stringify(curmenu);
|
||||
}else{
|
||||
if($(this).parent("li").length > liIndex){
|
||||
window.sessionStorage.setItem("curmenu",curmenu);
|
||||
curNav = curmenu;
|
||||
}else{
|
||||
window.sessionStorage.setItem("curmenu",JSON.stringify(menu[liIndex-1]));
|
||||
curNav = JSON.stringify(menu[liIndex-1]);
|
||||
}
|
||||
}
|
||||
menu.splice((liIndex-1), 1);
|
||||
window.sessionStorage.setItem("menu",JSON.stringify(menu));
|
||||
element.tabDelete("bodyTab",$(this).parent("li").attr("lay-id")).init();
|
||||
new Tab().tabMove();
|
||||
})
|
||||
|
||||
var bodyTab = new Tab();
|
||||
exports("bodyTab",function(option){
|
||||
return bodyTab.set(option);
|
||||
});
|
||||
})
|
||||
@@ -1,368 +1,368 @@
|
||||
var $,tab,skyconsWeather;
|
||||
layui.config({
|
||||
base : "/js/"
|
||||
}).use(['bodyTab','form','element','layer','jquery'],function(){
|
||||
var form = layui.form,
|
||||
layer = layui.layer,
|
||||
element = layui.element;
|
||||
$ = layui.jquery;
|
||||
tab = layui.bodyTab({
|
||||
openTabNum : "50", //最大可打开窗口数量
|
||||
url: "/Home/GetNavBar" //获取菜单json地址
|
||||
});
|
||||
|
||||
//更换皮肤
|
||||
function skins(){
|
||||
var skin = window.sessionStorage.getItem("skin");
|
||||
if(skin){ //如果更换过皮肤
|
||||
if(window.sessionStorage.getItem("skinValue") != "自定义"){
|
||||
$("body").addClass(window.sessionStorage.getItem("skin"));
|
||||
}else{
|
||||
$(".layui-layout-admin .layui-header").css("background-color",skin.split(',')[0]);
|
||||
$(".layui-bg-black").css("background-color",skin.split(',')[1]);
|
||||
$(".hideMenu").css("background-color",skin.split(',')[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
skins();
|
||||
$(".changeSkin").click(function(){
|
||||
layer.open({
|
||||
title : "更换皮肤",
|
||||
area : ["310px","280px"],
|
||||
type : "1",
|
||||
content : '<div class="skins_box">'+
|
||||
'<form class="layui-form">'+
|
||||
'<div class="layui-form-item">'+
|
||||
'<input type="radio" name="skin" value="默认" title="默认" lay-filter="default" checked="">'+
|
||||
'<input type="radio" name="skin" value="藏青" title="藏青" lay-filter="cyan">'+
|
||||
'<input type="radio" name="skin" value="蓝色" title="蓝色" lay-filter="blue">'+
|
||||
'<input type="radio" name="skin" value="自定义" title="自定义" lay-filter="custom">'+
|
||||
'<div class="skinCustom">'+
|
||||
'<input type="text" class="layui-input topColor" name="topSkin" placeholder="顶部颜色" />'+
|
||||
'<input type="text" class="layui-input leftColor" name="leftSkin" placeholder="左侧颜色" />'+
|
||||
'<input type="text" class="layui-input menuColor" name="btnSkin" placeholder="顶部菜单按钮" />'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div class="layui-form-item skinBtn">'+
|
||||
'<a href="javascript:;" class="layui-btn layui-btn-small layui-btn-normal" lay-submit="" lay-filter="changeSkin">确定更换</a>'+
|
||||
'<a href="javascript:;" class="layui-btn layui-btn-small layui-btn-primary" lay-submit="" lay-filter="noChangeSkin">我再想想</a>'+
|
||||
'</div>'+
|
||||
'</form>'+
|
||||
'</div>',
|
||||
success : function(index, layero){
|
||||
var skin = window.sessionStorage.getItem("skin");
|
||||
if(window.sessionStorage.getItem("skinValue")){
|
||||
$(".skins_box input[value="+window.sessionStorage.getItem("skinValue")+"]").attr("checked","checked");
|
||||
};
|
||||
if($(".skins_box input[value=自定义]").attr("checked")){
|
||||
$(".skinCustom").css("visibility","inherit");
|
||||
$(".topColor").val(skin.split(',')[0]);
|
||||
$(".leftColor").val(skin.split(',')[1]);
|
||||
$(".menuColor").val(skin.split(',')[2]);
|
||||
};
|
||||
form.render();
|
||||
$(".skins_box").removeClass("layui-hide");
|
||||
$(".skins_box .layui-form-radio").on("click",function(){
|
||||
var skinColor;
|
||||
if($(this).find("span").text() == "藏青"){
|
||||
skinColor = "cyan";
|
||||
}else if($(this).find("span").text() == "蓝色"){
|
||||
skinColor = "blue";
|
||||
}else if($(this).find("span").text() == "默认"){
|
||||
skinColor = "";
|
||||
}
|
||||
if($(this).find("span").text() != "自定义"){
|
||||
$(".topColor,.leftColor,.menuColor").val('');
|
||||
$("body").removeAttr("class").addClass("main_body "+skinColor+"");
|
||||
$(".skinCustom").removeAttr("style");
|
||||
$(".layui-bg-black,.hideMenu,.layui-layout-admin .layui-header").removeAttr("style");
|
||||
}else{
|
||||
$(".skinCustom").css("visibility","inherit");
|
||||
}
|
||||
})
|
||||
var skinStr,skinColor;
|
||||
$(".topColor").blur(function(){
|
||||
$(".layui-layout-admin .layui-header").css("background-color",$(this).val());
|
||||
})
|
||||
$(".leftColor").blur(function(){
|
||||
$(".layui-bg-black").css("background-color",$(this).val());
|
||||
})
|
||||
$(".menuColor").blur(function(){
|
||||
$(".hideMenu").css("background-color",$(this).val());
|
||||
})
|
||||
|
||||
form.on("submit(changeSkin)",function(data){
|
||||
if(data.field.skin != "自定义"){
|
||||
if(data.field.skin == "藏青"){
|
||||
skinColor = "cyan";
|
||||
}else if(data.field.skin == "蓝色"){
|
||||
skinColor = "blue";
|
||||
}else if(data.field.skin == "默认"){
|
||||
skinColor = "";
|
||||
}
|
||||
window.sessionStorage.setItem("skin",skinColor);
|
||||
}else{
|
||||
skinStr = $(".topColor").val()+','+$(".leftColor").val()+','+$(".menuColor").val();
|
||||
window.sessionStorage.setItem("skin",skinStr);
|
||||
$("body").removeAttr("class").addClass("main_body");
|
||||
}
|
||||
window.sessionStorage.setItem("skinValue",data.field.skin);
|
||||
layer.closeAll("page");
|
||||
});
|
||||
form.on("submit(noChangeSkin)",function(){
|
||||
$("body").removeAttr("class").addClass("main_body "+window.sessionStorage.getItem("skin")+"");
|
||||
$(".layui-bg-black,.hideMenu,.layui-layout-admin .layui-header").removeAttr("style");
|
||||
skins();
|
||||
layer.closeAll("page");
|
||||
});
|
||||
},
|
||||
cancel : function(){
|
||||
$("body").removeAttr("class").addClass("main_body "+window.sessionStorage.getItem("skin")+"");
|
||||
$(".layui-bg-black,.hideMenu,.layui-layout-admin .layui-header").removeAttr("style");
|
||||
skins();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
//退出
|
||||
$(".signOut").click(function(){
|
||||
window.sessionStorage.removeItem("menu");
|
||||
menu = [];
|
||||
window.sessionStorage.removeItem("curmenu");
|
||||
})
|
||||
|
||||
//隐藏左侧导航
|
||||
$(".hideMenu").click(function(){
|
||||
$(".layui-layout-admin").toggleClass("showMenu");
|
||||
//渲染顶部窗口
|
||||
tab.tabMove();
|
||||
})
|
||||
|
||||
//渲染左侧菜单
|
||||
tab.render();
|
||||
|
||||
//锁屏
|
||||
function lockPage(){
|
||||
layer.open({
|
||||
title : false,
|
||||
type : 1,
|
||||
content : ' <div class="admin-header-lock" id="lock-box">'+
|
||||
'<div class="admin-header-lock-img"><img src="/images/face.jpg"/></div>'+
|
||||
'<div class="admin-header-lock-name" id="lockUserName">admin</div>'+
|
||||
'<div class="input_btn">'+
|
||||
'<input type="password" class="admin-header-lock-input layui-input" autocomplete="off" placeholder="请输入密码解锁.." name="lockPwd" id="lockPwd" />'+
|
||||
'<button class="layui-btn" id="unlock">解锁</button>'+
|
||||
'</div>'+
|
||||
'<p>请输入“123456”,否则不会解锁成功哦!!!</p>'+
|
||||
'</div>',
|
||||
closeBtn : 0,
|
||||
shade : 0.9
|
||||
})
|
||||
$(".admin-header-lock-input").focus();
|
||||
}
|
||||
$(".lockcms").on("click",function(){
|
||||
window.sessionStorage.setItem("lockcms",true);
|
||||
lockPage();
|
||||
})
|
||||
// 判断是否显示锁屏
|
||||
if(window.sessionStorage.getItem("lockcms") == "true"){
|
||||
lockPage();
|
||||
}
|
||||
// 解锁
|
||||
$("body").on("click","#unlock",function(){
|
||||
if($(this).siblings(".admin-header-lock-input").val() == ''){
|
||||
layer.msg("请输入解锁密码!");
|
||||
$(this).siblings(".admin-header-lock-input").focus();
|
||||
}else{
|
||||
if($(this).siblings(".admin-header-lock-input").val() == "123456"){
|
||||
window.sessionStorage.setItem("lockcms",false);
|
||||
$(this).siblings(".admin-header-lock-input").val('');
|
||||
layer.closeAll("page");
|
||||
}else{
|
||||
layer.msg("密码错误,请重新输入!");
|
||||
$(this).siblings(".admin-header-lock-input").val('').focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
$(document).on('keydown', function() {
|
||||
if(event.keyCode == 13) {
|
||||
$("#unlock").click();
|
||||
}
|
||||
});
|
||||
|
||||
//手机设备的简单适配
|
||||
var treeMobile = $('.site-tree-mobile'),
|
||||
shadeMobile = $('.site-mobile-shade')
|
||||
|
||||
treeMobile.on('click', function(){
|
||||
$('body').addClass('site-mobile');
|
||||
});
|
||||
|
||||
shadeMobile.on('click', function(){
|
||||
$('body').removeClass('site-mobile');
|
||||
});
|
||||
|
||||
// 添加新窗口
|
||||
$("body").on("click",".layui-nav .layui-nav-item a",function(){
|
||||
//如果不存在子级
|
||||
if($(this).siblings().length == 0){
|
||||
addTab($(this));
|
||||
$('body').removeClass('site-mobile'); //移动端点击菜单关闭菜单层
|
||||
}
|
||||
$(this).parent("li").siblings().removeClass("layui-nav-itemed");
|
||||
})
|
||||
|
||||
//公告层
|
||||
function showNotice(){
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: "系统公告",
|
||||
closeBtn: false,
|
||||
area: '310px',
|
||||
shade: 0.8,
|
||||
id: 'LAY_layuipro',
|
||||
btn: ['火速围观'],
|
||||
moveType: 1,
|
||||
content: '<div style="padding:15px 20px; text-align:justify; line-height: 22px; text-indent:2em;border-bottom:1px solid #e2e2e2;"><p>最近偶然发现贤心大神的layui框架,瞬间被他的完美样式所吸引,虽然功能不算强大,但毕竟是一个刚刚出现的框架,后面会慢慢完善的。很早之前就想做一套后台模版,但是感觉bootstrop代码的冗余太大,不是非常喜欢,自己写又太累,所以一直闲置了下来。直到遇到了layui我才又燃起了制作一套后台模版的斗志。由于本人只是纯前端,所以页面只是单纯的实现了效果,没有做服务器端的一些处理,可能后期技术跟上了会更新的,如果有什么问题欢迎大家指导。谢谢大家。</p><p>在此特别感谢Beginner和Paco,他们写的框架给了我很好的启发和借鉴。希望有时间可以多多请教。</p></div>',
|
||||
success: function(layero){
|
||||
var btn = layero.find('.layui-layer-btn');
|
||||
btn.css('text-align', 'center');
|
||||
btn.on("click",function(){
|
||||
window.sessionStorage.setItem("showNotice","true");
|
||||
})
|
||||
if($(window).width() > 432){ //如果页面宽度不足以显示顶部“系统公告”按钮,则不提示
|
||||
btn.on("click",function(){
|
||||
layer.tips('系统公告躲在了这里', '#showNotice', {
|
||||
tips: 3
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//判断是否处于锁屏状态(如果关闭以后则未关闭浏览器之前不再显示)
|
||||
if(window.sessionStorage.getItem("lockcms") != "true" && window.sessionStorage.getItem("showNotice") != "true"){
|
||||
showNotice();
|
||||
}
|
||||
$(".showNotice").on("click",function(){
|
||||
showNotice();
|
||||
})
|
||||
|
||||
//刷新后还原打开的窗口
|
||||
if(window.sessionStorage.getItem("menu") != null){
|
||||
menu = JSON.parse(window.sessionStorage.getItem("menu"));
|
||||
curmenu = window.sessionStorage.getItem("curmenu");
|
||||
var openTitle = '';
|
||||
for(var i=0;i<menu.length;i++){
|
||||
openTitle = '';
|
||||
if(menu[i].icon){
|
||||
if(menu[i].icon.split("-")[0] == 'icon'){
|
||||
openTitle += '<i class="iconfont '+menu[i].icon+'"></i>';
|
||||
}else{
|
||||
openTitle += '<i class="layui-icon">'+menu[i].icon+'</i>';
|
||||
}
|
||||
}
|
||||
openTitle += '<cite>'+menu[i].title+'</cite>';
|
||||
openTitle += '<i class="layui-icon layui-unselect layui-tab-close" data-id="'+menu[i].layId+'">ဆ</i>';
|
||||
element.tabAdd("bodyTab",{
|
||||
title : openTitle,
|
||||
content :"<iframe src='"+menu[i].href+"' data-id='"+menu[i].layId+"'></frame>",
|
||||
id : menu[i].layId
|
||||
})
|
||||
//定位到刷新前的窗口
|
||||
if(curmenu != "undefined"){
|
||||
if(curmenu == '' || curmenu == "null"){ //定位到后台首页
|
||||
element.tabChange("bodyTab",'');
|
||||
}else if(JSON.parse(curmenu).title == menu[i].title){ //定位到刷新前的页面
|
||||
element.tabChange("bodyTab",menu[i].layId);
|
||||
}
|
||||
}else{
|
||||
element.tabChange("bodyTab",menu[menu.length-1].layId);
|
||||
}
|
||||
}
|
||||
//渲染顶部窗口
|
||||
tab.tabMove();
|
||||
}
|
||||
|
||||
//刷新当前
|
||||
$(".refresh").on("click",function(){ //此处添加禁止连续点击刷新一是为了降低服务器压力,另外一个就是为了防止超快点击造成chrome本身的一些js文件的报错(不过貌似这个问题还是存在,不过概率小了很多)
|
||||
if($(this).hasClass("refreshThis")){
|
||||
$(this).removeClass("refreshThis");
|
||||
$(".clildFrame .layui-tab-item.layui-show").find("iframe")[0].contentWindow.location.reload(true);
|
||||
}else{
|
||||
layer.msg("您点击的速度超过了服务器的响应速度,还是等两秒再刷新吧!");
|
||||
setTimeout(function(){
|
||||
$(".refresh").addClass("refreshThis");
|
||||
},2000)
|
||||
}
|
||||
})
|
||||
|
||||
//关闭其他
|
||||
$(".closePageOther").on("click",function(){
|
||||
if($("#top_tabs li").length>2 && $("#top_tabs li.layui-this cite").text()!="后台首页"){
|
||||
var menu = JSON.parse(window.sessionStorage.getItem("menu"));
|
||||
$("#top_tabs li").each(function(){
|
||||
if($(this).attr("lay-id") != '' && !$(this).hasClass("layui-this")){
|
||||
element.tabDelete("bodyTab",$(this).attr("lay-id")).init();
|
||||
//此处将当前窗口重新获取放入session,避免一个个删除来回循环造成的不必要工作量
|
||||
for(var i=0;i<menu.length;i++){
|
||||
if($("#top_tabs li.layui-this cite").text() == menu[i].title){
|
||||
menu.splice(0,menu.length,menu[i]);
|
||||
window.sessionStorage.setItem("menu",JSON.stringify(menu));
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}else if($("#top_tabs li.layui-this cite").text()=="后台首页" && $("#top_tabs li").length>1){
|
||||
$("#top_tabs li").each(function(){
|
||||
if($(this).attr("lay-id") != '' && !$(this).hasClass("layui-this")){
|
||||
element.tabDelete("bodyTab",$(this).attr("lay-id")).init();
|
||||
window.sessionStorage.removeItem("menu");
|
||||
menu = [];
|
||||
window.sessionStorage.removeItem("curmenu");
|
||||
}
|
||||
})
|
||||
}else{
|
||||
layer.msg("没有可以关闭的窗口了@_@");
|
||||
}
|
||||
//渲染顶部窗口
|
||||
tab.tabMove();
|
||||
})
|
||||
//关闭全部
|
||||
$(".closePageAll").on("click",function(){
|
||||
if($("#top_tabs li").length > 1){
|
||||
$("#top_tabs li").each(function(){
|
||||
if($(this).attr("lay-id") != ''){
|
||||
element.tabDelete("bodyTab",$(this).attr("lay-id")).init();
|
||||
window.sessionStorage.removeItem("menu");
|
||||
menu = [];
|
||||
window.sessionStorage.removeItem("curmenu");
|
||||
}
|
||||
})
|
||||
}else{
|
||||
layer.msg("没有可以关闭的窗口了@_@");
|
||||
}
|
||||
//渲染顶部窗口
|
||||
tab.tabMove();
|
||||
})
|
||||
})
|
||||
|
||||
//打开新窗口
|
||||
function addTab(_this){
|
||||
tab.tabAdd(_this);
|
||||
}
|
||||
|
||||
//捐赠弹窗
|
||||
function donation(){
|
||||
layer.tab({
|
||||
area : ['260px', '367px'],
|
||||
tab : [{
|
||||
title : "微信",
|
||||
content : "<div style='padding:30px;overflow:hidden;background:#d2d0d0;'><img src='/images/wechat.jpg'></div>"
|
||||
},{
|
||||
title : "支付宝",
|
||||
content : "<div style='padding:30px;overflow:hidden;background:#d2d0d0;'><img src='/images/alipay.jpg'></div>"
|
||||
}]
|
||||
})
|
||||
}
|
||||
|
||||
var $,tab,skyconsWeather;
|
||||
layui.config({
|
||||
base : "/js/"
|
||||
}).use(['bodyTab','form','element','layer','jquery'],function(){
|
||||
var form = layui.form,
|
||||
layer = layui.layer,
|
||||
element = layui.element;
|
||||
$ = layui.jquery;
|
||||
tab = layui.bodyTab({
|
||||
openTabNum : "50", //最大可打开窗口数量
|
||||
url: "/Home/GetNavBar" //获取菜单json地址
|
||||
});
|
||||
|
||||
//更换皮肤
|
||||
function skins(){
|
||||
var skin = window.sessionStorage.getItem("skin");
|
||||
if(skin){ //如果更换过皮肤
|
||||
if(window.sessionStorage.getItem("skinValue") != "自定义"){
|
||||
$("body").addClass(window.sessionStorage.getItem("skin"));
|
||||
}else{
|
||||
$(".layui-layout-admin .layui-header").css("background-color",skin.split(',')[0]);
|
||||
$(".layui-bg-black").css("background-color",skin.split(',')[1]);
|
||||
$(".hideMenu").css("background-color",skin.split(',')[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
skins();
|
||||
$(".changeSkin").click(function(){
|
||||
layer.open({
|
||||
title : "更换皮肤",
|
||||
area : ["310px","280px"],
|
||||
type : "1",
|
||||
content : '<div class="skins_box">'+
|
||||
'<form class="layui-form">'+
|
||||
'<div class="layui-form-item">'+
|
||||
'<input type="radio" name="skin" value="默认" title="默认" lay-filter="default" checked="">'+
|
||||
'<input type="radio" name="skin" value="藏青" title="藏青" lay-filter="cyan">'+
|
||||
'<input type="radio" name="skin" value="蓝色" title="蓝色" lay-filter="blue">'+
|
||||
'<input type="radio" name="skin" value="自定义" title="自定义" lay-filter="custom">'+
|
||||
'<div class="skinCustom">'+
|
||||
'<input type="text" class="layui-input topColor" name="topSkin" placeholder="顶部颜色" />'+
|
||||
'<input type="text" class="layui-input leftColor" name="leftSkin" placeholder="左侧颜色" />'+
|
||||
'<input type="text" class="layui-input menuColor" name="btnSkin" placeholder="顶部菜单按钮" />'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div class="layui-form-item skinBtn">'+
|
||||
'<a href="javascript:;" class="layui-btn layui-btn-small layui-btn-normal" lay-submit="" lay-filter="changeSkin">确定更换</a>'+
|
||||
'<a href="javascript:;" class="layui-btn layui-btn-small layui-btn-primary" lay-submit="" lay-filter="noChangeSkin">我再想想</a>'+
|
||||
'</div>'+
|
||||
'</form>'+
|
||||
'</div>',
|
||||
success : function(index, layero){
|
||||
var skin = window.sessionStorage.getItem("skin");
|
||||
if(window.sessionStorage.getItem("skinValue")){
|
||||
$(".skins_box input[value="+window.sessionStorage.getItem("skinValue")+"]").attr("checked","checked");
|
||||
};
|
||||
if($(".skins_box input[value=自定义]").attr("checked")){
|
||||
$(".skinCustom").css("visibility","inherit");
|
||||
$(".topColor").val(skin.split(',')[0]);
|
||||
$(".leftColor").val(skin.split(',')[1]);
|
||||
$(".menuColor").val(skin.split(',')[2]);
|
||||
};
|
||||
form.render();
|
||||
$(".skins_box").removeClass("layui-hide");
|
||||
$(".skins_box .layui-form-radio").on("click",function(){
|
||||
var skinColor;
|
||||
if($(this).find("span").text() == "藏青"){
|
||||
skinColor = "cyan";
|
||||
}else if($(this).find("span").text() == "蓝色"){
|
||||
skinColor = "blue";
|
||||
}else if($(this).find("span").text() == "默认"){
|
||||
skinColor = "";
|
||||
}
|
||||
if($(this).find("span").text() != "自定义"){
|
||||
$(".topColor,.leftColor,.menuColor").val('');
|
||||
$("body").removeAttr("class").addClass("main_body "+skinColor+"");
|
||||
$(".skinCustom").removeAttr("style");
|
||||
$(".layui-bg-black,.hideMenu,.layui-layout-admin .layui-header").removeAttr("style");
|
||||
}else{
|
||||
$(".skinCustom").css("visibility","inherit");
|
||||
}
|
||||
})
|
||||
var skinStr,skinColor;
|
||||
$(".topColor").blur(function(){
|
||||
$(".layui-layout-admin .layui-header").css("background-color",$(this).val());
|
||||
})
|
||||
$(".leftColor").blur(function(){
|
||||
$(".layui-bg-black").css("background-color",$(this).val());
|
||||
})
|
||||
$(".menuColor").blur(function(){
|
||||
$(".hideMenu").css("background-color",$(this).val());
|
||||
})
|
||||
|
||||
form.on("submit(changeSkin)",function(data){
|
||||
if(data.field.skin != "自定义"){
|
||||
if(data.field.skin == "藏青"){
|
||||
skinColor = "cyan";
|
||||
}else if(data.field.skin == "蓝色"){
|
||||
skinColor = "blue";
|
||||
}else if(data.field.skin == "默认"){
|
||||
skinColor = "";
|
||||
}
|
||||
window.sessionStorage.setItem("skin",skinColor);
|
||||
}else{
|
||||
skinStr = $(".topColor").val()+','+$(".leftColor").val()+','+$(".menuColor").val();
|
||||
window.sessionStorage.setItem("skin",skinStr);
|
||||
$("body").removeAttr("class").addClass("main_body");
|
||||
}
|
||||
window.sessionStorage.setItem("skinValue",data.field.skin);
|
||||
layer.closeAll("page");
|
||||
});
|
||||
form.on("submit(noChangeSkin)",function(){
|
||||
$("body").removeAttr("class").addClass("main_body "+window.sessionStorage.getItem("skin")+"");
|
||||
$(".layui-bg-black,.hideMenu,.layui-layout-admin .layui-header").removeAttr("style");
|
||||
skins();
|
||||
layer.closeAll("page");
|
||||
});
|
||||
},
|
||||
cancel : function(){
|
||||
$("body").removeAttr("class").addClass("main_body "+window.sessionStorage.getItem("skin")+"");
|
||||
$(".layui-bg-black,.hideMenu,.layui-layout-admin .layui-header").removeAttr("style");
|
||||
skins();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
//退出
|
||||
$(".signOut").click(function(){
|
||||
window.sessionStorage.removeItem("menu");
|
||||
menu = [];
|
||||
window.sessionStorage.removeItem("curmenu");
|
||||
})
|
||||
|
||||
//隐藏左侧导航
|
||||
$(".hideMenu").click(function(){
|
||||
$(".layui-layout-admin").toggleClass("showMenu");
|
||||
//渲染顶部窗口
|
||||
tab.tabMove();
|
||||
})
|
||||
|
||||
//渲染左侧菜单
|
||||
tab.render();
|
||||
|
||||
//锁屏
|
||||
function lockPage(){
|
||||
layer.open({
|
||||
title : false,
|
||||
type : 1,
|
||||
content : ' <div class="admin-header-lock" id="lock-box">'+
|
||||
'<div class="admin-header-lock-img"><img src="/images/face.jpg"/></div>'+
|
||||
'<div class="admin-header-lock-name" id="lockUserName">admin</div>'+
|
||||
'<div class="input_btn">'+
|
||||
'<input type="password" class="admin-header-lock-input layui-input" autocomplete="off" placeholder="请输入密码解锁.." name="lockPwd" id="lockPwd" />'+
|
||||
'<button class="layui-btn" id="unlock">解锁</button>'+
|
||||
'</div>'+
|
||||
'<p>请输入“123456”,否则不会解锁成功哦!!!</p>'+
|
||||
'</div>',
|
||||
closeBtn : 0,
|
||||
shade : 0.9
|
||||
})
|
||||
$(".admin-header-lock-input").focus();
|
||||
}
|
||||
$(".lockcms").on("click",function(){
|
||||
window.sessionStorage.setItem("lockcms",true);
|
||||
lockPage();
|
||||
})
|
||||
// 判断是否显示锁屏
|
||||
if(window.sessionStorage.getItem("lockcms") == "true"){
|
||||
lockPage();
|
||||
}
|
||||
// 解锁
|
||||
$("body").on("click","#unlock",function(){
|
||||
if($(this).siblings(".admin-header-lock-input").val() == ''){
|
||||
layer.msg("请输入解锁密码!");
|
||||
$(this).siblings(".admin-header-lock-input").focus();
|
||||
}else{
|
||||
if($(this).siblings(".admin-header-lock-input").val() == "123456"){
|
||||
window.sessionStorage.setItem("lockcms",false);
|
||||
$(this).siblings(".admin-header-lock-input").val('');
|
||||
layer.closeAll("page");
|
||||
}else{
|
||||
layer.msg("密码错误,请重新输入!");
|
||||
$(this).siblings(".admin-header-lock-input").val('').focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
$(document).on('keydown', function() {
|
||||
if(event.keyCode == 13) {
|
||||
$("#unlock").click();
|
||||
}
|
||||
});
|
||||
|
||||
//手机设备的简单适配
|
||||
var treeMobile = $('.site-tree-mobile'),
|
||||
shadeMobile = $('.site-mobile-shade')
|
||||
|
||||
treeMobile.on('click', function(){
|
||||
$('body').addClass('site-mobile');
|
||||
});
|
||||
|
||||
shadeMobile.on('click', function(){
|
||||
$('body').removeClass('site-mobile');
|
||||
});
|
||||
|
||||
// 添加新窗口
|
||||
$("body").on("click",".layui-nav .layui-nav-item a",function(){
|
||||
//如果不存在子级
|
||||
if($(this).siblings().length == 0){
|
||||
addTab($(this));
|
||||
$('body').removeClass('site-mobile'); //移动端点击菜单关闭菜单层
|
||||
}
|
||||
$(this).parent("li").siblings().removeClass("layui-nav-itemed");
|
||||
})
|
||||
|
||||
//公告层
|
||||
function showNotice(){
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: "系统公告",
|
||||
closeBtn: false,
|
||||
area: '310px',
|
||||
shade: 0.8,
|
||||
id: 'LAY_layuipro',
|
||||
btn: ['火速围观'],
|
||||
moveType: 1,
|
||||
content: '<div style="padding:15px 20px; text-align:justify; line-height: 22px; text-indent:2em;border-bottom:1px solid #e2e2e2;"><p>最近偶然发现贤心大神的layui框架,瞬间被他的完美样式所吸引,虽然功能不算强大,但毕竟是一个刚刚出现的框架,后面会慢慢完善的。很早之前就想做一套后台模版,但是感觉bootstrop代码的冗余太大,不是非常喜欢,自己写又太累,所以一直闲置了下来。直到遇到了layui我才又燃起了制作一套后台模版的斗志。由于本人只是纯前端,所以页面只是单纯的实现了效果,没有做服务器端的一些处理,可能后期技术跟上了会更新的,如果有什么问题欢迎大家指导。谢谢大家。</p><p>在此特别感谢Beginner和Paco,他们写的框架给了我很好的启发和借鉴。希望有时间可以多多请教。</p></div>',
|
||||
success: function(layero){
|
||||
var btn = layero.find('.layui-layer-btn');
|
||||
btn.css('text-align', 'center');
|
||||
btn.on("click",function(){
|
||||
window.sessionStorage.setItem("showNotice","true");
|
||||
})
|
||||
if($(window).width() > 432){ //如果页面宽度不足以显示顶部“系统公告”按钮,则不提示
|
||||
btn.on("click",function(){
|
||||
layer.tips('系统公告躲在了这里', '#showNotice', {
|
||||
tips: 3
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//判断是否处于锁屏状态(如果关闭以后则未关闭浏览器之前不再显示)
|
||||
if(window.sessionStorage.getItem("lockcms") != "true" && window.sessionStorage.getItem("showNotice") != "true"){
|
||||
showNotice();
|
||||
}
|
||||
$(".showNotice").on("click",function(){
|
||||
showNotice();
|
||||
})
|
||||
|
||||
//刷新后还原打开的窗口
|
||||
if(window.sessionStorage.getItem("menu") != null){
|
||||
menu = JSON.parse(window.sessionStorage.getItem("menu"));
|
||||
curmenu = window.sessionStorage.getItem("curmenu");
|
||||
var openTitle = '';
|
||||
for(var i=0;i<menu.length;i++){
|
||||
openTitle = '';
|
||||
if(menu[i].icon){
|
||||
if(menu[i].icon.split("-")[0] == 'icon'){
|
||||
openTitle += '<i class="iconfont '+menu[i].icon+'"></i>';
|
||||
}else{
|
||||
openTitle += '<i class="layui-icon">'+menu[i].icon+'</i>';
|
||||
}
|
||||
}
|
||||
openTitle += '<cite>'+menu[i].title+'</cite>';
|
||||
openTitle += '<i class="layui-icon layui-unselect layui-tab-close" data-id="'+menu[i].layId+'">ဆ</i>';
|
||||
element.tabAdd("bodyTab",{
|
||||
title : openTitle,
|
||||
content :"<iframe src='"+menu[i].href+"' data-id='"+menu[i].layId+"'></frame>",
|
||||
id : menu[i].layId
|
||||
})
|
||||
//定位到刷新前的窗口
|
||||
if(curmenu != "undefined"){
|
||||
if(curmenu == '' || curmenu == "null"){ //定位到后台首页
|
||||
element.tabChange("bodyTab",'');
|
||||
}else if(JSON.parse(curmenu).title == menu[i].title){ //定位到刷新前的页面
|
||||
element.tabChange("bodyTab",menu[i].layId);
|
||||
}
|
||||
}else{
|
||||
element.tabChange("bodyTab",menu[menu.length-1].layId);
|
||||
}
|
||||
}
|
||||
//渲染顶部窗口
|
||||
tab.tabMove();
|
||||
}
|
||||
|
||||
//刷新当前
|
||||
$(".refresh").on("click",function(){ //此处添加禁止连续点击刷新一是为了降低服务器压力,另外一个就是为了防止超快点击造成chrome本身的一些js文件的报错(不过貌似这个问题还是存在,不过概率小了很多)
|
||||
if($(this).hasClass("refreshThis")){
|
||||
$(this).removeClass("refreshThis");
|
||||
$(".clildFrame .layui-tab-item.layui-show").find("iframe")[0].contentWindow.location.reload(true);
|
||||
}else{
|
||||
layer.msg("您点击的速度超过了服务器的响应速度,还是等两秒再刷新吧!");
|
||||
setTimeout(function(){
|
||||
$(".refresh").addClass("refreshThis");
|
||||
},2000)
|
||||
}
|
||||
})
|
||||
|
||||
//关闭其他
|
||||
$(".closePageOther").on("click",function(){
|
||||
if($("#top_tabs li").length>2 && $("#top_tabs li.layui-this cite").text()!="后台首页"){
|
||||
var menu = JSON.parse(window.sessionStorage.getItem("menu"));
|
||||
$("#top_tabs li").each(function(){
|
||||
if($(this).attr("lay-id") != '' && !$(this).hasClass("layui-this")){
|
||||
element.tabDelete("bodyTab",$(this).attr("lay-id")).init();
|
||||
//此处将当前窗口重新获取放入session,避免一个个删除来回循环造成的不必要工作量
|
||||
for(var i=0;i<menu.length;i++){
|
||||
if($("#top_tabs li.layui-this cite").text() == menu[i].title){
|
||||
menu.splice(0,menu.length,menu[i]);
|
||||
window.sessionStorage.setItem("menu",JSON.stringify(menu));
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}else if($("#top_tabs li.layui-this cite").text()=="后台首页" && $("#top_tabs li").length>1){
|
||||
$("#top_tabs li").each(function(){
|
||||
if($(this).attr("lay-id") != '' && !$(this).hasClass("layui-this")){
|
||||
element.tabDelete("bodyTab",$(this).attr("lay-id")).init();
|
||||
window.sessionStorage.removeItem("menu");
|
||||
menu = [];
|
||||
window.sessionStorage.removeItem("curmenu");
|
||||
}
|
||||
})
|
||||
}else{
|
||||
layer.msg("没有可以关闭的窗口了@_@");
|
||||
}
|
||||
//渲染顶部窗口
|
||||
tab.tabMove();
|
||||
})
|
||||
//关闭全部
|
||||
$(".closePageAll").on("click",function(){
|
||||
if($("#top_tabs li").length > 1){
|
||||
$("#top_tabs li").each(function(){
|
||||
if($(this).attr("lay-id") != ''){
|
||||
element.tabDelete("bodyTab",$(this).attr("lay-id")).init();
|
||||
window.sessionStorage.removeItem("menu");
|
||||
menu = [];
|
||||
window.sessionStorage.removeItem("curmenu");
|
||||
}
|
||||
})
|
||||
}else{
|
||||
layer.msg("没有可以关闭的窗口了@_@");
|
||||
}
|
||||
//渲染顶部窗口
|
||||
tab.tabMove();
|
||||
})
|
||||
})
|
||||
|
||||
//打开新窗口
|
||||
function addTab(_this){
|
||||
tab.tabAdd(_this);
|
||||
}
|
||||
|
||||
//捐赠弹窗
|
||||
function donation(){
|
||||
layer.tab({
|
||||
area : ['260px', '367px'],
|
||||
tab : [{
|
||||
title : "微信",
|
||||
content : "<div style='padding:30px;overflow:hidden;background:#d2d0d0;'><img src='/images/wechat.jpg'></div>"
|
||||
},{
|
||||
title : "支付宝",
|
||||
content : "<div style='padding:30px;overflow:hidden;background:#d2d0d0;'><img src='/images/alipay.jpg'></div>"
|
||||
}]
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,63 +1,63 @@
|
||||
function navBar(strData){
|
||||
var data;
|
||||
if(typeof(strData) == "string"){
|
||||
var data = JSON.parse(strData); //部分用户解析出来的是字符串,转换一下
|
||||
}else{
|
||||
data = strData;
|
||||
}
|
||||
var ulHtml = '<ul class="layui-nav layui-nav-tree">';
|
||||
for(var i=0;i<data.length;i++){
|
||||
if(data[i].spread){
|
||||
ulHtml += '<li class="layui-nav-item layui-nav-itemed">';
|
||||
}else{
|
||||
ulHtml += '<li class="layui-nav-item">';
|
||||
}
|
||||
if(data[i].Children != undefined && data[i].Children.length > 0){
|
||||
ulHtml += '<a href="javascript:;">';
|
||||
if(data[i].Item.IconName != undefined && data[i].Item.IconName != ''){
|
||||
if(data[i].Item.IconName.indexOf("icon-") != -1){
|
||||
ulHtml += '<i class="iconfont '+data[i].Item.IconName+'" data-icon="'+data[i].Item.IconName+'"></i>';
|
||||
}else{
|
||||
ulHtml += '<i class="layui-icon" data-icon="'+data[i].Item.IconName+'">'+data[i].Item.IconName+'</i>';
|
||||
}
|
||||
}
|
||||
ulHtml += '<cite>'+data[i].Item.Name+'</cite>';
|
||||
ulHtml += '<span class="layui-nav-more"></span>';
|
||||
ulHtml += '</a>';
|
||||
ulHtml += '<dl class="layui-nav-child">';
|
||||
for(var j=0;j<data[i].Children.length;j++){
|
||||
if(data[i].Children[j].target == "_blank"){
|
||||
ulHtml += '<dd><a href="javascript:;" data-url="'+data[i].Children[j].Item.Url+'" target="'+data[i].Children[j].target+'">';
|
||||
}else{
|
||||
ulHtml += '<dd><a href="javascript:;" data-url="'+data[i].Children[j].Item.Url+'">';
|
||||
}
|
||||
if(data[i].Children[j].Item.IconName != undefined && data[i].Children[j].Item.IconName != ''){
|
||||
if(data[i].Children[j].Item.IconName.indexOf("icon-") != -1){
|
||||
ulHtml += '<i class="iconfont '+data[i].Children[j].Item.IconName+'" data-icon="'+data[i].Children[j].Item.IconName+'"></i>';
|
||||
}else{
|
||||
ulHtml += '<i class="layui-icon" data-icon="'+data[i].Children[j].Item.IconName+'">'+data[i].Children[j].Item.IconName+'</i>';
|
||||
}
|
||||
}
|
||||
ulHtml += '<cite>'+data[i].Children[j].Item.Name+'</cite></a></dd>';
|
||||
}
|
||||
ulHtml += "</dl>";
|
||||
}else{
|
||||
if(data[i].target == "_blank"){
|
||||
ulHtml += '<a href="javascript:;" data-url="'+data[i].Item.Url+'" target="'+data[i].target+'">';
|
||||
}else{
|
||||
ulHtml += '<a href="javascript:;" data-url="'+data[i].Item.Url+'">';
|
||||
}
|
||||
if(data[i].Item.IconName != undefined && data[i].Item.IconName != ''){
|
||||
if(data[i].Item.IconName.indexOf("icon-") != -1){
|
||||
ulHtml += '<i class="iconfont '+data[i].Item.IconName+'" data-icon="'+data[i].Item.IconName+'"></i>';
|
||||
}else{
|
||||
ulHtml += '<i class="layui-icon" data-icon="'+data[i].Item.IconName+'">'+data[i].Item.IconName+'</i>';
|
||||
}
|
||||
}
|
||||
ulHtml += '<cite>'+data[i].Item.Name+'</cite></a>';
|
||||
}
|
||||
ulHtml += '</li>';
|
||||
}
|
||||
ulHtml += '</ul>';
|
||||
return ulHtml;
|
||||
}
|
||||
function navBar(strData){
|
||||
var data;
|
||||
if(typeof(strData) == "string"){
|
||||
var data = JSON.parse(strData); //部分用户解析出来的是字符串,转换一下
|
||||
}else{
|
||||
data = strData;
|
||||
}
|
||||
var ulHtml = '<ul class="layui-nav layui-nav-tree">';
|
||||
for(var i=0;i<data.length;i++){
|
||||
if(data[i].spread){
|
||||
ulHtml += '<li class="layui-nav-item layui-nav-itemed">';
|
||||
}else{
|
||||
ulHtml += '<li class="layui-nav-item">';
|
||||
}
|
||||
if(data[i].Children != undefined && data[i].Children.length > 0){
|
||||
ulHtml += '<a href="javascript:;">';
|
||||
if(data[i].Item.IconName != undefined && data[i].Item.IconName != ''){
|
||||
if(data[i].Item.IconName.indexOf("icon-") != -1){
|
||||
ulHtml += '<i class="iconfont '+data[i].Item.IconName+'" data-icon="'+data[i].Item.IconName+'"></i>';
|
||||
}else{
|
||||
ulHtml += '<i class="layui-icon" data-icon="'+data[i].Item.IconName+'">'+data[i].Item.IconName+'</i>';
|
||||
}
|
||||
}
|
||||
ulHtml += '<cite>'+data[i].Item.Name+'</cite>';
|
||||
ulHtml += '<span class="layui-nav-more"></span>';
|
||||
ulHtml += '</a>';
|
||||
ulHtml += '<dl class="layui-nav-child">';
|
||||
for(var j=0;j<data[i].Children.length;j++){
|
||||
if(data[i].Children[j].target == "_blank"){
|
||||
ulHtml += '<dd><a href="javascript:;" data-url="'+data[i].Children[j].Item.Url+'" target="'+data[i].Children[j].target+'">';
|
||||
}else{
|
||||
ulHtml += '<dd><a href="javascript:;" data-url="'+data[i].Children[j].Item.Url+'">';
|
||||
}
|
||||
if(data[i].Children[j].Item.IconName != undefined && data[i].Children[j].Item.IconName != ''){
|
||||
if(data[i].Children[j].Item.IconName.indexOf("icon-") != -1){
|
||||
ulHtml += '<i class="iconfont '+data[i].Children[j].Item.IconName+'" data-icon="'+data[i].Children[j].Item.IconName+'"></i>';
|
||||
}else{
|
||||
ulHtml += '<i class="layui-icon" data-icon="'+data[i].Children[j].Item.IconName+'">'+data[i].Children[j].Item.IconName+'</i>';
|
||||
}
|
||||
}
|
||||
ulHtml += '<cite>'+data[i].Children[j].Item.Name+'</cite></a></dd>';
|
||||
}
|
||||
ulHtml += "</dl>";
|
||||
}else{
|
||||
if(data[i].target == "_blank"){
|
||||
ulHtml += '<a href="javascript:;" data-url="'+data[i].Item.Url+'" target="'+data[i].target+'">';
|
||||
}else{
|
||||
ulHtml += '<a href="javascript:;" data-url="'+data[i].Item.Url+'">';
|
||||
}
|
||||
if(data[i].Item.IconName != undefined && data[i].Item.IconName != ''){
|
||||
if(data[i].Item.IconName.indexOf("icon-") != -1){
|
||||
ulHtml += '<i class="iconfont '+data[i].Item.IconName+'" data-icon="'+data[i].Item.IconName+'"></i>';
|
||||
}else{
|
||||
ulHtml += '<i class="layui-icon" data-icon="'+data[i].Item.IconName+'">'+data[i].Item.IconName+'</i>';
|
||||
}
|
||||
}
|
||||
ulHtml += '<cite>'+data[i].Item.Name+'</cite></a>';
|
||||
}
|
||||
ulHtml += '</li>';
|
||||
}
|
||||
ulHtml += '</ul>';
|
||||
return ulHtml;
|
||||
}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
layui.config({
|
||||
base : "/js/"
|
||||
}).use(['form','layer'],function(){
|
||||
var form = layui.form,
|
||||
layer = parent.layer === undefined ? layui.layer : parent.layer,
|
||||
$ = layui.jquery;
|
||||
//video背景
|
||||
$(window).resize(function(){
|
||||
if($(".video-player").width() > $(window).width()){
|
||||
$(".video-player").css({"height":$(window).height(),"width":"auto","left":-($(".video-player").width()-$(window).width())/2});
|
||||
}else{
|
||||
$(".video-player").css({"width":$(window).width(),"height":"auto","left":-($(".video-player").width()-$(window).width())/2});
|
||||
}
|
||||
}).resize();
|
||||
|
||||
//登录按钮事件
|
||||
form.on("submit(login)",function(data){
|
||||
window.location.href = "/Login/LoginByDev";
|
||||
return false;
|
||||
})
|
||||
})
|
||||
layui.config({
|
||||
base : "/js/"
|
||||
}).use(['form','layer'],function(){
|
||||
var form = layui.form,
|
||||
layer = parent.layer === undefined ? layui.layer : parent.layer,
|
||||
$ = layui.jquery;
|
||||
//video背景
|
||||
$(window).resize(function(){
|
||||
if($(".video-player").width() > $(window).width()){
|
||||
$(".video-player").css({"height":$(window).height(),"width":"auto","left":-($(".video-player").width()-$(window).width())/2});
|
||||
}else{
|
||||
$(".video-player").css({"width":$(window).width(),"height":"auto","left":-($(".video-player").width()-$(window).width())/2});
|
||||
}
|
||||
}).resize();
|
||||
|
||||
//登录按钮事件
|
||||
form.on("submit(login)",function(data){
|
||||
window.location.href = "/Login/LoginByDev";
|
||||
return false;
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
layui.config({
|
||||
base : "/js/"
|
||||
}).use(['form','element','layer','jquery'],function(){
|
||||
var form = layui.form,
|
||||
layer = parent.layer === undefined ? layui.layer : parent.layer,
|
||||
element = layui.element,
|
||||
$ = layui.jquery;
|
||||
|
||||
$(".panel a").on("click",function(){
|
||||
window.parent.addTab($(this));
|
||||
})
|
||||
|
||||
//动态获取文章总数和待审核文章数量,最新文章
|
||||
$.get("/json/newsList.json",
|
||||
function(data){
|
||||
var waitNews = [];
|
||||
$(".allNews span").text(data.length); //文章总数
|
||||
for(var i=0;i<data.length;i++){
|
||||
var newsStr = data[i];
|
||||
if(newsStr["newsStatus"] == "待审核"){
|
||||
waitNews.push(newsStr);
|
||||
}
|
||||
}
|
||||
$(".waitNews span").text(waitNews.length); //待审核文章
|
||||
}
|
||||
)
|
||||
|
||||
//图片总数
|
||||
$.get("/json/images.json",
|
||||
function(data){
|
||||
$(".imgAll span").text(data.length);
|
||||
}
|
||||
)
|
||||
|
||||
//用户数
|
||||
$.get("/json/usersList.json",
|
||||
function(data){
|
||||
$(".userAll span").text(data.length);
|
||||
}
|
||||
)
|
||||
|
||||
//新消息
|
||||
$.get("/json/message.json",
|
||||
function(data){
|
||||
$(".newMessage span").text(data.length);
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
//数字格式化
|
||||
$(".panel span").each(function(){
|
||||
$(this).html($(this).text()>9999 ? ($(this).text()/10000).toFixed(2) + "<em>万</em>" : $(this).text());
|
||||
})
|
||||
|
||||
//系统基本参数
|
||||
if(window.sessionStorage.getItem("systemParameter")){
|
||||
var systemParameter = JSON.parse(window.sessionStorage.getItem("systemParameter"));
|
||||
fillParameter(systemParameter);
|
||||
}else{
|
||||
$.ajax({
|
||||
url : "/json/systemParameter.json",
|
||||
type : "get",
|
||||
dataType : "json",
|
||||
success : function(data){
|
||||
fillParameter(data);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//填充数据方法
|
||||
function fillParameter(data){
|
||||
//判断字段数据是否存在
|
||||
function nullData(data){
|
||||
if(data == '' || data == "undefined"){
|
||||
return "未定义";
|
||||
}else{
|
||||
return data;
|
||||
}
|
||||
}
|
||||
$(".version").text(nullData(data.version)); //当前版本
|
||||
$(".author").text(nullData(data.author)); //开发作者
|
||||
$(".homePage").text(nullData(data.homePage)); //网站首页
|
||||
$(".server").text(nullData(data.server)); //服务器环境
|
||||
$(".dataBase").text(nullData(data.dataBase)); //数据库版本
|
||||
$(".maxUpload").text(nullData(data.maxUpload)); //最大上传限制
|
||||
$(".userRights").text(nullData(data.userRights));//当前用户权限
|
||||
}
|
||||
|
||||
})
|
||||
layui.config({
|
||||
base : "/js/"
|
||||
}).use(['form','element','layer','jquery'],function(){
|
||||
var form = layui.form,
|
||||
layer = parent.layer === undefined ? layui.layer : parent.layer,
|
||||
element = layui.element,
|
||||
$ = layui.jquery;
|
||||
|
||||
$(".panel a").on("click",function(){
|
||||
window.parent.addTab($(this));
|
||||
})
|
||||
|
||||
//动态获取文章总数和待审核文章数量,最新文章
|
||||
$.get("/json/newsList.json",
|
||||
function(data){
|
||||
var waitNews = [];
|
||||
$(".allNews span").text(data.length); //文章总数
|
||||
for(var i=0;i<data.length;i++){
|
||||
var newsStr = data[i];
|
||||
if(newsStr["newsStatus"] == "待审核"){
|
||||
waitNews.push(newsStr);
|
||||
}
|
||||
}
|
||||
$(".waitNews span").text(waitNews.length); //待审核文章
|
||||
}
|
||||
)
|
||||
|
||||
//图片总数
|
||||
$.get("/json/images.json",
|
||||
function(data){
|
||||
$(".imgAll span").text(data.length);
|
||||
}
|
||||
)
|
||||
|
||||
//用户数
|
||||
$.get("/json/usersList.json",
|
||||
function(data){
|
||||
$(".userAll span").text(data.length);
|
||||
}
|
||||
)
|
||||
|
||||
//新消息
|
||||
$.get("/json/message.json",
|
||||
function(data){
|
||||
$(".newMessage span").text(data.length);
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
//数字格式化
|
||||
$(".panel span").each(function(){
|
||||
$(this).html($(this).text()>9999 ? ($(this).text()/10000).toFixed(2) + "<em>万</em>" : $(this).text());
|
||||
})
|
||||
|
||||
//系统基本参数
|
||||
if(window.sessionStorage.getItem("systemParameter")){
|
||||
var systemParameter = JSON.parse(window.sessionStorage.getItem("systemParameter"));
|
||||
fillParameter(systemParameter);
|
||||
}else{
|
||||
$.ajax({
|
||||
url : "/json/systemParameter.json",
|
||||
type : "get",
|
||||
dataType : "json",
|
||||
success : function(data){
|
||||
fillParameter(data);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//填充数据方法
|
||||
function fillParameter(data){
|
||||
//判断字段数据是否存在
|
||||
function nullData(data){
|
||||
if(data == '' || data == "undefined"){
|
||||
return "未定义";
|
||||
}else{
|
||||
return data;
|
||||
}
|
||||
}
|
||||
$(".version").text(nullData(data.version)); //当前版本
|
||||
$(".author").text(nullData(data.author)); //开发作者
|
||||
$(".homePage").text(nullData(data.homePage)); //网站首页
|
||||
$(".server").text(nullData(data.server)); //服务器环境
|
||||
$(".dataBase").text(nullData(data.dataBase)); //数据库版本
|
||||
$(".maxUpload").text(nullData(data.maxUpload)); //最大上传限制
|
||||
$(".userRights").text(nullData(data.userRights));//当前用户权限
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
"author": "yubaolee",
|
||||
"homePage": "/Home/Index",
|
||||
"server": "windows",
|
||||
"dataBase": "2003",
|
||||
"dataBase": "2008 R2",
|
||||
"maxUpload": "2M",
|
||||
"userRights": "总管理员",
|
||||
"userRights": "管理员",
|
||||
"description": "这是宝哥的吐血之作",
|
||||
"powerby": "copyright @2017 yubaolee",
|
||||
"record": "yubaolee",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
/** layui-v2.0.2 MIT License By http://www.layui.com */
|
||||
/** layui-v2.1.0 MIT License By http://www.layui.com */
|
||||
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
/** layui-v2.0.2 MIT License By http://www.layui.com */
|
||||
/** layui-v2.1.0 MIT License By http://www.layui.com */
|
||||
;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",o=">*[carousel-item]>*",l="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(o),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.indicator(),e.elemItem.length<=1||(e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['<button class="layui-icon '+u+'" lay-type="sub">'+("updown"===n.anim?"":"")+"</button>",'<button class="layui-icon '+u+'" lay-type="add">'+("updown"===n.anim?"":"")+"</button>"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['<div class="'+c+'"><ul>',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("<li"+(n.index===e?' class="layui-this"':"")+"></li>")}),i.join("")}(),"</ul></div>"].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a<n.index&&e.slide("sub",n.index-a)})},m.prototype.slide=function(e,i){var n=this,o=n.elemItem,u=n.config,c=u.index,m=u.elem.attr("lay-filter");n.haveSlide||("sub"===e?(n.subIndex(i),setTimeout(function(){o.eq(u.index).addClass(d),setTimeout(function(){o.eq(c).addClass(r),o.eq(u.index).addClass(r)},50)},50)):(n.addIndex(i),setTimeout(function(){o.eq(u.index).addClass(s),setTimeout(function(){o.eq(c).addClass(l),o.eq(u.index).addClass(l)},50)},50)),setTimeout(function(){o.removeClass(a+" "+d+" "+s+" "+l+" "+r),o.eq(u.index).addClass(a),n.haveSlide=!1},300),n.elemInd.find("li").eq(u.index).addClass(a).siblings().removeClass(a),n.haveSlide=!0,layui.event.call(this,t,"change("+m+")",{index:u.index,prevIndex:c,item:o.eq(u.index)}))},m.prototype.events=function(){var e=this,i=e.config;i.elem.data("haveEvents")||(i.elem.on("mouseenter",function(){clearInterval(e.timer)}).on("mouseleave",function(){e.autoplay()}),i.elem.data("haveEvents",!0))},n.render=function(e){var i=new m(e);return i},e(t,n)});
|
||||
@@ -1,2 +1,2 @@
|
||||
/** layui-v2.0.2 MIT License By http://www.layui.com */
|
||||
/** layui-v2.1.0 MIT License By http://www.layui.com */
|
||||
;layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('<ol class="layui-code-ol"><li>'+o.replace(/[\r\t\n]+/g,"</li><li>")+"</li></ol>"),c.find(">.layui-code-h3")[0]||c.prepend('<h3 class="layui-code-h3">'+(c.attr("lay-title")||e.title||"code")+(e.about?'<a href="'+l+'" target="_blank">layui.code</a>':"")+"</h3>");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss");
|
||||
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
/** layui-v2.0.2 MIT License By http://www.layui.com */
|
||||
/** layui-v2.1.0 MIT License By http://www.layui.com */
|
||||
;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='<i class="layui-anim layui-anim-rotate layui-anim-loop layui-icon "></i>';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="<cite>加载更多</cite>",h=l('<div class="layui-flow-more"><a href="javascript:;">'+d+"</a></div>");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;s<t.lazyimg.elem.length;s++){var v=t.lazyimg.elem.eq(s),y=a?function(){return v.offset().top-n.offset().top+m}():v.offset().top;if(c(v,f),i=s,y>u)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)});
|
||||
File diff suppressed because one or more lines are too long
2
OpenAuth.Mvc/layui/lay/modules/jquery.js
vendored
2
OpenAuth.Mvc/layui/lay/modules/jquery.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
/** layui-v2.0.2 MIT License By http://www.layui.com */
|
||||
/** layui-v2.1.0 MIT License By http://www.layui.com */
|
||||
;layui.define(function(e){"use strict";var a=document,t="getElementById",r="getElementsByTagName",n="laypage",i="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.groups=0|a.groups||5,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),a.groups<0?a.groups=0:a.groups>a.pages&&(a.groups=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var t=a.pages>a.groups?Math.ceil((a.curr+(a.groups>1?1:0))/(a.groups>0?a.groups:1)):1,r={prev:function(){return a.prev?'<a href="javascript:;" class="layui-laypage-prev'+(1==a.curr?" "+i:"")+'" data-page="'+(a.curr-1)+'">'+a.prev+"</a>":""}(),page:function(){var e=[];if(a.count<1)return"";t>1&&a.first!==!1&&0!==a.groups&&e.push('<a href="javascript:;" class="layui-laypage-first" data-page="1" title="首页">'+(a.first||1)+"</a>");var r=Math.floor((a.groups-1)/2),n=t>1?a.curr-r:1,i=t>1?function(){var e=a.curr+(a.groups-r-1);return e>a.pages?a.pages:e}():a.groups;for(i-n<a.groups-1&&(n=i-a.groups+1),a.first!==!1&&n>2&&e.push('<span class="layui-laypage-spr">…</span>');n<=i;n++)n===a.curr?e.push('<span class="layui-laypage-curr"><em class="layui-laypage-em" '+(/^#/.test(a.theme)?'style="background-color:'+a.theme+';"':"")+"></em><em>"+n+"</em></span>"):e.push('<a href="javascript:;" data-page="'+n+'">'+n+"</a>");return a.pages>a.groups&&a.pages>i&&a.last!==!1&&(i+1<a.pages&&e.push('<span class="layui-laypage-spr">…</span>'),0!==a.groups&&e.push('<a href="javascript:;" class="layui-laypage-last" title="尾页" data-page="'+a.pages+'">'+(a.last||a.pages)+"</a>")),e.join("")}(),next:function(){return a.next?'<a href="javascript:;" class="layui-laypage-next'+(a.curr==a.pages?" "+i:"")+'" data-page="'+(a.curr+1)+'">'+a.next+"</a>":""}(),count:'<span class="layui-laypage-count">共 '+a.count+" 条</span>",limit:function(){var e=['<span class="layui-laypage-limits"><select lay-ignore>'];return layui.each(a.limits,function(t,r){e.push('<option value="'+r+'"'+(r===a.limit?"selected":"")+">"+r+" 条/页</option>")}),e.join("")+"</select></span>"}(),skip:function(){return['<span class="layui-laypage-skip">到第','<input type="text" min="1" value="'+a.curr+'" class="layui-input">','页<button type="button" class="layui-laypage-btn">确定</button>',"</span>"].join("")}()};return['<div class="layui-box layui-laypage layui-laypage-'+(a.theme?/^#/.test(a.theme)?"molv":a.theme:"default")+'" id="layui-laypage-'+a.index+'">',function(){var e=[];return layui.each(a.layout,function(a,t){r[t]&&e.push(r[t])}),e.join("")}(),"</div>"].join("")},u.prototype.jump=function(e,a){if(e){var t=this,n=t.config,i=e.children,u=e[r]("button")[0],p=e[r]("input")[0],l=e[r]("select")[0],o=function(){var e=0|p.value.replace(/\s|\D/g,"");e&&(n.curr=e,t.render())};if(a)return o();for(var c=0,g=i.length;c<g;c++)"a"===i[c].nodeName.toLowerCase()&&s.on(i[c],"click",function(){var e=0|this.getAttribute("data-page");e<1||e>n.pages||(n.curr=e,t.render())});l&&s.on(l,"change",function(){var e=this.value;n.curr*e>n.count&&(n.curr=Math.ceil(n.count/e)),n.limit=e,t.render()}),u&&s.on(u,"click",function(){o()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[r]("input")[0];t&&s.on(t,"keyup",function(t){var r=this.value,n=t.keyCode;/^(37|38|39|40)$/.test(n)||(/\D/.test(r)&&(this.value=r.replace(/\D/,"")),13===n&&a.jump(e,!0))})}},u.prototype.render=function(e){var r=this,n=r.config,i=r.type(),u=r.view();2===i?n.elem&&(n.elem.innerHTML=u):3===i?n.elem.html(u):a[t](n.elem)&&(a[t](n.elem).innerHTML=u),n.jump&&n.jump(n,e);var s=a[t]("layui-laypage-"+n.index);r.jump(s),n.hash&&!e&&(location.hash="!"+n.hash+"="+n.curr),r.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(n,s)});
|
||||
@@ -1,2 +1,2 @@
|
||||
/** layui-v2.0.2 MIT License By http://www.layui.com */
|
||||
/** layui-v2.1.0 MIT License By http://www.layui.com */
|
||||
;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},n={exp:function(e){return new RegExp(e,"g")},query:function(e,n,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return c((n||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var n="Laytpl Error:";return"object"==typeof console&&console.error(n+e+"\n"+(r||"")),n+e}},c=n.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=c("^"+r.open+"#",""),l=c(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(c(r.open+"#"),r.open+"# ").replace(c(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(/(?="|')/g,"\\").replace(n.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(n.query(1),function(e){var n='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(c(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),n='"+_escape_('),n+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,n.escape)}catch(u){return delete o.cache,n.error(u,p)}},t.pt.render=function(e,r){var c,t=this;return e?(c=t.cache?t.cache(e,n.escape):t.parse(t.tpl,e),r?void r(c):c):n.error("no data")};var o=function(e){return"string"!=typeof e?n.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var n in e)r[n]=e[n]},o.v="1.2.0",e("laytpl",o)});
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
/** layui-v2.0.2 MIT License By http://www.layui.com */
|
||||
/** layui-v2.1.0 MIT License By http://www.layui.com */
|
||||
;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('<ul class="'+(n.spread?"layui-show":"")+'"></ul>'),s=o(["<li "+(n.spread?'data-spread="'+n.spread+'"':"")+">",function(){return l?'<i class="layui-icon layui-tree-spread">'+(n.spread?t.arrow[1]:t.arrow[0])+"</i>":""}(),function(){return r.check?'<i class="layui-icon layui-tree-check">'+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"</i>":""}(),function(){return'<a href="'+(n.href||"javascript:;")+'" '+(r.target&&n.href?'target="'+r.target+'"':"")+">"+('<i class="layui-icon layui-tree-'+(l?"branch":"leaf")+'">'+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"</i>")+("<cite>"+(n.name||"未命名")+"</cite></a>")}(),"</li>"].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('<div class="layui-box '+t+'"></div>'));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})});
|
||||
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
/** layui-v2.0.2 MIT License By http://www.layui.com */
|
||||
/** layui-v2.1.0 MIT License By http://www.layui.com */
|
||||
;layui.define("jquery",function(e){"use strict";var o=layui.$,t={fixbar:function(e){var t,a,i="layui-fixbar",l="layui-fixbar-top",r=o(document),c=o("body");e=o.extend({showHeight:200},e),e.bar1=e.bar1===!0?"":e.bar1,e.bar2=e.bar2===!0?"":e.bar2,e.bgcolor=e.bgcolor?"background-color:"+e.bgcolor:"";var n=[e.bar1,e.bar2,""],u=o(['<ul class="'+i+'">',e.bar1?'<li class="layui-icon" lay-type="bar1" style="'+e.bgcolor+'">'+n[0]+"</li>":"",e.bar2?'<li class="layui-icon" lay-type="bar2" style="'+e.bgcolor+'">'+n[1]+"</li>":"",'<li class="layui-icon '+l+'" lay-type="top" style="'+e.bgcolor+'">'+n[2]+"</li>","</ul>"].join("")),s=u.find("."+l),b=function(){var o=r.scrollTop();o>=e.showHeight?t||(s.show(),t=1):t&&(s.hide(),t=0)};o("."+i)[0]||("object"==typeof e.css&&u.css(e.css),c.append(u),b(),u.find("li").on("click",function(){var t=o(this),a=t.attr("lay-type");"top"===a&&o("html,body").animate({scrollTop:0},200),e.click&&e.click.call(this,a)}),r.on("scroll",function(){clearTimeout(a),a=setTimeout(function(){b()},100)}))},countdown:function(e,o,t){var a=this,i="function"==typeof o,l=new Date(e).getTime(),r=new Date(!o||i?(new Date).getTime():o).getTime(),c=l-r,n=[Math.floor(c/864e5),Math.floor(c/36e5)%24,Math.floor(c/6e4)%60,Math.floor(c/1e3)%60];i&&(t=o);var u=setTimeout(function(){a.countdown(e,r+1e3,t)},1e3);return t&&t(c>0?n:[0,0,0,0],o,u),c<=0&&clearTimeout(u),u},timeAgo:function(e,o){var t=(new Date).getTime()-new Date(e).getTime();return t>2592e6?(t=new Date(e).toLocaleString(),o&&(t=t.replace(/\s[\S]+$/g,"")),t):t>=864e5?(t/1e3/60/60/24|0)+"天前":t>=36e5?(t/1e3/60/60|0)+"小时前":t>=18e4?(t/1e3/60|0)+"分钟前":t<0?"未来":"刚刚"}};e("util",t)});
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user