更换使用adminlte皮肤

This commit is contained in:
2019-08-27 23:21:35 +08:00
parent 6b1fef6f98
commit 79265d6023
2098 changed files with 853 additions and 502383 deletions

View File

@@ -10,6 +10,7 @@ namespace app\controller\admin;
use app\controller\Admin; use app\controller\Admin;
use think\facade\Session; use think\facade\Session;
use app\model\Menu;
/** /**
* @title 后端公共模块 * @title 后端公共模块
@@ -20,6 +21,13 @@ class Index extends Admin{
* @title 系统首页 * @title 系统首页
*/ */
public function index(){ public function index(){
return $this->data;
}
/**
* @title 系统首页
*/
public function dashboard(){
} }
/** /**

View File

@@ -9,6 +9,7 @@
namespace app\controller\admin; namespace app\controller\admin;
use app\controller\Admin; use app\controller\Admin;
use app\Model\Menu as MenuModel;
class Menu extends Admin{ class Menu extends Admin{
@@ -16,6 +17,13 @@ class Menu extends Admin{
* @title 系统首页 * @title 系统首页
*/ */
public function index(){ public function index(){
if($this->request->isAjax()){
$menu = new MenuModel();
$res = $menu->select();
$this->data['data'] = $res;
return $this->data;
}
} }
} }

View File

@@ -18,4 +18,18 @@ class User extends Admin{
public function index(){ public function index(){
} }
/**
* @title 检测密码正确性
*/
public function checkPassword(){
return true;
}
/**
* @title 修改密码
*/
public function resetpwd(){
}
} }

View File

@@ -17,7 +17,7 @@ use think\facade\View;
*/ */
class AdminAuth { class AdminAuth {
protected $data = ['headerMenu' => [], 'asideMenu' => [], 'meta_title' => '']; protected $data = ['menu' => [], 'meta_title' => ''];
public function handle($request, \Closure $next) { public function handle($request, \Closure $next) {
$user = Session::get('user'); $user = Session::get('user');
@@ -50,44 +50,14 @@ class AdminAuth {
} }
Cache::set('menu', $menu); Cache::set('menu', $menu);
} }
$current_pid = 0;
foreach ($menu as $key => $value) { foreach ($menu as $key => $value) {
if (strpos($value['url'], $current_controller.'/') !== false) {
if ($value['pid'] == 0) {
$current_pid = $value['id'];
} else {
$current_pid = $value['pid'];
}
}
if ($request->isAdmin || in_array($value['id'], array())) { if ($request->isAdmin || in_array($value['id'], array())) {
$list[$value['id']] = $value; $list[$value['id']] = $value;
} }
} }
$headerMenu = list_to_tree($list);
foreach ($headerMenu as $key => $value) {
if ($value['id'] == $current_pid) {
$value['active'] = true;
$current_aside = $value['_child'];
} else {
$value['active'] = false;
}
$headerMenu[$key] = $value;
}
foreach ($current_aside as $key => $value) { $menuList = list_to_tree($list);
if ($current_url == $value['url']) { $this->data['menu'] = $menuList;
$value['active'] = true;
} else {
$value['active'] = false;
}
if (strpos($value['url'], $current_url) !== false) {
$this->data['meta_title'] = $value['title'];
}
$asideMenu[$value['group']][] = $value;
}
$this->data['asideMenu'] = $asideMenu;
$this->data['headerMenu'] = $headerMenu;
View::assign($this->data); View::assign($this->data);
} }
} }

View File

@@ -16,4 +16,9 @@ use think\Model;
*/ */
class Menu extends Model { class Menu extends Model {
public function getAuthMenuList(){
$list = $this->select();
$data = list_to_tree($list->toArray(), 'id', 'pid');
return $data;
}
} }

View File

