mirror of
https://github.com/tznb1/TwoNav.git
synced 2025-08-10 08:51:49 +00:00
Compare commits
2 Commits
v2.0.07-20
...
v2.0.09-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c65ca9225c | ||
|
|
a2f84325af |
10985
static/Layui/v2.6.8/modules/jquery.js
vendored
10985
static/Layui/v2.6.8/modules/jquery.js
vendored
File diff suppressed because one or more lines are too long
859
system/Medoo.php
859
system/Medoo.php
File diff suppressed because it is too large
Load Diff
@@ -58,7 +58,7 @@ if ($page == 'home') {
|
||||
|
||||
//调试
|
||||
if( $page == 'test' ) {
|
||||
$dirs = getDir(DIR.'/templates/home');
|
||||
$dirs = get_dir_list(DIR.'/templates/home');
|
||||
//var_dump($dirs);
|
||||
foreach ($dirs as $dir) {
|
||||
$path = DIR.'/templates/home/'.$dir; //目录完整路径
|
||||
@@ -111,7 +111,7 @@ if($page == 'config_home'){
|
||||
//主题设置页面
|
||||
if( $page == 'theme_home' || $page == 'theme_login' || $page == 'theme_transit' || $page == 'theme_register') {
|
||||
$fn = str_replace('theme_','',$page);
|
||||
$dirs = getDir(DIR.'/templates/'.$fn);
|
||||
$dirs = get_dir_list(DIR.'/templates/'.$fn);
|
||||
|
||||
foreach ($dirs as $dir) {
|
||||
$path = DIR.'/templates/'.$fn.'/'.$dir; //目录完整路径
|
||||
|
||||
@@ -25,13 +25,15 @@ function other_upsys(){
|
||||
if(!preg_match('/^v.+-(\d{8})$/i',SysVer,$matches)){
|
||||
msg(-1,"获取程序版本异常");
|
||||
}
|
||||
if (!is_dir('./data/temp')) mkdir('./data/temp',0755,true) or msg(-1,'下载失败,创建临时[/data/temp]目录失败');
|
||||
//检查指定文件夹是否可写
|
||||
$paths = ["./","./data","./static","./system","./templates"];
|
||||
$paths = ["./","./data","./data/temp","./static","./system","./templates"];
|
||||
foreach($paths as $path){
|
||||
if(!is_writable($path)){
|
||||
msg(-1,"文件夹不可写 >> $path");
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION['upsys']['sysver'] = intval($matches[1]);
|
||||
usleep(1000*300); //延迟300毫秒
|
||||
msg(1,'success');
|
||||
|
||||
@@ -230,8 +230,8 @@ function echo_category($property = false){
|
||||
function echo_pwds(){
|
||||
$where["uid"] = UID;
|
||||
$where['ORDER']['pid'] = 'ASC';
|
||||
foreach (select_db('user_pwd_group',['pid','name'],$where) as $data) {
|
||||
echo "<option value=\"{$data['pid']}\">{$data['name']}</option>";
|
||||
foreach (select_db('user_pwd_group',['pid','name','password'],$where) as $data) {
|
||||
echo "<option value=\"{$data['pid']}\">{$data['name']} | 密码 [{$data['password']}]</option>";
|
||||
}
|
||||
}
|
||||
//检查链接
|
||||
@@ -536,8 +536,8 @@ function downFile($url, $file = '', $savePath = './data/temp/'){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//获取目录
|
||||
function getDir($dir){
|
||||
//获取目录列表
|
||||
function get_dir_list($dir){
|
||||
$dirArray=[];
|
||||
if(false != ($handle = opendir($dir))){
|
||||
while(false !== ($file = readdir($handle))) {
|
||||
|
||||
@@ -1 +1 @@
|
||||
v2.0.07-20230405
|
||||
v2.0.09-20230410
|
||||
@@ -1,15 +1,10 @@
|
||||
/**
|
||||
配色方案(如有需要,请自行配置)
|
||||
*/
|
||||
/**头部-配色*/
|
||||
.layui-layout-admin .layui-header {
|
||||
background-color: #1aa094 !important;
|
||||
}
|
||||
|
||||
.layui-header > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover {
|
||||
background-color: #197971 !important;
|
||||
}
|
||||
|
||||
.layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover {
|
||||
background-color: #197971 !important;
|
||||
}
|
||||
@@ -33,7 +28,6 @@
|
||||
background-color: #1aa094 !important;
|
||||
}
|
||||
|
||||
|
||||
/**头部样式 */
|
||||
.layui-layout-admin .header {
|
||||
position: fixed;
|
||||
@@ -656,20 +650,6 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/**
|
||||
菜单缩放
|
||||
*/
|
||||
.popup-tips .layui-layer-TipsG{
|
||||
display: none;
|
||||
}
|
||||
.popup-tips.layui-layer-tips .layui-layer-content{
|
||||
padding: 0;
|
||||
}
|
||||
.popup-tips .layui-nav-tree{
|
||||
width: 150px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
/**左侧菜单字体间距*/
|
||||
.layuimini-menu-left .layui-nav-item a span {
|
||||
letter-spacing: 1px;
|
||||
@@ -680,7 +660,6 @@
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
|
||||
/**左侧菜单更多下拉样式*/
|
||||
.layuimini-menu-left .layui-nav-more,.layuimini-menu-left-zoom .layui-nav-more {
|
||||
font-family: layui-icon !important;
|
||||
@@ -691,20 +670,14 @@
|
||||
overflow: hidden;
|
||||
width: auto;
|
||||
height: auto;
|
||||
/*line-height: normal;*/
|
||||
border: none;
|
||||
display: inline-block;
|
||||
/*margin-top: -6px !important;*/
|
||||
}
|
||||
|
||||
.layuimini-menu-left .layui-nav-child .layui-nav-more {
|
||||
margin-top: -6px !important;
|
||||
}
|
||||
|
||||
.layuimini-menu-left .layui-nav .layui-nav-mored,.layuimini-menu-left .layui-nav-itemed>a .layui-nav-more{
|
||||
/*margin-top: -9px!important;*/
|
||||
}
|
||||
|
||||
.layuimini-menu-left-zoom.layui-nav .layui-nav-mored,.layuimini-menu-left-zoom.layui-nav-itemed>a .layui-nav-more{
|
||||
margin-top: -9px!important;
|
||||
}
|
||||
@@ -735,10 +708,7 @@
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
PC版样式
|
||||
*/
|
||||
/**PC版样式*/
|
||||
@media screen and (min-width: 1025px) {
|
||||
/**头部样式(缩放) */
|
||||
.layuimini-mini .layui-layout-left.layuimini-header-menu.layuimini-pc-show {
|
||||
@@ -796,7 +766,7 @@
|
||||
|
||||
/**菜单缩放*/
|
||||
.layuimini-mini .layuimini-menu-left .layui-nav-more,.layuimini-mini .layuimini-menu-left .layui-nav-child{
|
||||
display: none;!important;
|
||||
display: none!important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -886,25 +856,6 @@
|
||||
left: 15px;
|
||||
}
|
||||
|
||||
.layuimini-mini .layuimini-site-mobile {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.layuimini-site-mobile {
|
||||
display: block !important;
|
||||
position: fixed;
|
||||
z-index: 100000;
|
||||
bottom: 15px;
|
||||
left: 15px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-radius: 2px;
|
||||
text-align: center;
|
||||
background-color: rgba(0, 0, 0, .7);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.layuimini-header-content {
|
||||
z-index: 997;
|
||||
}
|
||||
@@ -913,14 +864,9 @@
|
||||
.layuimini-make {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.layuimini-site-mobile {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 550px){
|
||||
|
||||
/**头部右侧数据*/
|
||||
.layuimini-multi-module.layuimini-mini .layuimini-header-content .layui-layout-right {
|
||||
display: none;
|
||||
|
||||
@@ -10,23 +10,6 @@ body {
|
||||
width: 190px;
|
||||
}
|
||||
|
||||
/*手机端适配*/
|
||||
@media screen and (max-width: 768px) {
|
||||
.layui-form-mid {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.layui-form-item .layui-input-inline {
|
||||
margin-right: 0px;
|
||||
width: calc(100% - 110px);
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 450px){
|
||||
.layui-form-item .layui-input-inline+.layui-form-mid {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.layuimini-container {
|
||||
border: 1px solid #f2f2f2;
|
||||
border-radius: 5px;
|
||||
@@ -91,4 +74,40 @@ body {
|
||||
|
||||
.layui-table-tool-temp{
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
|
||||
/*手机端适配*/
|
||||
@media screen and (max-width: 768px) {
|
||||
.layui-form-mid {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.layui-form-item .layui-input-inline {
|
||||
margin-right: 0px;
|
||||
width: calc(100% - 110px);
|
||||
}
|
||||
/*手机端表单调整230410*/
|
||||
.layui-form-label{
|
||||
width: 60px;
|
||||
padding: 9px 9px;
|
||||
}
|
||||
.layui-input-block{
|
||||
margin-left: 85px;
|
||||
}
|
||||
/*隐藏描述*/
|
||||
.layui-form-mid{
|
||||
display:none
|
||||
}
|
||||
/*边距*/
|
||||
.layuimini-main {
|
||||
margin: 10px 5px 10px 0px;
|
||||
}
|
||||
.layui-form-item{
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 450px){
|
||||
.layui-form-item .layui-input-inline+.layui-form-mid {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
@@ -45,15 +45,11 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--无限极左侧菜单-->
|
||||
<div class="layui-side layui-bg-black layuimini-menu-left"></div>
|
||||
|
||||
<!--手机端遮罩层-->
|
||||
<div class="layuimini-make"></div>
|
||||
|
||||
<!-- 移动导航 -->
|
||||
<!--<div class="layuimini-site-mobile"><i class="layui-icon"></i></div>-->
|
||||
<div class="layui-body">
|
||||
<div class="layuimini-tab layui-tab-rollTool layui-tab" lay-filter="layuiminiTab" lay-allowclose="true">
|
||||
<ul class="layui-tab-title"><li class="layui-this" id="layuiminiHomeTabId" lay-id=""></li></ul>
|
||||
@@ -82,28 +78,16 @@
|
||||
<script>
|
||||
var u = "<?php echo U;?>"
|
||||
layui.config({version:"<?php echo $Ver;?>"});
|
||||
layui.use(['jquery', 'layer', 'miniAdmin'], function () {
|
||||
var $ = layui.jquery,layer = layui.layer,miniAdmin = layui.miniAdmin;
|
||||
miniAdmin.render({
|
||||
layui.use(['layer','miniAdmin'], function () {
|
||||
var layer = layui.layer;
|
||||
layui.miniAdmin.render({
|
||||
iniUrl: "./index.php?c=admin&page=menu&u="+u,
|
||||
urlHashLocation: true,
|
||||
bgColorDefault: false,
|
||||
multiModule: false,
|
||||
menuChildOpen: true,
|
||||
pageAnim: true,
|
||||
maxTabNum: 30
|
||||
});
|
||||
$('#logout').on("click", function () {
|
||||
$.post('./index.php?c=admin&page=logout&u='+u,function(d,status){
|
||||
if(d.code == 1) {
|
||||
layer.alert("您已安全的退出登录!", function () {
|
||||
top.location.href='./index.php?u='+u;
|
||||
});
|
||||
}else{
|
||||
layer.msg(d.msg,{icon: 5});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -80,20 +80,6 @@
|
||||
$("#fid").append("<option value=\""+res.data[i].cid+"\">"+res.data[i].name+"</option>");
|
||||
}
|
||||
}
|
||||
//加载加密分组数据
|
||||
$.post(get_api('read_pwd_group_list'),{'page':'1','limit':'9999'},function(data,status){
|
||||
if(data.code == 1){
|
||||
pwds = [];
|
||||
$("#pwd_id").empty();
|
||||
$("#pwd_id").append("<option value=\"0\">无</option>");
|
||||
for(var i =0;i<data.count;i++){
|
||||
pwds['pid_'+data.data[i].pid] = {'pwd':data.data[i].password,'name':data.data[i].name};
|
||||
$("#pwd_id").append("<option value=\""+data.data[i].pid+"\">"+data.data[i].name+" | 密码 [" + data.data[i].password +"]</option>");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
layui.form.render("select");//重新渲染下拉框
|
||||
limit = false; //取消修改限制
|
||||
layer.closeAll('loading'); //关闭加载层
|
||||
}
|
||||
|
||||
@@ -13,13 +13,8 @@ layui.config({
|
||||
miniTab: "layuimini/miniTab", // layuimini tab扩展
|
||||
miniTheme: "layuimini/miniTheme", // layuimini 主题扩展
|
||||
treetable: 'treetable-lay/treetable', //table树形扩展
|
||||
treetable2: 'treeTable/treeTable', //table树形表格2
|
||||
tableSelect: 'tableSelect/tableSelect', // table选择扩展
|
||||
iconPickerFa: 'iconPicker/iconPickerFa', // fa图标选择扩展
|
||||
tableSelect: 'tableSelect/tableSelect', // table选择扩展
|
||||
xIcon: 'xIcon/xIcon', //图标选择器
|
||||
echarts: 'echarts/echarts', // echarts图表扩展
|
||||
echartsTheme: 'echarts/echartsTheme', // echarts图表主题扩展
|
||||
layarea: 'layarea/layarea', // 省市县区三级联动下拉选择器
|
||||
treeSelect: 'treeSelect/treeSelect', // 树形下拉选择器
|
||||
background: 'background/background' //随机背景图
|
||||
});
|
||||
|
||||
@@ -1,399 +0,0 @@
|
||||
/**
|
||||
* fa图标选择器 根据开源项目https://gitee.com/wujiawei0926/iconpicker修改而来
|
||||
* @author wujiawei0926@yeah.net chung@99php.cn
|
||||
* @version 1.1
|
||||
*/
|
||||
|
||||
layui.define(['laypage', 'form'], function (exports) {
|
||||
"use strict";
|
||||
|
||||
var IconPicker = function () {
|
||||
this.v = '1.1';
|
||||
}, _MOD = 'iconPickerFa',
|
||||
_this = this,
|
||||
$ = layui.jquery,
|
||||
laypage = layui.laypage,
|
||||
form = layui.form,
|
||||
BODY = 'body',
|
||||
TIPS = '请选择图标';
|
||||
|
||||
/**
|
||||
* 渲染组件
|
||||
*/
|
||||
IconPicker.prototype.render = function (options) {
|
||||
var opts = options,
|
||||
// DOM选择器
|
||||
elem = opts.elem,
|
||||
// 数据类型:fontClass/unicode
|
||||
url = opts.url,
|
||||
// 是否分页:true/false
|
||||
page = opts.page == null ? true : opts.page,
|
||||
// 每页显示数量
|
||||
limit = opts.limit == null ? 12 : opts.limit,
|
||||
// 是否开启搜索:true/false
|
||||
search = opts.search == null ? true : opts.search,
|
||||
// 每个图标格子的宽度:'43px'或'20%'
|
||||
cellWidth = opts.cellWidth,
|
||||
// 点击回调
|
||||
click = opts.click,
|
||||
// 渲染成功后的回调
|
||||
success = opts.success,
|
||||
// json数据
|
||||
data = {},
|
||||
// 唯一标识
|
||||
tmp = new Date().getTime(),
|
||||
// 初始化时input的值
|
||||
ORIGINAL_ELEM_VALUE = $(elem).val(),
|
||||
TITLE = 'layui-select-title',
|
||||
TITLE_ID = 'layui-select-title-' + tmp,
|
||||
ICON_BODY = 'layui-iconpicker-' + tmp,
|
||||
PICKER_BODY = 'layui-iconpicker-body-' + tmp,
|
||||
PAGE_ID = 'layui-iconpicker-page-' + tmp,
|
||||
LIST_BOX = 'layui-iconpicker-list-box',
|
||||
selected = 'layui-form-selected',
|
||||
unselect = 'layui-unselect';
|
||||
|
||||
var a = {
|
||||
init: function () {
|
||||
data = common.getData(url);
|
||||
|
||||
a.hideElem().createSelect().createBody().toggleSelect();
|
||||
a.preventEvent().inputListen();
|
||||
common.loadCss();
|
||||
|
||||
if (success) {
|
||||
success(this.successHandle());
|
||||
}
|
||||
|
||||
return a;
|
||||
},
|
||||
successHandle: function () {
|
||||
var d = {
|
||||
options: opts,
|
||||
data: data,
|
||||
id: tmp,
|
||||
elem: $('#' + ICON_BODY)
|
||||
};
|
||||
return d;
|
||||
},
|
||||
/**
|
||||
* 隐藏elem
|
||||
*/
|
||||
hideElem: function () {
|
||||
$(elem).hide();
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 绘制select下拉选择框
|
||||
*/
|
||||
createSelect: function () {
|
||||
var oriIcon = '<i class="fa">';
|
||||
|
||||
// 默认图标
|
||||
if (ORIGINAL_ELEM_VALUE === '') {
|
||||
ORIGINAL_ELEM_VALUE = 'fa-adjust';
|
||||
|
||||
}
|
||||
|
||||
|
||||
oriIcon = '<i class="fa ' + ORIGINAL_ELEM_VALUE + '">';
|
||||
|
||||
oriIcon += '</i>';
|
||||
|
||||
var selectHtml = '<div class="layui-iconpicker layui-unselect layui-form-select" id="' + ICON_BODY + '">' +
|
||||
'<div class="' + TITLE + '" id="' + TITLE_ID + '">' +
|
||||
'<div class="layui-iconpicker-item">' +
|
||||
'<span class="layui-iconpicker-icon layui-unselect">' +
|
||||
oriIcon +
|
||||
'</span>' +
|
||||
'<i class="layui-edge"></i>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'<div class="layui-anim layui-anim-upbit" style="">' +
|
||||
'123' +
|
||||
'</div>';
|
||||
$(elem).after(selectHtml);
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 展开/折叠下拉框
|
||||
*/
|
||||
toggleSelect: function () {
|
||||
var item = '#' + TITLE_ID + ' .layui-iconpicker-item,#' + TITLE_ID + ' .layui-iconpicker-item .layui-edge';
|
||||
a.event('click', item, function (e) {
|
||||
var $icon = $('#' + ICON_BODY);
|
||||
if ($icon.hasClass(selected)) {
|
||||
$icon.removeClass(selected).addClass(unselect);
|
||||
} else {
|
||||
// 隐藏其他picker
|
||||
$('.layui-form-select').removeClass(selected);
|
||||
// 显示当前picker
|
||||
$icon.addClass(selected).removeClass(unselect);
|
||||
}
|
||||
e.stopPropagation();
|
||||
});
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 绘制主体部分
|
||||
*/
|
||||
createBody: function () {
|
||||
// 获取数据
|
||||
var searchHtml = '';
|
||||
|
||||
if (search) {
|
||||
searchHtml = '<div class="layui-iconpicker-search">' +
|
||||
'<input class="layui-input">' +
|
||||
'<i class="layui-icon"></i>' +
|
||||
'</div>';
|
||||
}
|
||||
|
||||
// 组合dom
|
||||
var bodyHtml = '<div class="layui-iconpicker-body" id="' + PICKER_BODY + '">' +
|
||||
searchHtml +
|
||||
'<div class="' + LIST_BOX + '"></div> ' +
|
||||
'</div>';
|
||||
$('#' + ICON_BODY).find('.layui-anim').eq(0).html(bodyHtml);
|
||||
a.search().createList().check().page();
|
||||
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 绘制图标列表
|
||||
* @param text 模糊查询关键字
|
||||
* @returns {string}
|
||||
*/
|
||||
createList: function (text) {
|
||||
var d = data,
|
||||
l = d.length,
|
||||
pageHtml = '',
|
||||
listHtml = $('<div class="layui-iconpicker-list">')//'<div class="layui-iconpicker-list">';
|
||||
|
||||
// 计算分页数据
|
||||
var _limit = limit, // 每页显示数量
|
||||
_pages = l % _limit === 0 ? l / _limit : parseInt(l / _limit + 1), // 总计多少页
|
||||
_id = PAGE_ID;
|
||||
|
||||
// 图标列表
|
||||
var icons = [];
|
||||
|
||||
for (var i = 0; i < l; i++) {
|
||||
var obj = d[i];
|
||||
|
||||
// 判断是否模糊查询
|
||||
if (text && obj.indexOf(text) === -1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 是否自定义格子宽度
|
||||
var style = '';
|
||||
if (cellWidth !== null) {
|
||||
style += ' style="width:' + cellWidth + '"';
|
||||
}
|
||||
|
||||
// 每个图标dom
|
||||
var icon = '<div class="layui-iconpicker-icon-item" title="' + obj + '" ' + style + '>';
|
||||
|
||||
icon += '<i class="fa ' + obj + '"></i>';
|
||||
|
||||
icon += '</div>';
|
||||
|
||||
icons.push(icon);
|
||||
}
|
||||
|
||||
// 查询出图标后再分页
|
||||
l = icons.length;
|
||||
_pages = l % _limit === 0 ? l / _limit : parseInt(l / _limit + 1);
|
||||
for (var i = 0; i < _pages; i++) {
|
||||
// 按limit分块
|
||||
var lm = $('<div class="layui-iconpicker-icon-limit" id="layui-iconpicker-icon-limit-' + tmp + (i + 1) + '">');
|
||||
|
||||
for (var j = i * _limit; j < (i + 1) * _limit && j < l; j++) {
|
||||
lm.append(icons[j]);
|
||||
}
|
||||
|
||||
listHtml.append(lm);
|
||||
}
|
||||
|
||||
// 无数据
|
||||
if (l === 0) {
|
||||
listHtml.append('<p class="layui-iconpicker-tips">无数据</p>');
|
||||
}
|
||||
|
||||
// 判断是否分页
|
||||
if (page) {
|
||||
$('#' + PICKER_BODY).addClass('layui-iconpicker-body-page');
|
||||
pageHtml = '<div class="layui-iconpicker-page" id="' + PAGE_ID + '">' +
|
||||
'<div class="layui-iconpicker-page-count">' +
|
||||
'<span id="' + PAGE_ID + '-current">1</span>/' +
|
||||
'<span id="' + PAGE_ID + '-pages">' + _pages + '</span>' +
|
||||
' (<span id="' + PAGE_ID + '-length">' + l + '</span>)' +
|
||||
'</div>' +
|
||||
'<div class="layui-iconpicker-page-operate">' +
|
||||
'<i class="layui-icon" id="' + PAGE_ID + '-prev" data-index="0" prev></i> ' +
|
||||
'<i class="layui-icon" id="' + PAGE_ID + '-next" data-index="2" next></i> ' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
}
|
||||
|
||||
|
||||
$('#' + ICON_BODY).find('.layui-anim').find('.' + LIST_BOX).html('').append(listHtml).append(pageHtml);
|
||||
return a;
|
||||
},
|
||||
// 阻止Layui的一些默认事件
|
||||
preventEvent: function () {
|
||||
var item = '#' + ICON_BODY + ' .layui-anim';
|
||||
a.event('click', item, function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
return a;
|
||||
},
|
||||
// 分页
|
||||
page: function () {
|
||||
var icon = '#' + PAGE_ID + ' .layui-iconpicker-page-operate .layui-icon';
|
||||
|
||||
$(icon).unbind('click');
|
||||
a.event('click', icon, function (e) {
|
||||
var elem = e.currentTarget,
|
||||
total = parseInt($('#' + PAGE_ID + '-pages').html()),
|
||||
isPrev = $(elem).attr('prev') !== undefined,
|
||||
// 按钮上标的页码
|
||||
index = parseInt($(elem).attr('data-index')),
|
||||
$cur = $('#' + PAGE_ID + '-current'),
|
||||
// 点击时正在显示的页码
|
||||
current = parseInt($cur.html());
|
||||
|
||||
// 分页数据
|
||||
if (isPrev && current > 1) {
|
||||
current = current - 1;
|
||||
$(icon + '[prev]').attr('data-index', current);
|
||||
} else if (!isPrev && current < total) {
|
||||
current = current + 1;
|
||||
$(icon + '[next]').attr('data-index', current);
|
||||
}
|
||||
$cur.html(current);
|
||||
|
||||
// 图标数据
|
||||
$('#' + ICON_BODY + ' .layui-iconpicker-icon-limit').hide();
|
||||
$('#layui-iconpicker-icon-limit-' + tmp + current).show();
|
||||
e.stopPropagation();
|
||||
});
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
search: function () {
|
||||
var item = '#' + PICKER_BODY + ' .layui-iconpicker-search .layui-input';
|
||||
a.event('input propertychange', item, function (e) {
|
||||
var elem = e.target,
|
||||
t = $(elem).val();
|
||||
a.createList(t);
|
||||
});
|
||||
return a;
|
||||
},
|
||||
/**
|
||||
* 点击选中图标
|
||||
*/
|
||||
check: function () {
|
||||
var item = '#' + PICKER_BODY + ' .layui-iconpicker-icon-item';
|
||||
a.event('click', item, function (e) {
|
||||
var el = $(e.currentTarget).find('.fa'),
|
||||
icon = '';
|
||||
|
||||
var clsArr = el.attr('class').split(/[\s\n]/),
|
||||
cls = clsArr[1],
|
||||
icon = cls;
|
||||
$('#' + TITLE_ID).find('.layui-iconpicker-item .fa').html('').attr('class', clsArr.join(' '));
|
||||
|
||||
|
||||
$('#' + ICON_BODY).removeClass(selected).addClass(unselect);
|
||||
$(elem).val(icon).attr('value', icon);
|
||||
// 回调
|
||||
if (click) {
|
||||
click({
|
||||
icon: icon
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
return a;
|
||||
},
|
||||
// 监听原始input数值改变
|
||||
inputListen: function () {
|
||||
var el = $(elem);
|
||||
a.event('change', elem, function () {
|
||||
var value = el.val();
|
||||
})
|
||||
// el.change(function(){
|
||||
|
||||
// });
|
||||
return a;
|
||||
},
|
||||
event: function (evt, el, fn) {
|
||||
$(BODY).on(evt, el, fn);
|
||||
}
|
||||
};
|
||||
|
||||
var common = {
|
||||
/**
|
||||
* 加载样式表
|
||||
*/
|
||||
loadCss: function () {
|
||||
var css = '.layui-iconpicker {max-width: 280px;}.layui-iconpicker .layui-anim{display:none;position:absolute;left:0;top:42px;padding:5px 0;z-index:899;min-width:100%;border:1px solid #d2d2d2;max-height:300px;overflow-y:auto;background-color:#fff;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.12);box-sizing:border-box;}.layui-iconpicker-item{border:1px solid #e6e6e6;width:90px;height:38px;border-radius:4px;cursor:pointer;position:relative;}.layui-iconpicker-icon{border-right:1px solid #e6e6e6;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;width:60px;height:100%;float:left;text-align:center;background:#fff;transition:all .3s;}.layui-iconpicker-icon i{line-height:38px;font-size:18px;}.layui-iconpicker-item > .layui-edge{left:70px;}.layui-iconpicker-item:hover{border-color:#D2D2D2!important;}.layui-iconpicker-item:hover .layui-iconpicker-icon{border-color:#D2D2D2!important;}.layui-iconpicker.layui-form-selected .layui-anim{display:block;}.layui-iconpicker-body{padding:6px;}.layui-iconpicker .layui-iconpicker-list{background-color:#fff;border:1px solid #ccc;border-radius:4px;}.layui-iconpicker .layui-iconpicker-icon-item{display:inline-block;width:21.1%;line-height:36px;text-align:center;cursor:pointer;vertical-align:top;height:36px;margin:4px;border:1px solid #ddd;border-radius:2px;transition:300ms;}.layui-iconpicker .layui-iconpicker-icon-item i.layui-icon{font-size:17px;}.layui-iconpicker .layui-iconpicker-icon-item:hover{background-color:#eee;border-color:#ccc;-webkit-box-shadow:0 0 2px #aaa,0 0 2px #fff inset;-moz-box-shadow:0 0 2px #aaa,0 0 2px #fff inset;box-shadow:0 0 2px #aaa,0 0 2px #fff inset;text-shadow:0 0 1px #fff;}.layui-iconpicker-search{position:relative;margin:0 0 6px 0;border:1px solid #e6e6e6;border-radius:2px;transition:300ms;}.layui-iconpicker-search:hover{border-color:#D2D2D2!important;}.layui-iconpicker-search .layui-input{cursor:text;display:inline-block;width:86%;border:none;padding-right:0;margin-top:1px;}.layui-iconpicker-search .layui-icon{position:absolute;top:11px;right:4%;}.layui-iconpicker-tips{text-align:center;padding:8px 0;cursor:not-allowed;}.layui-iconpicker-page{margin-top:6px;margin-bottom:-6px;font-size:12px;padding:0 2px;}.layui-iconpicker-page-count{display:inline-block;}.layui-iconpicker-page-operate{display:inline-block;float:right;cursor:default;}.layui-iconpicker-page-operate .layui-icon{font-size:12px;cursor:pointer;}.layui-iconpicker-body-page .layui-iconpicker-icon-limit{display:none;}.layui-iconpicker-body-page .layui-iconpicker-icon-limit:first-child{display:block;}';
|
||||
var $style = $('head').find('style[iconpicker]');
|
||||
if ($style.length === 0) {
|
||||
$('head').append('<style rel="stylesheet" iconpicker>' + css + '</style>');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
getData: function (url) {
|
||||
var iconlist = [];
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'get',
|
||||
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
||||
async: false,
|
||||
success: function (ret) {
|
||||
var exp = /fa-var-(.*):/ig;
|
||||
var result;
|
||||
while ((result = exp.exec(ret)) != null) {
|
||||
iconlist.push('fa-' + result[1]);
|
||||
}
|
||||
},
|
||||
error: function (xhr, textstatus, thrown) {
|
||||
layer.msg('fa图标接口有误');
|
||||
}
|
||||
});
|
||||
return iconlist;
|
||||
}
|
||||
};
|
||||
|
||||
a.init();
|
||||
return new IconPicker();
|
||||
};
|
||||
|
||||
/**
|
||||
* 选中图标
|
||||
* @param filter lay-filter
|
||||
* @param iconName 图标名称,自动识别fontClass/unicode
|
||||
*/
|
||||
IconPicker.prototype.checkIcon = function (filter, iconName) {
|
||||
var el = $('*[lay-filter=' + filter + ']'),
|
||||
p = el.next().find('.layui-iconpicker-item .fa'),
|
||||
c = iconName;
|
||||
|
||||
if (c.indexOf('#xe') > 0) {
|
||||
p.html(c);
|
||||
} else {
|
||||
p.html('').attr('class', 'fa ' + c);
|
||||
}
|
||||
el.attr('value', c).val(c);
|
||||
};
|
||||
|
||||
var iconPicker = new IconPicker();
|
||||
exports(_MOD, iconPicker);
|
||||
});
|
||||
@@ -1,34 +1,11 @@
|
||||
/**
|
||||
* date:2020/02/27
|
||||
* author:Mr.Chung
|
||||
* version:2.0
|
||||
* description:layuimini 主体框架扩展
|
||||
*/
|
||||
layui.define(["jquery", "miniMenu", "element","miniTab", "miniTheme"], function (exports) {
|
||||
var $ = layui.$,
|
||||
layer = layui.layer,
|
||||
miniMenu = layui.miniMenu,
|
||||
miniTheme = layui.miniTheme,
|
||||
element = layui.element ,
|
||||
element = layui.element,
|
||||
miniTab = layui.miniTab;
|
||||
|
||||
if (!/http(s*):\/\//.test(location.href)) {
|
||||
var tips = "请先将项目部署至web容器(Apache/Tomcat/Nginx/IIS/等),否则部分数据将无法显示";
|
||||
return layer.alert(tips);
|
||||
}
|
||||
|
||||
var miniAdmin = {
|
||||
|
||||
/**
|
||||
* 后台框架初始化
|
||||
* @param options.iniUrl 后台初始化接口地址
|
||||
* @param options.urlHashLocation URL地址hash定位
|
||||
* @param options.bgColorDefault 默认皮肤
|
||||
* @param options.multiModule 是否开启多模块
|
||||
* @param options.menuChildOpen 是否展开子菜单
|
||||
* @param options.pageAnim iframe窗口动画
|
||||
* @param options.maxTabNum 最大的tab打开数量
|
||||
*/
|
||||
render: function (options) {
|
||||
options.iniUrl = options.iniUrl || null;
|
||||
options.urlHashLocation = options.urlHashLocation || false;
|
||||
@@ -39,7 +16,7 @@ layui.define(["jquery", "miniMenu", "element","miniTab", "miniTheme"], function
|
||||
options.maxTabNum = options.maxTabNum || 20;
|
||||
$.getJSON(options.iniUrl, function (data) {
|
||||
if (data == null) {
|
||||
miniAdmin.error('暂无菜单信息')
|
||||
miniAdmin.error('暂无菜单信息');
|
||||
} else {
|
||||
miniAdmin.renderLogo(data.logoInfo);
|
||||
miniAdmin.renderHome(data.homeInfo);
|
||||
@@ -71,31 +48,19 @@ layui.define(["jquery", "miniMenu", "element","miniTab", "miniTheme"], function
|
||||
miniAdmin.error('菜单接口有误');
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化logo
|
||||
* @param data
|
||||
*/
|
||||
//初始化logo
|
||||
renderLogo: function (data) {
|
||||
var html = '<a href="' + data.href + '"><img src="' + data.image + '" alt="logo"><h1>' + data.title + '</h1></a>';
|
||||
$('.layuimini-logo').html(html);
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化首页
|
||||
* @param data
|
||||
*/
|
||||
//初始化首页
|
||||
renderHome: function (data) {
|
||||
sessionStorage.setItem('layuiminiHomeHref', data.href);
|
||||
$('#layuiminiHomeTabId').html('<span class="layuimini-tab-active"></span><span class="disable-close">' + data.title + '</span><i class="layui-icon layui-unselect layui-tab-close">ဆ</i>');
|
||||
$('#layuiminiHomeTabId').attr('lay-id', data.href);
|
||||
$('#layuiminiHomeTabIframe').html('<iframe width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" src="./?c=admin&page=' + data.href + '&u=' + u + '"></iframe>');
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化iframe窗口动画
|
||||
* @param anim
|
||||
*/
|
||||
//初始化iframe窗口动画
|
||||
renderAnim: function (anim) {
|
||||
if (anim) {
|
||||
$('#layuimini-bg-color').after('<style id="layuimini-page-anim">' +
|
||||
@@ -115,7 +80,7 @@ layui.define(["jquery", "miniMenu", "element","miniTab", "miniTheme"], function
|
||||
'</style>');
|
||||
}
|
||||
},
|
||||
|
||||
//进入全屏
|
||||
fullScreen: function () {
|
||||
var el = document.documentElement;
|
||||
var rfs = el.requestFullScreen || el.webkitRequestFullScreen;
|
||||
@@ -138,10 +103,7 @@ layui.define(["jquery", "miniMenu", "element","miniTab", "miniTheme"], function
|
||||
miniAdmin.error('浏览器不支持全屏调用!');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 退出全屏
|
||||
*/
|
||||
//退出全屏
|
||||
exitFullScreen: function () {
|
||||
var el = document;
|
||||
var cfs = el.cancelFullScreen || el.webkitCancelFullScreen || el.exitFullScreen;
|
||||
@@ -164,10 +126,7 @@ layui.define(["jquery", "miniMenu", "element","miniTab", "miniTheme"], function
|
||||
miniAdmin.error('浏览器不支持全屏调用!');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化设备端
|
||||
*/
|
||||
//初始化设备端
|
||||
renderDevice: function () {
|
||||
if (miniAdmin.checkMobile()) {
|
||||
$('.layuimini-tool i').attr('data-side-fold', 1);
|
||||
@@ -176,29 +135,15 @@ layui.define(["jquery", "miniMenu", "element","miniTab", "miniTheme"], function
|
||||
$('.layui-layout-body').addClass('layuimini-all');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 成功
|
||||
* @param title
|
||||
* @returns {*}
|
||||
*/
|
||||
//成功提示
|
||||
success: function (title) {
|
||||
return layer.msg(title, {icon: 1, shade: this.shade, scrollbar: false, time: 2000, shadeClose: true});
|
||||
},
|
||||
|
||||
/**
|
||||
* 失败
|
||||
* @param title
|
||||
* @returns {*}
|
||||
*/
|
||||
//失败提示
|
||||
error: function (title) {
|
||||
return layer.msg(title, {icon: 2, shade: this.shade, scrollbar: false, time: 3000, shadeClose: true});
|
||||
},
|
||||
|
||||
/**
|
||||
* 判断是否为手机
|
||||
* @returns {boolean}
|
||||
*/
|
||||
//判断是否为手机
|
||||
checkMobile: function () {
|
||||
var ua = navigator.userAgent.toLocaleLowerCase();
|
||||
var pf = navigator.platform.toLocaleLowerCase();
|
||||
@@ -213,55 +158,15 @@ layui.define(["jquery", "miniMenu", "element","miniTab", "miniTheme"], function
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
// 监听
|
||||
listen: function () {
|
||||
// 刷新
|
||||
$('body').on('click', '[data-refresh]', function () {
|
||||
//刷新
|
||||
$('body').on('click','[data-refresh]', function () {
|
||||
$(".layui-tab-item.layui-show").find("iframe")[0].contentWindow.location.reload();
|
||||
miniAdmin.success('刷新成功');
|
||||
});
|
||||
|
||||
// 监听提示信息
|
||||
$("body").on("mouseenter", ".layui-nav-tree .menu-li", function () {
|
||||
if (miniAdmin.checkMobile()) {
|
||||
return false;
|
||||
}
|
||||
var classInfo = $(this).attr('class'),
|
||||
tips = $(this).prop("innerHTML"),
|
||||
isShow = $('.layuimini-tool i').attr('data-side-fold');
|
||||
if (isShow == 0 && tips) {
|
||||
tips = "<ul class='layuimini-menu-left-zoom layui-nav layui-nav-tree layui-this'><li class='layui-nav-item layui-nav-itemed'>"+tips+"</li></ul>" ;
|
||||
window.openTips = layer.tips(tips, $(this), {
|
||||
tips: [2, '#2f4056'],
|
||||
time: 300000,
|
||||
skin:"popup-tips",
|
||||
success:function (el) {
|
||||
var left = $(el).position().left - 10 ;
|
||||
$(el).css({ left:left });
|
||||
element.render();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("body").on("mouseleave", ".popup-tips", function () {
|
||||
if (miniAdmin.checkMobile()) {
|
||||
return false;
|
||||
}
|
||||
var isShow = $('.layuimini-tool i').attr('data-side-fold');
|
||||
if (isShow == 0) {
|
||||
try {
|
||||
layer.close(window.openTips);
|
||||
} catch (e) {
|
||||
console.log(e.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// 全屏
|
||||
$('body').on('click', '[data-check-screen]', function () {
|
||||
//全屏
|
||||
$('body').on('click','[data-check-screen]', function () {
|
||||
var check = $(this).attr('data-check-screen');
|
||||
if (check == 'full') {
|
||||
miniAdmin.fullScreen();
|
||||
@@ -273,14 +178,23 @@ layui.define(["jquery", "miniMenu", "element","miniTab", "miniTheme"], function
|
||||
$(this).html('<i class="fa fa-arrows-alt"></i>');
|
||||
}
|
||||
});
|
||||
|
||||
// 点击遮罩层
|
||||
$('body').on('click', '.layuimini-make', function () {
|
||||
//点击遮罩层
|
||||
$('body').on('click','.layuimini-make', function () {
|
||||
miniAdmin.renderDevice();
|
||||
});
|
||||
|
||||
//退出登录
|
||||
$('#logout').on("click", function () {
|
||||
$.post('./index.php?c=admin&page=logout&u='+u,function(d,status){
|
||||
if(d.code == 1) {
|
||||
layer.alert("您已安全的退出登录!", function () {
|
||||
top.location.href='./index.php?u='+u;
|
||||
});
|
||||
}else{
|
||||
layer.msg(d.msg,{icon: 5});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
exports("miniAdmin", miniAdmin);
|
||||
exports("miniAdmin",miniAdmin);
|
||||
});
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
/**
|
||||
* date:2020/02/27
|
||||
* author:Mr.Chung
|
||||
* version:2.0
|
||||
* description:layuimini 菜单框架扩展
|
||||
*/
|
||||
layui.define(["element","laytpl" ,"jquery"], function (exports) {
|
||||
var element = layui.element,
|
||||
$ = layui.$,
|
||||
@@ -11,30 +5,14 @@ layui.define(["element","laytpl" ,"jquery"], function (exports) {
|
||||
layer = layui.layer;
|
||||
|
||||
var miniMenu = {
|
||||
|
||||
/**
|
||||
* 菜单初始化
|
||||
* @param options.menuList 菜单数据信息
|
||||
* @param options.multiModule 是否开启多模块
|
||||
* @param options.menuChildOpen 是否展开子菜单
|
||||
*/
|
||||
//菜单初始化
|
||||
render: function (options) {
|
||||
options.menuList = options.menuList || [];
|
||||
options.multiModule = options.multiModule || false;
|
||||
options.menuChildOpen = options.menuChildOpen || false;
|
||||
if (options.multiModule) {
|
||||
miniMenu.renderMultiModule(options.menuList, options.menuChildOpen);
|
||||
} else {
|
||||
miniMenu.renderSingleModule(options.menuList, options.menuChildOpen);
|
||||
}
|
||||
miniMenu.renderSingleModule(options.menuList, options.menuChildOpen);
|
||||
miniMenu.listen();
|
||||
},
|
||||
|
||||
/**
|
||||
* 单模块
|
||||
* @param menuList 菜单数据
|
||||
* @param menuChildOpen 是否默认展开
|
||||
*/
|
||||
//单模块
|
||||
renderSingleModule: function (menuList, menuChildOpen) {
|
||||
menuList = menuList || [];
|
||||
var leftMenuHtml = '',
|
||||
@@ -49,10 +27,7 @@ layui.define(["element","laytpl" ,"jquery"], function (exports) {
|
||||
|
||||
element.init();
|
||||
},
|
||||
|
||||
/**
|
||||
* 渲染一级菜单
|
||||
*/
|
||||
//渲染一级菜单
|
||||
compileMenu: function(menu,isSub){
|
||||
var menuHtml = '<li {{#if( d.menu){ }} data-menu="{{d.menu}}" {{#}}} class="layui-nav-item menu-li {{d.childOpenClass}} {{d.className}}" {{#if( d.id){ }} id="{{d.id}}" {{#}}}> <a {{#if( d.href){ }} layuimini-href="{{d.href}}" {{#}}} {{#if( d.target){ }} target="{{d.target}}" {{#}}} href="javascript:;">{{#if( d.icon){ }} <i class="{{d.icon}}"></i> {{#}}} <span class="layui-left-nav">{{d.title}}</span></a> {{# if(d.children){}} {{d.children}} {{#}}} </li>' ;
|
||||
if(isSub){
|
||||
@@ -70,7 +45,6 @@ layui.define(["element","laytpl" ,"jquery"], function (exports) {
|
||||
}
|
||||
return laytpl(wrapperHtml).render(menu);
|
||||
},
|
||||
|
||||
each:function(list,callback){
|
||||
var _list = [];
|
||||
for(var i = 0 ,length = list.length ; i<length ;i++ ){
|
||||
@@ -111,98 +85,9 @@ layui.define(["element","laytpl" ,"jquery"], function (exports) {
|
||||
leftMenusHtml = me.compileMenuContainer({ id:options.parentMenuId,className:options.leftMenuCheckDefault,children:leftMenusHtml }) ;
|
||||
return leftMenusHtml ;
|
||||
},
|
||||
/**
|
||||
* 多模块
|
||||
* @param menuList 菜单数据
|
||||
* @param menuChildOpen 是否默认展开
|
||||
*/
|
||||
renderMultiModule: function (menuList, menuChildOpen) {
|
||||
menuList = menuList || [];
|
||||
var me = this ;
|
||||
var headerMenuHtml = '',
|
||||
headerMobileMenuHtml = '',
|
||||
leftMenuHtml = '',
|
||||
leftMenuCheckDefault = 'layui-this',
|
||||
childOpenClass = '',
|
||||
headerMenuCheckDefault = 'layui-this';
|
||||
|
||||
if (menuChildOpen) childOpenClass = ' layui-nav-itemed';
|
||||
var headerMenuHtml = this.each(menuList, function (index, val) { //顶部菜单渲染
|
||||
var menu = 'multi_module_' + index ;
|
||||
var id = menu+"HeaderId";
|
||||
var topMenuItemHtml = "" ;
|
||||
topMenuItemHtml = me.compileMenu({
|
||||
className:headerMenuCheckDefault,
|
||||
menu:menu,
|
||||
id:id,
|
||||
title:val.title,
|
||||
href:"",
|
||||
target:"",
|
||||
children:""
|
||||
});
|
||||
leftMenuHtml+=me.renderLeftMenu(val.child,{
|
||||
parentMenuId:menu,
|
||||
childOpenClass:childOpenClass,
|
||||
leftMenuCheckDefault:leftMenuCheckDefault
|
||||
});
|
||||
headerMobileMenuHtml +=me.compileMenu({ id:id,menu:menu,id:id,icon:val.icon, title:val.title, },true);
|
||||
headerMenuCheckDefault = "";
|
||||
leftMenuCheckDefault = "layui-hide" ;
|
||||
return topMenuItemHtml ;
|
||||
}).join("");
|
||||
$('.layui-layout-body').addClass('layuimini-multi-module'); //多模块标识
|
||||
$('.layuimini-menu-header-pc').html(headerMenuHtml); //电脑
|
||||
$('.layuimini-menu-left').html(leftMenuHtml);
|
||||
$('.layuimini-menu-header-mobile').html(headerMobileMenuHtml); //手机
|
||||
element.init();
|
||||
},
|
||||
|
||||
/**
|
||||
* 监听
|
||||
*/
|
||||
//监听
|
||||
listen: function () {
|
||||
|
||||
/**
|
||||
* 菜单模块切换
|
||||
*/
|
||||
$('body').on('click', '[data-menu]', function () {
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000});
|
||||
var menuId = $(this).attr('data-menu');
|
||||
// header
|
||||
$(".layuimini-header-menu .layui-nav-item.layui-this").removeClass('layui-this');
|
||||
$(this).addClass('layui-this');
|
||||
// left
|
||||
$(".layuimini-menu-left .layui-nav.layui-nav-tree.layui-this").addClass('layui-hide');
|
||||
$(".layuimini-menu-left .layui-nav.layui-nav-tree.layui-this.layui-hide").removeClass('layui-this');
|
||||
$("#" + menuId).removeClass('layui-hide');
|
||||
$("#" + menuId).addClass('layui-this');
|
||||
layer.close(loading);
|
||||
});
|
||||
|
||||
/**
|
||||
* 菜单缩放
|
||||
*/
|
||||
$('body').on('click', '.layuimini-site-mobile', function () {
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000});
|
||||
var isShow = $('.layuimini-tool [data-side-fold]').attr('data-side-fold');
|
||||
if (isShow == 1) { // 缩放
|
||||
$('.layuimini-tool [data-side-fold]').attr('data-side-fold', 0);
|
||||
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-indent');
|
||||
$('.layui-layout-body').removeClass('layuimini-all');
|
||||
$('.layui-layout-body').addClass('layuimini-mini');
|
||||
} else { // 正常
|
||||
$('.layuimini-tool [data-side-fold]').attr('data-side-fold', 1);
|
||||
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-outdent');
|
||||
$('.layui-layout-body').removeClass('layuimini-mini');
|
||||
$('.layui-layout-body').addClass('layuimini-all');
|
||||
layer.close(window.openTips);
|
||||
}
|
||||
element.init();
|
||||
layer.close(loading);
|
||||
});
|
||||
/**
|
||||
* 菜单缩放
|
||||
*/
|
||||
//菜单缩放
|
||||
$('body').on('click', '[data-side-fold]', function () {
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000});
|
||||
var isShow = $('.layuimini-tool [data-side-fold]').attr('data-side-fold');
|
||||
@@ -211,40 +96,17 @@ layui.define(["element","laytpl" ,"jquery"], function (exports) {
|
||||
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-indent');
|
||||
$('.layui-layout-body').removeClass('layuimini-all');
|
||||
$('.layui-layout-body').addClass('layuimini-mini');
|
||||
// $(".menu-li").each(function (idx,el) {
|
||||
// $(el).addClass("hidden-sub-menu");
|
||||
// });
|
||||
|
||||
} else { // 正常
|
||||
$('.layuimini-tool [data-side-fold]').attr('data-side-fold', 1);
|
||||
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-outdent');
|
||||
$('.layui-layout-body').removeClass('layuimini-mini');
|
||||
$('.layui-layout-body').addClass('layuimini-all');
|
||||
// $(".menu-li").each(function (idx,el) {
|
||||
// $(el).removeClass("hidden-sub-menu");
|
||||
// });
|
||||
layer.close(window.openTips);
|
||||
}
|
||||
element.init();
|
||||
layer.close(loading);
|
||||
});
|
||||
|
||||
/**
|
||||
* 手机端点开模块
|
||||
*/
|
||||
$('body').on('click', '.layuimini-header-menu.layuimini-mobile-show dd', function () {
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000});
|
||||
var check = $('.layuimini-tool [data-side-fold]').attr('data-side-fold');
|
||||
if(check === "1"){
|
||||
$('.layuimini-site-mobile').trigger("click");
|
||||
element.init();
|
||||
}
|
||||
layer.close(loading);
|
||||
});
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
|
||||
exports("miniMenu", miniMenu);
|
||||
});
|
||||
|
||||
@@ -1,27 +1,13 @@
|
||||
/**
|
||||
* date:2020/02/27
|
||||
* author:Mr.Chung
|
||||
* version:2.0
|
||||
* description:layuimini tab框架扩展
|
||||
*/
|
||||
layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
var element = layui.element,
|
||||
layer = layui.layer,
|
||||
$ = layui.$;
|
||||
|
||||
|
||||
var element = layui.element,layer = layui.layer,$ = layui.$;
|
||||
var miniTab = {
|
||||
|
||||
/**
|
||||
* 初始化tab
|
||||
* @param options
|
||||
*/
|
||||
//初始化tab
|
||||
render: function (options) {
|
||||
options.filter = options.filter || null;
|
||||
options.multiModule = options.multiModule || false;
|
||||
options.urlHashLocation = options.urlHashLocation || false;
|
||||
options.maxTabNum = options.maxTabNum || 20;
|
||||
options.menuList = options.menuList || []; // todo 后期菜单想改为不操作dom, 而是直接操作初始化传过来的数据
|
||||
options.menuList = options.menuList || [];
|
||||
options.homeInfo = options.homeInfo || {};
|
||||
options.listenSwichCallback = options.listenSwichCallback || function () {
|
||||
};
|
||||
@@ -30,15 +16,7 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
miniTab.listenSwitch(options);
|
||||
miniTab.listenHash(options);
|
||||
},
|
||||
|
||||
/**
|
||||
* 新建tab窗口
|
||||
* @param options.tabId
|
||||
* @param options.href
|
||||
* @param options.title
|
||||
* @param options.isIframe
|
||||
* @param options.maxTabNum
|
||||
*/
|
||||
//新建tab窗口
|
||||
create: function (options) {
|
||||
options.tabId = options.tabId || null;
|
||||
options.href = options.href || null;
|
||||
@@ -59,35 +37,20 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
$('.layuimini-menu-left').attr('layuimini-tab-tag', 'add');
|
||||
sessionStorage.setItem('layuiminimenu_' + options.tabId, options.title);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 切换选项卡
|
||||
* @param tabId
|
||||
*/
|
||||
//切换选项卡
|
||||
change: function (tabId) {
|
||||
element.tabChange('layuiminiTab', tabId);
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除tab窗口
|
||||
* @param tabId
|
||||
* @param isParent
|
||||
*/
|
||||
//删除tab窗口
|
||||
delete: function (tabId, isParent) {
|
||||
// todo 未知BUG,不知道是不是layui问题,必须先删除元素
|
||||
$(".layuimini-tab .layui-tab-title .layui-unselect.layui-tab-bar").remove();
|
||||
|
||||
if (isParent === true) {
|
||||
parent.layui.element.tabDelete('layuiminiTab', tabId);
|
||||
} else {
|
||||
element.tabDelete('layuiminiTab', tabId);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 在iframe层打开新tab方法
|
||||
*/
|
||||
//在iframe层打开新tab方法
|
||||
openNewTabByIframe: function (options) {
|
||||
options.href = options.href || null;
|
||||
options.title = options.title || null;
|
||||
@@ -105,10 +68,7 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
parent.layui.element.tabChange('layuiminiTab', options.href);
|
||||
parent.layer.close(loading);
|
||||
},
|
||||
|
||||
/**
|
||||
* 在iframe层关闭当前tab方法
|
||||
*/
|
||||
//在iframe层关闭当前tab方法
|
||||
deleteCurrentByIframe: function () {
|
||||
var ele = $(".layuimini-tab .layui-tab-title li.layui-this", parent.document);
|
||||
if (ele.length > 0) {
|
||||
@@ -116,10 +76,7 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
miniTab.delete(layId, true);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 判断tab窗口
|
||||
*/
|
||||
//判断tab窗口
|
||||
check: function (tabId, isIframe) {
|
||||
// 判断选项卡上是否有
|
||||
var checkTab = false;
|
||||
@@ -140,12 +97,7 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
}
|
||||
return checkTab;
|
||||
},
|
||||
|
||||
/**
|
||||
* 开启tab右键菜单
|
||||
* @param tabId
|
||||
* @param left
|
||||
*/
|
||||
//开启tab右键菜单
|
||||
openTabRignMenu: function (tabId, left) {
|
||||
miniTab.closeTabRignMenu();
|
||||
var menuHtml = '<div class="layui-unselect layui-form-select layui-form-selected layuimini-tab-mousedown layui-show" data-tab-id="' + tabId + '" style="left: ' + left + 'px!important">\n' +
|
||||
@@ -159,20 +111,12 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
$('.layuimini-tab .layui-tab-title').after(menuHtml);
|
||||
$('.layuimini-tab .layui-tab-content').after(makeHtml);
|
||||
},
|
||||
|
||||
/**
|
||||
* 关闭tab右键菜单
|
||||
*/
|
||||
//关闭tab右键菜单
|
||||
closeTabRignMenu: function () {
|
||||
$('.layuimini-tab-mousedown').remove();
|
||||
$('.layuimini-tab-make').remove();
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询菜单信息
|
||||
* @param href
|
||||
* @param menuList
|
||||
*/
|
||||
//查询菜单信息
|
||||
searchMenu: function (href, menuList) {
|
||||
var menu;
|
||||
for (key in menuList) {
|
||||
@@ -191,18 +135,11 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
}
|
||||
return menu;
|
||||
},
|
||||
|
||||
/**
|
||||
* 监听
|
||||
* @param options
|
||||
*/
|
||||
//监听
|
||||
listen: function (options) {
|
||||
options = options || {};
|
||||
options.maxTabNum = options.maxTabNum || 20;
|
||||
|
||||
/**
|
||||
* 打开新窗口
|
||||
*/
|
||||
//打开新窗口
|
||||
$('body').on('click', '[layuimini-href]', function () {
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000});
|
||||
var tabId = $(this).attr('layuimini-href'),
|
||||
@@ -237,10 +174,7 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
element.tabChange('layuiminiTab', tabId);
|
||||
layer.close(loading);
|
||||
});
|
||||
|
||||
/**
|
||||
* 在iframe子菜单上打开新窗口
|
||||
*/
|
||||
//在iframe子菜单上打开新窗口
|
||||
$('body').on('click', '[layuimini-content-href]', function () {
|
||||
var loading = parent.layer.load(0, {shade: false, time: 2 * 1000});
|
||||
var tabId = $(this).attr('layuimini-content-href'),
|
||||
@@ -266,10 +200,7 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
parent.layui.element.tabChange('layuiminiTab', tabId);
|
||||
parent.layer.close(loading);
|
||||
});
|
||||
|
||||
/**
|
||||
* 关闭选项卡
|
||||
**/
|
||||
//关闭选项卡
|
||||
$('body').on('click', '.layuimini-tab .layui-tab-title .layui-tab-close', function () {
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000});
|
||||
var $parent = $(this).parent();
|
||||
@@ -279,10 +210,7 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
}
|
||||
layer.close(loading);
|
||||
});
|
||||
|
||||
/**
|
||||
* 选项卡操作
|
||||
*/
|
||||
//选项卡操作
|
||||
$('body').on('click', '[layuimini-tab-close]', function () {
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000});
|
||||
var closeType = $(this).attr('layuimini-tab-close');
|
||||
@@ -304,18 +232,12 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
});
|
||||
layer.close(loading);
|
||||
});
|
||||
|
||||
/**
|
||||
* 禁用网页右键
|
||||
*/
|
||||
//禁用网页右键
|
||||
$(".layuimini-tab .layui-tab-title").unbind("mousedown").bind("contextmenu", function (e) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* 注册鼠标右键
|
||||
*/
|
||||
//注册鼠标右键
|
||||
$('body').on('mousedown', '.layuimini-tab .layui-tab-title li', function (e) {
|
||||
var left = $(this).offset().left - $('.layuimini-tab ').offset().left + ($(this).width() / 2),
|
||||
tabId = $(this).attr('lay-id');
|
||||
@@ -323,17 +245,11 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
miniTab.openTabRignMenu(tabId, left);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* 关闭tab右键菜单
|
||||
*/
|
||||
//关闭tab右键菜单
|
||||
$('body').on('click', '.layui-body,.layui-header,.layuimini-menu-left,.layuimini-tab-make', function () {
|
||||
miniTab.closeTabRignMenu();
|
||||
});
|
||||
|
||||
/**
|
||||
* tab右键选项卡操作
|
||||
*/
|
||||
//tab右键选项卡操作
|
||||
$('body').on('click', '[layuimini-tab-menu-close]', function () {
|
||||
var loading = layer.load(0, {shade: false, time: 2 * 1000});
|
||||
var closeType = $(this).attr('layuimini-tab-menu-close'),
|
||||
@@ -358,10 +274,7 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 监听tab切换
|
||||
* @param options
|
||||
*/
|
||||
//监听tab切换
|
||||
listenSwitch: function (options) {
|
||||
options.filter = options.filter || null;
|
||||
options.multiModule = options.multiModule || false;
|
||||
@@ -382,21 +295,12 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
$('.layuimini-menu-left').attr('layuimini-tab-tag', 'no')
|
||||
} else {
|
||||
$("[layuimini-href]").parent().removeClass('layui-this');
|
||||
if (options.multiModule) {
|
||||
miniTab.listenSwitchMultiModule(tabId);
|
||||
} else {
|
||||
miniTab.listenSwitchSingleModule(tabId);
|
||||
}
|
||||
miniTab.listenSwitchSingleModule(tabId);
|
||||
}
|
||||
miniTab.rollPosition();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 监听hash变化
|
||||
* @param options
|
||||
* @returns {boolean}
|
||||
*/
|
||||
//监听hash变化
|
||||
listenHash: function (options) {
|
||||
options.urlHashLocation = options.urlHashLocation || false;
|
||||
options.maxTabNum = options.maxTabNum || 20;
|
||||
@@ -405,10 +309,8 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
if (!options.urlHashLocation) return false;
|
||||
var tabId = location.hash.replace(/^#/, '');
|
||||
if (tabId === null || tabId === undefined || tabId ==='') return false;
|
||||
|
||||
// 判断是否为首页
|
||||
if(tabId ===options.homeInfo.href) return false;
|
||||
|
||||
// 判断是否为右侧菜单
|
||||
var menu = miniTab.searchMenu(tabId, options.menuList);
|
||||
if (menu !== undefined) {
|
||||
@@ -423,7 +325,6 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
element.tabChange('layuiminiTab', tabId);
|
||||
return false;
|
||||
}
|
||||
|
||||
// 判断是否为快捷菜单
|
||||
var isSearchMenu = false;
|
||||
$("[layuimini-content-href]").each(function () {
|
||||
@@ -443,7 +344,6 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
}
|
||||
});
|
||||
if (isSearchMenu) return false;
|
||||
|
||||
// 既不是右侧菜单、快捷菜单,就直接打开
|
||||
var title = sessionStorage.getItem('layuiminimenu_' + tabId) === null ? tabId : sessionStorage.getItem('layuiminimenu_' + tabId);
|
||||
miniTab.create({
|
||||
@@ -456,10 +356,7 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
element.tabChange('layuiminiTab', tabId);
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* 监听滚动
|
||||
*/
|
||||
//监听滚动
|
||||
listenRoll: function () {
|
||||
$(".layuimini-tab-roll-left").click(function () {
|
||||
miniTab.rollClick("left");
|
||||
@@ -468,11 +365,7 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
miniTab.rollClick("right");
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 单模块切换
|
||||
* @param tabId
|
||||
*/
|
||||
//单模块切换
|
||||
listenSwitchSingleModule: function (tabId) {
|
||||
$("[layuimini-href]").each(function () {
|
||||
if ($(this).attr("layuimini-href") === tabId) {
|
||||
@@ -499,50 +392,7 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 多模块切换
|
||||
* @param tabId
|
||||
*/
|
||||
listenSwitchMultiModule: function (tabId) {
|
||||
$("[layuimini-href]").each(function () {
|
||||
if ($(this).attr("layuimini-href") === tabId) {
|
||||
|
||||
// 自动展开菜单栏
|
||||
var addMenuClass = function ($element, type) {
|
||||
if (type === 1) {
|
||||
$element.addClass('layui-this');
|
||||
if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-this')) {
|
||||
var moduleId = $element.parent().attr('id');
|
||||
$(".layuimini-header-menu li").attr('class', 'layui-nav-item');
|
||||
$("#" + moduleId + "HeaderId").addClass("layui-this");
|
||||
$(".layuimini-menu-left .layui-nav.layui-nav-tree").attr('class', 'layui-nav layui-nav-tree layui-hide');
|
||||
$("#" + moduleId).attr('class', 'layui-nav layui-nav-tree layui-this');
|
||||
} else {
|
||||
addMenuClass($element.parent().parent(), 2);
|
||||
}
|
||||
} else {
|
||||
$element.addClass('layui-nav-itemed');
|
||||
if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-nav-itemed')) {
|
||||
var moduleId = $element.parent().attr('id');
|
||||
$(".layuimini-header-menu li").attr('class', 'layui-nav-item');
|
||||
$("#" + moduleId + "HeaderId").addClass("layui-this");
|
||||
$(".layuimini-menu-left .layui-nav.layui-nav-tree").attr('class', 'layui-nav layui-nav-tree layui-hide');
|
||||
$("#" + moduleId).attr('class', 'layui-nav layui-nav-tree layui-this');
|
||||
} else {
|
||||
addMenuClass($element.parent().parent(), 2);
|
||||
}
|
||||
}
|
||||
};
|
||||
addMenuClass($(this).parent(), 1);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 自动定位
|
||||
*/
|
||||
//自动定位
|
||||
rollPosition: function () {
|
||||
var $tabTitle = $('.layuimini-tab .layui-tab-title');
|
||||
var autoLeft = 0;
|
||||
@@ -557,11 +407,7 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
scrollLeft: autoLeft - $tabTitle.width() / 3
|
||||
}, 200);
|
||||
},
|
||||
|
||||
/**
|
||||
* 点击滚动
|
||||
* @param direction
|
||||
*/
|
||||
//点击滚动
|
||||
rollClick: function (direction) {
|
||||
var $tabTitle = $('.layuimini-tab .layui-tab-title');
|
||||
var left = $tabTitle.scrollLeft();
|
||||
@@ -575,8 +421,6 @@ layui.define(["element", "layer", "jquery"], function (exports) {
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
exports("miniTab", miniTab);
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,396 +0,0 @@
|
||||
/* 最外层容器 */
|
||||
.ew-tree-table {
|
||||
margin: 10px 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ew-tree-table .layui-table {
|
||||
margin: 0;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
/* 表格容器 */
|
||||
.ew-tree-table-group {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* 主体表格容器 */
|
||||
.ew-tree-table > .ew-tree-table-group > .ew-tree-table-box {
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 表头表格容器 */
|
||||
.ew-tree-table > .ew-tree-table-group > .ew-tree-table-head {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
/* 容器加边框 */
|
||||
.ew-tree-table .ew-tree-table-border {
|
||||
position: absolute;
|
||||
background-color: #e6e6e6;
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-table-border.top {
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-table-border.left {
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-table-border.right {
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 0.52px;
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-table-border.bottom {
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 0.52px;
|
||||
}
|
||||
|
||||
/* table的loading */
|
||||
.ew-tree-table .ew-tree-table-box > .ew-tree-table-loading {
|
||||
padding: 10px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-table-box > .ew-tree-table-loading > i {
|
||||
color: #999;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-table-box > .ew-tree-table-loading.ew-loading-float {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/* 空数据提示 */
|
||||
.ew-tree-table .ew-tree-table-box > .ew-tree-table-empty {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 折叠箭头 */
|
||||
.ew-tree-table .ew-tree-table-arrow {
|
||||
margin-right: 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-table-arrow:before {
|
||||
content: "\e623";
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-table-open .ew-tree-table-arrow:before {
|
||||
content: "\e625";
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-table-arrow.arrow2 {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
line-height: 16px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-table-arrow.arrow2:before {
|
||||
content: "\e602";
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-table-open .ew-tree-table-arrow.arrow2:before {
|
||||
content: "\e61a";
|
||||
}
|
||||
|
||||
/* 箭头隐藏 */
|
||||
.ew-tree-table-arrow.ew-tree-table-arrow-hide {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/* 箭头变加载中状态 */
|
||||
.ew-tree-table .ew-tree-table-loading > td .ew-tree-pack > .ew-tree-table-arrow:before {
|
||||
content: "\e63d" !important;
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-table-loading > td .ew-tree-pack > .ew-tree-table-arrow {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-table-loading > td .ew-tree-pack > .ew-tree-table-arrow + * {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
/* tr加载中禁用事件 */
|
||||
.ew-tree-table tr.ew-tree-table-loading > * {
|
||||
pointer-events: none !important;
|
||||
}
|
||||
|
||||
/* 图标列 */
|
||||
.ew-tree-table .ew-tree-pack {
|
||||
cursor: pointer;
|
||||
line-height: 16px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-pack > span {
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* 折叠行 */
|
||||
.ew-tree-table .ew-tree-tb-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 缩进 */
|
||||
.ew-tree-table .ew-tree-table-indent {
|
||||
margin-right: 5px;
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
/* 图标 */
|
||||
.ew-tree-table .ew-tree-icon {
|
||||
margin-right: 5px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-icon-folder, .ew-tree-table .ew-tree-icon-file {
|
||||
width: 22px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-icon-folder:after, .ew-tree-table .ew-tree-icon-file:after {
|
||||
content: "";
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: -3px;
|
||||
background-size: cover;
|
||||
background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNTc0MDYyMzE3MTQ3IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjIxNTgiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iNjQiIGhlaWdodD0iNjQiPjxkZWZzPjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PC9zdHlsZT48L2RlZnM+PHBhdGggZD0iTTE4MSA4MjNoLTMxLjFjLTI4LjYgMC01MS45LTIzLjItNTEuOS01MS45VjI1Mi40YzAtMjguNiAyMy4yLTUxLjkgNTEuOS01MS45SDQzMGw4MyA3Ny44aDMzMmM0NS42IDAgODMgMzUgODMgNzcuOHYzODkuMWMwIDQyLjgtMzcuMyA3Ny44LTgzIDc3LjhIMTgxeiIgcC1pZD0iMjE1OSIgZmlsbD0iI0ZGQTUwMCI+PC9wYXRoPjwvc3ZnPg==")
|
||||
}
|
||||
|
||||
.ew-tree-table tr.ew-tree-table-open > td > .ew-tree-pack .ew-tree-icon-folder:after {
|
||||
background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNTc0MDYyMzA5MDQwIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjE5NzciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iNjQiIGhlaWdodD0iNjQiPjxkZWZzPjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PC9zdHlsZT48L2RlZnM+PHBhdGggZD0iTTMyNi40IDQ2MC4xSDkyOGwtODIuMyAzMjRjLTUuOCAyMy0yNi42IDM5LjEtNTAuMyAzOS4xSDE0OS45Yy0yOC42IDAtNTEuOS0yMy4yLTUxLjktNTEuOVYyNTIuNmMwLTI4LjYgMjMuMi01MS45IDUxLjktNTEuOUg0MTNsMTA1IDEwMy43aDI5MS44YzE0LjMgMCAyNS45IDExLjYgMjUuOSAyNS45djc3LjhoLTUyN0wyMDMuNCA1NjMuOWg1Mi43bDcwLjMtMTAzLjh6IiBwLWlkPSIxOTc4IiBmaWxsPSIjRkZBNTAwIj48L3BhdGg+PC9zdmc+")
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-icon-file:after {
|
||||
background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNTc0MDYyNTE1MDUxIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjEzNTE4IiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0Ij48ZGVmcz48c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwvc3R5bGU+PC9kZWZzPjxwYXRoIGQ9Ik03NDEuMyAxNjEuNmgtNDIuNGMtMTAuNSAwLTE5LjEgOC42LTE5LjEgMTkuMXM4LjYgMTkuMSAxOS4xIDE5LjFoNDIuNGM0MiAwIDc2LjIgMzQuMiA3Ni4yIDc2LjN2NDc3LjRjMCA0Mi4xLTM0LjMgNzYuMy03Ni40IDc2LjNIMjgyLjljLTQyLjEgMC03Ni4zLTM0LjItNzYuMy03Ni4zVjI3Ni4xYzAtNDIuMSAzNC4yLTc2LjMgNzYuMy03Ni4zaDQ0LjljMTAuNSAwIDE5LjEtOC42IDE5LjEtMTkuMXMtOC42LTE5LjEtMTkuMS0xOS4xaC00NC45Yy02My4xIDAtMTE0LjUgNTEuNC0xMTQuNSAxMTQuNXY0NzcuNGMwIDYzLjEgNTEuNCAxMTQuNSAxMTQuNSAxMTQuNWg0NTguM2M2My4xIDAgMTE0LjUtNTEuNCAxMTQuNS0xMTQuNVYyNzYuMWMtMC4xLTYzLjEtNTEuNC0xMTQuNS0xMTQuNC0xMTQuNXoiIHAtaWQ9IjEzNTE5IiBmaWxsPSIjRkZBNTAwIj48L3BhdGg+PHBhdGggZD0iTTY4MC42IDUwNS4zSDM0My40Yy0xMi4zIDAtMjIuMyA4LjYtMjIuMyAxOS4xczEwIDE5LjEgMjIuMyAxOS4xaDMzNy4yYzEyLjMgMCAyMi4zLTguNiAyMi4zLTE5LjEgMC0xMC42LTEwLTE5LjEtMjIuMy0xOS4xek00MzkuMyAyMTMuM2gxNDQuNmMxOSAwIDM0LjQtMTIuOCAzNC40LTI4LjZzLTE1LjQtMjguNi0zNC40LTI4LjZINDM5LjNjLTE5IDAtMzQuNCAxMi44LTM0LjQgMjguNi0wLjEgMTUuNyAxNS4zIDI4LjYgMzQuNCAyOC42ek02ODAuNiA2NThIMzQzLjRjLTEyLjMgMC0yMi4zIDguNS0yMi4zIDE5LjEgMCAxMC41IDEwIDE5LjEgMjIuMyAxOS4xaDMzNy4yYzEyLjMgMCAyMi4zLTguNiAyMi4zLTE5LjEgMC0xMC42LTEwLTE5LjEtMjIuMy0xOS4xek02ODAuNiAzNTIuNUgzNDMuNGMtMTIuMyAwLTIyLjMgOC42LTIyLjMgMTkuMXMxMCAxOS4xIDIyLjMgMTkuMWgzMzcuMmMxMi4zIDAgMjIuMy04LjYgMjIuMy0xOS4xIDAtMTAuNS0xMC0xOS4xLTIyLjMtMTkuMXoiIHAtaWQ9IjEzNTIwIiBmaWxsPSIjRkZBNTAwIj48L3BhdGg+PC9zdmc+")
|
||||
}
|
||||
|
||||
/* 序号列调整 */
|
||||
.ew-tree-table td[data-type="numbers"] {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 单元格内表单元素样式调整 */
|
||||
.ew-tree-table .layui-form-switch {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.ew-tree-table .layui-form-radio {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* checkbox和radio列调整 */
|
||||
.ew-tree-table-checkbox + .layui-form-checkbox {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.ew-tree-table-checkbox + .layui-form-checkbox > .layui-icon {
|
||||
color: transparent;
|
||||
transition: background-color .1s linear;
|
||||
}
|
||||
|
||||
.ew-tree-table-checkbox + .layui-form-checkbox.layui-form-checked > .layui-icon {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ew-tree-table-radio + .layui-form-radio {
|
||||
padding: 0;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.ew-tree-table-radio + .layui-form-radio > i {
|
||||
margin: 0;
|
||||
height: 20px;
|
||||
font-size: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
/* checkbox半选状态 */
|
||||
.ew-tree-table .layui-form-checked.ew-form-indeterminate > .layui-icon:before {
|
||||
content: "";
|
||||
width: 9px;
|
||||
height: 2px;
|
||||
display: inline-block;
|
||||
background-color: #eee;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.ew-tree-table .layui-form-checked.ew-form-indeterminate > .layui-icon {
|
||||
line-height: 14px;
|
||||
}
|
||||
|
||||
/* 单元格编辑 */
|
||||
.ew-tree-table .layui-table td[data-edit] {
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-table-edit {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0;
|
||||
box-shadow: 1px 1px 20px rgba(0, 0, 0, .15);
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-table-edit:focus {
|
||||
border-color: #5FB878 !important;
|
||||
}
|
||||
|
||||
.ew-tree-table .ew-tree-table-edit.layui-form-danger {
|
||||
border-color: #FF5722 !important;
|
||||
}
|
||||
|
||||
/* 搜索数据隐藏行 */
|
||||
.ew-tree-table tr.ew-tree-table-filter-hide {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* 单元格超出隐藏 */
|
||||
.ew-tree-table-td-single {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ew-tree-table-td-single > .ew-tree-tips {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.ew-tree-table-td-single > .ew-tree-tips-c {
|
||||
position: absolute;
|
||||
right: -10px;
|
||||
top: -6px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
border-radius: 50%;
|
||||
background-color: #666;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ew-tree-table table tr:first-child .ew-tree-table-td-single > .ew-tree-tips-c {
|
||||
top: 2px;
|
||||
bottom: auto;
|
||||
right: -12px;
|
||||
}
|
||||
|
||||
.ew-tree-table-td-single.ew-tree-tips-open {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 5;
|
||||
background-color: #fff;
|
||||
min-height: 100%;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 3px 3px 8px rgba(0, 0, 0, .15);
|
||||
}
|
||||
|
||||
.ew-tree-table table thead .ew-tree-table-td-single.ew-tree-tips-open {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.ew-tree-table-td-single.ew-tree-tips-open.ew-show-left {
|
||||
right: 0;
|
||||
left: auto;
|
||||
box-shadow: -3px 3px 8px rgba(0, 0, 0, .15);
|
||||
}
|
||||
|
||||
.ew-tree-table-td-single.ew-tree-tips-open.ew-show-bottom {
|
||||
bottom: 0;
|
||||
top: auto;
|
||||
box-shadow: 3px -3px 8px rgba(0, 0, 0, .15);
|
||||
}
|
||||
|
||||
.ew-tree-table-td-single.ew-tree-tips-open.ew-show-left.ew-show-bottom {
|
||||
box-shadow: -3px -3px 8px rgba(0, 0, 0, .15);
|
||||
}
|
||||
|
||||
.ew-tree-table-td-single.ew-tree-tips-open > .ew-tree-tips {
|
||||
padding: 9px 15px;
|
||||
overflow: auto;
|
||||
max-width: 280px;
|
||||
max-height: 100px;
|
||||
width: max-content;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.ew-tree-table-td-single.ew-tree-tips-open > .ew-tree-tips-c {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.ew-tree-table-td-single.ew-tree-tips-open.ew-show-left > .ew-tree-tips-c {
|
||||
left: -10px;
|
||||
right: auto !important;
|
||||
}
|
||||
|
||||
.ew-tree-table td > .layui-table-grid-down {
|
||||
bottom: 0;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* 辅助样式 */
|
||||
.pd-tb-0 {
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.break-all {
|
||||
word-break: break-all !important;
|
||||
}
|
||||
|
||||
/* 列宽拖拽调整 */
|
||||
/*.ew-tree-table .ew-tb-resize {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 10px;
|
||||
cursor: col-resize;
|
||||
}*/
|
||||
File diff suppressed because it is too large
Load Diff
@@ -248,18 +248,6 @@ layui.use(['form','table','dropdown','miniTab'], function () {
|
||||
return true;
|
||||
}
|
||||
})
|
||||
}else if(event === 'generate'){ //生成大量链接
|
||||
if($('#fid').val() == 0 ){
|
||||
layer.msg("请选择一个分类",{icon:3});
|
||||
return;
|
||||
}
|
||||
var fid = $('#fid').val();
|
||||
for (i = 0; i < 1000; i++) {
|
||||
$.post(get_api('write_link','add'),{title:'百度翻译'+i,fid:fid,url:'https://fanyi.baidu.com/#zh/en/'+i+'_'+randomString(5)},function(data,status){
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ function _GET(letiable,top = false){
|
||||
let pair = lets[i].split("=");
|
||||
if(pair[0] == letiable){return pair[1];}
|
||||
}
|
||||
return(false);
|
||||
return false;
|
||||
}
|
||||
//时间戳格式化
|
||||
function timestampToTime(timestamp) {
|
||||
@@ -68,4 +68,12 @@ function Get_baseUrl() {
|
||||
pathname = pathname.substring(0, pathname.lastIndexOf("/") + 1),
|
||||
baseUrl = protocol + "//" + hostname + (port ? ":" + port : "") + pathname;
|
||||
return baseUrl;
|
||||
}
|
||||
|
||||
//帮助
|
||||
if (typeof jQuery != 'undefined') {
|
||||
$("#help").click(function(){
|
||||
window.open("https://gitee.com/tznb/TwoNav/wikis/pages?sort_id=" + $(this).attr("sort_id") + "&doc_id=3767990","target");
|
||||
return false;
|
||||
});
|
||||
}
|
||||
@@ -96,7 +96,8 @@
|
||||
|
||||
<?php } ?>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block"><button class="layui-btn layui-btn-normal" lay-submit lay-filter="save">确认保存</button></div>
|
||||
<button class="layui-btn layui-btn-primary layui-border-black" id="help" sort_id="7968924">帮助</button>
|
||||
<button class="layui-btn layui-btn-normal" lay-submit lay-filter="save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -146,6 +147,7 @@ layui.use(['jquery','form','upload'], function () {
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
<label class="layui-form-label required">所属分类</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="fid" id="fid" lay-verify="required">
|
||||
<option value=""></option><?php echo_category(true); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
<div class="layui-input-block">
|
||||
<select name="pwd_id" id="pwd_id">
|
||||
<option value="0">无</option>
|
||||
<?php echo_pwds(); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<div class="layui-progress" lay-filter="progress" id="progress" style="display:none;">
|
||||
<div class="layui-progress-bar"></div>
|
||||
</div>
|
||||
<blockquote class="layui-elem-quote" style="margin-top: 10px;border-left: 5px solid #FF5722; color: #FF5722;" id='guide'>第一步:请上传数据,支持: db3 / html 格式(最大10M),使用前请参考<a href="https://gitee.com/tznb/TwoNav/wikis/pages?sort_id=7937908&doc_id=3674619" target="_blank" rel = "nofollow">帮助文档</a></blockquote>
|
||||
<blockquote class="layui-elem-quote" style="margin-top: 10px;border-left: 5px solid #FF5722; color: #FF5722;" id='guide'>第一步:请上传数据,支持: db3 / html 格式(最大10M),使用前请参考<a href="https://gitee.com/tznb/TwoNav/wikis/pages?sort_id=7968661&doc_id=3767990" target="_blank" rel = "nofollow">帮助文档</a></blockquote>
|
||||
|
||||
<div class="layui-form-item" style="display:none;" id='fid'>
|
||||
<label class="layui-form-label">所属分类</label>
|
||||
@@ -500,7 +500,7 @@ layui.use(['layer','element','upload','form','table'], function(){
|
||||
}else if(obj.event == 'local_refresh'){
|
||||
table.reload('list');
|
||||
}else if(obj.event == 'local_help'){
|
||||
window.open('https://gitee.com/tznb/TwoNav/wikis/pages?sort_id=7937908&doc_id=3674619');
|
||||
window.open('https://gitee.com/tznb/TwoNav/wikis/pages?sort_id=7968661&doc_id=3767990');
|
||||
}
|
||||
});
|
||||
//行事件
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<?php
|
||||
$title='概况';
|
||||
$awesome=true;
|
||||
$HOST = getindexurl();
|
||||
|
||||
|
||||
//读取缓存数据
|
||||
$Notice = get_db('global_config','v',['k'=>'notice']);
|
||||
@@ -261,11 +259,11 @@ require 'header.php';
|
||||
<tr>
|
||||
<td>专属地址</td>
|
||||
<td>
|
||||
<a href="<?php echo $HOST.'?u='.U;?>" target="_blank">我的主页</a>
|
||||
<a href="<?php echo './?u='.U;?>" target="_blank">我的主页</a>
|
||||
|
||||
<a href="<?php echo $HOST.'?c='.$USER_DB['Login'].'&u='.U;?>" target="_blank">TwoNav - 登录</a>
|
||||
<a href="<?php echo './?c='.$USER_DB['Login'].'&u='.U;?>" target="_blank">TwoNav - 登录</a>
|
||||
|
||||
<i class="fa fa-arrow-left layui-hide-xs" style="color: #ff5722;"> <span style="color: #ff5722;" title="收藏专属入口可避免出现无法登录后台的情况">建议收藏</span></i>
|
||||
<i class="fa fa-arrow-left layui-hide-xs" style="color: #ff5722;"> <span style="color: #ff5722;" title="收藏专属入口可避免无法登录后台的情况">建议收藏</span></i>
|
||||
</td>
|
||||
<tr>
|
||||
</tbody>
|
||||
@@ -285,6 +283,10 @@ if($USER_DB['UserGroup'] == 'root'){
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
layui.extend({
|
||||
echarts: '{/}<?php echo $libs?>/Layui/extend/echarts',
|
||||
echartsTheme: '{/}<?php echo $libs?>/Layui/extend/echartsTheme'
|
||||
});
|
||||
layui.use(['layer', 'miniTab','echarts'], function () {
|
||||
var $ = layui.jquery,
|
||||
layer = layui.layer,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:11px;font-weight:700;color:#fff;line-height:1;vertical-align:middle;white-space:nowrap;text-align:center;background-color:#777;border-radius:10px}
|
||||
</style>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main" style=" margin-left: 0px; ">
|
||||
<div class="layuimini-main">
|
||||
<form class="layui-form layuimini-form" lay-filter="form">
|
||||
|
||||
<div class="layui-form-item">
|
||||
|
||||
@@ -67,7 +67,6 @@
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal layui-hide-xs" lay-event="batch_disable" id="batch_disable">设为禁用</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal layui-btn-danger layui-hide-xs" lay-event="testing" id="testing" <?php echo $global_config['offline']?'style="display:none;"':''?> >检测</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal layui-btn-danger" layuimini-content-href="link_sort" data-title="链接排序">排序模式</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal layui-btn-danger layui-hide-xs" lay-event="generate" id="generate">生成</button>
|
||||
</div>
|
||||
</script>
|
||||
<script src = "<?php echo $libs;?>/jquery/jquery-3.6.0.min.js"></script>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<script type="text/html" id="toolbar">
|
||||
<div class="layui-btn-group">
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="add">新增</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="help">使用说明</button>
|
||||
</div>
|
||||
</script>
|
||||
<script src = "<?php echo $libs;?>/jquery/jquery-3.6.0.min.js"></script>
|
||||
@@ -65,6 +66,9 @@ layui.use(['form','table'], function () {
|
||||
if (obj.event === 'add') {
|
||||
form.val('form', {'pid':'0','name':'','password':'','description':''});
|
||||
index = layer.open({type: 1,scrollbar: false,shadeClose: true,title: '新增分组',area : ['100%', '100%'],content: $('.form')});
|
||||
}else if(obj.event === 'help'){
|
||||
window.open("https://gitee.com/tznb/TwoNav/wikis/pages?sort_id=7969061&doc_id=3767990","target");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ $user_groups = select_db('user_group',['id','code','name'],'');
|
||||
<script src = "./templates/admin/js/public.js?v=<?php echo $Ver;?>"></script>
|
||||
<?php load_static('js');?>
|
||||
<script>
|
||||
var host = '<?php echo getindexurl().'?c='.$global_config['Register']."&key=";?>';
|
||||
var host = Get_baseUrl() + '<?php echo 'index.php?c='.$global_config['Register']."&key=";?>';
|
||||
|
||||
layui.use(['table','layer','form'], function(){
|
||||
var table = layui.table;
|
||||
|
||||
@@ -1,31 +1,39 @@
|
||||
<?php
|
||||
if($USER_DB['UserGroup'] != 'root'){$content='您没有权限访问此页面'; require(DIR.'/templates/admin/page/404.php');exit;}
|
||||
$title='授权管理';require(dirname(__DIR__).'/header.php');
|
||||
$subscribe = unserialize(get_db('global_config','v',["k" => "s_subscribe"])); ?>
|
||||
$subscribe = unserialize(get_db('global_config','v',["k" => "s_subscribe"]));
|
||||
$HTTP_HOST = preg_replace('/:\d+$/','',$_SERVER['HTTP_HOST']); //去除端口号
|
||||
?>
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<div class="layui-form layuimini-form layui-form-pane">
|
||||
<h3 style = "margin-bottom:1em;">当前域名:<font color="red"><?php echo $_SERVER['HTTP_HOST']; ?></font> (订阅时填写)</h3>
|
||||
<blockquote class="layui-elem-quote layui-text">
|
||||
<li>1. 查询授权时当前域名必须和订阅填写一致</li>
|
||||
<li>2. 其他二级域名使用时请手动输入订单号/邮箱保存</li>
|
||||
<li>3. 授权未绑定邮箱时邮箱留空,已绑定时请输入正确邮箱</li>
|
||||
<li>4. 如有其他疑问联系技术支持</li>
|
||||
</blockquote>
|
||||
<h3 style = "margin-bottom:1em;">当前域名:<font color="red"><?php echo $HTTP_HOST; ?></font> (订阅时填写)</h3>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">订单号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id = "order_id" name="order_id" value = "<?php echo $subscribe['order_id']; ?>" required autocomplete="off" placeholder="请输入订单号" class="layui-input">
|
||||
<input type="text" id = "order_id" name="order_id" value="<?php echo $subscribe['order_id']; ?>" required autocomplete="off" placeholder="请输入订单号" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">订阅邮箱</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="email" id = "email" value = "<?php echo $subscribe['email']; ?>" required autocomplete="off" placeholder="订阅邮箱" class="layui-input">
|
||||
<input type="text" name="email" id ="email" value="<?php echo $subscribe['email']; ?>" required autocomplete="off" placeholder="订阅邮箱" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" style = "display:none;">
|
||||
<label class="layui-form-label">域名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="domain" id = "domain" value = "<?php echo $_SERVER['HTTP_HOST']; ?>" autocomplete="off" placeholder="网站域名" class="layui-input">
|
||||
<input type="text" name="domain" id ="domain" value="<?php echo $HTTP_HOST; ?>" autocomplete="off" placeholder="网站域名" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -39,9 +47,11 @@ $subscribe = unserialize(get_db('global_config','v',["k" => "s_subscribe"])); ?>
|
||||
<div class="layui-btn-group">
|
||||
<button class="layui-btn layui-btn-normal" lay-submit lay-filter="set_subscribe">保存设置</button>
|
||||
<button class="layui-btn layui-btn-warm" lay-submit lay-filter="reset_subscribe">删除</button>
|
||||
<button class="layui-btn layui-btn-danger" lay-submit lay-filter="buy">购买授权</button>
|
||||
<button class="layui-btn layui-btn-danger" id="help" sort_id="7968669">购买授权</button>
|
||||
<button class="layui-btn" lay-submit lay-filter="get_subscribe">查询授权</button>
|
||||
</div>
|
||||
|
||||
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top:30px;"><legend>授权用户专享</legend></fieldset>
|
||||
<blockquote class="layui-elem-quote layui-text">
|
||||
<li>1. 可使用一键更新功能</li>
|
||||
@@ -59,6 +69,7 @@ $subscribe = unserialize(get_db('global_config','v',["k" => "s_subscribe"])); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src = "<?php echo $libs;?>/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src = "./templates/admin/js/public.js?v=<?php echo $Ver;?>"></script>
|
||||
<?php load_static('js.layui');?>
|
||||
<script>
|
||||
@@ -75,7 +86,6 @@ layui.use(['jquery','form'], function () {
|
||||
if(data.code == 200) {
|
||||
$("#order_id").val(data.data.order_id);
|
||||
$("#end_time").val(timestampToTime(data.data.end_time));
|
||||
//$("#email").attr({"lay-verify":"email"});
|
||||
layer.msg(data.msg, {icon: 1,time: 10000});
|
||||
}else{
|
||||
layer.msg(data.msg, {icon: 5,time: 10000});
|
||||
@@ -109,7 +119,6 @@ layui.use(['jquery','form'], function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
//清空订阅信息
|
||||
form.on('submit(reset_subscribe)', function(data){
|
||||
var order_id = data.field.order_id;
|
||||
@@ -121,11 +130,10 @@ layui.use(['jquery','form'], function () {
|
||||
layer.closeAll('loading');
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
//存储到数据库中
|
||||
function set_subscribe(order_id,email,end_time,domain) {
|
||||
$.post("./index.php?c=api&method=write_subscribe&u=<?php echo $u;?>",{order_id:order_id,email:email,end_time:end_time,domain:domain},function(data,status){
|
||||
$.post(get_api('write_subscribe'),{order_id:order_id,email:email,end_time:end_time,domain:domain},function(data,status){
|
||||
if(data.code == 1) {
|
||||
layer.msg(data.msg, {icon: 1});
|
||||
}else{
|
||||
@@ -133,12 +141,6 @@ layui.use(['jquery','form'], function () {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//购买订阅
|
||||
form.on('submit(buy)', function (data) {
|
||||
window.open("https://gitee.com/tznb/TwoNav/wikis/pages?sort_id=7934408&doc_id=3674619","target");
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -141,6 +141,7 @@
|
||||
</div>
|
||||
</form>
|
||||
</ul>
|
||||
<script src = "<?php echo $libs;?>/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src = "./templates/admin/js/public.js?v=<?php echo $Ver;?>"></script>
|
||||
<script src = "<?php echo $libs?>/Other/ClipBoard.min.js"></script>
|
||||
<?php load_static('js');?>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
max-height: 100%;
|
||||
aspect-ratio:16/9;
|
||||
}
|
||||
#default #del {display: none;}
|
||||
</style>
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
max-height: 100%;
|
||||
aspect-ratio:16/9;
|
||||
}
|
||||
#default #del {display: none;}
|
||||
</style>
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
max-height: 100%;
|
||||
aspect-ratio:16/9;
|
||||
}
|
||||
#default #del {display: none;}
|
||||
</style>
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
max-height: 100%;
|
||||
aspect-ratio:16/9;
|
||||
}
|
||||
#default #del {display: none;}
|
||||
</style>
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
|
||||
@@ -2,6 +2,32 @@
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main" style=" margin-left: 20px;">
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<h4 class="layui-timeline-title">v2.0.09-20230410</h4>
|
||||
<ul>
|
||||
<li>优化兼容性/细节调整</li>
|
||||
<li>放宽授权验证规则</li>
|
||||
<li>修复前端调用添加链接页面没有分类的bug</li>
|
||||
<li>修复默认主题删除链接提示ID不存在的bug</li>
|
||||
<li>修复下载更新时temp目录不存在时未自动创建导致下载失败的bug</li>
|
||||
<li>调整手机端布局(减小边距/不显示描述)</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<h4 class="layui-timeline-title">v2.0.08-20230406</h4>
|
||||
<ul>
|
||||
<li>增加一些使用说明</li>
|
||||
<li>优化兼容性(php8.0.0 getdir函数重名)</li>
|
||||
<li>调整主题模板默认主题不显示删除按钮(因为不允许删除默认模板)</li>
|
||||
<li>精简部分静态资源,Medoo框架更新到2.1.8</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">背景图URL</label>
|
||||
<div class="layui-input-inline" style="width: 73%;">
|
||||
<input type="url" id="backgroundURL" name="backgroundURL" value="<?php echo $theme_config['backgroundURL'];?>" placeholder="存在时其他背景色无效,请输入图片URL" autocomplete="off" class="layui-input">
|
||||
<input type="url" name="backgroundURL" value="<?php echo $theme_config['backgroundURL'];?>" placeholder="存在时其他背景色无效,请输入图片URL" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -282,13 +282,13 @@
|
||||
<script src = '<?php echo $libs?>/jquery/jquery-3.6.0.min.js'></script>
|
||||
<script src="<?php echo $libs?>/Layui/v2.6.8/layui.js"></script>
|
||||
<script src="./templates/admin/js/public.js?v=<?php echo $Ver;?>"></script>
|
||||
|
||||
<script src="./templates/admin/js/lay-config.js?v=<?php echo $Ver;?>" charset="utf-8"></script>
|
||||
<script>
|
||||
var u = '<?php echo $u?>';
|
||||
var t = '<?php echo $theme;?>';
|
||||
var s = '<?php echo $_GET['source'];?>';
|
||||
var api = get_api('write_theme','config') + '&t=' + t;
|
||||
layui.use(['form','colorpicker','element','dropdown'], function(){
|
||||
layui.use(['form','colorpicker','element','dropdown','background'], function(){
|
||||
var form = layui.form;
|
||||
var colorpicker = layui.colorpicker;
|
||||
var dropdown = layui.dropdown;
|
||||
@@ -328,93 +328,8 @@ dropdown.render({elem: '#OtherBackgroundColor-input',data:BackgroundColor ,click
|
||||
dropdown.render({elem: '#SidebarBackgroundColor-input',data:BackgroundColor ,click: function(obj){this.elem.val(obj.code);},style: 'width: 225px;'});
|
||||
|
||||
//背景图下拉菜单
|
||||
dropdown.render({
|
||||
elem: '#backgroundURL'
|
||||
,data: [{
|
||||
title: '博天(自适应/动漫)'
|
||||
,url: 'https://api.btstu.cn/sjbz/api.php?lx=dongman&method=zsy'
|
||||
,author:'https://api.btstu.cn/doc/sjbz.php'
|
||||
},{
|
||||
title: '博天(自适应/妹子)'
|
||||
,url: 'https://api.btstu.cn/sjbz/api.php?lx=meizi&method=zsy'
|
||||
,author:'https://api.btstu.cn/doc/sjbz.php'
|
||||
},{
|
||||
title: '博天(自适应/风景)'
|
||||
,url: 'https://api.btstu.cn/sjbz/api.php?lx=fengjing&method=zsy'
|
||||
,author:'https://api.btstu.cn/doc/sjbz.php'
|
||||
},{
|
||||
title: '博天(自适应/随机)'
|
||||
,url: 'https://api.btstu.cn/sjbz/api.php?lx=suiji&method=zsy'
|
||||
,author:'https://api.btstu.cn/doc/sjbz.php'
|
||||
},{
|
||||
title: '姬长信(PC/每日必应)'
|
||||
,url: 'https://api.isoyu.com/bing_images.php'
|
||||
,author:'https://api.isoyu.com'
|
||||
,n:'姬长信'
|
||||
},{
|
||||
title: '樱花(PC/动漫)'
|
||||
,url: 'https://www.dmoe.cc/random.php'
|
||||
,author:'https://www.dmoe.cc'
|
||||
},{
|
||||
title: '梁炯灿(PC/动漫)'
|
||||
,url: 'https://tuapi.eees.cc/api.php?category=dongman&type=302'
|
||||
,author:'https://tuapi.eees.cc'
|
||||
},{
|
||||
title: '梁炯灿(PC/风景)'
|
||||
,url: 'https://tuapi.eees.cc/api.php?category=fengjing&type=302'
|
||||
,author:'https://tuapi.eees.cc'
|
||||
},{
|
||||
title: '梁炯灿(PC/必应)'
|
||||
,url: 'https://tuapi.eees.cc/api.php?category=biying&type=302'
|
||||
,author:'https://tuapi.eees.cc'
|
||||
},{
|
||||
title: '梁炯灿(PC/美女)'
|
||||
,url: 'https://tuapi.eees.cc/api.php?category=meinv&type=302'
|
||||
,author:'https://tuapi.eees.cc'
|
||||
},{
|
||||
title: '苏晓晴(PC/动漫)'
|
||||
,url: 'https://acg.toubiec.cn/random.php'
|
||||
,author:'https://acg.toubiec.cn'
|
||||
},{
|
||||
title: '墨天逸(PC/动漫)'
|
||||
,url: 'https://api.mtyqx.cn/api/random.php'
|
||||
,author:'https://api.mtyqx.cn/'
|
||||
},{
|
||||
title: '小歪(PC/动漫)'
|
||||
,url: 'https://api.ixiaowai.cn/api/api.php'
|
||||
,author:'https://api.ixiaowai.cn'
|
||||
},{
|
||||
title: '小歪(PC/MC酱)'
|
||||
,url: 'https://api.ixiaowai.cn/mcapi/mcapi.php'
|
||||
,author:'https://api.ixiaowai.cn'
|
||||
},{
|
||||
title: '小歪(PC/风景)'
|
||||
,url: 'https://api.ixiaowai.cn/gqapi/gqapi.php'
|
||||
,author:'https://api.ixiaowai.cn'
|
||||
},{
|
||||
title: '保罗(PC/动漫)'
|
||||
,url: 'https://api.paugram.com/wallpaper/?source=sina'
|
||||
,author:'https://api.paugram.com/help/wallpaper'
|
||||
,n:'保罗'
|
||||
},{
|
||||
title: '樱道(PC/动漫)'
|
||||
,url: 'https://api.r10086.com/img-api.php?type=动漫综合1'
|
||||
,author:'https://img.r10086.com/'
|
||||
,n:'樱道'
|
||||
}]
|
||||
,click: function(obj){
|
||||
if (obj.n == '樱道'){
|
||||
layeropen('官方还有很多分类哦<br />感兴趣的自己去看<br />访问速度比较慢<br />友链有个镜像接口比较快','https://img.r10086.com/');
|
||||
}else if (obj.n == '保罗'){
|
||||
layeropen('官方还有其他接口<br />感兴趣的自己去看<br />有缓存','https://api.paugram.com/help/wallpaper');
|
||||
}else if (obj.n == '姬长信'){
|
||||
layeropen('官方还有其他接口<br />感兴趣的自己去看<br />慢且不稳','https://api.isoyu.com/#/壁纸模块');
|
||||
}
|
||||
this.elem.val(obj.url);
|
||||
}
|
||||
,style: 'width: 235px;'
|
||||
});
|
||||
|
||||
layui.background.render("input[name='backgroundURL']");
|
||||
|
||||
function layeropen(content,url){
|
||||
layer.open({
|
||||
type: 1
|
||||
|
||||
@@ -46,7 +46,7 @@ var menu = {
|
||||
link_id = link_id.replace('id_','');
|
||||
mdui.confirm('确认删除?'
|
||||
,function(){
|
||||
$.post(get_api('write_link','del'),{id:link_id},function(data,status){
|
||||
$.post(get_api('write_link','del'),{lid:link_id},function(data,status){
|
||||
if(data.code == 1) {
|
||||
$("#id_" + link_id).remove();
|
||||
}else{
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<link rel="stylesheet" href="<?php echo $libs?>/Layui/v2.6.8/css/layui.css">
|
||||
<link rel="stylesheet" href="<?php echo $libs?>/Other/login.css">
|
||||
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="<?php echo $libs?>/Other/html5.min.js"></script>
|
||||
<script src="<?php echo $libs?>/Other/respond.min.js"></script>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 275 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 KiB |
@@ -11,7 +11,7 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<link rel="stylesheet" href="<?php echo $libs?>/Layui/v2.6.8/css/layui.css">
|
||||
<link rel="stylesheet" href="./templates/register/default/main.css">
|
||||
<link rel="stylesheet" href="<?php echo $libs?>/Other/login.css">
|
||||
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="<?php echo $libs?>/Other/html5.min.js"></script>
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
.main-body {top:50%;left:50%;position:absolute;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);transform:translate(-50%,-50%);overflow:hidden;}
|
||||
.login-main .login-bottom .center .item input {display:inline-block;width:227px;height:22px;padding:0;position:absolute;border:0;outline:0;font-size:14px;letter-spacing:0;}
|
||||
.login-main .login-bottom .center .item .icon-1 {background:url(icon-login.png) no-repeat 1px 0;}
|
||||
.login-main .login-bottom .center .item .icon-2 {background:url(icon-login.png) no-repeat -54px 0;}
|
||||
.login-main .login-bottom .center .item .icon-3 {background:url(icon-login.png) no-repeat -106px 0;}
|
||||
.login-main .login-bottom .center .item .icon-4 {background:url(icon-login.png) no-repeat 0 -43px;position:absolute;right:-10px;cursor:pointer;}
|
||||
.login-main .login-bottom .center .item .icon-5 {background:url(icon-login.png) no-repeat -55px -43px;}
|
||||
.login-main .login-bottom .center .item .icon-6 {background:url(icon-login.png) no-repeat 0 -93px;position:absolute;right:-10px;margin-top:8px;cursor:pointer;}
|
||||
.login-main .login-bottom .tip .icon-nocheck {display:inline-block;width:10px;height:10px;border-radius:2px;border:solid 1px #9abcda;position:relative;top:2px;margin:1px 8px 1px 1px;cursor:pointer;}
|
||||
.login-main .login-bottom .tip .icon-check {margin:0 7px 0 0;width:14px;height:14px;border:none;background:url(icon-login.png) no-repeat -111px -48px;}
|
||||
.login-main .login-bottom .center .item .icon {display:inline-block;width:33px;height:22px;}
|
||||
.login-main .login-bottom .center .item {width:288px;height:35px;border-bottom:1px solid #dae1e6;margin-bottom:35px;}
|
||||
.login-main {width:428px;position:relative;float:left;}
|
||||
.login-main .login-top {height:117px;background-color:#148be4;border-radius:12px 12px 0 0;font-family:SourceHanSansCN-Regular;font-size:30px;font-weight:400;font-stretch:normal;letter-spacing:0;color:#fff;line-height:117px;text-align:center;overflow:hidden;-webkit-transform:rotate(0);-moz-transform:rotate(0);-ms-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0);}
|
||||
.login-main .login-top .bg1 {display:inline-block;width:74px;height:74px;background:#fff;opacity:.1;border-radius:0 74px 0 0;position:absolute;left:0;top:43px;}
|
||||
.login-main .login-top .bg2 {display:inline-block;width:94px;height:94px;background:#fff;opacity:.1;border-radius:50%;position:absolute;right:-16px;top:-16px;}
|
||||
.login-main .login-bottom {width:428px;background:#fff;border-radius:0 0 12px 12px;padding-bottom:53px;}
|
||||
.login-main .login-bottom .center {width:288px;margin:0 auto;padding-top:40px;padding-bottom:15px;position:relative;}
|
||||
.login-main .login-bottom .tip {clear:both;height:16px;line-height:16px;width:288px;margin:0 auto;}
|
||||
body {background:url(bg.png) 0% 0% / cover no-repeat;position:static;font-size:12px;}
|
||||
input::-webkit-input-placeholder {color:#a6aebf;}
|
||||
input::-moz-placeholder {/* Mozilla Firefox 19+ */ color:#a6aebf;}
|
||||
input:-moz-placeholder {/* Mozilla Firefox 4 to 18 */ color:#a6aebf;}
|
||||
input:-ms-input-placeholder {/* Internet Explorer 10-11 */ color:#a6aebf;}
|
||||
input:-webkit-autofill {/* 取消Chrome记住密码的背景颜色 */ -webkit-box-shadow:0 0 0 1000px white inset !important;}
|
||||
html {height:100%;}
|
||||
.login-main .login-bottom .tip {clear:both;height:16px;line-height:16px;width:288px;margin:0 auto;}
|
||||
.login-main .login-bottom .tip .login-tip {font-family:MicrosoftYaHei;font-size:12px;font-weight:400;font-stretch:normal;letter-spacing:0;color:#9abcda;cursor:pointer;}
|
||||
.login-main .login-bottom .tip .forget {font-stretch:normal;letter-spacing:0;color:#1391ff;text-decoration:none;position:absolute;right:62px;}
|
||||
.login-main .login-bottom .login-btn {width:288px;height:40px;background-color:#1E9FFF;border-radius:16px;margin:24px auto 0;text-align:center;line-height:40px;color:#fff;font-size:14px;letter-spacing:0;cursor:pointer;border:none;}
|
||||
.login-main .login-bottom .center .item .validateImg {position:absolute;right:1px;cursor:pointer;height:36px;border:1px solid #e6e6e6;}
|
||||
.footer {left:0;bottom:0;color:#fff;width:100%;position:absolute;text-align:center;line-height:30px;padding-bottom:10px;text-shadow:#000 0.1em 0.1em 0.1em;font-size:14px;}
|
||||
.padding-5 {padding:5px !important;}
|
||||
.footer a,.footer span {color:#fff;}
|
||||
@media screen and (max-width:428px) {.login-main {width:360px !important;}
|
||||
.login-main .login-top {width:360px !important;}
|
||||
.login-main .login-bottom {width:360px !important;}
|
||||
}
|
||||
@@ -58,7 +58,7 @@
|
||||
<div class="layui-form-item" style="padding-top: 10px;">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit lay-filter="save">保存</button>
|
||||
过渡页使用说明,请参考:<a href="https://dwz.ovh/mrkx1" target = "_blank" title = "过渡页使用说明">https://dwz.ovh/mrkx1</a>
|
||||
<a href="https://gitee.com/tznb/TwoNav/wikis/pages?sort_id=7968712&doc_id=3767990" target = "_blank" >过渡页使用说明</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"name":"OneNav1",
|
||||
"description":"OneNav旧版过渡页",
|
||||
"homepage":"https://www.xiaoz.me",
|
||||
"version":"2.0.0",
|
||||
"update":"2023/03/15",
|
||||
"version":"2.0.1",
|
||||
"update":"2023/04/05",
|
||||
"author":"xiaoz",
|
||||
"screenshot":"https://s3.bmp.ovh/imgs/2022/04/17/8cac968a8cc8135c.png",
|
||||
"config": {
|
||||
|
||||
Reference in New Issue
Block a user