@@ -1,36 +0,0 @@
html,body{height:100%;width:100%;overflow:hidden!important;min-width:0}
.login-container{height:100%;background-color:#2494F2;overflow:hidden;font-size:9pt}
.login-container ul{display:block;margin:0;padding:0;list-style:none}
.login-container ul li{display:block;margin:0;padding:0;list-style:none}
.login-container .clouds-container{position:absolute;overflow:hidden;height:100%;width:100%}
.login-container .clouds{background:url("../images/cloud_two.png") repeat-x left 15%;position:absolute;left:0;top:0;height:100%;width:300%;-webkit-animation:cloudmove 200s linear infinite;-moz-animation:cloudmove 200s linear infinite;-o-animation:cloudmove 200s linear infinite;animation:cloudmove 200s linear infinite;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}
.login-container .clouds-fast{background:url("../images/cloud.png") no-repeat 0 40%;-webkit-animation:cloudmove 30s linear infinite;-moz-animation:cloudmove 30s linear infinite;-o-animation:cloudmove 30s linear infinite;animation:cloudmove 30s linear infinite}
.login-container .clouds-footer{background:url("../images/cloud_one.png") no-repeat left 100%;animation:none}
@keyframes cloudmove{0%{left:-50%}100%{left:150%}}
@-moz-keyframes cloudmove{0%{left:-50%}100%{left:150%}}
@-webkit-keyframes cloudmove{0%{left:-50%}100%{left:150%}}
.login-container .header{height:47px;position:absolute;top:0;z-index:100;width:100%}
.login-container .header a,
.login-container .header a:hover,
.login-container .header a:focus{text-decoration:none;color:#eee;outline:none}
.login-container .header a:hover{color:#fff}
.login-container .header span.title{line-height:47px;text-indent:44px;float:left;color:#fff;font-size:16px}
.login-container .header ul{float:right;padding-right:30px}
.login-container .header ul li{float:left;margin-left:20px;line-height:47px;}
.login-container .container{background:url(../images/bg.png) no-repeat center center;width:100%;height:585px;overflow:hidden;position:relative;top:50%;margin-top:-300px}
.login-from{box-shadow: 0 0 3px #cdcdcd; background: #ffffff; padding: 20px 30px; width:320px; margin: 50px auto auto auto; border-radius: 4px;}
.login-from .logo{width: 60px; height:60px; overflow: hidden; margin: auto;}
.login-from .logo img{width: 60px; height:60px;}
.login-from .form{padding-top: 40px;}
.login-from .form .el-form-item__content{margin-left: 0 !important;}
.login-from .form .el-button{width: 100%;}
/* 底部版权 */
.login-container .footer{height:50px;line-height:50px;text-align:center;position:absolute;bottom:0;width:100%;color:#fff;;letter-spacing:0.5px}
.login-container .footer span{display:inline-block;height:10px;overflow:hidden;line-height:10px;padding-left:1px;padding-right:1px}
.login-container .footer a{color:#fff}
.login-container .footer a:hover{color:#fff}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 580 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 424 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 738 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

View File

@@ -1,268 +1,172 @@
$(function($) { $(function () {
'use strict'
var storage, fail, uid; /**
try { * List of all the available skins
uid = new Date; (storage = window.localStorage).setItem(uid, uid); *
fail = storage.getItem(uid) != uid; * @type Array
storage.removeItem(uid); */
fail && (storage = false); var mySkins = [
} catch(e) {} 'skin-blue',
if (storage) { 'skin-black',
try { 'skin-red',
var usedSkin = localStorage.getItem('config-skin'); 'skin-yellow',
if (usedSkin != '') { 'skin-purple',
$('#skin-colors .skin-changer').removeClass('active'); 'skin-green',
$('#skin-colors .skin-changer[data-skin="' + usedSkin + '"]').addClass('active'); 'skin-blue-light',
} 'skin-black-light',
'skin-red-light',
//固定头部、左侧菜单以及底部版权信息 'skin-yellow-light',
$('body').addClass('fixed-header'); 'skin-purple-light',
$('body').addClass('fixed-footer'); 'skin-green-light'
$('body').addClass('fixed-leftmenu'); ]
if ($('#page-wrapper').hasClass('nav-small')) {
$('#page-wrapper').removeClass('nav-small');
}
$('.fixed-leftmenu #col-left').nanoScroller({ var $skinsList = $('<ul />', {'class': 'list-unstyled clearfix'})
alwaysVisible: true,
iOSNativeScrolling: false,
preventPageScrolling: true,
contentClass: 'col-left-nano-content'
});
var boxedLayout = localStorage.getItem('config-boxed-layout'); // Dark sidebar skins
if (boxedLayout == 'boxed-layout') { var $skinBlue =
$('body').addClass(boxedLayout); $('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
$('#config-boxed-layout').prop('checked', true); .append('<a href="javascript:void(0)" data-skin="skin-blue" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
} + '<div><span style="display:block; width: 20%; float: left; height: 7px; background: #367fa9"></span><span class="bg-light-blue" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
var sidebarSamll = localStorage.getItem('config-sidebar-samll'); + '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
if (sidebarSamll == 'sidebar-samll') { + '</a>'
$('#config-sidebar-samll').prop('checked', true); + '<p class="text-center no-margin">蓝黑</p>')
$('#page-wrapper').addClass('nav-small'); $skinsList.append($skinBlue)
} else { var $skinBlack =
$('#page-wrapper').removeClass('nav-small'); $('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
}; .append('<a href="javascript:void(0)" data-skin="skin-black" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
} catch(e) { + '<div style="box-shadow: 0 0 2px rgba(0,0,0,0.1)" class="clearfix"><span style="display:block; width: 20%; float: left; height: 7px; background: #fefefe"></span><span style="display:block; width: 80%; float: left; height: 7px; background: #fefefe"></span></div>'
console.log(e); + '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
} + '</a>'
+ '<p class="text-center no-margin">白黑</p>')
$skinsList.append($skinBlack)
var $skinPurple =
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
.append('<a href="javascript:void(0)" data-skin="skin-purple" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
+ '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-purple-active"></span><span class="bg-purple" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
+ '</a>'
+ '<p class="text-center no-margin">紫黑</p>')
$skinsList.append($skinPurple)
var $skinGreen =
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
.append('<a href="javascript:void(0)" data-skin="skin-green" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
+ '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-green-active"></span><span class="bg-green" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
+ '</a>'
+ '<p class="text-center no-margin">绿黑</p>')
$skinsList.append($skinGreen)
var $skinRed =
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
.append('<a href="javascript:void(0)" data-skin="skin-red" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
+ '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-red-active"></span><span class="bg-red" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
+ '</a>'
+ '<p class="text-center no-margin">红黑</p>')
$skinsList.append($skinRed)
var $skinYellow =
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
.append('<a href="javascript:void(0)" data-skin="skin-yellow" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
+ '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-yellow-active"></span><span class="bg-yellow" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
+ '</a>'
+ '<p class="text-center no-margin">黄黑</p>')
$skinsList.append($skinYellow)
// Light sidebar skins
var $skinBlueLight =
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
.append('<a href="javascript:void(0)" data-skin="skin-blue-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
+ '<div><span style="display:block; width: 20%; float: left; height: 7px; background: #367fa9"></span><span class="bg-light-blue" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
+ '</a>'
+ '<p class="text-center no-margin" style="font-size: 12px">亮蓝</p>')
$skinsList.append($skinBlueLight)
var $skinBlackLight =
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
.append('<a href="javascript:void(0)" data-skin="skin-black-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
+ '<div style="box-shadow: 0 0 2px rgba(0,0,0,0.1)" class="clearfix"><span style="display:block; width: 20%; float: left; height: 7px; background: #fefefe"></span><span style="display:block; width: 80%; float: left; height: 7px; background: #fefefe"></span></div>'
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
+ '</a>'
+ '<p class="text-center no-margin" style="font-size: 12px">亮</p>')
$skinsList.append($skinBlackLight)
var $skinPurpleLight =
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
.append('<a href="javascript:void(0)" data-skin="skin-purple-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
+ '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-purple-active"></span><span class="bg-purple" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
+ '</a>'
+ '<p class="text-center no-margin" style="font-size: 12px">亮紫</p>')
$skinsList.append($skinPurpleLight)
var $skinGreenLight =
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
.append('<a href="javascript:void(0)" data-skin="skin-green-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
+ '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-green-active"></span><span class="bg-green" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
+ '</a>'
+ '<p class="text-center no-margin" style="font-size: 12px">亮绿</p>')
$skinsList.append($skinGreenLight)
var $skinRedLight =
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
.append('<a href="javascript:void(0)" data-skin="skin-red-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
+ '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-red-active"></span><span class="bg-red" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
+ '</a>'
+ '<p class="text-center no-margin" style="font-size: 12px">亮红</p>')
$skinsList.append($skinRedLight)
var $skinYellowLight =
$('<li />', {style: 'float:left; width: 33.33333%; padding: 5px;'})
.append('<a href="javascript:void(0)" data-skin="skin-yellow-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
+ '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-yellow-active"></span><span class="bg-yellow" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
+ '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
+ '</a>'
+ '<p class="text-center no-margin" style="font-size: 12px">亮黄</p>')
$skinsList.append($skinYellowLight)
$('[data-skin-box] > .content').append($skinsList);
setup();
/**
* Replaces the old skin with the new skin
* @param String cls the new skin class
* @returns Boolean false to prevent link's default action
*/
function changeSkin(cls) {
$.each(mySkins, function (i) {
$('body').removeClass(mySkins[i])
})
$('body').addClass(cls)
store('skin', cls)
return false
} }
$('#config-tool-cog').on('click',
function() {
$('#config-tool').toggleClass('closed');
});
$('#config-boxed-layout').on('change',
function() {
var boxedLayout = '';
if ($(this).is(':checked')) {
$('body').addClass('boxed-layout');
boxedLayout = 'boxed-layout';
} else {
$('body').removeClass('boxed-layout');
}
writeStorage(storage, 'config-boxed-layout', boxedLayout);
});
$('#config-sidebar-samll').on('change',function(){ /**
var sidebarSamll = ''; * Retrieve default settings and apply them to the template
if ($(this).is(':checked')) { *
$('#page-wrapper').addClass('nav-small'); * @returns void
sidebarSamll = 'sidebar-samll'; */
writeStorage(storage, 'config-sidebar-samll', sidebarSamll); function setup() {
} else { var tmp = get('skin') || 'skin-blue';
$('#page-wrapper').removeClass('nav-small'); if (tmp && $.inArray(tmp, mySkins) >= 0){
writeStorage(storage, 'config-sidebar-samll', sidebarSamll); changeSkin(tmp)
location.reload();
} }
})
if (!storage) { // Add the change skin listener
$('#config-boxed-layout').prop('checked', false); $('[data-skin]').on('click', function (e) {
$('#config-sidebar-samll').prop('checked', false); if ($(this).hasClass('knob'))
return
e.preventDefault()
changeSkin($(this).data('skin'))
})
$('[data-toggle="control-sidebar"]').click(function(){
$("[data-skin-box]").animate({right:"0"}, 500);
})
$('.tool-bar').click(function(){
$("[data-skin-box]").animate({right:"-320px"}, 500);
})
} }
$('#skin-colors .skin-changer').on('click', })
function() {
$('body').removeClassPrefix('theme-');
$('body').addClass($(this).data('skin'));
$('#skin-colors .skin-changer').removeClass('active');
$(this).addClass('active');
writeStorage(storage, 'config-skin', $(this).data('skin'));
});
//合并自script.js
setTimeout(function() {
$('#content-wrapper > .row').css({
opacity: 1
});
},
200);
$('#sidebar-nav,#nav-col-submenu').on('click', '.dropdown-toggle',
function(e) {
e.preventDefault();
var $item = $(this).parent();
if (!$item.hasClass('open')) {
$item.parent().find('.open .submenu').slideUp('fast');
$item.parent().find('.open').toggleClass('open');
}
$item.toggleClass('open');
if ($item.hasClass('open')) {
$item.children('.submenu').slideDown('fast');
} else {
$item.children('.submenu').slideUp('fast');
}
});
$('body').on('mouseenter', '#page-wrapper.nav-small #sidebar-nav .dropdown-toggle',
function(e) {
if ($(document).width() >= 992) {
var $item = $(this).parent();
if ($('body').hasClass('fixed-leftmenu')) {
var topPosition = $item.position().top;
if ((topPosition + 4 * $(this).outerHeight()) >= $(window).height()) {
topPosition -= 6 * $(this).outerHeight();
}
$('#nav-col-submenu').html($item.children('.submenu').clone());
$('#nav-col-submenu > .submenu').css({
'top': topPosition
});
}
$item.addClass('open');
$item.children('.submenu').slideDown('fast');
}
});
$('body').on('mouseleave', '#page-wrapper.nav-small #sidebar-nav > .nav-pills > li',
function(e) {
if ($(document).width() >= 992) {
var $item = $(this);
if ($item.hasClass('open')) {
$item.find('.open .submenu').slideUp('fast');
$item.find('.open').removeClass('open');
$item.children('.submenu').slideUp('fast');
}
$item.removeClass('open');
}
});
$('body').on('mouseenter', '#page-wrapper.nav-small #sidebar-nav a:not(.dropdown-toggle)',
function(e) {
if ($('body').hasClass('fixed-leftmenu')) {
$('#nav-col-submenu').html('');
}
});
$('body').on('mouseleave', '#page-wrapper.nav-small #nav-col',
function(e) {
if ($('body').hasClass('fixed-leftmenu')) {
$('#nav-col-submenu').html('');
}
});
$('#make-small-nav').click(function(e) {
$('#page-wrapper').toggleClass('nav-small');
});
$(window).smartresize(function() {
if ($(document).width() <= 991) {
$('#page-wrapper').removeClass('nav-small');
}
});
$('.mobile-search').click(function(e) {
e.preventDefault();
$('.mobile-search').addClass('active');
$('.mobile-search form input.form-control').focus();
});
$(document).mouseup(function(e) {
var container = $('.mobile-search');
if (!container.is(e.target) && container.has(e.target).length === 0) {
container.removeClass('active');
}
});
$('.fixed-leftmenu #col-left').nanoScroller({
alwaysVisible: true,
iOSNativeScrolling: false,
preventPageScrolling: true,
contentClass: 'col-left-nano-content'
});
$("[data-toggle='tooltip']").each(function(index, el) {
$(el).tooltip({
placement: $(this).data("placement") || 'top'
});
});
});
function writeStorage(storage, key, value) {
if (storage) {
try {
localStorage.setItem(key, value);
} catch(e) {
console.log(e);
}
}
}
$.fn.removeClassPrefix = function(prefix) {
this.each(function(i, el) {
var classes = el.className.split(" ").filter(function(c) {
return c.lastIndexOf(prefix, 0) !== 0;
});
el.className = classes.join(" ");
});
return this;
}; (function($, sr) {
var debounce = function(func, threshold, execAsap) {
var timeout;
return function debounced() {
var obj = this,
args = arguments;
function delayed() {
if (!execAsap) func.apply(obj, args);
timeout = null;
};
if (timeout) clearTimeout(timeout);
else if (execAsap) func.apply(obj, args);
timeout = setTimeout(delayed, threshold || 100);
};
}
jQuery.fn[sr] = function(fn) {
return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr);
};
})(jQuery, 'smartresize');
function helpIntro(){
var placementRight = 'right';
var placementLeft = 'left';
if ($('body').hasClass('rtl')) {
placementRight = 'left';
placementLeft = 'right';
}
// Define the tour!
var tour = {
id: "Cube-intro",
steps: [
{
target: 'make-small-nav',
title: "设置小菜单按钮",
content: "点击小菜单可以把左侧菜单变成小菜单,增大右侧操作区域!",
placement: "bottom",
zindex: 999,
xOffset: -8
},
{
target: 'config-tool-options',
title: "后台配置工具",
content: "配置后台主题色彩,定制头部、左侧菜单以及底部信息",
placement: placementLeft,
zindex: 999,
fixedElement: true,
xOffset: -55
},
{
target: 'sidebar-nav',
title: "左侧导航区域",
content: "左侧功能导航区域。",
placement: placementRight
}
],
showPrevButton: true
};
// Start the tour!
hopscotch.startTour(tour);
}

View File

@@ -1,24 +0,0 @@
define(['jquery'], function($){
var Backend = {
init: function(){
if($('.editable').length > 0){
// require(['editable'], function(){
// $('.editable').editable();
// })
}
},
setBodySize: function(){
var height = $(window).height();
if ($('#content-wrapper').height() < height) {
$('#content-wrapper').height($(window).height()-120);
}
$(window).resize(function(){
Backend.setBodySize();
})
}
}
Backend.setBodySize();
Backend.init(); //默认初始化执行的代码
return Backend;
})

View File

@@ -1,157 +0,0 @@
require.config({
urlArgs: "v=",
packages: [
{
name: 'moment',
location: '/static/libs/moment',
main: 'moment'
}
],
include: ['jquery', 'drop', 'drag', 'form'],
paths:{
'backend': '../admin/js/backend',
'form': '/static/js/require-form',
'table': '/static/js/require-table',
'upload': '/static/js/require-upload',
'validator': '/static/js/require-validator',
'drag': 'jquery.drag.min',
'drop': 'jquery.drop.min',
'echarts': 'echarts.min',
'echarts-theme': 'echarts-theme',
"jquery":'/static/libs/jquery/jquery.min',
"nanoscroller":"/static/libs/nanoscroller/jquery.nanoscroller.min",
"slimscroll":"/static/js/jquery.slimscroll.min",
"bootstrap":"/static/libs/bootstrap/js/bootstrap.min",
'bootstrap-table-commonsearch': '/static/js/bootstrap-table-commonsearch',
'bootstrap-table-template': '/static/js/bootstrap-table-template',
//
// 以下的包从bower的libs目录加载
'jquery': '/static/libs/jquery/dist/jquery.min',
'bootstrap': '/static/libs/bootstrap/dist/js/bootstrap.min',
'bootstrap-datetimepicker': '/static/libs/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min',
'bootstrap-daterangepicker': '/static/libs/bootstrap-daterangepicker/daterangepicker',
'bootstrap-select': '/static/libs/bootstrap-select/dist/js/bootstrap-select.min',
'bootstrap-select-lang': '/static/libs/bootstrap-select/dist/js/i18n/defaults-zh_CN',
'bootstrap-table': '/static/libs/bootstrap-table/dist/bootstrap-table.min',
'bootstrap-table-export': '/static/libs/bootstrap-table/dist/extensions/export/bootstrap-table-export.min',
'bootstrap-table-mobile': '/static/libs/bootstrap-table/dist/extensions/mobile/bootstrap-table-mobile',
'bootstrap-table-lang': '/static/libs/bootstrap-table/dist/locale/bootstrap-table-zh-CN',
'bootstrap-slider': '/static/libs/bootstrap-slider/bootstrap-slider',
'tableexport': '/static/libs/tableExport.jquery.plugin/tableExport.min',
'dragsort': '/static/libs/fastadmin-dragsort/jquery.dragsort',
'sortable': '/static/libs/Sortable/Sortable.min',
'addtabs': '/static/libs/fastadmin-addtabs/jquery.addtabs',
'slimscroll': '/static/libs/jquery-slimscroll/jquery.slimscroll',
'validator-core': '/static/libs/nice-validator/dist/jquery.validator',
'validator-lang': '/static/libs/nice-validator/dist/local/zh-CN',
'plupload': '/static/libs/plupload/js/plupload.min',
'toastr': '/static/libs/toastr/toastr',
'jstree': '/static/libs/jstree/dist/jstree.min',
'layer': '/static/libs/fastadmin-layer/dist/layer',
'cookie': '/static/libs/jquery.cookie/jquery.cookie',
'cxselect': '/static/libs/fastadmin-cxselect/js/jquery.cxselect',
'template': '/static/libs/art-template/dist/template-native',
'selectpage': '/static/libs/fastadmin-selectpage/selectpage',
'citypicker': '/static/libs/fastadmin-citypicker/dist/js/city-picker.min',
'citypicker-data': '/static/libs/fastadmin-citypicker/dist/js/city-picker.data',
'editable': '/static/libs/x-editable/dist/bootstrap3-editable/js/bootstrap-editable.min'
},
shim:{
"nanoscroller":['jquery'],
"slimscroll":{
deps: ['jquery'],
exports: '$.fn.extend'
},
'bootstrap': ['jquery'],
'bootstrap-table': {
deps: [
'bootstrap',
'css!/static/libs/bootstrap-table/dist/bootstrap-table.min.css'
],
exports: '$.fn.bootstrapTable'
},
'bootstrap-table-lang': {
deps: ['bootstrap-table'],
exports: '$.fn.bootstrapTable.defaults'
},
'bootstrap-table-export': {
deps: ['bootstrap-table', 'tableexport'],
exports: '$.fn.bootstrapTable.defaults'
},
'bootstrap-table-mobile': {
deps: ['bootstrap-table'],
exports: '$.fn.bootstrapTable.defaults'
},
'bootstrap-table-advancedsearch': {
deps: ['bootstrap-table'],
exports: '$.fn.bootstrapTable.defaults'
},
'bootstrap-table-commonsearch': {
deps: ['bootstrap-table'],
exports: '$.fn.bootstrapTable.defaults'
},
'bootstrap-table-template': {
deps: ['bootstrap-table', 'template'],
exports: '$.fn.bootstrapTable.defaults'
},
'tableexport': {
deps: ['jquery'],
exports: '$.fn.extend'
},
'bootstrap-datetimepicker': [
'moment/locale/zh-cn.js',
'css!/static/libs/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css',
],
'bootstrap-select': ['css!/static/libs/bootstrap-select/dist/css/bootstrap-select.min.css',],
'bootstrap-select-lang': ['bootstrap-select'],
'toastr': ['css!/static/libs/toastr/toastr.min.css'],
'jstree': ['css!/static/libs/jstree/dist/themes/default/style.css',],
'plupload': {
deps: ['/static/libs/plupload/js/moxie.min.js'],
exports: "plupload"
},
'layer': ['css!/static/libs/fastadmin-layer/dist/theme/default/layer.css'],
'validator-core': ['css!/static/libs/nice-validator/dist/jquery.validator.css'],
'validator-lang': ['validator-core'],
'selectpage': ['css!/static/libs/fastadmin-selectpage/selectpage.css'],
'citypicker': ['citypicker-data', 'css!/static/libs/fastadmin-citypicker/dist/css/city-picker.css'],
'editable':{
deps: ['bootstrap', 'css!/static/libs/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css']
}
},
baseUrl:"/static/js/",
map: {
'*': {
'css': '/static/libs/require-css/css.min.js'
}
},
//baseUrl: '/static/admin/js/backend/',
waitSeconds: 30,
charset: 'utf-8' // 文件编码
});
require(['jquery', 'sent'], function($, Sent){
$(function($) {
require(['backend', 'addons'], function (Backend, Addons) {
// 避免目录冲突
require.config({baseUrl: '/static/admin/js/module/'});
var current_url = (window.location.pathname).split('/');
if (typeof(isLoadModule) != "undefined" && isLoadModule) {
require([current_url[2]], function(Controller){
var action = current_url[3].split('.');
if (Controller.hasOwnProperty(action[0])) {
Controller[action[0]]();
} else {
if (Controller.hasOwnProperty("_empty")) {
Controller._empty();
}
}
}, function (e) {
console.error(e); // 这里可捕获模块加载的错误
})
}
})
})
})

View File

@@ -1,8 +0,0 @@
define([], function(){
var controller = {
group: function(){
}
}
return controller;
})

View File

@@ -1,17 +0,0 @@
define(['vue', 'iview'],function(Vue, iView){
var controller = {
clear: function(){
var vm = new Vue({
el:'.vue-main',
data:{
value:''
},
created(){
this.$Message.success('这是一条成功的提示');
}
});
}
}
return controller;
})

Some files were not shown because too many files have changed in this diff Show More