├── .gitignore ├── README.md ├── backend ├── README.md ├── doc │ └── 01.md └── src │ ├── .gitignore │ ├── application │ ├── admin │ │ ├── config.php │ │ ├── controller │ │ │ ├── Admin.php │ │ │ ├── Building.php │ │ │ ├── Common.php │ │ │ ├── Group.php │ │ │ ├── Index.php │ │ │ ├── Log.php │ │ │ ├── Login.php │ │ │ ├── Menu.php │ │ │ └── Room.php │ │ ├── model │ │ │ ├── Admin.php │ │ │ └── Menu.php │ │ ├── view │ │ │ ├── admin │ │ │ │ ├── index.html │ │ │ │ └── public_edit_info.html │ │ │ ├── building │ │ │ │ └── index.html │ │ │ ├── group │ │ │ │ └── index.html │ │ │ ├── index │ │ │ │ └── index.html │ │ │ ├── layout.html │ │ │ ├── log │ │ │ │ └── index.html │ │ │ ├── login │ │ │ │ └── index.html │ │ │ ├── menu │ │ │ │ └── index.html │ │ │ └── room │ │ │ │ ├── checkin.html │ │ │ │ └── checkout.html │ │ └── widget │ │ │ └── Menu.php │ ├── command.php │ ├── common.php │ ├── config.php │ ├── database.php │ ├── extra │ │ └── queue.php │ ├── index │ │ └── controller │ │ │ └── Index.php │ ├── route.php │ └── tags.php │ ├── extend │ └── .gitignore │ ├── public │ ├── favicon.ico │ ├── index.php │ ├── robots.txt │ ├── router.php │ └── static │ │ ├── css │ │ ├── font.css │ │ └── xadmin.css │ │ ├── fonts │ │ ├── iconfont.eot │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ └── iconfont.woff │ │ ├── images │ │ ├── a.jpg │ │ ├── b.jpg │ │ ├── c.jpg │ │ ├── d.jpg │ │ ├── e.jpg │ │ ├── f.jpg │ │ ├── g.jpg │ │ ├── h.jpg │ │ ├── i.jpg │ │ ├── j.jpg │ │ └── k.jpg │ │ ├── js │ │ ├── echarts-for-x-admin.js │ │ └── xadmin.js │ │ └── lib │ │ └── layui │ │ ├── css │ │ ├── layui.css │ │ └── modules │ │ │ ├── code.css │ │ │ ├── laydate │ │ │ ├── icon.png │ │ │ └── laydate.css │ │ │ └── layer │ │ │ └── default │ │ │ ├── icon-ext.png │ │ │ ├── icon.png │ │ │ ├── layer.css │ │ │ ├── loading-0.gif │ │ │ ├── loading-1.gif │ │ │ └── loading-2.gif │ │ ├── font │ │ ├── iconfont.eot │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ └── iconfont.woff │ │ ├── images │ │ └── face │ │ │ ├── 0.gif │ │ │ ├── 1.gif │ │ │ ├── 10.gif │ │ │ ├── 11.gif │ │ │ ├── 12.gif │ │ │ ├── 13.gif │ │ │ ├── 14.gif │ │ │ ├── 15.gif │ │ │ ├── 16.gif │ │ │ ├── 17.gif │ │ │ ├── 18.gif │ │ │ ├── 19.gif │ │ │ ├── 2.gif │ │ │ ├── 20.gif │ │ │ ├── 21.gif │ │ │ ├── 22.gif │ │ │ ├── 23.gif │ │ │ ├── 24.gif │ │ │ ├── 25.gif │ │ │ ├── 26.gif │ │ │ ├── 27.gif │ │ │ ├── 28.gif │ │ │ ├── 29.gif │ │ │ ├── 3.gif │ │ │ ├── 30.gif │ │ │ ├── 31.gif │ │ │ ├── 32.gif │ │ │ ├── 33.gif │ │ │ ├── 34.gif │ │ │ ├── 35.gif │ │ │ ├── 36.gif │ │ │ ├── 37.gif │ │ │ ├── 38.gif │ │ │ ├── 39.gif │ │ │ ├── 4.gif │ │ │ ├── 40.gif │ │ │ ├── 41.gif │ │ │ ├── 42.gif │ │ │ ├── 43.gif │ │ │ ├── 44.gif │ │ │ ├── 45.gif │ │ │ ├── 46.gif │ │ │ ├── 47.gif │ │ │ ├── 48.gif │ │ │ ├── 49.gif │ │ │ ├── 5.gif │ │ │ ├── 50.gif │ │ │ ├── 51.gif │ │ │ ├── 52.gif │ │ │ ├── 53.gif │ │ │ ├── 54.gif │ │ │ ├── 55.gif │ │ │ ├── 56.gif │ │ │ ├── 57.gif │ │ │ ├── 58.gif │ │ │ ├── 59.gif │ │ │ ├── 6.gif │ │ │ ├── 60.gif │ │ │ ├── 61.gif │ │ │ ├── 62.gif │ │ │ ├── 63.gif │ │ │ ├── 64.gif │ │ │ ├── 65.gif │ │ │ ├── 66.gif │ │ │ ├── 67.gif │ │ │ ├── 68.gif │ │ │ ├── 69.gif │ │ │ ├── 7.gif │ │ │ ├── 70.gif │ │ │ ├── 71.gif │ │ │ ├── 8.gif │ │ │ └── 9.gif │ │ ├── lay │ │ ├── all.js │ │ ├── lib │ │ │ └── jquery.js │ │ └── modules │ │ │ ├── code.js │ │ │ ├── element.js │ │ │ ├── flow.js │ │ │ ├── form.js │ │ │ ├── laydate.js │ │ │ ├── layedit.js │ │ │ ├── layer.js │ │ │ ├── laypage.js │ │ │ ├── laytpl.js │ │ │ ├── tree.js │ │ │ ├── upload.js │ │ │ └── util.js │ │ └── layui.js │ ├── runtime │ └── .gitignore │ └── vendor │ └── .gitignore ├── golang ├── doc │ └── 01.md └── src │ ├── L01_httpApi │ └── HttpApi.go │ └── L02_httpMysql │ └── gormdemo.go └── sql └── web2020.sql /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | .DS_Store 9 | # Test binary, built with `go test -c` 10 | *.test 11 | 12 | # Output of the go coverage tool, specifically when used with LiteIDE 13 | *.out 14 | 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 《互联网软件开发技术与实践》课程项目指导手册 2 | 3 | ### 实践内容 4 | 5 | * 宿舍管理后台系统实践01 【[参考文档](/backend/doc/01.md)】 6 | 7 | * 学生选宿舍Golang实现01 【[参考文档](/golang/doc/01.md)】 8 | 9 | * 手机端学生选宿舍实践01 10 | 11 | 12 | 13 | 14 | 15 | # 著作权申明 16 | License: CC BY-NC-SA 4.0 17 | 18 | Creative Commons License 19 | - 本作品选择采用:署名-非商业性使用-相同方式共享 的CC协议。 20 | - 您可以:复制、发行、展览、表演、放映、广播或通过信息网络传播本作品。以及创作演绎作品。 21 | - 惟须遵守下列条件: 22 | - 署名 — 您必须按照作者或者许可人指定的方式对作品进行署名。 23 | - 署名方式为:在转载或新作品开头的显著位置,注明原作者的姓名、来源及其采用的知识共享协议,与本作品在Github上的原发地址建立链接 24 | - 非商业性使用 — 您不得将本作品用于商业目的。 25 | - 相同方式共享 — 如果您改变、转换本作品或者以本作品为基础进行创作,您只能采用与本协议相同的许可协议发布基于本作品的演绎作品。 26 | -------------------------------------------------------------------------------- /backend/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /backend/doc/01.md: -------------------------------------------------------------------------------- 1 | 2 | # 操作步骤 3 | 4 | 5 | ## 搭建Thinkphp5环境 6 | 7 | 8 | ## 添加xadmin静态资源 9 | 10 | 11 | ## 实现用户登录功能 12 | 13 | 14 | ## 实现欢迎页面 15 | 16 | 17 | ## 实现宿舍楼管理页面 18 | 19 | 20 | ## 增加登录检测功能 21 | 22 | 23 | ## 增加权限验证功能 24 | 25 | 26 | ## 增加布局模板 27 | 28 | 29 | ## 实现动态菜单 30 | 31 | ## 增加操作日志 32 | -------------------------------------------------------------------------------- /backend/src/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | composer.lock 3 | *.log 4 | thinkphp 5 | */.DS_Storegit 6 | .user.ini 7 | .well-known/* 8 | .htaccess 9 | 10 | -------------------------------------------------------------------------------- /backend/src/application/admin/config.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | return [ 12 | // +---------------------------------------------------------------------- 13 | // | 模板设置 14 | // +---------------------------------------------------------------------- 15 | 'template' => [ 16 | 'layout_on' => true, 17 | 'layout_name' => 'layout', 18 | ], 19 | 20 | ]; -------------------------------------------------------------------------------- /backend/src/application/admin/controller/Admin.php: -------------------------------------------------------------------------------- 1 | fetch('index'); 14 | } 15 | 16 | public function public_edit_info() 17 | { 18 | return $this->fetch('public_edit_info'); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /backend/src/application/admin/controller/Building.php: -------------------------------------------------------------------------------- 1 | fetch('index'); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /backend/src/application/admin/controller/Common.php: -------------------------------------------------------------------------------- 1 | error('请登陆', 'login/index'); 20 | } 21 | 22 | $user_id = session('user_id'); 23 | 24 | //权限检查 25 | if (!$this->_checkAuthor($user_id)) { 26 | $this->error('你无权限操作'); 27 | } 28 | 29 | //记录日志 30 | $this->_addLog(); 31 | } 32 | 33 | /** 34 | * 权限检查 35 | */ 36 | private function _checkAuthor($user_id) { 37 | 38 | if($user_id==1){ 39 | return true; 40 | } 41 | 42 | $c = strtolower(request()->controller()); 43 | $a = strtolower(request()->action()); 44 | 45 | if (preg_match('/^public_/', $a)) { 46 | return true; 47 | } 48 | if ($c == 'index' && $a == 'index') { 49 | return true; 50 | } 51 | 52 | $menu = model('Menu')->getMyMenu(); 53 | foreach ($menu as $k => $v) { 54 | if (strtolower($v['c']) == $c && strtolower($v['a']) == $a) { 55 | return true; 56 | } 57 | } 58 | 59 | return false; 60 | } 61 | 62 | /** 63 | * 记录日志 64 | */ 65 | private function _addLog() { 66 | 67 | $data = array(); 68 | $data['querystring'] = request()->query()?'?'.request()->query():''; 69 | $data['m'] = request()->module(); 70 | $data['c'] = request()->controller(); 71 | $data['a'] = request()->action(); 72 | $data['userid'] = session('user_id'); 73 | $data['username'] = session('user_name'); 74 | $data['ip'] = ip2long(request()->ip()); 75 | $data['time'] = time(); 76 | $arr = array('Index/index','Log/index'); 77 | if (!in_array($data['c'].'/'.$data['a'], $arr)) { 78 | db('admin_log')->insert($data); 79 | } 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /backend/src/application/admin/controller/Group.php: -------------------------------------------------------------------------------- 1 | fetch('index'); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /backend/src/application/admin/controller/Index.php: -------------------------------------------------------------------------------- 1 | fetch('index'); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /backend/src/application/admin/controller/Log.php: -------------------------------------------------------------------------------- 1 | fetch('index'); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /backend/src/application/admin/controller/Login.php: -------------------------------------------------------------------------------- 1 | view->engine->layout(false); 15 | return $this->fetch(); 16 | } 17 | 18 | 19 | /** 20 | * 处理登录请求 21 | */ 22 | public function dologin() 23 | { 24 | $username = input('post.username'); 25 | $password = input('post.password'); 26 | 27 | if (!$username) { 28 | $this->error('用户名不能为空'); 29 | } 30 | if (!$password) { 31 | $this->error('密码不能为空'); 32 | } 33 | 34 | $admin = model('Admin'); 35 | $info = $admin->getInfoByUsername($username); 36 | 37 | if (!$info) { 38 | $this->error('用户名或密码错误'); 39 | } 40 | $md5_salt = config('md5_salt'); 41 | 42 | if (md5(md5($password).$md5_salt) != $info['password']) { 43 | $this->error('用户名或密码错误'); 44 | } else { 45 | session('user_name', $info['username']); 46 | session('user_id', $info['id']); 47 | 48 | session('group_id', $admin->getUserGroups($info['id'])); 49 | //记录登录信息 50 | $admin->editInfo($info['id']); 51 | $this->success('登入成功', 'index/index'); 52 | } 53 | } 54 | 55 | /** 56 | * 登出 57 | */ 58 | public function logout() 59 | { 60 | session('user_name', null); 61 | session('user_id', null); 62 | $this->success('退出成功', 'login/index'); 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /backend/src/application/admin/controller/Menu.php: -------------------------------------------------------------------------------- 1 | fetch('index'); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /backend/src/application/admin/controller/Room.php: -------------------------------------------------------------------------------- 1 | fetch('index'); 14 | } 15 | 16 | /** 17 | * 登入 18 | */ 19 | public function checkin() 20 | { 21 | return $this->fetch('checkin'); 22 | } 23 | 24 | /** 25 | * 登入 26 | */ 27 | public function checkout() 28 | { 29 | return $this->fetch('checkout'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /backend/src/application/admin/model/Admin.php: -------------------------------------------------------------------------------- 1 | '无效', 2 => '有效'); 11 | 12 | /** 13 | * 登录时调用 14 | * @param String $username 用户名 15 | * @return Array 16 | */ 17 | public function getInfoByUsername($username) { 18 | $res = $this->field('id,username,password,realname,status') 19 | ->where(array('username' => $username,'status' => 1)) 20 | ->find(); 21 | if ($res) { 22 | $res = $res->data; 23 | } 24 | 25 | return $res; 26 | } 27 | 28 | /** 29 | * 30 | * @param int $userid 用户ID 31 | * @return Array 32 | */ 33 | public function getUserGroups($uid) { 34 | 35 | $res = db('admin_group_access')->field('group_id')->where('uid', $uid)->select(); 36 | 37 | $userGroups = ''; 38 | if ($res) { 39 | foreach ($res as $k => $v) { 40 | $userGroups .= $v['group_id'] . ','; 41 | } 42 | return trim($userGroups, ','); 43 | } else { 44 | return false; 45 | } 46 | } 47 | 48 | /** 49 | * 登陆更新 50 | * @param int $id id 51 | * @param array $data 更新的数据 52 | */ 53 | public function editInfo( $id, $data = array()) { 54 | $data['lastlogintime'] = time(); 55 | $data['lastloginip'] = ip2long(request()->ip()); 56 | 57 | // allowField,过滤数组中的非数据表字段数据 58 | $res = $this->allowField(true)->save($data, ['id' => $id]); 59 | return $res; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /backend/src/application/admin/model/Menu.php: -------------------------------------------------------------------------------- 1 | 8 | * @version SVN:$Id:$ 9 | */ 10 | 11 | namespace app\admin\model; 12 | 13 | use think\Model; 14 | 15 | class Menu extends Model { 16 | /** 17 | * 我的菜单 18 | * @param type $display 19 | * @return array 20 | */ 21 | public function getMyMenu($display = null) { 22 | $where = array(); 23 | $user_id = session('user_id'); 24 | $group_id = session('group_id'); 25 | if ($user_id != 1) { 26 | $res = db('admin_group') 27 | ->field('rules') 28 | ->where('id','in', $group_id) 29 | ->select(); 30 | if (!$res) { 31 | return false; 32 | } 33 | $tmp = ''; 34 | foreach ($res as $k => $v) { 35 | $tmp .=$v['rules'] . ','; 36 | } 37 | 38 | $menu_ids = trim($tmp, ','); 39 | $where['id'] = ['in', $menu_ids]; 40 | } 41 | 42 | 43 | if ($display) { 44 | $where['display'] = $display; 45 | } 46 | 47 | $res = db('menu')->where($where)->order('listorder asc')->select(); 48 | 49 | return $res; 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /backend/src/application/admin/view/admin/index.html: -------------------------------------------------------------------------------- 1 | 这是管理页面 -------------------------------------------------------------------------------- /backend/src/application/admin/view/admin/public_edit_info.html: -------------------------------------------------------------------------------- 1 | 个人信息编辑页面 -------------------------------------------------------------------------------- /backend/src/application/admin/view/building/index.html: -------------------------------------------------------------------------------- 1 | 这是楼管理页面 -------------------------------------------------------------------------------- /backend/src/application/admin/view/group/index.html: -------------------------------------------------------------------------------- 1 | 这是分组管理页面 -------------------------------------------------------------------------------- /backend/src/application/admin/view/index/index.html: -------------------------------------------------------------------------------- 1 | 这是登陆成功的首页面 -------------------------------------------------------------------------------- /backend/src/application/admin/view/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 宿舍管理系统后台 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 |
22 | 32 |
33 | 34 | 35 |
36 | 37 |
38 |
39 | {:action('Menu/index','','widget')} 40 |
41 | 42 |
43 | 44 | 45 |
46 |
47 | {__CONTENT__} 48 |
49 |
50 | 51 |
52 | 53 | 54 | 57 | 58 | 59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
初始化
74 |
75 |
76 |
77 |
78 |
79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /backend/src/application/admin/view/log/index.html: -------------------------------------------------------------------------------- 1 | 这是Log管理页面 -------------------------------------------------------------------------------- /backend/src/application/admin/view/login/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 宿舍管理系统后台 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 | 22 |

登录你的帐号

23 | 24 |
25 | 26 | 29 |
30 | 31 |
32 | 33 | 36 |
37 |
38 | 39 | 40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
初始化
58 |
59 |
60 |
61 |
62 |
63 | 64 | -------------------------------------------------------------------------------- /backend/src/application/admin/view/menu/index.html: -------------------------------------------------------------------------------- 1 | 这是Menu管理页面 -------------------------------------------------------------------------------- /backend/src/application/admin/view/room/checkin.html: -------------------------------------------------------------------------------- 1 | 入住 -------------------------------------------------------------------------------- /backend/src/application/admin/view/room/checkout.html: -------------------------------------------------------------------------------- 1 | 退宿 -------------------------------------------------------------------------------- /backend/src/application/admin/widget/Menu.php: -------------------------------------------------------------------------------- 1 | 8 | * @version SVN:$Id:$ 9 | */ 10 | 11 | namespace app\admin\widget; 12 | 13 | class Menu { 14 | 15 | public function __construct() { 16 | if (!session('user_id')) { 17 | return false; 18 | } 19 | } 20 | 21 | public function index() { 22 | $menu = model('Menu')->getMyMenu(1); 23 | 24 | $menuTree = list_to_tree($menu); 25 | 26 | trace($menuTree); 27 | 28 | $html = '"; 32 | //echo $html;exit; 33 | return $html; 34 | } 35 | private function check_menu_open($tree){ 36 | if (is_array($tree)) { 37 | foreach ($tree as $val) { 38 | if ($val['c'] == request()->controller() && $val['a'] == request()->action()) { 39 | return true; 40 | } 41 | } 42 | } 43 | return false; 44 | } 45 | 46 | private function menu_tree($tree) { 47 | 48 | $html = ''; 49 | 50 | if (is_array($tree)) { 51 | 52 | foreach ($tree as $val) { 53 | 54 | if (isset($val["name"])) { 55 | $title = $val["name"]; 56 | 57 | if (!empty($val["a"])) { 58 | $url = url('@admin/' . $val['c'] . '/' . $val['a']); 59 | } 60 | 61 | if (empty($val['icon'])) { 62 | $icon = ""; 63 | } else { 64 | $icon = "&#".$val['icon'].";"; 65 | } 66 | 67 | if ($val['c'] == request()->controller() && $val['a'] == request()->action()) { 68 | $current = 'current'; 69 | } else { 70 | $current = ''; 71 | } 72 | 73 | $opened =''; 74 | 75 | if (isset($val['_child'])) { 76 | if($this->check_menu_open($val['_child'])) 77 | $opened ='opened'; 78 | $html.=' 79 |
  • 80 | 81 | ' . $icon . ' 82 | ' . $title . ' 83 | 84 | 85 | 92 |
  • 93 | '; 94 | } else { 95 | 96 | $html.=' 97 |
  • 98 | 99 | ' . $icon. ' 100 | ' . $title . ' 101 | 102 | 103 |
  • 104 | '; 105 | } 106 | } 107 | } 108 | } 109 | 110 | return $html; 111 | } 112 | 113 | } -------------------------------------------------------------------------------- /backend/src/application/command.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | return []; 13 | -------------------------------------------------------------------------------- /backend/src/application/common.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | // 应用公共文件 13 | 14 | /** 15 | * 数组转树 16 | * @param type $list 17 | * @param type $root 18 | * @param type $pk 19 | * @param type $pid 20 | * @param type $child 21 | * @return type 22 | */ 23 | function list_to_tree($list, $root = 0, $pk = 'id', $pid = 'parentid', $child = '_child') { 24 | // 创建Tree 25 | $tree = array(); 26 | if (is_array($list)) { 27 | // 创建基于主键的数组引用 28 | $refer = array(); 29 | foreach ($list as $key => $data) { 30 | $refer[$data[$pk]] = &$list[$key]; 31 | } 32 | foreach ($list as $key => $data) { 33 | // 判断是否存在parent 34 | $parentId = 0; 35 | if (isset($data[$pid])) { 36 | $parentId = $data[$pid]; 37 | } 38 | if ((string) $root == $parentId) { 39 | $tree[] = &$list[$key]; 40 | } else { 41 | if (isset($refer[$parentId])) { 42 | $parent = &$refer[$parentId]; 43 | $parent[$child][] = &$list[$key]; 44 | } 45 | } 46 | } 47 | } 48 | return $tree; 49 | } 50 | -------------------------------------------------------------------------------- /backend/src/application/config.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | return [ 13 | // +---------------------------------------------------------------------- 14 | // | 应用设置 15 | // +---------------------------------------------------------------------- 16 | 17 | //MD5 18 | 'md5_salt' => 'web2020', 19 | 20 | // 应用调试模式 21 | 'app_debug' => true, 22 | // 应用Trace 23 | 'app_trace' => true, 24 | // 应用模式状态 25 | 'app_status' => '', 26 | // 是否支持多模块 27 | 'app_multi_module' => true, 28 | // 入口自动绑定模块 29 | 'auto_bind_module' => false, 30 | // 注册的根命名空间 31 | 'root_namespace' => [], 32 | // 扩展函数文件 33 | 'extra_file_list' => [THINK_PATH . 'helper' . EXT], 34 | // 默认输出类型 35 | 'default_return_type' => 'html', 36 | // 默认AJAX 数据返回格式,可选json xml ... 37 | 'default_ajax_return' => 'json', 38 | // 默认JSONP格式返回的处理方法 39 | 'default_jsonp_handler' => 'jsonpReturn', 40 | // 默认JSONP处理方法 41 | 'var_jsonp_handler' => 'callback', 42 | // 默认时区 43 | 'default_timezone' => 'PRC', 44 | // 是否开启多语言 45 | 'lang_switch_on' => false, 46 | // 默认全局过滤方法 用逗号分隔多个 47 | 'default_filter' => '', 48 | // 默认语言 49 | 'default_lang' => 'zh-cn', 50 | // 应用类库后缀 51 | 'class_suffix' => false, 52 | // 控制器类后缀 53 | 'controller_suffix' => false, 54 | 55 | // +---------------------------------------------------------------------- 56 | // | 模块设置 57 | // +---------------------------------------------------------------------- 58 | 59 | // 默认模块名 60 | 'default_module' => 'admin', 61 | // 禁止访问模块 62 | 'deny_module_list' => ['common'], 63 | // 默认控制器名 64 | 'default_controller' => 'Index', 65 | // 默认操作名 66 | 'default_action' => 'index', 67 | // 默认验证器 68 | 'default_validate' => '', 69 | // 默认的空控制器名 70 | 'empty_controller' => 'Error', 71 | // 操作方法后缀 72 | 'action_suffix' => '', 73 | // 自动搜索控制器 74 | 'controller_auto_search' => false, 75 | 76 | // +---------------------------------------------------------------------- 77 | // | URL设置 78 | // +---------------------------------------------------------------------- 79 | 80 | // PATHINFO变量名 用于兼容模式 81 | 'var_pathinfo' => 's', 82 | // 兼容PATH_INFO获取 83 | 'pathinfo_fetch' => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'], 84 | // pathinfo分隔符 85 | 'pathinfo_depr' => '/', 86 | // URL伪静态后缀 87 | 'url_html_suffix' => 'html', 88 | // URL普通方式参数 用于自动生成 89 | 'url_common_param' => false, 90 | // URL参数方式 0 按名称成对解析 1 按顺序解析 91 | 'url_param_type' => 0, 92 | // 是否开启路由 93 | 'url_route_on' => true, 94 | // 路由使用完整匹配 95 | 'route_complete_match' => false, 96 | // 路由配置文件(支持配置多个) 97 | 'route_config_file' => ['route'], 98 | // 是否开启路由解析缓存 99 | 'route_check_cache' => false, 100 | // 是否强制使用路由 101 | 'url_route_must' => false, 102 | // 域名部署 103 | 'url_domain_deploy' => false, 104 | // 域名根,如thinkphp.cn 105 | 'url_domain_root' => '', 106 | // 是否自动转换URL中的控制器和操作名 107 | 'url_convert' => true, 108 | // 默认的访问控制器层 109 | 'url_controller_layer' => 'controller', 110 | // 表单请求类型伪装变量 111 | 'var_method' => '_method', 112 | // 表单ajax伪装变量 113 | 'var_ajax' => '_ajax', 114 | // 表单pjax伪装变量 115 | 'var_pjax' => '_pjax', 116 | // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则 117 | 'request_cache' => false, 118 | // 请求缓存有效期 119 | 'request_cache_expire' => null, 120 | // 全局请求缓存排除规则 121 | 'request_cache_except' => [], 122 | 123 | // +---------------------------------------------------------------------- 124 | // | 模板设置 125 | // +---------------------------------------------------------------------- 126 | 127 | 'template' => [ 128 | // 模板引擎类型 支持 php think 支持扩展 129 | 'type' => 'Think', 130 | // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 131 | 'auto_rule' => 1, 132 | // 模板路径 133 | 'view_path' => '', 134 | // 模板后缀 135 | 'view_suffix' => 'html', 136 | // 模板文件名分隔符 137 | 'view_depr' => DS, 138 | // 模板引擎普通标签开始标记 139 | 'tpl_begin' => '{', 140 | // 模板引擎普通标签结束标记 141 | 'tpl_end' => '}', 142 | // 标签库标签开始标记 143 | 'taglib_begin' => '{', 144 | // 标签库标签结束标记 145 | 'taglib_end' => '}', 146 | ], 147 | 148 | // 视图输出字符串内容替换 149 | 'view_replace_str' => [], 150 | // 默认跳转页面对应的模板文件 151 | 'dispatch_success_tmpl' => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl', 152 | 'dispatch_error_tmpl' => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl', 153 | 154 | // +---------------------------------------------------------------------- 155 | // | 异常及错误设置 156 | // +---------------------------------------------------------------------- 157 | 158 | // 异常页面的模板文件 159 | 'exception_tmpl' => THINK_PATH . 'tpl' . DS . 'think_exception.tpl', 160 | 161 | // 错误显示信息,非调试模式有效 162 | 'error_message' => '页面错误!请稍后再试~', 163 | // 显示错误信息 164 | 'show_error_msg' => false, 165 | // 异常处理handle类 留空使用 \think\exception\Handle 166 | 'exception_handle' => '', 167 | 168 | // +---------------------------------------------------------------------- 169 | // | 日志设置 170 | // +---------------------------------------------------------------------- 171 | 172 | 'log' => [ 173 | // 日志记录方式,内置 file socket 支持扩展 174 | 'type' => 'File', 175 | // 日志保存目录 176 | 'path' => LOG_PATH, 177 | // 日志记录级别 178 | 'level' => [], 179 | ], 180 | 181 | // +---------------------------------------------------------------------- 182 | // | Trace设置 开启 app_trace 后 有效 183 | // +---------------------------------------------------------------------- 184 | 'trace' => [ 185 | // 内置Html Console 支持扩展 186 | 'type' => 'Html', 187 | ], 188 | 189 | // +---------------------------------------------------------------------- 190 | // | 缓存设置 191 | // +---------------------------------------------------------------------- 192 | 193 | 'cache' => [ 194 | // 驱动方式 195 | 'type' => 'File', 196 | // 缓存保存目录 197 | 'path' => CACHE_PATH, 198 | // 缓存前缀 199 | 'prefix' => '', 200 | // 缓存有效期 0表示永久缓存 201 | 'expire' => 0, 202 | ], 203 | 204 | // +---------------------------------------------------------------------- 205 | // | 会话设置 206 | // +---------------------------------------------------------------------- 207 | 208 | 'session' => [ 209 | 'id' => '', 210 | // SESSION_ID的提交变量,解决flash上传跨域 211 | 'var_session_id' => '', 212 | // SESSION 前缀 213 | 'prefix' => 'think', 214 | // 驱动方式 支持redis memcache memcached 215 | 'type' => '', 216 | // 是否自动开启 SESSION 217 | 'auto_start' => true, 218 | ], 219 | 220 | // +---------------------------------------------------------------------- 221 | // | Cookie设置 222 | // +---------------------------------------------------------------------- 223 | 'cookie' => [ 224 | // cookie 名称前缀 225 | 'prefix' => '', 226 | // cookie 保存时间 227 | 'expire' => 0, 228 | // cookie 保存路径 229 | 'path' => '/', 230 | // cookie 有效域名 231 | 'domain' => '', 232 | // cookie 启用安全传输 233 | 'secure' => false, 234 | // httponly设置 235 | 'httponly' => '', 236 | // 是否使用 setcookie 237 | 'setcookie' => true, 238 | ], 239 | 240 | //分页配置 241 | 'paginate' => [ 242 | 'type' => 'bootstrap', 243 | 'var_page' => 'page', 244 | 'list_rows' => 15, 245 | ], 246 | ]; 247 | -------------------------------------------------------------------------------- /backend/src/application/database.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | return [ 13 | // 数据库类型 14 | 'type' => 'mysql', 15 | // 服务器地址 16 | 'hostname' => '127.0.0.1', 17 | // 数据库名 18 | 'database' => 'web2020', 19 | // 用户名 20 | 'username' => 'web2020', 21 | // 密码 22 | 'password' => 'web2020', 23 | // 端口 24 | 'hostport' => '', 25 | // 连接dsn 26 | 'dsn' => '', 27 | // 数据库连接参数 28 | 'params' => [], 29 | // 数据库编码默认采用utf8 30 | 'charset' => 'utf8', 31 | // 数据库表前缀 32 | 'prefix' => 'web2020_', 33 | // 数据库调试模式 34 | 'debug' => true, 35 | // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) 36 | 'deploy' => 0, 37 | // 数据库读写是否分离 主从式有效 38 | 'rw_separate' => false, 39 | // 读写分离后 主服务器数量 40 | 'master_num' => 1, 41 | // 指定从服务器序号 42 | 'slave_no' => '', 43 | // 自动读取主库数据 44 | 'read_master' => false, 45 | // 是否严格检查字段是否存在 46 | 'fields_strict' => true, 47 | // 数据集返回类型 48 | 'resultset_type' => 'array', 49 | // 自动写入时间戳字段 50 | 'auto_timestamp' => false, 51 | // 时间字段取出后的默认时间格式 52 | 'datetime_format' => 'Y-m-d H:i:s', 53 | // 是否需要进行SQL性能分析 54 | 'sql_explain' => false, 55 | ]; 56 | -------------------------------------------------------------------------------- /backend/src/application/extra/queue.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | return [ 13 | 'connector' => 'Sync' 14 | ]; 15 | -------------------------------------------------------------------------------- /backend/src/application/index/controller/Index.php: -------------------------------------------------------------------------------- 1 | *{ padding: 0; margin: 0; } .think_default_text{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }

    :)

    ThinkPHP V5
    十年磨一剑 - 为API开发设计的高性能框架

    [ V5.0 版本由 七牛云 独家赞助发布 ]
    '; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /backend/src/application/route.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | return [ 13 | '__pattern__' => [ 14 | 'name' => '\w+', 15 | ], 16 | '[hello]' => [ 17 | ':id' => ['index/hello', ['method' => 'get'], ['id' => '\d+']], 18 | ':name' => ['index/hello', ['method' => 'post']], 19 | ], 20 | 21 | ]; 22 | -------------------------------------------------------------------------------- /backend/src/application/tags.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | // 应用行为扩展定义文件 13 | return [ 14 | // 应用初始化 15 | 'app_init' => [], 16 | // 应用开始 17 | 'app_begin' => [], 18 | // 模块初始化 19 | 'module_init' => [], 20 | // 操作开始执行 21 | 'action_begin' => [], 22 | // 视图内容过滤 23 | 'view_filter' => [], 24 | // 日志写入 25 | 'log_write' => [], 26 | // 应用结束 27 | 'app_end' => [], 28 | ]; 29 | -------------------------------------------------------------------------------- /backend/src/extend/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /backend/src/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/favicon.ico -------------------------------------------------------------------------------- /backend/src/public/index.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | // [ 应用入口文件 ] 13 | 14 | // 定义应用目录 15 | define('APP_PATH', __DIR__ . '/../application/'); 16 | // 加载框架引导文件 17 | require __DIR__ . '/../thinkphp/start.php'; 18 | -------------------------------------------------------------------------------- /backend/src/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /backend/src/public/router.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | // $Id$ 12 | 13 | if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) { 14 | return false; 15 | } else { 16 | if (!isset($_SERVER['PATH_INFO'])) { 17 | $_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI']; 18 | } 19 | require __DIR__ . "/index.php"; 20 | } 21 | -------------------------------------------------------------------------------- /backend/src/public/static/css/font.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'iconfont'; 3 | src: url('../fonts/iconfont.eot'); 4 | src: url('../fonts/iconfont.eot?#iefix') format('embedded-opentype'), 5 | url('../fonts/iconfont.woff') format('woff'), 6 | url('../fonts/iconfont.ttf') format('truetype'), 7 | url('../fonts/iconfont.svg#iconfont') format('svg'); 8 | } 9 | .iconfont{ 10 | color: #fff; 11 | font-family:"iconfont" !important; 12 | font-size:16px;font-style:normal; 13 | -webkit-font-smoothing: antialiased; 14 | -webkit-text-stroke-width: 0.2px; 15 | -moz-osx-font-smoothing: grayscale; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /backend/src/public/static/css/xadmin.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | @import url(../lib/layui/css/layui.css); 3 | *{ 4 | margin: 0px; 5 | padding: 0px; 6 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 7 | } 8 | a{ 9 | text-decoration: none; 10 | } 11 | html{ 12 | width: 100%; 13 | } 14 | body{ 15 | width: 100%; 16 | background-color: #54364a; 17 | background-image: url(../images/a.jpg); 18 | background-repeat: no-repeat; 19 | background-size: cover; 20 | color: #ffffff; 21 | } 22 | /*layer弹出层背景设置*/ 23 | 24 | .layui-layer{ 25 | background-image: url(../images/h.jpg); 26 | background-size: cover; 27 | } 28 | 29 | /*背景设置*/ 30 | .bg-changer{ 31 | position: fixed; 32 | left: 0px; 33 | top: -110px; 34 | width: 100%; 35 | /*height: 100px;*/ 36 | 37 | } 38 | .bg-changer #changer-set{ 39 | position: fixed; 40 | top: 111px; 41 | right: 0px; 42 | width: 33px; 43 | height: 33px; 44 | background: rgba(0,0,0,0.5); 45 | border: 1px solid rgba(255,255,255, 0.3); 46 | border-top: 0px; 47 | color: #fff; 48 | text-align: center; 49 | line-height: 33px; 50 | cursor: pointer; 51 | 52 | } 53 | .bg-changer #changer-set i{ 54 | display: block; 55 | font-size: 25px; 56 | /* 设置默认样式,开启3d硬件加速 */ 57 | -webkit-transform:translate3d(0,0,0); 58 | -moz-transform:translate3d(0,0,0); 59 | transform:translate3d(0,0,0); 60 | /* 设置动画,animation:动画名称 动画播放时长单位秒或微秒 动画播放的速度曲线linear为匀速 动画播放次数infinite为循环播放; */ 61 | -webkit-animation:play 3s linear infinite; 62 | -moz-animation:play 3s linear infinite; 63 | animation:play 3s linear infinite; 64 | } 65 | 66 | @-webkit-keyframes play{ 67 | 0% { 68 | -webkit-transform:rotateZ(0deg); 69 | } 70 | 100% { 71 | -webkit-transform:rotateZ(360deg); 72 | } 73 | } 74 | @-moz-keyframes play{ 75 | 0% { 76 | -moz-transform:rotateZ(0deg); 77 | } 78 | 100% { 79 | -moz-transform:rotateZ(360deg); 80 | } 81 | } 82 | @keyframes play{ 83 | 0% { 84 | transform:rotateZ(0deg); 85 | } 86 | 100% { 87 | transform:rotateZ(360deg); 88 | } 89 | } 90 | .bg-changer .changer-list{ 91 | width: 100%; 92 | height: 100px; 93 | /*display: none;*/ 94 | padding-top: 10px; 95 | background: rgba(0,0,0,0.5); 96 | border: 1px solid rgba(255,255,255, 0.3); 97 | } 98 | .bg-changer .changer-list .swiper-slide{ 99 | width: 80px; 100 | } 101 | .bg-changer .changer-list img.item{ 102 | width: 80px; 103 | height: 80px; 104 | } 105 | .bg-changer .changer-list span{ 106 | display: block; 107 | width: 80px; 108 | height: 80px; 109 | color: #fff; 110 | text-align: center; 111 | line-height: 80px; 112 | background: #4390EE url() 0 0 no-repeat; 113 | } 114 | .bg-changer .bg-out{ 115 | width: 100%; 116 | height: 900px; 117 | background: red url() 0 0 no-repeat; 118 | opacity: 0; 119 | display: none; 120 | } 121 | /*登录样式*/ 122 | .login-logo{ 123 | width: 100%; 124 | padding-top: 70px; 125 | height: 50px; 126 | } 127 | .login-logo h1{ 128 | color: #fff; 129 | font-size: 25px; 130 | text-align: center; 131 | } 132 | .login-box{ 133 | width: 310px; 134 | height: 350px; 135 | padding: 20px 15px 15px; 136 | background-color: rgba(0, 0, 0, 0.25); 137 | border: 1px solid rgba(255,255,255, 0.3); 138 | margin: 0 auto; 139 | } 140 | .login-box h3{ 141 | font-weight: 300; 142 | margin-bottom: 25px; 143 | color: #fff; 144 | margin-left: 0; 145 | font-size: 22px; 146 | margin-top: 20px; 147 | } 148 | .layui-form-item{ 149 | margin-top: 15px; 150 | } 151 | .layui-form-pane .layui-form-label{ 152 | 153 | border-radius: 6px; 154 | background-color: rgba(0, 0, 0, 0.25); 155 | border: 1px solid rgba(255, 255, 255, 0.2); 156 | border-right: 0px; 157 | border-top-right-radius: 0; 158 | border-bottom-right-radius: 0; 159 | 160 | } 161 | .layui-form-pane .login-form{ 162 | width: 25px; 163 | } 164 | .layui-form-pane .layui-form-label i{ 165 | color: #fff; 166 | font-size: 18px; 167 | line-height: 14px; 168 | } 169 | .layui-form-item .login-inline{ 170 | width: 245px; 171 | /*margin-left: 60px;*/ 172 | /*background-color: rgba(0, 0, 0, 0.25);*/ 173 | } 174 | @media screen and (max-width: 450px){ 175 | .layui-form-item .layui-input-inline { 176 | margin: 0 0 10px 56px; 177 | } 178 | } 179 | 180 | .layui-form-label i{ 181 | font-size: 14px; 182 | 183 | } 184 | 185 | .layui-form-pane .layui-input,.layui-form-pane .layui-textarea,.layui-form-pane .layui-select{ 186 | background-color: rgba(0, 0, 0, 0.25); 187 | border-radius: 6px; 188 | border: 1px solid rgba(255, 255, 255, 0.2); 189 | border-top-left-radius: 0; 190 | border-bottom-left-radius: 0; 191 | color: #fff; 192 | } 193 | .layui-input:focus, .layui-textarea:focus, .layui-select:focus { 194 | border-color: #66afe9; 195 | outline: 0; 196 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); 197 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); 198 | } 199 | 200 | .layui-input::-webkit-input-placeholder, .layui-textarea::-webkit-input-placeholder, .layui-select::-webkit-input-placeholder { color:#fff; } 201 | .layui-input::-moz-placeholder, .layui-textarea::-moz-placeholder, .layui-select::-moz-placeholder { color:#fff; } 202 | 203 | 204 | .login-title { 205 | font-weight: bold; 206 | color: #fff; 207 | font-size: 14px; 208 | } 209 | 210 | 211 | .form-actions { 212 | background-color: rgba(0, 0, 0, 0.25); 213 | margin-left: -15px; 214 | margin-right: -15px; 215 | text-align: center; 216 | margin-top: 20px; 217 | padding: 19px 20px 20px; 218 | } 219 | 220 | .forgot { 221 | width: 100%; 222 | padding: 15px 0; 223 | text-align: center; 224 | color: #fff; 225 | } 226 | .forgot:hover { 227 | color: #fff; 228 | } 229 | 230 | .btn { 231 | /*display: inline-block;*/ 232 | padding: 6px 12px; 233 | margin-bottom: 0; 234 | font-size: 14px; 235 | font-weight: normal; 236 | line-height: 1.428571429; 237 | text-align: center; 238 | white-space: nowrap; 239 | vertical-align: middle; 240 | cursor: pointer; 241 | border: 1px solid transparent; 242 | border-radius: 4px; 243 | -webkit-user-select: none; 244 | -moz-user-select: none; 245 | -ms-user-select: none; 246 | -o-user-select: none; 247 | user-select: none; 248 | color: #ffffff; 249 | background-color: rgba(240, 173, 78, 0.55); 250 | border-color: #eea236; 251 | margin:0 auto; 252 | } 253 | 254 | /*头部*/ 255 | .container{ 256 | width: 100%; 257 | height: 71px; 258 | background-color: rgba(0, 0, 0, 0.25); 259 | border-bottom: 1px solid rgba(255, 255, 255, 0.2); 260 | } 261 | .container .open-nav{ 262 | float: left; 263 | line-height: 71px; 264 | padding-left: 10px; 265 | display: none; 266 | cursor: pointer; 267 | 268 | } 269 | .container .open-nav i{ 270 | cursor: pointer; 271 | } 272 | .container .logo{ 273 | float: left; 274 | color: #fff; 275 | font-size: 25px; 276 | padding-left: 20px; 277 | line-height: 71px; 278 | } 279 | .container .right{ 280 | float: right; 281 | } 282 | /*主体*/ 283 | .wrapper{ 284 | display: table; 285 | position: relative; 286 | width: 100%; 287 | } 288 | .wrapper .left-nav{ 289 | background-color: rgba(0, 0, 0, 0.20); 290 | color: #FFF; 291 | display: table-cell; 292 | float: none!important; 293 | vertical-align: top; 294 | max-width: 250px; 295 | /*width: 0px;*/ 296 | } 297 | .wrapper .left-nav #nav li{ 298 | width: 250px; 299 | background-color: rgba(0, 0, 0, 0.1); 300 | border-bottom: 1px solid rgba(255, 255, 255, 0.1); 301 | } 302 | .wrapper .left-nav #nav li:hover{ 303 | background-color: rgba(0, 0, 0, 0.3); 304 | } 305 | .wrapper .left-nav #nav .current{ 306 | background-color: rgba(0, 0, 0, 0.3); 307 | } 308 | .wrapper .left-nav #nav li a{ 309 | width: 230px; 310 | color: #fff; 311 | font-size: 14px; 312 | padding: 15px 15px 15px 20px; 313 | display: block; 314 | } 315 | 316 | .wrapper .left-nav #nav li .sub-menu{ 317 | display: none; 318 | background-color:rgba(0, 0, 0, 0.3) 319 | } 320 | .wrapper .left-nav #nav li .opened{ 321 | display: block; 322 | } 323 | .wrapper .left-nav #nav li .opened{ 324 | 325 | } 326 | .wrapper .left-nav #nav li .opened .current{ 327 | background-color:rgba(0, 0, 0, 0.4) 328 | } 329 | .wrapper .left-nav #nav li .sub-menu li a{ 330 | padding: 12px 15px 12px 45px; 331 | font-size: 14px; 332 | } 333 | .wrapper .left-nav #nav li .sub-menu li a i{ 334 | font-size: 12px; 335 | } 336 | .wrapper .left-nav #nav li a i{ 337 | padding-right: 10px; 338 | line-height: 16px; 339 | } 340 | .wrapper .left-nav #nav li .nav_right{ 341 | float: right; 342 | font-size: 12px; 343 | } 344 | .wrapper .page-content{ 345 | color: #FFF; 346 | padding: 20px 30px; 347 | display: table-cell; 348 | float: none!important; 349 | word-wrap:break-word; 350 | word-break:break-all; 351 | 352 | } 353 | .wrapper .page-content .content{ 354 | min-height: 500px; 355 | /*width: 100%;*/ 356 | /*height: 300px;*/ 357 | /*background: red url() 0 0 no-repeat;*/ 358 | } 359 | 360 | xblock{ 361 | display: block; 362 | margin-bottom: 10px; 363 | padding: 5px; 364 | line-height: 22px; 365 | /* border-left: 5px solid #009688; */ 366 | border-radius: 0 2px 2px 0; 367 | background-color: rgba(0,0,0,0.2); 368 | } 369 | .x-right{ 370 | float: right; 371 | } 372 | 373 | .footer{ 374 | width: 100%; 375 | background-color: rgba(0, 0, 0, 0.25); 376 | border-top: 1px solid rgba(255, 255, 255, 0.2); 377 | line-height: 41px; 378 | color: #fff; 379 | /*padding-left: 10px;*/ 380 | } 381 | .footer .copyright{ 382 | margin-left: 10px; 383 | } 384 | 385 | 386 | @media screen and (max-width: 1024px){ 387 | .wrapper .left-nav{ 388 | width: 0px; 389 | } 390 | .wrapper .left-nav #side-nav{ 391 | display: none; 392 | } 393 | .container .open-nav{ 394 | display: block; 395 | } 396 | } 397 | 398 | @media screen and (min-width: 1024px){ 399 | .wrapper .left-nav{ 400 | width: 250px; 401 | } 402 | .wrapper .left-nav #side-nav{ 403 | display: block; 404 | } 405 | .container .open-nav{ 406 | display: none; 407 | } 408 | } 409 | 410 | @media screen and (max-width: 1024px){ 411 | .login-box{ 412 | width: 100%; 413 | } 414 | } 415 | 416 | @media screen and (max-width: 500px){ 417 | .container .right{ 418 | display: none; 419 | } 420 | } 421 | 422 | @media screen and (max-width: 768px){ 423 | .xbs768{ 424 | display: none; 425 | } 426 | } 427 | 428 | -------------------------------------------------------------------------------- /backend/src/public/static/fonts/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/fonts/iconfont.eot -------------------------------------------------------------------------------- /backend/src/public/static/fonts/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/fonts/iconfont.ttf -------------------------------------------------------------------------------- /backend/src/public/static/fonts/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/fonts/iconfont.woff -------------------------------------------------------------------------------- /backend/src/public/static/images/a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/images/a.jpg -------------------------------------------------------------------------------- /backend/src/public/static/images/b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/images/b.jpg -------------------------------------------------------------------------------- /backend/src/public/static/images/c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/images/c.jpg -------------------------------------------------------------------------------- /backend/src/public/static/images/d.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/images/d.jpg -------------------------------------------------------------------------------- /backend/src/public/static/images/e.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/images/e.jpg -------------------------------------------------------------------------------- /backend/src/public/static/images/f.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/images/f.jpg -------------------------------------------------------------------------------- /backend/src/public/static/images/g.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/images/g.jpg -------------------------------------------------------------------------------- /backend/src/public/static/images/h.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/images/h.jpg -------------------------------------------------------------------------------- /backend/src/public/static/images/i.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/images/i.jpg -------------------------------------------------------------------------------- /backend/src/public/static/images/j.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/images/j.jpg -------------------------------------------------------------------------------- /backend/src/public/static/images/k.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/images/k.jpg -------------------------------------------------------------------------------- /backend/src/public/static/js/echarts-for-x-admin.js: -------------------------------------------------------------------------------- 1 | (function (root, factory) { 2 | if (typeof define === 'function' && define.amd) { 3 | // AMD. Register as an anonymous module. 4 | define(['exports', 'echarts'], factory); 5 | } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { 6 | // CommonJS 7 | factory(exports, require('echarts')); 8 | } else { 9 | // Browser globals 10 | factory({}, root.echarts); 11 | } 12 | }(this, function (exports, echarts) { 13 | var log = function (msg) { 14 | if (typeof console !== 'undefined') { 15 | console && console.error && console.error(msg); 16 | } 17 | }; 18 | if (!echarts) { 19 | log('ECharts is not Loaded'); 20 | return; 21 | } 22 | echarts.registerTheme('echarts-for-x-admin', { 23 | "color": [ 24 | "#c23531", 25 | "#2f4554", 26 | "#61a0a8", 27 | "#d48265", 28 | "#91c7ae", 29 | "#749f83", 30 | "#ca8622", 31 | "#bda29a", 32 | "#6e7074", 33 | "#546570", 34 | "#c4ccd3" 35 | ], 36 | "backgroundColor": "rgba(0,0,0,0.2)", 37 | "textStyle": {}, 38 | "title": { 39 | "textStyle": { 40 | "color": "#ffffff" 41 | }, 42 | "subtextStyle": { 43 | "color": "#ffffff" 44 | } 45 | }, 46 | "line": { 47 | "itemStyle": { 48 | "normal": { 49 | "borderWidth": 1 50 | } 51 | }, 52 | "lineStyle": { 53 | "normal": { 54 | "width": 2 55 | } 56 | }, 57 | "symbolSize": 4, 58 | "symbol": "emptyCircle", 59 | "smooth": false 60 | }, 61 | "radar": { 62 | "itemStyle": { 63 | "normal": { 64 | "borderWidth": 1 65 | } 66 | }, 67 | "lineStyle": { 68 | "normal": { 69 | "width": 2 70 | } 71 | }, 72 | "symbolSize": 4, 73 | "symbol": "emptyCircle", 74 | "smooth": false 75 | }, 76 | "bar": { 77 | "itemStyle": { 78 | "normal": { 79 | "barBorderWidth": 0, 80 | "barBorderColor": "#ccc" 81 | }, 82 | "emphasis": { 83 | "barBorderWidth": 0, 84 | "barBorderColor": "#ccc" 85 | } 86 | } 87 | }, 88 | "pie": { 89 | "itemStyle": { 90 | "normal": { 91 | "borderWidth": 0, 92 | "borderColor": "#ccc" 93 | }, 94 | "emphasis": { 95 | "borderWidth": 0, 96 | "borderColor": "#ccc" 97 | } 98 | } 99 | }, 100 | "scatter": { 101 | "itemStyle": { 102 | "normal": { 103 | "borderWidth": 0, 104 | "borderColor": "#ccc" 105 | }, 106 | "emphasis": { 107 | "borderWidth": 0, 108 | "borderColor": "#ccc" 109 | } 110 | } 111 | }, 112 | "boxplot": { 113 | "itemStyle": { 114 | "normal": { 115 | "borderWidth": 0, 116 | "borderColor": "#ccc" 117 | }, 118 | "emphasis": { 119 | "borderWidth": 0, 120 | "borderColor": "#ccc" 121 | } 122 | } 123 | }, 124 | "parallel": { 125 | "itemStyle": { 126 | "normal": { 127 | "borderWidth": 0, 128 | "borderColor": "#ccc" 129 | }, 130 | "emphasis": { 131 | "borderWidth": 0, 132 | "borderColor": "#ccc" 133 | } 134 | } 135 | }, 136 | "sankey": { 137 | "itemStyle": { 138 | "normal": { 139 | "borderWidth": 0, 140 | "borderColor": "#ccc" 141 | }, 142 | "emphasis": { 143 | "borderWidth": 0, 144 | "borderColor": "#ccc" 145 | } 146 | } 147 | }, 148 | "funnel": { 149 | "itemStyle": { 150 | "normal": { 151 | "borderWidth": 0, 152 | "borderColor": "#ccc" 153 | }, 154 | "emphasis": { 155 | "borderWidth": 0, 156 | "borderColor": "#ccc" 157 | } 158 | } 159 | }, 160 | "gauge": { 161 | "itemStyle": { 162 | "normal": { 163 | "borderWidth": 0, 164 | "borderColor": "#ccc" 165 | }, 166 | "emphasis": { 167 | "borderWidth": 0, 168 | "borderColor": "#ccc" 169 | } 170 | } 171 | }, 172 | "candlestick": { 173 | "itemStyle": { 174 | "normal": { 175 | "color": "#c23531", 176 | "color0": "#314656", 177 | "borderColor": "#c23531", 178 | "borderColor0": "#314656", 179 | "borderWidth": 1 180 | } 181 | } 182 | }, 183 | "graph": { 184 | "itemStyle": { 185 | "normal": { 186 | "borderWidth": 0, 187 | "borderColor": "#ccc" 188 | } 189 | }, 190 | "lineStyle": { 191 | "normal": { 192 | "width": 1, 193 | "color": "#aaa" 194 | } 195 | }, 196 | "symbolSize": 4, 197 | "symbol": "emptyCircle", 198 | "smooth": false, 199 | "color": [ 200 | "#c23531", 201 | "#2f4554", 202 | "#61a0a8", 203 | "#d48265", 204 | "#91c7ae", 205 | "#749f83", 206 | "#ca8622", 207 | "#bda29a", 208 | "#6e7074", 209 | "#546570", 210 | "#c4ccd3" 211 | ], 212 | "label": { 213 | "normal": { 214 | "textStyle": { 215 | "color": "#eeeeee" 216 | } 217 | } 218 | } 219 | }, 220 | "map": { 221 | "itemStyle": { 222 | "normal": { 223 | "areaColor": "#eee", 224 | "borderColor": "#444", 225 | "borderWidth": 0.5 226 | }, 227 | "emphasis": { 228 | "areaColor": "rgba(255,215,0,0.8)", 229 | "borderColor": "#444", 230 | "borderWidth": 1 231 | } 232 | }, 233 | "label": { 234 | "normal": { 235 | "textStyle": { 236 | "color": "#ffffff" 237 | } 238 | }, 239 | "emphasis": { 240 | "textStyle": { 241 | "color": "#ffffff" 242 | } 243 | } 244 | } 245 | }, 246 | "geo": { 247 | "itemStyle": { 248 | "normal": { 249 | "areaColor": "#eee", 250 | "borderColor": "#444", 251 | "borderWidth": 0.5 252 | }, 253 | "emphasis": { 254 | "areaColor": "rgba(255,215,0,0.8)", 255 | "borderColor": "#444", 256 | "borderWidth": 1 257 | } 258 | }, 259 | "label": { 260 | "normal": { 261 | "textStyle": { 262 | "color": "#ffffff" 263 | } 264 | }, 265 | "emphasis": { 266 | "textStyle": { 267 | "color": "#ffffff" 268 | } 269 | } 270 | } 271 | }, 272 | "categoryAxis": { 273 | "axisLine": { 274 | "show": true, 275 | "lineStyle": { 276 | "color": "#ffffff" 277 | } 278 | }, 279 | "axisTick": { 280 | "show": true, 281 | "lineStyle": { 282 | "color": "#ffffff" 283 | } 284 | }, 285 | "axisLabel": { 286 | "show": true, 287 | "textStyle": { 288 | "color": "#ffffff" 289 | } 290 | }, 291 | "splitLine": { 292 | "show": false, 293 | "lineStyle": { 294 | "color": [ 295 | "#ccc" 296 | ] 297 | } 298 | }, 299 | "splitArea": { 300 | "show": false, 301 | "areaStyle": { 302 | "color": [ 303 | "rgba(250,250,250,0.3)", 304 | "rgba(200,200,200,0.3)" 305 | ] 306 | } 307 | } 308 | }, 309 | "valueAxis": { 310 | "axisLine": { 311 | "show": true, 312 | "lineStyle": { 313 | "color": "#ffffff" 314 | } 315 | }, 316 | "axisTick": { 317 | "show": true, 318 | "lineStyle": { 319 | "color": "#ffffff" 320 | } 321 | }, 322 | "axisLabel": { 323 | "show": true, 324 | "textStyle": { 325 | "color": "#ffffff" 326 | } 327 | }, 328 | "splitLine": { 329 | "show": true, 330 | "lineStyle": { 331 | "color": [ 332 | "#ccc" 333 | ] 334 | } 335 | }, 336 | "splitArea": { 337 | "show": false, 338 | "areaStyle": { 339 | "color": [ 340 | "rgba(250,250,250,0.3)", 341 | "rgba(200,200,200,0.3)" 342 | ] 343 | } 344 | } 345 | }, 346 | "logAxis": { 347 | "axisLine": { 348 | "show": true, 349 | "lineStyle": { 350 | "color": "#ffffff" 351 | } 352 | }, 353 | "axisTick": { 354 | "show": true, 355 | "lineStyle": { 356 | "color": "#ffffff" 357 | } 358 | }, 359 | "axisLabel": { 360 | "show": true, 361 | "textStyle": { 362 | "color": "#ffffff" 363 | } 364 | }, 365 | "splitLine": { 366 | "show": true, 367 | "lineStyle": { 368 | "color": [ 369 | "#cccccc" 370 | ] 371 | } 372 | }, 373 | "splitArea": { 374 | "show": false, 375 | "areaStyle": { 376 | "color": [ 377 | "rgba(250,250,250,0.3)", 378 | "rgba(200,200,200,0.3)" 379 | ] 380 | } 381 | } 382 | }, 383 | "timeAxis": { 384 | "axisLine": { 385 | "show": true, 386 | "lineStyle": { 387 | "color": "#ffffff" 388 | } 389 | }, 390 | "axisTick": { 391 | "show": true, 392 | "lineStyle": { 393 | "color": "#ffffff" 394 | } 395 | }, 396 | "axisLabel": { 397 | "show": true, 398 | "textStyle": { 399 | "color": "#ffffff" 400 | } 401 | }, 402 | "splitLine": { 403 | "show": true, 404 | "lineStyle": { 405 | "color": [ 406 | "#cccccc" 407 | ] 408 | } 409 | }, 410 | "splitArea": { 411 | "show": false, 412 | "areaStyle": { 413 | "color": [ 414 | "rgba(250,250,250,0.3)", 415 | "rgba(200,200,200,0.3)" 416 | ] 417 | } 418 | } 419 | }, 420 | "toolbox": { 421 | "iconStyle": { 422 | "normal": { 423 | "borderColor": "#999" 424 | }, 425 | "emphasis": { 426 | "borderColor": "#666" 427 | } 428 | } 429 | }, 430 | "legend": { 431 | "textStyle": { 432 | "color": "#ffffff" 433 | } 434 | }, 435 | "tooltip": { 436 | "axisPointer": { 437 | "lineStyle": { 438 | "color": "#ccc", 439 | "width": 1 440 | }, 441 | "crossStyle": { 442 | "color": "#ccc", 443 | "width": 1 444 | } 445 | } 446 | }, 447 | "timeline": { 448 | "lineStyle": { 449 | "color": "#293c55", 450 | "width": 1 451 | }, 452 | "itemStyle": { 453 | "normal": { 454 | "color": "#293c55", 455 | "borderWidth": 1 456 | }, 457 | "emphasis": { 458 | "color": "#a9334c" 459 | } 460 | }, 461 | "controlStyle": { 462 | "normal": { 463 | "color": "#293c55", 464 | "borderColor": "#293c55", 465 | "borderWidth": 0.5 466 | }, 467 | "emphasis": { 468 | "color": "#293c55", 469 | "borderColor": "#293c55", 470 | "borderWidth": 0.5 471 | } 472 | }, 473 | "checkpointStyle": { 474 | "color": "#e43c59", 475 | "borderColor": "rgba(194,53,49, 0.5)" 476 | }, 477 | "label": { 478 | "normal": { 479 | "textStyle": { 480 | "color": "#ffffff" 481 | } 482 | }, 483 | "emphasis": { 484 | "textStyle": { 485 | "color": "#ffffff" 486 | } 487 | } 488 | } 489 | }, 490 | "visualMap": { 491 | "color": [ 492 | "#bf444c", 493 | "#d88273", 494 | "#f6efa6" 495 | ] 496 | }, 497 | "dataZoom": { 498 | "backgroundColor": "rgba(47,69,84,0)", 499 | "dataBackgroundColor": "rgba(47,69,84,0.3)", 500 | "fillerColor": "rgba(167,183,204,0.4)", 501 | "handleColor": "#a7b7cc", 502 | "handleSize": "100%", 503 | "textStyle": { 504 | "color": "#ffffff" 505 | } 506 | }, 507 | "markPoint": { 508 | "label": { 509 | "normal": { 510 | "textStyle": { 511 | "color": "#eeeeee" 512 | } 513 | }, 514 | "emphasis": { 515 | "textStyle": { 516 | "color": "#eeeeee" 517 | } 518 | } 519 | } 520 | } 521 | }); 522 | })); 523 | -------------------------------------------------------------------------------- /backend/src/public/static/js/xadmin.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | //加载弹出层 3 | layui.use(['form','element'], 4 | function() { 5 | layer = layui.layer; 6 | element = layui.element(); 7 | }); 8 | 9 | //初如化背景 10 | function bgint () { 11 | if(localStorage.bglist){ 12 | var arr = JSON.parse(localStorage.bglist);// 13 | // console.log(arr); 14 | //全局背景统一 15 | if(arr['bgSrc']){ 16 | $('body').css('background-image', 'url('+arr['bgSrc']+')'); 17 | 18 | //初始化弹出层背景 19 | } 20 | //单个背景逻辑 21 | // if(arr[location.href]){ 22 | // $('body').css('background-image', 'url('+arr[location.href]+')'); 23 | // } 24 | } 25 | } 26 | 27 | bgint(); 28 | 29 | //背景主题功能 30 | var changerlist = new Swiper('.changer-list', { 31 | initialSlide :5, 32 | effect: 'coverflow', 33 | grabCursor: true, 34 | centeredSlides: true, 35 | slidesPerView: 'auto', 36 | coverflow: { 37 | rotate: 50, 38 | stretch: -10, 39 | depth: 100, 40 | modifier: 1, 41 | slideShadows : false 42 | } 43 | }); 44 | 45 | //判断是否显示左侧菜单 46 | $(window).resize(function(){ 47 | width=$(this).width(); 48 | if(width>1024){ 49 | $('#side-nav').show(); 50 | } 51 | }); 52 | 53 | //背景主题设置展示 54 | is_show_change=true; 55 | $('#changer-set').click(function(event) { 56 | if(is_show_change){ 57 | $('.bg-out').show(); 58 | $('.bg-changer').animate({top: '0px'}, 500); 59 | is_show_change=false; 60 | }else{ 61 | $('.bg-changer').animate({top: '-110px'}, 500); 62 | is_show_change=true; 63 | } 64 | 65 | }); 66 | 67 | //背景主题切换 68 | $('.bg-changer img.item').click(function(event) { 69 | if(!localStorage.bglist){ 70 | arr = {}; 71 | }else{ 72 | arr = JSON.parse(localStorage.bglist); 73 | } 74 | var src = $(this).attr('src'); 75 | $('body').css('background-image', 'url('+src+')'); 76 | 77 | url = location.href; 78 | 79 | // 单个背景逻辑 80 | // arr[url]=src; 81 | 82 | // 全局背景统一 83 | arr['bgSrc'] = src; 84 | // console.log(arr); 85 | 86 | localStorage.bglist = JSON.stringify(arr); 87 | 88 | }); 89 | 90 | //背景初始化 91 | $('.reset').click(function () { 92 | localStorage.clear(); 93 | layer.msg('初如化成功',function(){}); 94 | }); 95 | 96 | 97 | //背景切换点击空白区域隐藏 98 | $('.bg-out').click(function () { 99 | $('.bg-changer').animate({top: '-110px'}, 500); 100 | is_show_change=true; 101 | $(this).hide(); 102 | }) 103 | 104 | 105 | //窄屏下的左侧菜单隐藏效果 106 | $('.container .open-nav i').click(function(event) { 107 | $('#side-nav').toggle(400); 108 | // $('.wrapper .left-nav').toggle(400) 109 | }); 110 | 111 | //左侧菜单效果 112 | $('.left-nav #nav li').click(function () { 113 | if($(this).hasClass('open')){ 114 | $(this).removeClass('open'); 115 | $(this).find('.nav_right').html(''); 116 | $(this).children('.sub-menu').slideUp(); 117 | // $(this).siblings().children('.sub-menu').slideUp(); 118 | }else{ 119 | $(this).addClass('open'); 120 | $(this).find('.nav_right').html(''); 121 | $(this).children('.sub-menu').slideDown(); 122 | $(this).siblings().children('.sub-menu').slideUp(); 123 | $(this).siblings().removeClass('open'); 124 | } 125 | 126 | }) 127 | 128 | //初始化菜单展开样式 129 | $('.left-nav #nav li .opened').siblings('a').find('.nav_right').html(''); 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | }) 139 | 140 | /*弹出层*/ 141 | /* 142 | 参数解释: 143 | title 标题 144 | url 请求的url 145 | id 需要操作的数据id 146 | w 弹出层宽度(缺省调默认值) 147 | h 弹出层高度(缺省调默认值) 148 | */ 149 | function x_admin_show(title,url,w,h){ 150 | if (title == null || title == '') { 151 | title=false; 152 | }; 153 | if (url == null || url == '') { 154 | url="404.html"; 155 | }; 156 | if (w == null || w == '') { 157 | w=800; 158 | }; 159 | if (h == null || h == '') { 160 | h=($(window).height() - 50); 161 | }; 162 | layer.open({ 163 | type: 2, 164 | area: [w+'px', h +'px'], 165 | fix: false, //不固定 166 | maxmin: true, 167 | shadeClose: true, 168 | shade:0.4, 169 | title: title, 170 | content: url 171 | }); 172 | } 173 | 174 | /*关闭弹出框口*/ 175 | function x_admin_close(){ 176 | var index = parent.layer.getFrameIndex(window.name); 177 | parent.layer.close(index); 178 | } 179 | -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name: layui.code 4 | @Author: 贤心 5 | @Site: http://www.layui.com 6 | 7 | */ 8 | 9 | /* 加载就绪标志 */ 10 | html #layuicss-skincodecss{display:none; position: absolute; width:1989px;} 11 | 12 | /* 默认风格 */ 13 | .layui-code-view{display: block; position: relative; margin: 10px 0; padding: 0; border: 1px solid #ddd; border-left-width: 6px; background-color: #F2F2F2; color: #333; font-family: Courier New; font-size: 12px;} 14 | .layui-code-h3{position: relative; padding: 0 10px; height: 30px; line-height: 30px; border-bottom: 1px solid #ddd; font-size: 12px;} 15 | .layui-code-h3 a{position: absolute; right: 10px; top: 0; color: #999;} 16 | .layui-code-view .layui-code-ol{position: relative; overflow: auto;} 17 | .layui-code-view .layui-code-ol li{position: relative; margin-left: 45px; line-height: 20px; padding: 0 5px; border-left: 1px solid #ddd; list-style-type: decimal-leading-zero; *list-style-type: decimal; background-color: #fff;} 18 | .layui-code-view pre{margin: 0;} 19 | 20 | /* notepadd++风格 */ 21 | .layui-code-notepad{border: 1px solid #0C0C0C; border-left-color: #3F3F3F; background-color: #0C0C0C; color: #C2BE9E} 22 | .layui-code-notepad .layui-code-h3{border-bottom: none;} 23 | .layui-code-notepad .layui-code-ol li{background-color: #3F3F3F; border-left: none;} -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/css/modules/laydate/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/css/modules/laydate/icon.png -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/css/modules/laydate/laydate.css: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name: laydate 核心样式 4 | @Author:贤心 5 | @Site:http://sentsin.com/layui/laydate 6 | 7 | **/ 8 | 9 | 10 | #layuicss-laydatecss{display: none; position: absolute; width: 1989px;} 11 | 12 | .laydate_body .laydate_box, .laydate_body .laydate_box *{margin:0; padding:0;box-sizing:content-box;} 13 | .laydate-icon, 14 | .laydate-icon-default, 15 | .laydate-icon-danlan, 16 | .laydate-icon-dahong, 17 | .laydate-icon-molv{height:22px; line-height:22px; padding-right:20px; border:1px solid #C6C6C6; background-repeat:no-repeat; background-position:right center; background-color:#fff; outline:0;} 18 | .laydate-icon-default{ background-image:url(../skins/default/icon.png)} 19 | .laydate-icon-danlan{border:1px solid #B1D2EC; background-image:url(../skins/danlan/icon.png)} 20 | .laydate-icon-dahong{background-image:url(../skins/dahong/icon.png)} 21 | .laydate-icon-molv{background-image:url(../skins/molv/icon.png)} 22 | .laydate_body .laydate_box{width:240px; font:12px '\5B8B\4F53'; z-index:99999999; *margin:-2px 0 0 -2px; *overflow:hidden; _margin:0; _position:absolute!important; background-color:#fff;} 23 | .laydate_body .laydate_box li{list-style:none;} 24 | .laydate_body .laydate_box .laydate_void{cursor:text!important;} 25 | .laydate_body .laydate_box a, .laydate_body .laydate_box a:hover{text-decoration:none; blr:expression(this.onFocus=this.blur()); cursor:pointer;} 26 | .laydate_body .laydate_box a:hover{text-decoration:none;} 27 | .laydate_body .laydate_box cite, .laydate_body .laydate_box label{position:absolute; width:0; height:0; border-width:5px; border-style:dashed; border-color:transparent; overflow:hidden; cursor:pointer;} 28 | .laydate_body .laydate_box .laydate_yms, .laydate_body .laydate_box .laydate_time{display:none;} 29 | .laydate_body .laydate_box .laydate_show{display:block;} 30 | .laydate_body .laydate_box input{outline:0; font-size:14px; background-color:#fff;} 31 | .laydate_body .laydate_top{position:relative; height:26px; padding:5px; *width:100%; z-index:99;} 32 | .laydate_body .laydate_ym{position:relative; float:left; height:24px; cursor:pointer;} 33 | .laydate_body .laydate_ym input{float:left; height:24px; line-height:24px; text-align:center; border:none; cursor:pointer;} 34 | .laydate_body .laydate_ym .laydate_yms{position:absolute; left: -1px; top: 24px; height:181px;} 35 | .laydate_body .laydate_y{width:121px; margin-right:6px;} 36 | .laydate_body .laydate_y input{width:64px; margin-right:15px;} 37 | .laydate_body .laydate_y .laydate_yms{width:121px; text-align:center;} 38 | .laydate_body .laydate_y .laydate_yms a{position:relative; display:block; height:20px;} 39 | .laydate_body .laydate_y .laydate_yms ul{height:139px; padding:0; *overflow:hidden;} 40 | .laydate_body .laydate_y .laydate_yms ul li{float:left; width:60px; height:20px; line-height: 20px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;} 41 | .laydate_body .laydate_m{width:99px;} 42 | .laydate_body .laydate_m .laydate_yms{width:99px; padding:0;} 43 | .laydate_body .laydate_m input{width:42px; margin-right:15px;} 44 | .laydate_body .laydate_m .laydate_yms span{display:block; float:left; width:42px; margin: 5px 0 0 5px; line-height:24px; text-align:center; _display:inline;} 45 | .laydate_body .laydate_choose{display:block; float:left; position:relative; width:20px; height:24px;} 46 | .laydate_body .laydate_choose cite, .laydate_body .laydate_tab cite{left:50%; top:50%;} 47 | .laydate_body .laydate_chtop cite{margin:-7px 0 0 -5px; border-bottom-style:solid;} 48 | .laydate_body .laydate_chdown cite, .laydate_body .laydate_ym label{top:50%; margin:-2px 0 0 -5px; border-top-style:solid;} 49 | .laydate_body .laydate_chprev cite{margin:-5px 0 0 -7px;} 50 | .laydate_body .laydate_chnext cite{margin:-5px 0 0 -2px;} 51 | .laydate_body .laydate_ym label{right:28px;} 52 | .laydate_body .laydate_table{ width:230px; margin:0 5px; border-collapse:collapse; border-spacing:0px; } 53 | .laydate_body .laydate_table td{width:31px; height:19px; line-height:19px; text-align: center; cursor:pointer; font-size: 12px;} 54 | .laydate_body .laydate_table thead{height:22px; line-height:22px;} 55 | .laydate_body .laydate_table thead th{font-weight:400; font-size:12px; text-align:center;} 56 | .laydate_body .laydate_bottom{position:relative; height:22px; line-height:20px; padding:5px; font-size:12px;} 57 | .laydate_body .laydate_bottom #laydate_hms{position: relative; z-index: 1; float:left; } 58 | .laydate_body .laydate_time{ position:absolute; left:5px; bottom: 26px; width:129px; height:125px; *overflow:hidden;} 59 | .laydate_body .laydate_time .laydate_hmsno{ padding:5px 0 0 5px;} 60 | .laydate_body .laydate_time .laydate_hmsno span{display:block; float:left; width:24px; height:19px; line-height:19px; text-align:center; cursor:pointer; *margin-bottom:-5px;} 61 | .laydate_body .laydate_time1{width:228px; height:154px;} 62 | .laydate_body .laydate_time1 .laydate_hmsno{padding: 6px 0 0 8px;} 63 | .laydate_body .laydate_time1 .laydate_hmsno span{width:21px; height:20px; line-height:20px;} 64 | .laydate_body .laydate_msg{left:49px; bottom:67px; width:141px; height:auto; overflow: hidden;} 65 | .laydate_body .laydate_msg p{padding:5px 10px;} 66 | .laydate_body .laydate_bottom li{float:left; height:20px; line-height:20px; border-right:none; font-weight:900;} 67 | .laydate_body .laydate_bottom .laydate_sj{width:33px; text-align:center; font-weight:400;} 68 | .laydate_body .laydate_bottom input{float:left; width:21px; height:20px; line-height:20px; border:none; text-align:center; cursor:pointer; font-size:12px; font-weight:400;} 69 | .laydate_body .laydate_bottom .laydte_hsmtex{height:20px; line-height:20px; text-align:center;} 70 | .laydate_body .laydate_bottom .laydte_hsmtex span{position:absolute; width:20px; top:0; right:0px; cursor:pointer;} 71 | .laydate_body .laydate_bottom .laydte_hsmtex span:hover{font-size:14px;} 72 | .laydate_body .laydate_bottom .laydate_btn{position:absolute; right:5px; top:5px;} 73 | .laydate_body .laydate_bottom .laydate_btn a{float:left; height:20px; padding:0 6px; _padding:0 5px;} 74 | .laydate_body .laydate_bottom .laydate_v{position:absolute; left:10px; top:6px; font-family:Courier; z-index:0;} 75 | 76 | 77 | 78 | 79 | .laydate-icon{border:1px solid #C6C6C6; background-image:url(icon.png)} 80 | 81 | .laydate_body .laydate_box, 82 | .laydate_body .laydate_ym, 83 | .laydate_body .laydate_ym .laydate_yms, 84 | .laydate_body .laydate_table, 85 | .laydate_body .laydate_table td, 86 | .laydate_body .laydate_bottom #laydate_hms, 87 | .laydate_body .laydate_time, 88 | .laydate_body .laydate_bottom .laydate_btn a{border:1px solid #ccc;} 89 | 90 | .laydate_body .laydate_y .laydate_yms a, 91 | .laydate_body .laydate_choose, 92 | .laydate_body .laydate_table thead, 93 | .laydate_body .laydate_bottom .laydte_hsmtex{background-color:#F6F6F6;} 94 | 95 | .laydate_body .laydate_box, 96 | .laydate_body .laydate_ym .laydate_yms, 97 | .laydate_body .laydate_time{box-shadow: 2px 2px 5px rgba(0,0,0,.1);} 98 | 99 | .laydate_body .laydate_box{border-top:none; border-bottom:none; background-color:#fff; color:#333;} 100 | .laydate_body .laydate_box input{color:#333;} 101 | .laydate_body .laydate_box .laydate_void{color:#ccc!important; /*text-decoration:line-through;*/} 102 | .laydate_body .laydate_box .laydate_void:hover{background-color:#fff!important} 103 | .laydate_body .laydate_box a, .laydate_body .laydate_box a:hover{color:#333;} 104 | .laydate_body .laydate_box a:hover{color:#666;} 105 | .laydate_body .laydate_click{background-color:#eee!important;} 106 | .laydate_body .laydate_top{border-top:1px solid #C6C6C6;} 107 | .laydate_body .laydate_ym .laydate_yms{border:1px solid #C6C6C6; background-color:#fff;} 108 | .laydate_body .laydate_y .laydate_yms a{border-bottom:1px solid #C6C6C6;} 109 | .laydate_body .laydate_y .laydate_yms .laydate_chdown{border-top:1px solid #C6C6C6; border-bottom:none;} 110 | .laydate_body .laydate_choose{border-left:1px solid #C6C6C6;} 111 | .laydate_body .laydate_chprev{border-left:none; border-right:1px solid #C6C6C6;} 112 | .laydate_body .laydate_choose:hover, 113 | .laydate_body .laydate_y .laydate_yms a:hover{background-color:#fff;} 114 | .laydate_body .laydate_chtop cite{border-bottom-color:#666;} 115 | .laydate_body .laydate_chdown cite, .laydate_body .laydate_ym label{border-top-color:#666;} 116 | .laydate_body .laydate_chprev cite{border-right-style:solid; border-right-color:#666;} 117 | .laydate_body .laydate_chnext cite{border-left-style:solid; border-left-color:#666;} 118 | .laydate_body .laydate_table td{border:none; height:21px!important; line-height:21px!important; background-color:#fff;} 119 | .laydate_body .laydate_table .laydate_nothis{color:#999;} 120 | .laydate_body .laydate_table thead{height:21px!important; line-height:21px!important;} 121 | .laydate_body .laydate_table thead th{border-bottom:1px solid #ccc;} 122 | .laydate_body .laydate_bottom{border-bottom:1px solid #C6C6C6;} 123 | .laydate_body .laydate_bottom #laydate_hms{background-color:#fff;} 124 | .laydate_body .laydate_time{background-color:#fff;} 125 | .laydate_body .laydate_bottom .laydate_sj{border-right:1px solid #C6C6C6; background-color:#F6F6F6;} 126 | .laydate_body .laydate_bottom input{background-color:#fff;} 127 | .laydate_body .laydate_bottom .laydte_hsmtex{border-bottom:1px solid #C6C6C6;} 128 | .laydate_body .laydate_bottom .laydate_btn{border-right:1px solid #C6C6C6;} 129 | .laydate_body .laydate_bottom .laydate_v{color:#999} 130 | .laydate_body .laydate_bottom .laydate_btn a{border-right:none; background-color:#F6F6F6;} 131 | .laydate_body .laydate_bottom .laydate_btn a:hover{color:#000; background-color:#fff;} 132 | 133 | .laydate_body .laydate_m .laydate_yms span:hover, 134 | .laydate_body .laydate_y .laydate_yms ul li:hover, 135 | .laydate_body .laydate_table td:hover, 136 | .laydate_body .laydate_time .laydate_hmsno span:hover{background-color:#F3F3F3} 137 | -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/css/modules/layer/default/layer.css: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name: layer 4 | @Author: 贤心 5 | 6 | **/ 7 | 8 | *html{background-image: url(about:blank); background-attachment: fixed;} 9 | html #layuicss-skinlayercss{display: none; position: absolute; width: 1989px;} 10 | 11 | /* common */ 12 | .layui-layer-shade, .layui-layer{position:fixed; _position:absolute; pointer-events: auto;} 13 | .layui-layer-shade{top:0; left:0; width:100%; height:100%; _height:expression(document.body.offsetHeight+"px");} 14 | .layui-layer{-webkit-overflow-scrolling: touch;} 15 | .layui-layer{top:150px; left: 0; margin:0; padding:0; background-color: #fff; 16 | background-repeat: no-repeat; 17 | background-size: cover; -webkit-background-clip: content; box-shadow: 1px 1px 50px rgba(0,0,0,.3);} 18 | .layui-layer-close{position:absolute;} 19 | .layui-layer-content{position:relative;} 20 | .layui-layer-border{border: 1px solid #B2B2B2; border: 1px solid rgba(0,0,0,.1); box-shadow: 1px 1px 5px rgba(0,0,0,.2);} 21 | .layui-layer-load{background:url(loading-1.gif) #eee center center no-repeat;} 22 | .layui-layer-ico{ background:url(icon.png) no-repeat;} 23 | .layui-layer-dialog .layui-layer-ico, 24 | .layui-layer-setwin a, 25 | .layui-layer-btn a{display:inline-block; *display:inline; *zoom:1; vertical-align:top;} 26 | 27 | .layui-layer-move{display: none; position: fixed; *position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; cursor: move; opacity: 0; filter:alpha(opacity=0); background-color: #fff; z-index: 2147483647;} 28 | .layui-layer-resize{position: absolute; width: 15px; height: 15px; right: 0; bottom: 0; cursor: se-resize;} 29 | 30 | /* 动画 */ 31 | .layui-layer{border-radius: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation-duration:.3s; animation-duration:.3s;} 32 | 33 | @-webkit-keyframes bounceIn { /* 默认 */ 34 | 0% {opacity: 0; -webkit-transform: scale(.5); transform: scale(.5)} 35 | 100% {opacity: 1; -webkit-transform: scale(1); transform: scale(1)} 36 | } 37 | @keyframes bounceIn { 38 | 0% {opacity: 0; -webkit-transform: scale(.5); -ms-transform: scale(.5); transform: scale(.5)} 39 | 100% {opacity: 1; -webkit-transform: scale(1); -ms-transform: scale(1); transform: scale(1)} 40 | } 41 | .layer-anim{-webkit-animation-name: bounceIn;animation-name: bounceIn} 42 | 43 | @-webkit-keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:zoomInDown;animation-name:zoomInDown} 44 | 45 | @-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig} 46 | 47 | @-webkit-keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft} 48 | 49 | @-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg);transform:translateX(0px) rotate(0deg)}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg);-ms-transform:translateX(0px) rotate(0deg);transform:translateX(0px) rotate(0deg)}}.layer-anim-04{-webkit-animation-name:rollIn;animation-name:rollIn} 50 | 51 | @keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:fadeIn;animation-name:fadeIn} 52 | 53 | @-webkit-keyframes shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}} 54 | 55 | @-webkit-keyframes bounceOut { /* 关闭动画 */ 56 | 100% {opacity: 0; -webkit-transform: scale(.7); transform: scale(.7)} 57 | 30% {-webkit-transform: scale(1.05); transform: scale(1.05)} 58 | 0% {-webkit-transform: scale(1); transform: scale(1);} 59 | } 60 | @keyframes bounceOut { 61 | 100% {opacity: 0; -webkit-transform: scale(.7); -ms-transform: scale(.7); transform: scale(.7);} 62 | 30% {-webkit-transform: scale(1.05); -ms-transform: scale(1.05); transform: scale(1.05);} 63 | 0% {-webkit-transform: scale(1); -ms-transform: scale(1);transform: scale(1);} 64 | } 65 | .layer-anim-close{-webkit-animation-name: bounceOut;animation-name: bounceOut; -webkit-animation-duration:.2s; animation-duration:.2s;} 66 | 67 | /* 标题栏 */ 68 | .layui-layer-title{padding:0 80px 0 20px; height:42px; line-height:42px; font-size:14px; color:#fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background-color: rgba(0,0,0,0.2); border-radius: 2px 2px 0 0;} 69 | .layui-layer-setwin{position:absolute; right:15px; *right:0; top:15px; font-size:0; line-height: initial;} 70 | .layui-layer-setwin a{position:relative; width: 16px; height:16px; margin-left:10px; font-size:12px; _overflow:hidden;} 71 | .layui-layer-setwin .layui-layer-min cite{position:absolute; width:14px; height:2px; left:0; top:50%; margin-top:-1px; background-color:#fff; cursor:pointer; _overflow:hidden;} 72 | .layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA; } 73 | .layui-layer-setwin .layui-layer-max{background-position:-32px -40px;} 74 | .layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px;} 75 | .layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px;} 76 | .layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px;} 77 | .layui-layer-setwin .layui-layer-close1{background-position:0 -40px; cursor:pointer;} 78 | .layui-layer-setwin .layui-layer-close1:hover{opacity:0.7;} 79 | .layui-layer-setwin .layui-layer-close2{position:absolute; right:-28px; top:-28px; width:30px; height:30px; margin-left:0; background-position:-149px -31px; *right:-18px; _display:none;} 80 | .layui-layer-setwin .layui-layer-close2:hover{ background-position:-180px -31px;} 81 | 82 | /* 按钮栏 */ 83 | .layui-layer-btn{text-align: right; padding:0 10px 12px; pointer-events: auto; user-select: none; -webkit-user-select: none;} 84 | .layui-layer-btn a{height: 28px; line-height: 28px; margin: 0 6px; padding: 0 15px; border:1px #dedede solid; background-color:#f1f1f1; color: #333; border-radius: 2px; font-weight:400; cursor:pointer; text-decoration: none;} 85 | .layui-layer-btn a:hover{opacity: 0.9; text-decoration: none;} 86 | .layui-layer-btn a:active{opacity: 0.8;} 87 | .layui-layer-btn .layui-layer-btn0{border-color: #4898d5; background-color: #2e8ded; color:#fff;} 88 | .layui-layer-btn-l{text-align: left;} 89 | .layui-layer-btn-c{text-align: center;} 90 | 91 | /* 定制化 */ 92 | .layui-layer-dialog{min-width:260px;} 93 | .layui-layer-dialog .layui-layer-content{position: relative; padding:20px; line-height:24px; word-break: break-all; overflow:hidden; font-size:14px; overflow-x: hidden; overflow-y:auto;color: #fff} 94 | .layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute; top:16px; left:15px; _left:-40px; width:30px; height:30px;} 95 | .layui-layer-ico1{background-position:-30px 0 } 96 | .layui-layer-ico2{background-position:-60px 0;} 97 | .layui-layer-ico3{background-position:-90px 0;} 98 | .layui-layer-ico4{background-position:-120px 0;} 99 | .layui-layer-ico5{background-position:-150px 0;} 100 | .layui-layer-ico6{background-position:-180px 0;} 101 | .layui-layer-rim{border:6px solid #8D8D8D; border:6px solid rgba(0,0,0,.3); border-radius:5px; box-shadow: none;} 102 | .layui-layer-msg{min-width:180px; box-shadow: none;} 103 | .layui-layer-hui{min-width:100px; background-color: #000; filter:alpha(opacity=60); background-color: rgba(0,0,0,0.6); color: #fff; border:none;} 104 | .layui-layer-hui .layui-layer-content{padding:12px 25px; text-align:center;} 105 | .layui-layer-dialog .layui-layer-padding{padding: 20px 20px 20px 55px; text-align: left;} 106 | .layui-layer-page .layui-layer-content{position:relative; overflow:auto;} 107 | .layui-layer-page .layui-layer-btn,.layui-layer-iframe .layui-layer-btn{padding-top:10px;} 108 | .layui-layer-nobg{background:none;} 109 | .layui-layer-iframe iframe{display: block; width: 100%;} 110 | 111 | .layui-layer-loading{border-radius:100%; background:none; box-shadow:none; border:none;} 112 | .layui-layer-loading .layui-layer-content{width:60px; height:24px; background:url(loading-0.gif) no-repeat;} 113 | .layui-layer-loading .layui-layer-loading1{width:37px; height:37px; background:url(loading-1.gif) no-repeat;} 114 | .layui-layer-loading .layui-layer-loading2, .layui-layer-ico16{width:32px; height:32px; background:url(loading-2.gif) no-repeat;} 115 | .layui-layer-tips{background: none; box-shadow:none; border:none;} 116 | .layui-layer-tips .layui-layer-content{position: relative; line-height: 22px; min-width: 12px; padding: 5px 10px; font-size: 12px; _float:left; border-radius: 2px; box-shadow: 1px 1px 3px rgba(0,0,0,.2); background-color: #000; color: #fff;} 117 | .layui-layer-tips .layui-layer-close{right:-2px; top:-1px;} 118 | .layui-layer-tips i.layui-layer-TipsG{ position:absolute; width:0; height:0; border-width:8px; border-color:transparent; border-style:dashed; *overflow:hidden;} 119 | .layui-layer-tips i.layui-layer-TipsT, .layui-layer-tips i.layui-layer-TipsB{left:5px; border-right-style:solid; border-right-color: #000;} 120 | .layui-layer-tips i.layui-layer-TipsT{bottom:-8px;} 121 | .layui-layer-tips i.layui-layer-TipsB{top:-8px;} 122 | .layui-layer-tips i.layui-layer-TipsR, .layui-layer-tips i.layui-layer-TipsL{top:1px; border-bottom-style:solid; border-bottom-color: #000;} 123 | .layui-layer-tips i.layui-layer-TipsR{left:-8px;} 124 | .layui-layer-tips i.layui-layer-TipsL{right:-8px;} 125 | 126 | /* skin */ 127 | .layui-layer-lan[type="dialog"]{min-width:280px;} 128 | .layui-layer-lan .layui-layer-title{background:#4476A7; color:#fff; border: none;} 129 | .layui-layer-lan .layui-layer-btn{padding:10px; text-align: right; border-top:1px solid #E9E7E7} 130 | .layui-layer-lan .layui-layer-btn a{background:#BBB5B5; border:none;} 131 | .layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5;} 132 | .layui-layer-molv .layui-layer-title{background:#009f95; color:#fff; border: none;} 133 | .layui-layer-molv .layui-layer-btn a{background:#009f95;} 134 | .layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1;} 135 | 136 | 137 | 138 | /** 139 | 140 | @Name: layer拓展样式 141 | 142 | */ 143 | 144 | .layui-layer-iconext{background:url(icon-ext.png) no-repeat;} 145 | 146 | /* prompt模式 */ 147 | .layui-layer-prompt .layui-layer-input{display:block; width:220px; height:30px; margin:0 auto; line-height:30px; padding: 0 5px; border: 1px solid #ccc; box-shadow: 1px 1px 5px rgba(0,0,0,.1) inset; color:#fff;background:rgba(0,0,0,0.3);} 148 | .layui-layer-prompt textarea.layui-layer-input{width:300px; height:100px; line-height:20px;} 149 | .layui-layer-prompt .layui-layer-content{padding: 20px;} 150 | .layui-layer-prompt .layui-layer-btn{padding-top: 0;} 151 | 152 | /* tab模式 */ 153 | .layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4);} 154 | .layui-layer-tab .layui-layer-title{padding-left:0; overflow: visible;} 155 | .layui-layer-tab .layui-layer-title span{position:relative; float:left; min-width:80px; max-width:260px; padding:0 20px; text-align:center; cursor:default; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;} 156 | .layui-layer-tab .layui-layer-title span.layui-layer-tabnow{height:42px; background-color:rgba(0,0,0,0.3); z-index:10;} 157 | .layui-layer-tab .layui-layer-title span:first-child{border-left:none;} 158 | .layui-layer-tabmain{line-height:24px; clear:both;} 159 | .layui-layer-tabmain .layui-layer-tabli{ 160 | color: #fff; 161 | display:none;} 162 | .layui-layer-tabmain .layui-layer-tabli.xubox_tab_layer{display:block;} 163 | .xubox_tabclose{position:absolute; right:10px; top:5px; cursor:pointer;} 164 | 165 | /* photo模式 */ 166 | .layui-layer-photos{-webkit-animation-duration:1s; animation-duration:1s;} 167 | .layui-layer-photos .layui-layer-content{overflow:hidden; text-align: center;} 168 | .layui-layer-photos .layui-layer-phimg img{position: relative; width:100%; display: inline-block; *display:inline; *zoom:1; vertical-align:top;} 169 | .layui-layer-imguide,.layui-layer-imgbar{display:none;} 170 | .layui-layer-imgprev, .layui-layer-imgnext{position:absolute; top:50%; width:27px; _width:44px; height:44px; margin-top:-22px; outline:none;blr:expression(this.onFocus=this.blur());} 171 | .layui-layer-imgprev{left:10px; background-position:-5px -5px; _background-position:-70px -5px;} 172 | .layui-layer-imgprev:hover{background-position:-33px -5px; _background-position:-120px -5px;} 173 | .layui-layer-imgnext{right:10px; _right:8px; background-position:-5px -50px; _background-position:-70px -50px;} 174 | .layui-layer-imgnext:hover{background-position:-33px -50px; _background-position:-120px -50px;} 175 | .layui-layer-imgbar{position:absolute; left:0; bottom:0; width:100%; height:32px; line-height:32px; background-color:rgba(0,0,0,.8); background-color:#000\9; filter:Alpha(opacity=80); color:#fff; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font-size:0;} 176 | .layui-layer-imgtit{/*position:absolute; left:20px;*/} 177 | .layui-layer-imgtit *{display:inline-block; *display:inline; *zoom:1; vertical-align:top; font-size:12px;} 178 | .layui-layer-imgtit a{max-width:65%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; color:#fff;} 179 | .layui-layer-imgtit a:hover{color:#fff; text-decoration:underline;} 180 | .layui-layer-imgtit em{padding-left:10px; font-style: normal;} 181 | 182 | 183 | @media screen and (max-width: 1100px) { 184 | .layui-layer-iframe{overflow-y: auto; -webkit-overflow-scrolling: touch;} 185 | } 186 | 187 | 188 | -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/font/iconfont.eot -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/font/iconfont.woff -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/0.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/1.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/10.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/11.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/12.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/13.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/14.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/15.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/16.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/17.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/18.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/19.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/2.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/20.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/21.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/22.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/23.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/24.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/25.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/26.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/27.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/28.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/29.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/3.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/30.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/31.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/32.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/33.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/34.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/35.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/36.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/37.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/38.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/39.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/4.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/40.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/41.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/42.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/43.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/44.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/45.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/46.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/47.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/48.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/49.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/5.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/50.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/51.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/52.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/53.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/54.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/55.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/56.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/57.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/58.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/59.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/6.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/60.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/61.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/62.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/63.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/64.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/65.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/66.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/67.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/68.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/69.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/7.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/70.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/71.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/8.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/my-ss-course/web2020/16c5784f24b9a4e7aba85f1c5f24eecd7d38df87/backend/src/public/static/lib/layui/images/face/9.gif -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/lay/all.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name:用于打包PC完整版,即包含layui.js和所有模块的完整合并(该文件不会存在于构建后的目录) 4 | @Author:贤心 5 | @License:LGPL 6 | 7 | */ 8 | 9 | layui.define(function(exports){ 10 | var cache = layui.cache; 11 | layui.config({ 12 | dir: cache.dir.replace(/lay\/dest\/$/, '') 13 | }); 14 | exports('layui.all', layui.v); 15 | }); 16 | -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/lay/modules/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name:layui.code 代码修饰器 4 | @Author:贤心 5 | @License:LGPL 6 | 7 | */ 8 | 9 | layui.define('jquery', function(exports){ 10 | "use strict"; 11 | 12 | var $ = layui.jquery; 13 | var about = 'http://www.layui.com/doc/modules/code.html'; //关于信息 14 | 15 | exports('code', function(options){ 16 | var elems = []; 17 | options = options || {}; 18 | options.elem = $(options.elem||'.layui-code'); 19 | options.about = 'about' in options ? options.about : true; 20 | 21 | options.elem.each(function(){ 22 | elems.push(this); 23 | }); 24 | 25 | layui.each(elems.reverse(), function(index, item){ 26 | var othis = $(item), html = othis.html(); 27 | 28 | //转义HTML标签 29 | if(othis.attr('lay-encode') || options.encode){ 30 | html = html.replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&') 31 | .replace(//g, '>').replace(/'/g, ''').replace(/"/g, '"') 32 | } 33 | 34 | othis.html('
    1. ' + html.replace(/[\r\t\n]+/g, '
    2. ') + '
    ') 35 | 36 | if(!othis.find('>.layui-code-h3')[0]){ 37 | othis.prepend('

    '+ (othis.attr('lay-title')||options.title||'code') + (options.about ? 'layui.code' : '') + '

    '); 38 | } 39 | 40 | var ol = othis.find('>.layui-code-ol'); 41 | othis.addClass('layui-box layui-code-view'); 42 | 43 | //识别皮肤 44 | if(othis.attr('lay-skin') || options.skin){ 45 | othis.addClass('layui-code-' +(othis.attr('lay-skin') || options.skin)); 46 | } 47 | 48 | //按行数适配左边距 49 | if((ol.find('li').length/100|0) > 0){ 50 | ol.css('margin-left', (ol.find('li').length/100|0) + 'px'); 51 | } 52 | 53 | //设置最大高度 54 | if(othis.attr('lay-height') || options.height){ 55 | ol.css('max-height', othis.attr('lay-height') || options.height); 56 | } 57 | 58 | }); 59 | 60 | }); 61 | }).addcss('modules/code.css', 'skincodecss'); -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/lay/modules/element.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name:layui.element 常用元素操作 4 | @Author:贤心 5 | @License:LGPL 6 | 7 | */ 8 | 9 | layui.define('jquery', function(exports){ 10 | "use strict"; 11 | 12 | var $ = layui.jquery 13 | ,hint = layui.hint() 14 | ,device = layui.device() 15 | 16 | ,MOD_NAME = 'element', THIS = 'layui-this', SHOW = 'layui-show' 17 | 18 | ,Element = function(){ 19 | this.config = {}; 20 | }; 21 | 22 | //全局设置 23 | Element.prototype.set = function(options){ 24 | var that = this; 25 | $.extend(true, that.config, options); 26 | return that; 27 | }; 28 | 29 | //表单事件监听 30 | Element.prototype.on = function(events, callback){ 31 | return layui.onevent(MOD_NAME, events, callback); 32 | }; 33 | 34 | //外部Tab新增 35 | Element.prototype.tabAdd = function(filter, options){ 36 | var tabElem = $('.layui-tab[lay-filter='+ filter +']') 37 | ,titElem = tabElem.children('.layui-tab-title') 38 | ,contElem = tabElem.children('.layui-tab-content'); 39 | titElem.append('
  • '+ (options.title||'unnaming') +'
  • '); 40 | contElem.append('
    '+ (options.content||'') +'
    '); 41 | return call.tabAuto(), this; 42 | }; 43 | 44 | //外部Tab删除 45 | Element.prototype.tabDelete = function(filter, index){ 46 | var tabElem = $('.layui-tab[lay-filter='+ filter +']') 47 | ,liElem = tabElem.children('.layui-tab-title').find('>li').eq(index); 48 | call.tabDelete(null, liElem); 49 | return this; 50 | }; 51 | 52 | //外部Tab切换 53 | Element.prototype.tabChange = function(filter, index){ 54 | var tabElem = $('.layui-tab[lay-filter='+ filter +']') 55 | ,liElem = tabElem.children('.layui-tab-title').find('>li').eq(index); 56 | call.tabClick(null, index, liElem); 57 | return this; 58 | }; 59 | 60 | var NAV_ELEM = '.layui-nav', NAV_ITEM = 'layui-nav-item', NAV_BAR = 'layui-nav-bar' 61 | ,NAV_TREE = 'layui-nav-tree', NAV_CHILD = 'layui-nav-child', NAV_MORE = 'layui-nav-more' 62 | ,NAV_ANIM = 'layui-anim layui-anim-upbit' 63 | 64 | //基础事件体 65 | ,call = { 66 | //Tab点击 67 | tabClick: function(e, index, liElem){ 68 | var othis = liElem || $(this) 69 | ,index = index || othis.index() 70 | ,parents = othis.parents('.layui-tab') 71 | ,item = parents.children('.layui-tab-content').children('.layui-tab-item') 72 | ,filter = parents.attr('lay-filter'); 73 | 74 | othis.addClass(THIS).siblings().removeClass(THIS); 75 | item.eq(index).addClass(SHOW).siblings().removeClass(SHOW); 76 | 77 | layui.event.call(this, MOD_NAME, 'tab('+ filter +')', { 78 | elem: parents 79 | ,index: index 80 | }); 81 | } 82 | 83 | //Tab删除 84 | ,tabDelete: function(e, othis){ 85 | var li = othis || $(this).parent(), index = li.index(); 86 | var parents = li.parents('.layui-tab'); 87 | var item = parents.children('.layui-tab-content').children('.layui-tab-item') 88 | 89 | if(li.hasClass(THIS)){ 90 | if(li.next()[0]){ 91 | call.tabClick.call(li.next()[0], null, index + 1); 92 | } else if(li.prev()[0]){ 93 | call.tabClick.call(li.prev()[0], null, index - 1); 94 | } 95 | } 96 | 97 | li.remove(); 98 | item.eq(index).remove(); 99 | } 100 | 101 | //Tab自适应 102 | ,tabAuto: function(){ 103 | var SCROLL = 'layui-tab-scroll', MORE = 'layui-tab-more', BAR = 'layui-tab-bar' 104 | , CLOSE = 'layui-tab-close', that = this; 105 | 106 | $('.layui-tab').each(function(){ 107 | var othis = $(this) 108 | ,title = othis.children('.layui-tab-title') 109 | ,item = othis.children('.layui-tab-content').children('.layui-tab-item') 110 | ,STOPE = 'lay-stope="tabmore"' 111 | ,span = $(''); 112 | 113 | if(that === window && device.ie != 8){ 114 | call.hideTabMore(true) 115 | } 116 | 117 | //允许关闭 118 | if(othis.attr('lay-allowClose')){ 119 | title.find('li').each(function(){ 120 | var li = $(this); 121 | if(!li.find('.'+CLOSE)[0]){ 122 | var close = $(''); 123 | close.on('click', call.tabDelete); 124 | li.append(close); 125 | } 126 | }); 127 | } 128 | 129 | //响应式 130 | if(title.prop('scrollWidth') > title.outerWidth()+1){ 131 | if(title.find('.'+BAR)[0]) return; 132 | title.append(span); 133 | span.on('click', function(e){ 134 | title[this.title ? 'removeClass' : 'addClass'](MORE); 135 | this.title = this.title ? '' : '收缩'; 136 | }); 137 | } else { 138 | title.find('.'+BAR).remove(); 139 | } 140 | }); 141 | } 142 | //隐藏更多Tab 143 | ,hideTabMore: function(e){ 144 | var tsbTitle = $('.layui-tab-title'); 145 | if(e === true || $(e.target).attr('lay-stope') !== 'tabmore'){ 146 | tsbTitle.removeClass('layui-tab-more'); 147 | tsbTitle.find('.layui-tab-bar').attr('title',''); 148 | } 149 | } 150 | //点击选中 151 | ,clickThis: function(){ 152 | var othis = $(this), parents = othis.parents(NAV_ELEM) 153 | ,filter = parents.attr('lay-filter'); 154 | 155 | if(othis.find('.'+NAV_CHILD)[0]) return; 156 | parents.find('.'+THIS).removeClass(THIS); 157 | othis.addClass(THIS); 158 | layui.event.call(this, MOD_NAME, 'nav('+ filter +')', othis); 159 | } 160 | //点击子菜单选中 161 | ,clickChild: function(){ 162 | var othis = $(this), parents = othis.parents(NAV_ELEM) 163 | ,filter = parents.attr('lay-filter'); 164 | parents.find('.'+THIS).removeClass(THIS); 165 | othis.addClass(THIS); 166 | layui.event.call(this, MOD_NAME, 'nav('+ filter +')', othis); 167 | } 168 | //展开二级菜单 169 | ,showChild: function(){ 170 | var othis = $(this), parents = othis.parents(NAV_ELEM); 171 | var parent = othis.parent(), child = othis.siblings('.'+NAV_CHILD); 172 | if(parents.hasClass(NAV_TREE)){ 173 | child.removeClass(NAV_ANIM); 174 | parent[child.css('display') === 'none' ? 'addClass': 'removeClass'](NAV_ITEM+'ed'); 175 | } 176 | } 177 | }; 178 | 179 | //初始化元素操作 180 | Element.prototype.init = function(type){ 181 | var that = this, items = { 182 | 183 | //Tab选项卡 184 | tab: function(){ 185 | call.tabAuto.call({}); 186 | } 187 | 188 | //导航菜单 189 | ,nav: function(){ 190 | var TIME = 200, timer, timerMore, timeEnd, follow = function(bar, nav){ 191 | var othis = $(this), child = othis.find('.'+NAV_CHILD); 192 | 193 | if(nav.hasClass(NAV_TREE)){ 194 | bar.css({ 195 | top: othis.position().top 196 | ,height: othis.children('a').height() 197 | ,opacity: 1 198 | }); 199 | } else { 200 | child.addClass(NAV_ANIM); 201 | bar.css({ 202 | left: othis.position().left + parseFloat(othis.css('marginLeft')) 203 | ,top: othis.position().top + othis.height() - 5 204 | }); 205 | 206 | timer = setTimeout(function(){ 207 | bar.css({ 208 | width: othis.width() 209 | ,opacity: 1 210 | }); 211 | }, device.ie && device.ie < 10 ? 0 : TIME); 212 | 213 | clearTimeout(timeEnd); 214 | if(child.css('display') === 'block'){ 215 | clearTimeout(timerMore); 216 | } 217 | timerMore = setTimeout(function(){ 218 | child.addClass(SHOW) 219 | othis.find('.'+NAV_MORE).addClass(NAV_MORE+'d'); 220 | }, 300); 221 | } 222 | } 223 | 224 | $(NAV_ELEM).each(function(){ 225 | var othis = $(this) 226 | ,bar = $('') 227 | ,itemElem = othis.find('.'+NAV_ITEM); 228 | 229 | //Hover滑动效果 230 | if(!othis.find('.'+NAV_BAR)[0]){ 231 | othis.append(bar); 232 | itemElem.on('mouseenter', function(){ 233 | follow.call(this, bar, othis); 234 | }).on('mouseleave', function(){ 235 | if(!othis.hasClass(NAV_TREE)){ 236 | clearTimeout(timerMore); 237 | timerMore = setTimeout(function(){ 238 | othis.find('.'+NAV_CHILD).removeClass(SHOW); 239 | othis.find('.'+NAV_MORE).removeClass(NAV_MORE+'d'); 240 | }, 300); 241 | } 242 | }); 243 | othis.on('mouseleave', function(){ 244 | clearTimeout(timer) 245 | timeEnd = setTimeout(function(){ 246 | if(othis.hasClass(NAV_TREE)){ 247 | bar.css({ 248 | height: 0 249 | ,top: bar.position().top + bar.height()/2 250 | ,opacity: 0 251 | }); 252 | } else { 253 | bar.css({ 254 | width: 0 255 | ,left: bar.position().left + bar.width()/2 256 | ,opacity: 0 257 | }); 258 | } 259 | }, TIME); 260 | }); 261 | } 262 | 263 | itemElem.each(function(){ 264 | var oitem = $(this), child = oitem.find('.'+NAV_CHILD); 265 | 266 | //二级菜单 267 | if(child[0] && !oitem.find('.'+NAV_MORE)[0]){ 268 | var one = oitem.children('a'); 269 | one.append(''); 270 | } 271 | 272 | oitem.off('click', call.clickThis).on('click', call.clickThis); //点击选中 273 | oitem.children('a').off('click', call.showChild).on('click', call.showChild); //展开二级菜单 274 | child.children('dd').off('click', call.clickChild).on('click', call.clickChild); //点击子菜单选中 275 | }); 276 | }); 277 | } 278 | //面包屑 279 | ,breadcrumb: function(){ 280 | var ELEM = '.layui-breadcrumb' 281 | 282 | $(ELEM).each(function(){ 283 | var othis = $(this) 284 | ,separator = othis.attr('lay-separator') || '>' 285 | ,aNode = othis.find('a'); 286 | if(aNode.find('.layui-box')[0]) return; 287 | aNode.each(function(index){ 288 | if(index === aNode.length - 1) return; 289 | $(this).append(''+ separator +''); 290 | }); 291 | othis.css('visibility', 'visible'); 292 | }); 293 | } 294 | }; 295 | 296 | return layui.each(items, function(index, item){ 297 | item(); 298 | }); 299 | }; 300 | 301 | var element = new Element(), dom = $(document); 302 | element.init(); 303 | 304 | var TITLE = '.layui-tab-title li'; 305 | dom.on('click', TITLE, call.tabClick); //Tab切换 306 | dom.on('click', call.hideTabMore); //隐藏展开的Tab 307 | $(window).on('resize', call.tabAuto); //自适应 308 | 309 | exports(MOD_NAME, function(options){ 310 | return element.set(options); 311 | }); 312 | }); 313 | 314 | -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name:layui.flow 流加载 4 | @Author:贤心 5 | @License:LGPL 6 | 7 | */ 8 | 9 | 10 | layui.define('jquery', function(exports){ 11 | "use strict"; 12 | 13 | var $ = layui.jquery, Flow = function(options){} 14 | ,ELEM_MORE = 'layui-flow-more' 15 | ,ELEM_LOAD = ''; 16 | 17 | //主方法 18 | Flow.prototype.load = function(options){ 19 | var that = this, page = 0, lock, isOver, lazyimg, timer; 20 | options = options || {}; 21 | 22 | var elem = $(options.elem); if(!elem[0]) return; 23 | var scrollElem = $(options.scrollElem || document); //滚动条所在元素 24 | var mb = options.mb || 50; //与底部的临界距离 25 | var isAuto = 'isAuto' in options ? options.isAuto : true; //是否自动滚动加载 26 | var end = options.end || '没有更多了'; //“末页”显示文案 27 | 28 | //滚动条所在元素是否为document 29 | var notDocment = options.scrollElem && options.scrollElem !== document; 30 | 31 | //加载更多 32 | var ELEM_TEXT = '加载更多' 33 | ,more = $('
    '+ ELEM_TEXT +'
    '); 34 | 35 | if(!elem.find('.layui-flow-more')[0]){ 36 | elem.append(more); 37 | } 38 | 39 | //加载下一个元素 40 | var next = function(html, over){ 41 | html = $(html); 42 | more.before(html); 43 | over = over == 0 ? true : null; 44 | over ? more.html(end) : more.find('a').html(ELEM_TEXT); 45 | isOver = over; 46 | lock = null; 47 | lazyimg && lazyimg(); 48 | }; 49 | 50 | //触发请求 51 | var done = function(){ 52 | lock = true; 53 | more.find('a').html(ELEM_LOAD); 54 | typeof options.done === 'function' && options.done(++page, next); 55 | }; 56 | 57 | done(); 58 | 59 | //不自动滚动加载 60 | more.find('a').on('click', function(){ 61 | var othis = $(this); 62 | if(isOver) return; 63 | lock || done(); 64 | }); 65 | 66 | //如果允许图片懒加载 67 | if(options.isLazyimg){ 68 | var lazyimg = that.lazyimg({ 69 | elem: options.elem + ' img' 70 | ,scrollElem: options.scrollElem 71 | }); 72 | } 73 | 74 | if(!isAuto) return that; 75 | 76 | scrollElem.on('scroll', function(){ 77 | var othis = $(this), top = othis.scrollTop(); 78 | 79 | if(timer) clearTimeout(timer); 80 | if(isOver) return; 81 | 82 | timer = setTimeout(function(){ 83 | //计算滚动所在容器的可视高度 84 | var height = notDocment ? othis.height() : $(window).height(); 85 | 86 | //计算滚动所在容器的实际高度 87 | var scrollHeight = notDocment 88 | ? othis.prop('scrollHeight') 89 | : document.documentElement.scrollHeight; 90 | 91 | //临界点 92 | if(scrollHeight - top - height <= mb){ 93 | lock || done(); 94 | } 95 | }, 100); 96 | }); 97 | return that; 98 | }; 99 | 100 | //图片懒加载 101 | Flow.prototype.lazyimg = function(options){ 102 | var that = this, index = 0, haveScroll; 103 | options = options || {}; 104 | 105 | var scrollElem = $(options.scrollElem || document); //滚动条所在元素 106 | var elem = options.elem || 'img'; 107 | 108 | //滚动条所在元素是否为document 109 | var notDocment = options.scrollElem && options.scrollElem !== document; 110 | 111 | //显示图片 112 | var show = function(item, height){ 113 | var start = scrollElem.scrollTop(), end = start + height; 114 | var elemTop = notDocment ? function(){ 115 | return item.offset().top - scrollElem.offset().top + start; 116 | }() : item.offset().top; 117 | 118 | /* 始终只加载在当前屏范围内的图片 */ 119 | if(elemTop >= start && elemTop <= end){ 120 | if(!item.attr('src')){ 121 | var src = item.attr('lay-src'); 122 | layui.img(src, function(){ 123 | var next = that.lazyimg.elem.eq(index); 124 | item.attr('src', src).removeAttr('lay-src'); 125 | 126 | /* 当前图片加载就绪后,检测下一个图片是否在当前屏 */ 127 | next[0] && render(next); 128 | index++; 129 | }); 130 | } 131 | } 132 | }, render = function(othis, scroll){ 133 | 134 | //计算滚动所在容器的可视高度 135 | var height = notDocment ? (scroll||scrollElem).height() : $(window).height(); 136 | var start = scrollElem.scrollTop(), end = start + height; 137 | 138 | that.lazyimg.elem = $(elem); 139 | 140 | if(othis){ 141 | show(othis, height); 142 | } else { 143 | //计算未加载过的图片 144 | for(var i = 0; i < that.lazyimg.elem.length; i++){ 145 | var item = that.lazyimg.elem.eq(i), elemTop = notDocment ? function(){ 146 | return item.offset().top - scrollElem.offset().top + start; 147 | }() : item.offset().top; 148 | 149 | show(item, height); 150 | index = i; 151 | 152 | //如果图片的top坐标,超出了当前屏,则终止后续图片的遍历 153 | if(elemTop > end) break; 154 | } 155 | } 156 | }; 157 | 158 | render(); 159 | 160 | if(!haveScroll){ 161 | var timer; 162 | scrollElem.on('scroll', function(){ 163 | var othis = $(this); 164 | if(timer) clearTimeout(timer) 165 | timer = setTimeout(function(){ 166 | render(null, othis); 167 | }, 50); 168 | }); 169 | haveScroll = true; 170 | } 171 | return render; 172 | }; 173 | 174 | //暴露接口 175 | exports('flow', new Flow()); 176 | }); 177 | -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/lay/modules/form.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name:layui.form 表单组件 4 | @Author:贤心 5 | @License:LGPL 6 | 7 | */ 8 | 9 | layui.define('layer', function(exports){ 10 | "use strict"; 11 | 12 | var $ = layui.jquery 13 | ,layer = layui.layer 14 | ,hint = layui.hint() 15 | ,device = layui.device() 16 | 17 | ,MOD_NAME = 'form', ELEM = '.layui-form', THIS = 'layui-this', SHOW = 'layui-show', DISABLED = 'layui-disabled' 18 | 19 | ,Form = function(){ 20 | this.config = { 21 | verify: { 22 | required: [ 23 | /[\S]+/ 24 | ,'必填项不能为空' 25 | ] 26 | ,phone: [ 27 | /^1\d{10}$/ 28 | ,'请输入正确的手机号' 29 | ] 30 | ,email: [ 31 | /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/ 32 | ,'邮箱格式不正确' 33 | ] 34 | ,url: [ 35 | /(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/ 36 | ,'链接格式不正确' 37 | ] 38 | ,number: [ 39 | /^\d+$/ 40 | ,'只能填写数字' 41 | ] 42 | ,date: [ 43 | /^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/ 44 | ,'日期格式不正确' 45 | ] 46 | ,identity: [ 47 | /(^\d{15}$)|(^\d{17}(x|X|\d)$)/ 48 | ,'请输入正确的身份证号' 49 | ] 50 | } 51 | }; 52 | }; 53 | 54 | //全局设置 55 | Form.prototype.set = function(options){ 56 | var that = this; 57 | $.extend(true, that.config, options); 58 | return that; 59 | }; 60 | 61 | //验证规则设定 62 | Form.prototype.verify = function(settings){ 63 | var that = this; 64 | $.extend(true, that.config.verify, settings); 65 | return that; 66 | }; 67 | 68 | //表单事件监听 69 | Form.prototype.on = function(events, callback){ 70 | return layui.onevent(MOD_NAME, events, callback); 71 | }; 72 | 73 | //表单控件渲染 74 | Form.prototype.render = function(type){ 75 | var that = this, items = { 76 | //下拉选择框 77 | select: function(){ 78 | var TIPS = '请选择', CLASS = 'layui-form-select', TITLE = 'layui-select-title' 79 | 80 | ,selects = $(ELEM).find('select'), hide = function(e, clear){ 81 | if(!$(e.target).parent().hasClass(TITLE) || clear){ 82 | $('.'+CLASS).removeClass(CLASS+'ed'); 83 | } 84 | } 85 | 86 | ,events = function(reElem, disabled){ 87 | var select = $(this), title = reElem.find('.' + TITLE); 88 | 89 | if(disabled) return; 90 | 91 | //展开下拉 92 | title.on('click', function(e){ 93 | reElem.hasClass(CLASS+'ed') ? reElem.removeClass(CLASS+'ed') : ( 94 | hide(e, true), 95 | reElem.addClass(CLASS+'ed') 96 | ); 97 | }); 98 | 99 | //选择 100 | reElem.find('dl>dd').on('click', function(){ 101 | var othis = $(this), value = othis.attr('lay-value'); 102 | var filter = select.attr('lay-filter'); //获取过滤器 103 | 104 | if(othis.hasClass(DISABLED)) return false; 105 | 106 | select.val(value).removeClass('layui-form-danger'), title.find('input').val(othis.text()); 107 | othis.addClass(THIS).siblings().removeClass(THIS); 108 | layui.event(MOD_NAME, 'select('+ filter +')', { 109 | elem: select[0] 110 | ,value: value 111 | }); 112 | }); 113 | 114 | reElem.find('dl>dt').on('click', function(e){ 115 | return false; 116 | }); 117 | 118 | //关闭下拉 119 | $(document).off('click', hide).on('click', hide) 120 | } 121 | 122 | selects.each(function(index, select){ 123 | var othis = $(this), hasRender = othis.next('.'+CLASS), disabled = this.disabled; 124 | var value = select.value, selected = $(select.options[select.selectedIndex]); //获取当前选中项 125 | 126 | //替代元素 127 | var reElem = $(['
    ' 128 | ,'
    ' 129 | ,'
    ' 130 | ,'
    '+ function(options){ 131 | var arr = []; 132 | layui.each(options, function(index, item){ 133 | if(index === 0 && !item.value) return; 134 | if(item.tagName.toLowerCase() === 'optgroup'){ 135 | arr.push('
    '+ item.label +'
    '); 136 | } else { 137 | arr.push('
    '+ item.innerHTML +'
    '); 138 | } 139 | }); 140 | return arr.join(''); 141 | }(othis.find('*')) +'
    ' 142 | ,'
    '].join('')); 143 | 144 | hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender 145 | othis.after(reElem); 146 | events.call(this, reElem, disabled); 147 | }); 148 | } 149 | //复选框/开关 150 | ,checkbox: function(){ 151 | var CLASS = { 152 | checkbox: ['layui-form-checkbox', 'layui-form-checked', 'checkbox'] 153 | ,_switch: ['layui-form-switch', 'layui-form-onswitch', 'switch'] 154 | } 155 | ,checks = $(ELEM).find('input[type=checkbox]') 156 | 157 | ,events = function(reElem, RE_CLASS){ 158 | var check = $(this); 159 | 160 | //勾选 161 | reElem.on('click', function(){ 162 | var filter = check.attr('lay-filter'); //获取过滤器 163 | 164 | if(check[0].disabled) return; 165 | 166 | check[0].checked ? ( 167 | check[0].checked = false 168 | ,reElem.removeClass(RE_CLASS[1]) 169 | ) : ( 170 | check[0].checked = true 171 | ,reElem.addClass(RE_CLASS[1]) 172 | ); 173 | layui.event(MOD_NAME, RE_CLASS[2]+'('+ filter +')', { 174 | elem: check[0] 175 | ,value: check[0].value 176 | }); 177 | }); 178 | } 179 | 180 | checks.each(function(index, check){ 181 | var othis = $(this), skin = othis.attr('lay-skin'), disabled = this.disabled; 182 | if(skin === 'switch') skin = '_'+skin; 183 | var RE_CLASS = CLASS[skin] || CLASS.checkbox; 184 | 185 | //替代元素 186 | var hasRender = othis.next('.' + RE_CLASS[0]); 187 | var reElem = $(['
    ' 189 | ,{ 190 | _switch: '' 191 | }[skin] || (''+ (check.title || '勾选') +'') 192 | ,'
    '].join('')); 193 | 194 | hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender 195 | othis.after(reElem); 196 | events.call(this, reElem, RE_CLASS); 197 | }); 198 | } 199 | //单选框 200 | ,radio: function(){ 201 | var CLASS = 'layui-form-radio', ICON = ['', ''] 202 | ,radios = $(ELEM).find('input[type=radio]') 203 | 204 | ,events = function(reElem){ 205 | var radio = $(this), ANIM = 'layui-anim-scaleSpring'; 206 | 207 | reElem.on('click', function(){ 208 | var name = radio[0].name, forms = radio.parents(ELEM); 209 | var filter = radio.attr('lay-filter'); //获取过滤器 210 | var sameRadio = forms.find('input[name='+ name.replace(/(\.|#|\[|\])/g, '\\$1') +']'); //找到相同name的兄弟 211 | 212 | if(radio[0].disabled) return; 213 | 214 | layui.each(sameRadio, function(){ 215 | var next = $(this).next('.'+CLASS); 216 | this.checked = false; 217 | next.removeClass(CLASS+'ed'); 218 | next.find('.layui-icon').removeClass(ANIM).html(ICON[1]); 219 | }); 220 | 221 | radio[0].checked = true; 222 | reElem.addClass(CLASS+'ed'); 223 | reElem.find('.layui-icon').addClass(ANIM).html(ICON[0]); 224 | 225 | layui.event(MOD_NAME, 'radio('+ filter +')', { 226 | elem: radio[0] 227 | ,value: radio[0].value 228 | }); 229 | }); 230 | }; 231 | 232 | radios.each(function(index, radio){ 233 | var othis = $(this), hasRender = othis.next('.' + CLASS), disabled = this.disabled; 234 | 235 | //替代元素 236 | var reElem = $(['
    ' 237 | ,''+ ICON[radio.checked ? 0 : 1] +'' 238 | ,''+ (radio.title||'未命名') +'' 239 | ,'
    '].join('')); 240 | 241 | hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender 242 | othis.after(reElem); 243 | events.call(this, reElem); 244 | }); 245 | } 246 | }; 247 | type ? ( 248 | items[type] ? items[type]() : hint.error('不支持的'+ type + '表单渲染') 249 | ) : layui.each(items, function(index, item){ 250 | item(); 251 | }); 252 | return that; 253 | }; 254 | 255 | //表单提交校验 256 | var submit = function(){ 257 | var button = $(this), verify = form.config.verify, stop = null 258 | ,DANGER = 'layui-form-danger', field = {} ,elem = button.parents(ELEM) 259 | 260 | ,verifyElem = elem.find('*[lay-verify]') //获取需要校验的元素 261 | ,formElem = button.parents('form')[0] //获取当前所在的form元素,如果存在的话 262 | ,fieldElem = elem.find('input,select,textarea') //获取所有表单域 263 | ,filter = button.attr('lay-filter'); //获取过滤器 264 | 265 | //开始校验 266 | layui.each(verifyElem, function(_, item){ 267 | var othis = $(this), ver = othis.attr('lay-verify'), tips = ''; 268 | var value = othis.val(), isFn = typeof verify[ver] === 'function'; 269 | othis.removeClass(DANGER); 270 | if(verify[ver] && (isFn ? tips = verify[ver](value, item) : !verify[ver][0].test(value)) ){ 271 | layer.msg(tips || verify[ver][1], { 272 | icon: 5 273 | ,shift: 6 274 | }); 275 | //非移动设备自动定位焦点 276 | if(!device.android && !device.ios){ 277 | item.focus(); 278 | } 279 | othis.addClass(DANGER); 280 | return stop = true; 281 | } 282 | }); 283 | 284 | if(stop) return false; 285 | 286 | layui.each(fieldElem, function(_, item){ 287 | if(!item.name) return; 288 | if(/^checkbox|radio$/.test(item.type) && !item.checked) return; 289 | field[item.name] = item.value; 290 | }); 291 | 292 | //获取字段 293 | return layui.event.call(this, MOD_NAME, 'submit('+ filter +')', { 294 | elem: this 295 | ,form: formElem 296 | ,field: field 297 | }); 298 | }; 299 | 300 | //自动完成渲染 301 | var form = new Form(), dom = $(document); 302 | form.render(); 303 | 304 | //表单reset重置渲染 305 | dom.on('reset', ELEM, function(){ 306 | setTimeout(function(){ 307 | form.render(); 308 | }, 50); 309 | }); 310 | 311 | //表单提交事件 312 | dom.on('submit', ELEM, submit) 313 | .on('click', '*[lay-submit]', submit); 314 | 315 | exports(MOD_NAME, function(options){ 316 | return form.set(options); 317 | }); 318 | }); 319 | 320 | 321 | -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name : layui.laypage 分页组件 4 | @Author:贤心 5 | @License:LGPL 6 | 7 | */ 8 | 9 | layui.define(function(exports){ 10 | "use strict"; 11 | 12 | function laypage(options){ 13 | var skin = 'laypagecss'; 14 | new Page(options); 15 | } 16 | 17 | var doc = document, id = 'getElementById', tag = 'getElementsByTagName'; 18 | var index = 0, Page = function(options){ 19 | var that = this; 20 | var conf = that.config = options || {}; 21 | conf.item = index++; 22 | that.render(true); 23 | }; 24 | 25 | Page.on = function(elem, even, fn){ 26 | elem.attachEvent ? elem.attachEvent('on'+ even, function(){ 27 | fn.call(elem, window.even); //for ie, this指向为当前dom元素 28 | }) : elem.addEventListener(even, fn, false); 29 | return Page; 30 | }; 31 | 32 | //判断传入的容器类型 33 | Page.prototype.type = function(){ 34 | var conf = this.config; 35 | if(typeof conf.cont === 'object'){ 36 | return conf.cont.length === undefined ? 2 : 3; 37 | } 38 | }; 39 | 40 | //分页视图 41 | Page.prototype.view = function(){ 42 | var that = this, conf = that.config, view = [], dict = {}; 43 | conf.pages = conf.pages|0; 44 | conf.curr = (conf.curr|0) || 1; 45 | conf.groups = 'groups' in conf ? (conf.groups|0) : 5; 46 | conf.first = 'first' in conf ? conf.first : '首页'; 47 | conf.last = 'last' in conf ? conf.last : '末页'; 48 | conf.prev = 'prev' in conf ? conf.prev : '上一页'; 49 | conf.next = 'next' in conf ? conf.next : '下一页'; 50 | 51 | if(conf.pages <= 1){ 52 | return ''; 53 | } 54 | 55 | if(conf.groups > conf.pages){ 56 | conf.groups = conf.pages; 57 | } 58 | 59 | //计算当前组 60 | dict.index = Math.ceil((conf.curr + ((conf.groups > 1 && conf.groups !== conf.pages) ? 1 : 0))/(conf.groups === 0 ? 1 : conf.groups)); 61 | 62 | //当前页非首页,则输出上一页 63 | if(conf.curr > 1 && conf.prev){ 64 | view.push(''+ conf.prev +''); 65 | } 66 | 67 | //当前组非首组,则输出首页 68 | if(dict.index > 1 && conf.first && conf.groups !== 0){ 69 | view.push(''+ conf.first +''); 70 | } 71 | 72 | //输出当前页组 73 | dict.poor = Math.floor((conf.groups-1)/2); 74 | dict.start = dict.index > 1 ? conf.curr - dict.poor : 1; 75 | dict.end = dict.index > 1 ? (function(){ 76 | var max = conf.curr + (conf.groups - dict.poor - 1); 77 | return max > conf.pages ? conf.pages : max; 78 | }()) : conf.groups; 79 | if(dict.end - dict.start < conf.groups - 1){ //最后一组状态 80 | dict.start = dict.end - conf.groups + 1; 81 | } 82 | for(; dict.start <= dict.end; dict.start++){ 83 | if(dict.start === conf.curr){ 84 | view.push(''+ dict.start +''); 85 | } else { 86 | view.push(''+ dict.start +''); 87 | } 88 | } 89 | 90 | //总页数大于连续分页数,且当前组最大页小于总页,输出尾页 91 | if(conf.pages > conf.groups && dict.end < conf.pages && conf.last && conf.groups !== 0){ 92 | view.push(''+ conf.last +''); 93 | } 94 | 95 | //当前页不为尾页时,输出下一页 96 | dict.flow = !conf.prev && conf.groups === 0; 97 | if(conf.curr !== conf.pages && conf.next || dict.flow){ 98 | view.push((function(){ 99 | return (dict.flow && conf.curr === conf.pages) 100 | ? ''+ conf.next +'' 101 | : ''+ conf.next +''; 102 | }())); 103 | } 104 | 105 | return '
    '+ view.join('') + function(){ 108 | return conf.skip 109 | ? '到第 页 ' 110 | + '' 111 | : ''; 112 | }() +'
    '; 113 | }; 114 | 115 | //跳页 116 | Page.prototype.jump = function(elem){ 117 | if(!elem) return; 118 | var that = this, conf = that.config, childs = elem.children; 119 | var btn = elem[tag]('button')[0]; 120 | var input = elem[tag]('input')[0]; 121 | for(var i = 0, len = childs.length; i < len; i++){ 122 | if(childs[i].nodeName.toLowerCase() === 'a'){ 123 | Page.on(childs[i], 'click', function(){ 124 | var curr = this.getAttribute('data-page')|0; 125 | conf.curr = curr; 126 | that.render(); 127 | 128 | }); 129 | } 130 | } 131 | if(btn){ 132 | Page.on(btn, 'click', function(){ 133 | var curr = input.value.replace(/\s|\D/g, '')|0; 134 | if(curr && curr <= conf.pages){ 135 | conf.curr = curr; 136 | that.render(); 137 | } 138 | }); 139 | } 140 | }; 141 | 142 | //渲染分页 143 | Page.prototype.render = function(load){ 144 | var that = this, conf = that.config, type = that.type(); 145 | var view = that.view(); 146 | if(type === 2){ 147 | conf.cont.innerHTML = view; 148 | } else if(type === 3){ 149 | conf.cont.html(view); 150 | } else { 151 | doc[id](conf.cont).innerHTML = view; 152 | } 153 | conf.jump && conf.jump(conf, load); 154 | that.jump(doc[id]('layui-laypage-' + conf.item)); 155 | if(conf.hash && !load){ 156 | location.hash = '!'+ conf.hash +'='+ conf.curr; 157 | } 158 | }; 159 | 160 | exports('laypage', laypage); 161 | 162 | }); -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name : layui.laytpl 模板引擎 4 | @Author:贤心 5 | @License:LGPL 6 | 7 | */ 8 | 9 | layui.define(function(exports){ 10 | 11 | "use strict"; 12 | 13 | var config = { 14 | open: '{{', 15 | close: '}}' 16 | }; 17 | 18 | var tool = { 19 | exp: function(str){ 20 | return new RegExp(str, 'g'); 21 | }, 22 | //匹配满足规则内容 23 | query: function(type, _, __){ 24 | var types = [ 25 | '#([\\s\\S])+?', //js语句 26 | '([^{#}])*?' //普通字段 27 | ][type || 0]; 28 | return exp((_||'') + config.open + types + config.close + (__||'')); 29 | }, 30 | escape: function(html){ 31 | return String(html||'').replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&') 32 | .replace(//g, '>').replace(/'/g, ''').replace(/"/g, '"'); 33 | }, 34 | error: function(e, tplog){ 35 | var error = 'Laytpl Error:'; 36 | typeof console === 'object' && console.error(error + e + '\n'+ (tplog || '')); 37 | return error + e; 38 | } 39 | }; 40 | 41 | var exp = tool.exp, Tpl = function(tpl){ 42 | this.tpl = tpl; 43 | }; 44 | 45 | Tpl.pt = Tpl.prototype; 46 | 47 | window.errors = 0; 48 | 49 | //编译模版 50 | Tpl.pt.parse = function(tpl, data){ 51 | var that = this, tplog = tpl; 52 | var jss = exp('^'+config.open+'#', ''), jsse = exp(config.close+'$', ''); 53 | 54 | tpl = tpl.replace(/\s+|\r|\t|\n/g, ' ').replace(exp(config.open+'#'), config.open+'# ') 55 | 56 | .replace(exp(config.close+'}'), '} '+config.close).replace(/\\/g, '\\\\') 57 | 58 | .replace(/(?="|')/g, '\\').replace(tool.query(), function(str){ 59 | str = str.replace(jss, '').replace(jsse, ''); 60 | return '";' + str.replace(/\\/g, '') + ';view+="'; 61 | }) 62 | 63 | .replace(tool.query(1), function(str){ 64 | var start = '"+('; 65 | if(str.replace(/\s/g, '') === config.open+config.close){ 66 | return ''; 67 | } 68 | str = str.replace(exp(config.open+'|'+config.close), ''); 69 | if(/^=/.test(str)){ 70 | str = str.replace(/^=/, ''); 71 | start = '"+_escape_('; 72 | } 73 | return start + str.replace(/\\/g, '') + ')+"'; 74 | }); 75 | 76 | tpl = '"use strict";var view = "' + tpl + '";return view;'; 77 | 78 | try{ 79 | that.cache = tpl = new Function('d, _escape_', tpl); 80 | return tpl(data, tool.escape); 81 | } catch(e){ 82 | delete that.cache; 83 | return tool.error(e, tplog); 84 | } 85 | }; 86 | 87 | Tpl.pt.render = function(data, callback){ 88 | var that = this, tpl; 89 | if(!data) return tool.error('no data'); 90 | tpl = that.cache ? that.cache(data, tool.escape) : that.parse(that.tpl, data); 91 | if(!callback) return tpl; 92 | callback(tpl); 93 | }; 94 | 95 | var laytpl = function(tpl){ 96 | if(typeof tpl !== 'string') return tool.error('Template not found'); 97 | return new Tpl(tpl); 98 | }; 99 | 100 | laytpl.config = function(options){ 101 | options = options || {}; 102 | for(var i in options){ 103 | config[i] = options[i]; 104 | } 105 | }; 106 | 107 | laytpl.v = '1.2.0'; 108 | 109 | exports('laytpl', laytpl); 110 | 111 | }); -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/lay/modules/tree.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name:layui.tree 树组件 4 | @Author:贤心 5 | @License:LGPL 6 | 7 | */ 8 | 9 | 10 | layui.define('jquery', function(exports){ 11 | "use strict"; 12 | 13 | var $ = layui.jquery; 14 | var hint = layui.hint(); 15 | 16 | var enterSkin = 'layui-tree-enter', Tree = function(options){ 17 | this.options = options; 18 | }; 19 | 20 | //图标 21 | var icon = { 22 | arrow: ['', ''] //箭头 23 | ,checkbox: ['', ''] //复选框 24 | ,radio: ['', ''] //单选框 25 | ,branch: ['', ''] //父节点 26 | ,leaf: '' //叶节点 27 | }; 28 | 29 | //初始化 30 | Tree.prototype.init = function(elem){ 31 | var that = this; 32 | elem.addClass('layui-box layui-tree'); //添加tree样式 33 | if(that.options.skin){ 34 | elem.addClass('layui-tree-skin-'+ that.options.skin); 35 | } 36 | that.tree(elem); 37 | that.on(elem); 38 | }; 39 | 40 | //树节点解析 41 | Tree.prototype.tree = function(elem, children){ 42 | var that = this, options = that.options 43 | var nodes = children || options.nodes; 44 | 45 | layui.each(nodes, function(index, item){ 46 | var hasChild = item.children && item.children.length > 0; 47 | var ul = $(''); 48 | var li = $(['
  • ' 49 | //展开箭头 50 | ,function(){ 51 | return hasChild ? ''+ ( 52 | item.spread ? icon.arrow[1] : icon.arrow[0] 53 | ) +'' : ''; 54 | }() 55 | 56 | //复选框/单选框 57 | ,function(){ 58 | return options.check ? ( 59 | ''+ ( 60 | options.check === 'checkbox' ? icon.checkbox[0] : ( 61 | options.check === 'radio' ? icon.radio[0] : '' 62 | ) 63 | ) +'' 64 | ) : ''; 65 | }() 66 | 67 | //节点 68 | ,function(){ 69 | return '' 72 | + (''+ ( 73 | hasChild ? ( 74 | item.spread ? icon.branch[1] : icon.branch[0] 75 | ) : icon.leaf 76 | ) +'') //节点图标 77 | + (''+ (item.name||'未命名') +''); 78 | }() 79 | 80 | ,'
  • '].join('')); 81 | 82 | //如果有子节点,则递归继续生成树 83 | if(hasChild){ 84 | li.append(ul); 85 | that.tree(ul, item.children); 86 | } 87 | 88 | elem.append(li); 89 | 90 | //触发点击节点回调 91 | typeof options.click === 'function' && that.click(li, item); 92 | 93 | //伸展节点 94 | that.spread(li, item); 95 | 96 | //拖拽节点 97 | options.drag && that.drag(li, item); 98 | }); 99 | }; 100 | 101 | //点击节点回调 102 | Tree.prototype.click = function(elem, item){ 103 | var that = this, options = that.options; 104 | elem.children('a').on('click', function(e){ 105 | layui.stope(e); 106 | options.click(item) 107 | }); 108 | }; 109 | 110 | //伸展节点 111 | Tree.prototype.spread = function(elem, item){ 112 | var that = this, options = that.options; 113 | var arrow = elem.children('.layui-tree-spread') 114 | var ul = elem.children('ul'), a = elem.children('a'); 115 | 116 | //执行伸展 117 | var open = function(){ 118 | if(elem.data('spread')){ 119 | elem.data('spread', null) 120 | ul.removeClass('layui-show'); 121 | arrow.html(icon.arrow[0]); 122 | a.find('.layui-icon').html(icon.branch[0]); 123 | } else { 124 | elem.data('spread', true); 125 | ul.addClass('layui-show'); 126 | arrow.html(icon.arrow[1]); 127 | a.find('.layui-icon').html(icon.branch[1]); 128 | } 129 | }; 130 | 131 | //如果没有子节点,则不执行 132 | if(!ul[0]) return; 133 | 134 | arrow.on('click', open); 135 | a.on('dblclick', open); 136 | } 137 | 138 | //通用事件 139 | Tree.prototype.on = function(elem){ 140 | var that = this, options = that.options; 141 | var dragStr = 'layui-tree-drag'; 142 | 143 | //屏蔽选中文字 144 | elem.find('i').on('selectstart', function(e){ 145 | return false 146 | }); 147 | 148 | //拖拽 149 | if(options.drag){ 150 | $(document).on('mousemove', function(e){ 151 | var move = that.move; 152 | if(move.from){ 153 | var to = move.to, treeMove = $('
    '); 154 | e.preventDefault(); 155 | $('.' + dragStr)[0] || $('body').append(treeMove); 156 | var dragElem = $('.' + dragStr)[0] ? $('.' + dragStr) : treeMove; 157 | (dragElem).addClass('layui-show').html(move.from.elem.children('a').html()); 158 | dragElem.css({ 159 | left: e.pageX + 10 160 | ,top: e.pageY + 10 161 | }) 162 | } 163 | }).on('mouseup', function(){ 164 | var move = that.move; 165 | if(move.from){ 166 | move.from.elem.children('a').removeClass(enterSkin); 167 | move.to && move.to.elem.children('a').removeClass(enterSkin); 168 | that.move = {}; 169 | $('.' + dragStr).remove(); 170 | } 171 | }); 172 | } 173 | }; 174 | 175 | //拖拽节点 176 | Tree.prototype.move = {}; 177 | Tree.prototype.drag = function(elem, item){ 178 | var that = this, options = that.options; 179 | var a = elem.children('a'), mouseenter = function(){ 180 | var othis = $(this), move = that.move; 181 | if(move.from){ 182 | move.to = { 183 | item: item 184 | ,elem: elem 185 | }; 186 | othis.addClass(enterSkin); 187 | } 188 | }; 189 | a.on('mousedown', function(){ 190 | var move = that.move 191 | move.from = { 192 | item: item 193 | ,elem: elem 194 | }; 195 | }); 196 | a.on('mouseenter', mouseenter).on('mousemove', mouseenter) 197 | .on('mouseleave', function(){ 198 | var othis = $(this), move = that.move; 199 | if(move.from){ 200 | delete move.to; 201 | othis.removeClass(enterSkin); 202 | } 203 | }); 204 | }; 205 | 206 | //暴露接口 207 | exports('tree', function(options){ 208 | var tree = new Tree(options = options || {}); 209 | var elem = $(options.elem); 210 | if(!elem[0]){ 211 | return hint.error('layui.tree 没有找到'+ options.elem +'元素'); 212 | } 213 | tree.init(elem); 214 | }); 215 | }); 216 | -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/lay/modules/upload.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | @Title: layui.upload 单文件上传 - 全浏览器兼容版 4 | @Author: 贤心 5 | @License:LGPL 6 | 7 | */ 8 | 9 | layui.define('layer', function(exports){ 10 | "use strict"; 11 | 12 | var $ = layui.jquery; 13 | var layer = layui.layer; 14 | var device = layui.device(); 15 | 16 | var elemDragEnter = 'layui-upload-enter'; 17 | var elemIframe = 'layui-upload-iframe'; 18 | 19 | var msgConf = { 20 | icon: 2 21 | ,shift: 6 22 | }, fileType = { 23 | file: '文件' 24 | ,video: '视频' 25 | ,audio: '音频' 26 | }; 27 | 28 | var Upload = function(options){ 29 | this.options = options; 30 | }; 31 | 32 | //初始化渲染 33 | Upload.prototype.init = function(){ 34 | var that = this, options = that.options; 35 | var body = $('body'), elem = $(options.elem || '.layui-upload-file'); 36 | var iframe = $(''); 37 | 38 | //插入iframe 39 | $('#'+elemIframe)[0] || body.append(iframe); 40 | 41 | return elem.each(function(index, item){ 42 | item = $(item); 43 | var form = '
    '; 44 | 45 | var type = item.attr('lay-type') || options.type; //获取文件类型 46 | 47 | //包裹ui元素 48 | if(!options.unwrap){ 49 | form = '
    ' + form + ''+ ( 50 | item.attr('lay-title') || options.title|| ('上传'+ (fileType[type]||'图片') ) 51 | ) +'
    '; 52 | } 53 | 54 | form = $(form); 55 | 56 | //拖拽支持 57 | if(!options.unwrap){ 58 | form.on('dragover', function(e){ 59 | e.preventDefault(); 60 | $(this).addClass(elemDragEnter); 61 | }).on('dragleave', function(){ 62 | $(this).removeClass(elemDragEnter); 63 | }).on('drop', function(){ 64 | $(this).removeClass(elemDragEnter); 65 | }); 66 | } 67 | 68 | //如果已经实例化,则移除包裹元素 69 | if(item.parent('form').attr('target') === elemIframe){ 70 | if(options.unwrap){ 71 | item.unwrap(); 72 | } else { 73 | item.parent().next().remove(); 74 | item.unwrap().unwrap(); 75 | } 76 | }; 77 | 78 | //包裹元素 79 | item.wrap(form); 80 | 81 | //触发上传 82 | item.off('change').on('change', function(){ 83 | that.action(this, type); 84 | }); 85 | }); 86 | }; 87 | 88 | //提交上传 89 | Upload.prototype.action = function(input, type){ 90 | var that = this, options = that.options, val = input.value; 91 | var item = $(input), ext = item.attr('lay-ext') || options.ext || ''; //获取支持上传的文件扩展名; 92 | 93 | if(!val){ 94 | return; 95 | }; 96 | 97 | //校验文件 98 | switch(type){ 99 | case 'file': //一般文件 100 | if(ext && !RegExp('\\w\\.('+ ext +')$', 'i').test(escape(val))){ 101 | layer.msg('不支持该文件格式', msgConf); 102 | return input.value = ''; 103 | } 104 | break; 105 | case 'video': //视频文件 106 | if(!RegExp('\\w\\.('+ (ext||'avi|mp4|wma|rmvb|rm|flash|3gp|flv') +')$', 'i').test(escape(val))){ 107 | layer.msg('不支持该视频格式', msgConf); 108 | return input.value = ''; 109 | } 110 | break; 111 | case 'audio': //音频文件 112 | if(!RegExp('\\w\\.('+ (ext||'mp3|wav|mid') +')$', 'i').test(escape(val))){ 113 | layer.msg('不支持该音频格式', msgConf); 114 | return input.value = ''; 115 | } 116 | break; 117 | default: //图片文件 118 | if(!RegExp('\\w\\.('+ (ext||'jpg|png|gif|bmp|jpeg') +')$', 'i').test(escape(val))){ 119 | layer.msg('不支持该图片格式', msgConf); 120 | return input.value = ''; 121 | } 122 | break; 123 | } 124 | 125 | options.before && options.before(input); 126 | item.parent().submit(); 127 | 128 | var iframe = $('#'+elemIframe), timer = setInterval(function() { 129 | var res; 130 | try { 131 | res = iframe.contents().find('body').text(); 132 | } catch(e) { 133 | layer.msg('上传接口存在跨域', msgConf); 134 | clearInterval(timer); 135 | } 136 | if(res){ 137 | clearInterval(timer); 138 | iframe.contents().find('body').html(''); 139 | try { 140 | res = JSON.parse(res); 141 | } catch(e){ 142 | res = {}; 143 | return layer.msg('请对上传接口返回JSON字符', msgConf); 144 | } 145 | typeof options.success === 'function' && options.success(res, input); 146 | } 147 | }, 30); 148 | 149 | input.value = ''; 150 | }; 151 | 152 | //暴露接口 153 | exports('upload', function(options){ 154 | var upload = new Upload(options = options || {}); 155 | upload.init(); 156 | }); 157 | }); 158 | 159 | -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name:layui.util 工具集 4 | @Author:贤心 5 | @License:LGPL 6 | 7 | */ 8 | 9 | layui.define('jquery', function(exports){ 10 | "use strict"; 11 | 12 | var $ = layui.jquery 13 | 14 | ,util = { 15 | //固定块 16 | fixbar: function(options){ 17 | options = options || {}; 18 | options.bgcolor = options.bgcolor ? ('background-color:' + options.bgcolor) : ''; 19 | 20 | var TOP_BAR = 'layui-fixbar-top', timer, is, icon = [ 21 | options.bar1 === true ? '' : options.bar1 //bar1 - 信息图标 22 | ,options.bar2 === true ? '' : options.bar2 //bar2 - 问号图标 23 | ,'' //置顶 24 | ] 25 | 26 | ,dom = $([''].join('')) 31 | 32 | ,topbar = dom.find('.'+TOP_BAR) 33 | 34 | ,scroll = function(){ 35 | var stop = $(document).scrollTop(); 36 | if(stop >= (options.showHeight || 200)){ 37 | is || (topbar.show(), is = 1); 38 | } else { 39 | is && (topbar.hide(), is = 0); 40 | } 41 | }; 42 | 43 | if($('.layui-fixbar')[0]) return; 44 | typeof options.css === 'object' && (dom.css(options.css)); 45 | $('body').append(dom), scroll(); 46 | 47 | //bar点击事件 48 | dom.find('li').on('click', function(){ 49 | var othis = $(this), type = othis.attr('lay-type'); 50 | if(type === 'top'){ 51 | $('html,body').animate({ 52 | scrollTop : 0 53 | }, 200);; 54 | } 55 | options.click && options.click.call(this, type); 56 | }); 57 | 58 | //Top显示控制 59 | $(document).on('scroll', function(){ 60 | if(timer) clearTimeout(timer); 61 | timer = setTimeout(function(){ 62 | scroll(); 63 | }, 100); 64 | }); 65 | } 66 | }; 67 | 68 | exports('util', util); 69 | }); -------------------------------------------------------------------------------- /backend/src/public/static/lib/layui/layui.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | @Title: Layui 4 | @Description:经典模块化前端框架 5 | @Site: www.layui.com 6 | @Author: 贤心 7 | @License:LGPL 8 | 9 | */ 10 | 11 | ;!function(win){ 12 | 13 | "use strict"; 14 | 15 | var Lay = function(){ 16 | this.v = '1.0.7'; //版本号 17 | }; 18 | 19 | Lay.fn = Lay.prototype; 20 | 21 | var doc = document, config = Lay.fn.cache = {}, 22 | 23 | //获取layui所在目录 24 | getPath = function(){ 25 | var js = doc.scripts, jsPath = js[js.length - 1].src; 26 | return jsPath.substring(0, jsPath.lastIndexOf('/') + 1); 27 | }(), 28 | 29 | //异常提示 30 | error = function(msg){ 31 | win.console && console.error && console.error('Layui hint: ' + msg); 32 | }, 33 | 34 | isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]', 35 | 36 | //内置模块 37 | modules = { 38 | layer: 'modules/layer' //弹层 39 | ,laydate: 'modules/laydate' //日期 40 | ,laypage: 'modules/laypage' //分页 41 | ,laytpl: 'modules/laytpl' //模板引擎 42 | ,layim: 'modules/layim' //web通讯 43 | ,layedit: 'modules/layedit' //富文本编辑器 44 | ,form: 'modules/form' //表单集 45 | ,upload: 'modules/upload' //上传 46 | ,tree: 'modules/tree' //树结构 47 | ,slide: 'modules/slide' //轮播/滚动 48 | ,table: 'modules/table' //富表格 49 | ,element: 'modules/element' //常用元素操作 50 | ,util: 'modules/util' //工具块 51 | ,flow: 'modules/flow' //流加载 52 | ,code: 'modules/code' //代码修饰器 53 | ,single: 'modules/single' //单页应用 54 | ,mobile: 'modules/mobile' //移动大模块 55 | 56 | ,jquery: 'lib/jquery' //DOM库(第三方) 57 | 58 | ,'layui.mod': 'dest/layui.mod' //PC模块合并版 59 | }; 60 | 61 | config.modules = {}; //记录模块物理路径 62 | config.status = {}; //记录模块加载状态 63 | config.timeout = 10; //符合规范的模块请求最长等待秒数 64 | config.event = {}; //记录模块自定义事件 65 | 66 | //定义模块 67 | Lay.fn.define = function(deps, callback){ 68 | var that = this 69 | ,type = typeof deps === 'function' 70 | ,mods = function(){ 71 | typeof callback === 'function' && callback(function(app, exports){ 72 | layui[app] = exports; 73 | config.status[app] = true; 74 | }); 75 | return this; 76 | }; 77 | type && ( 78 | callback = deps, 79 | deps = [] 80 | ); 81 | if(layui['layui.all']){ 82 | return mods.call(that); 83 | }; 84 | that.use(deps, mods); 85 | return that; 86 | }; 87 | 88 | //使用特定模块 89 | Lay.fn.use = function(apps, callback, exports){ 90 | var that = this, dir = config.dir = config.dir ? config.dir : getPath; 91 | var head = doc.getElementsByTagName('head')[0]; 92 | 93 | apps = typeof apps === 'string' ? [apps] : apps; 94 | 95 | //如果页面已经存在jQuery1.7+库且所定义的模块依赖jQuery,则不加载内部jquery模块 96 | if(window.jQuery && jQuery.fn.on){ 97 | that.each(apps, function(index, item){ 98 | if(item === 'jquery'){ 99 | apps.splice(index, 1); 100 | } 101 | }); 102 | layui.jquery = jQuery; 103 | } 104 | 105 | var item = apps[0], timeout = 0; 106 | exports = exports || []; 107 | 108 | //静态资源host 109 | config.host = config.host || (dir.match(/\/\/([\s\S]+?)\//)||['//'+ location.host +'/'])[0]; 110 | 111 | if(apps.length === 0 || (layui['layui.all'] && modules[item])){ 112 | return typeof callback === 'function' && callback.apply(layui, exports), that; 113 | } 114 | 115 | //加载完毕 116 | function onScriptLoad(e, url){ 117 | var readyRegExp = navigator.platform === 'PLaySTATION 3' ? /^complete$/ : /^(complete|loaded)$/ 118 | if (e.type === 'load' || (readyRegExp.test((e.currentTarget || e.srcElement).readyState))) { 119 | config.modules[item] = url; 120 | head.removeChild(node); 121 | (function poll() { 122 | if(++timeout > config.timeout * 1000 / 4){ 123 | return error(item + ' is not a valid module'); 124 | }; 125 | config.status[item] ? onCallback() : setTimeout(poll, 4); 126 | }()); 127 | } 128 | } 129 | 130 | //加载模块 131 | var node = doc.createElement('script'), url = ( 132 | modules[item] ? (dir + 'lay/') : (config.base || '') 133 | ) + (that.modules[item] || item) + '.js'; 134 | node.async = true; 135 | node.charset = 'utf-8'; 136 | node.src = url + function(){ 137 | var version = config.version === true 138 | ? (config.v || (new Date()).getTime()) 139 | : (config.version||''); 140 | return version ? ('?v=' + version) : ''; 141 | }(); 142 | 143 | //首次加载 144 | if(!config.modules[item]){ 145 | head.appendChild(node); 146 | if(node.attachEvent && !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && !isOpera){ 147 | node.attachEvent('onreadystatechange', function(e){ 148 | onScriptLoad(e, url); 149 | }); 150 | } else { 151 | node.addEventListener('load', function(e){ 152 | onScriptLoad(e, url); 153 | }, false); 154 | } 155 | } else { 156 | (function poll() { 157 | if(++timeout > config.timeout * 1000 / 4){ 158 | return error(item + ' is not a valid module'); 159 | }; 160 | (typeof config.modules[item] === 'string' && config.status[item]) 161 | ? onCallback() 162 | : setTimeout(poll, 4); 163 | }()); 164 | } 165 | 166 | config.modules[item] = url; 167 | 168 | //回调 169 | function onCallback(){ 170 | exports.push(layui[item]); 171 | apps.length > 1 ? 172 | that.use(apps.slice(1), callback, exports) 173 | : ( typeof callback === 'function' && callback.apply(layui, exports) ); 174 | } 175 | 176 | return that; 177 | 178 | }; 179 | 180 | //获取节点的style属性值 181 | Lay.fn.getStyle = function(node, name){ 182 | var style = node.currentStyle ? node.currentStyle : win.getComputedStyle(node, null); 183 | return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name); 184 | }; 185 | 186 | //css外部加载器 187 | Lay.fn.link = function(href, fn, cssname){ 188 | var that = this, link = doc.createElement('link'); 189 | var head = doc.getElementsByTagName('head')[0]; 190 | if(typeof fn === 'string') cssname = fn; 191 | var app = (cssname || href).replace(/\.|\//g, ''); 192 | var id = link.id = 'layuicss-'+app, timeout = 0; 193 | 194 | link.rel = 'stylesheet'; 195 | link.href = href + (config.debug ? '?v='+new Date().getTime() : ''); 196 | link.media = 'all'; 197 | 198 | if(!doc.getElementById(id)){ 199 | head.appendChild(link); 200 | } 201 | 202 | if(typeof fn !== 'function') return ; 203 | 204 | //轮询css是否加载完毕 205 | (function poll() { 206 | if(++timeout > config.timeout * 1000 / 100){ 207 | return error(href + ' timeout'); 208 | }; 209 | parseInt(that.getStyle(doc.getElementById(id), 'width')) === 1989 ? function(){ 210 | fn(); 211 | }() : setTimeout(poll, 100); 212 | }()); 213 | }; 214 | 215 | //css内部加载器 216 | Lay.fn.addcss = function(firename, fn, cssname){ 217 | layui.link(config.dir + 'css/' + firename, fn, cssname); 218 | }; 219 | 220 | //图片预加载 221 | Lay.fn.img = function(url, callback, error) { 222 | var img = new Image(); 223 | img.src = url; 224 | if(img.complete){ 225 | return callback(img); 226 | } 227 | img.onload = function(){ 228 | img.onload = null; 229 | callback(img); 230 | }; 231 | img.onerror = function(e){ 232 | img.onerror = null; 233 | error(e); 234 | }; 235 | }; 236 | 237 | //全局配置 238 | Lay.fn.config = function(options){ 239 | options = options || {}; 240 | for(var key in options){ 241 | config[key] = options[key]; 242 | } 243 | return this; 244 | }; 245 | 246 | //记录全部模块 247 | Lay.fn.modules = function(){ 248 | var clone = {}; 249 | for(var o in modules){ 250 | clone[o] = modules[o]; 251 | } 252 | return clone; 253 | }(); 254 | 255 | //拓展模块 256 | Lay.fn.extend = function(options){ 257 | var that = this; 258 | 259 | //验证模块是否被占用 260 | options = options || {}; 261 | for(var o in options){ 262 | if(that[o] || that.modules[o]){ 263 | error('\u6A21\u5757\u540D '+ o +' \u5DF2\u88AB\u5360\u7528'); 264 | } else { 265 | that.modules[o] = options[o]; 266 | } 267 | } 268 | 269 | return that; 270 | }; 271 | 272 | //路由 273 | Lay.fn.router = function(hash){ 274 | var hashs = (hash || location.hash).replace(/^#/, '').split('/') || []; 275 | var item, param = { 276 | dir: [] 277 | }; 278 | for(var i = 0; i < hashs.length; i++){ 279 | item = hashs[i].split('='); 280 | /^\w+=/.test(hashs[i]) ? function(){ 281 | if(item[0] !== 'dir'){ 282 | param[item[0]] = item[1]; 283 | } 284 | }() : param.dir.push(hashs[i]); 285 | item = null; 286 | } 287 | return param; 288 | }; 289 | 290 | //本地存储 291 | Lay.fn.data = function(table, settings){ 292 | table = table || 'layui'; 293 | 294 | if(!win.JSON || !win.JSON.parse) return; 295 | 296 | //如果settings为null,则删除表 297 | if(settings === null){ 298 | return delete localStorage[table]; 299 | } 300 | 301 | settings = typeof settings === 'object' 302 | ? settings 303 | : {key: settings}; 304 | 305 | try{ 306 | var data = JSON.parse(localStorage[table]); 307 | } catch(e){ 308 | var data = {}; 309 | } 310 | 311 | if(settings.value) data[settings.key] = settings.value; 312 | if(settings.remove) delete data[settings.key]; 313 | localStorage[table] = JSON.stringify(data); 314 | 315 | return settings.key ? data[settings.key] : data; 316 | }; 317 | 318 | //设备信息 319 | Lay.fn.device = function(key){ 320 | var agent = navigator.userAgent.toLowerCase(); 321 | 322 | //获取版本号 323 | var getVersion = function(label){ 324 | var exp = new RegExp(label + '/([^\\s\\_\\-]+)'); 325 | label = (agent.match(exp)||[])[1]; 326 | return label || false; 327 | }; 328 | 329 | var result = { 330 | os: function(){ //底层操作系统 331 | if(/windows/.test(agent)){ 332 | return 'windows'; 333 | } else if(/linux/.test(agent)){ 334 | return 'linux'; 335 | } else if(/iphone|ipod|ipad|ios/.test(agent)){ 336 | return 'ios'; 337 | } 338 | }() 339 | ,ie: function(){ //ie版本 340 | return (!!win.ActiveXObject || "ActiveXObject" in win) ? ( 341 | (agent.match(/msie\s(\d+)/) || [])[1] || '11' //由于ie11并没有msie的标识 342 | ) : false; 343 | }() 344 | ,weixin: getVersion('micromessenger') //是否微信 345 | }; 346 | 347 | //任意的key 348 | if(key && !result[key]){ 349 | result[key] = getVersion(key); 350 | } 351 | 352 | //移动设备 353 | result.android = /android/.test(agent); 354 | result.ios = result.os === 'ios'; 355 | 356 | return result; 357 | }; 358 | 359 | //提示 360 | Lay.fn.hint = function(){ 361 | return { 362 | error: error 363 | } 364 | }; 365 | 366 | //遍历 367 | Lay.fn.each = function(obj, fn){ 368 | var that = this, key; 369 | if(typeof fn !== 'function') return that; 370 | obj = obj || []; 371 | if(obj.constructor === Object){ 372 | for(key in obj){ 373 | if(fn.call(obj[key], key, obj[key])) break; 374 | } 375 | } else { 376 | for(key = 0; key < obj.length; key++){ 377 | if(fn.call(obj[key], key, obj[key])) break; 378 | } 379 | } 380 | return that; 381 | }; 382 | 383 | //阻止事件冒泡 384 | Lay.fn.stope = function(e){ 385 | e = e || win.event; 386 | e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true; 387 | }; 388 | 389 | //自定义模块事件 390 | Lay.fn.onevent = function(modName, events, callback){ 391 | if(typeof modName !== 'string' 392 | || typeof callback !== 'function') return this; 393 | config.event[modName + '.' + events] = [callback]; 394 | 395 | //不再对多次事件监听做支持 396 | /* 397 | config.event[modName + '.' + events] 398 | ? config.event[modName + '.' + events].push(callback) 399 | : config.event[modName + '.' + events] = [callback]; 400 | */ 401 | 402 | return this; 403 | }; 404 | 405 | //执行自定义模块事件 406 | Lay.fn.event = function(modName, events, params){ 407 | var that = this, result = null, filter = events.match(/\(.*\)$/)||[]; //提取事件过滤器 408 | var set = (events = modName + '.'+ events).replace(filter, ''); //获取事件本体名 409 | var callback = function(_, item){ 410 | var res = item && item.call(that, params); 411 | res === false && result === null && (result = false); 412 | }; 413 | layui.each(config.event[set], callback); 414 | filter[0] && layui.each(config.event[events], callback); //执行过滤器中的事件 415 | return result; 416 | }; 417 | 418 | win.layui = new Lay(); 419 | 420 | }(window); 421 | 422 | -------------------------------------------------------------------------------- /backend/src/runtime/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /backend/src/vendor/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /golang/doc/01.md: -------------------------------------------------------------------------------- 1 | 2 | # 实践步骤 3 | 4 | 5 | ## 实现api接口 6 | 7 | 8 | ## 操作Mysql数据库 https://gorm.io/docs/index.html 9 | 10 | -------------------------------------------------------------------------------- /golang/src/L01_httpApi/HttpApi.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "io" 7 | "log" 8 | "net/http" 9 | ) 10 | 11 | //Ret ... 12 | type Ret struct { 13 | Code int `json:"code,int"` 14 | Data string `json:"data"` 15 | } 16 | 17 | func printRequest(w http.ResponseWriter, r *http.Request) { 18 | fmt.Println("r.Form=", r.Form) //这些信息是输出到服务器端的打印信息 , Get参数 19 | ret := new(Ret) 20 | 21 | ret.Code = 200 22 | ret.Data = "提交成功" 23 | w.Header().Set("Content-Type", "application/json; charset=utf-8") 24 | retJSON, _ := json.Marshal(ret) 25 | io.WriteString(w, string(retJSON)) 26 | } 27 | 28 | func sayMore(w http.ResponseWriter, r *http.Request) { 29 | r.ParseForm() //解析参数,默认是不会解析的 30 | printRequest(w, r) 31 | } 32 | 33 | func main() { 34 | http.HandleFunc("/api/room/order", sayMore) //设置访问的路径 35 | err := http.ListenAndServe(":8888", nil) //设置监听的端口 36 | if err != nil { 37 | log.Fatal("ListenAndServe: ", err) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /golang/src/L02_httpMysql/gormdemo.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | 7 | "gorm.io/driver/mysql" 8 | "gorm.io/gorm" 9 | ) 10 | 11 | //Building ... 12 | type Building struct { 13 | ID int `gorm:"primaryKey"` 14 | BuildingNo int `gorm:"column:buildingNo"` 15 | BuildingName string `gorm:"column:buildingName"` 16 | Status int `gorm:"column:status"` //0 新生不可见 17 | } 18 | 19 | func main() { 20 | dsn := "web2020:web2020@tcp(127.0.0.1:3306)/web2020?charset=utf8mb4&parseTime=True&loc=Local" 21 | 22 | buidling := 5 23 | count := 4 24 | 25 | //连接数据库 26 | 27 | db, err := gorm.Open(mysql.Open(dsn), &gorm.Config{}) 28 | if err != nil { 29 | fmt.Println(err) 30 | } 31 | fmt.Println("------------连接数据库成功-----------") 32 | isok := 0 33 | 34 | // 取出楼ID 35 | building := Building{} 36 | errBuilding := db.Table("web2020_dorm_building").Where(" status = 1").Where(" buildingNO = ?", buidling).First(&building).Error 37 | if errors.Is(errBuilding, gorm.ErrRecordNotFound) { 38 | fmt.Println("该楼不满足新生住宿申请条件") 39 | } else { 40 | isok = 1 41 | fmt.Println(building.BuildingName) 42 | } 43 | 44 | // 检查人员是否符合申请条件,必须都为新生,并且在名单内,性别与申请的一致,检查人员是否已经分配了宿舍 45 | 46 | if isok == 1 && count > 4 { 47 | fmt.Println("同住人数量参数错误") 48 | isok = 0 49 | } 50 | 51 | // 开始事务 52 | tx := db.Begin() 53 | 54 | if isok == 1 { 55 | // 如果找到 56 | // 1、写入宿舍数据 57 | // 将学号,姓名 写入到相应的宿舍床位中 58 | // (1)取出该房间内的床位个数,床位状态必须为可用,未分配, 59 | // (2)检查数量的否符合分配的数量 60 | // (3)分别写入相应的床位状态,已分配、学号、姓名,将学生的状态设置已经分配宿舍 61 | switch count { 62 | case 4: 63 | 64 | case 3: 65 | 66 | case 2: 67 | 68 | case 1: 69 | 70 | } 71 | 72 | // 2、将房间的空床数设置为相应的真实值 73 | // 将宿舍空床位数减去入住人数 74 | 75 | // 3、把申请宿舍订单写入订单表中,状态为成功 76 | 77 | } else { 78 | // 如果未找到 79 | 80 | } 81 | 82 | // 否则,提交事务 83 | tx.Commit() 84 | 85 | } 86 | -------------------------------------------------------------------------------- /sql/web2020.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.4.10 3 | -- http://www.phpmyadmin.net 4 | -- 5 | -- Host: 127.0.0.1 6 | -- Generation Time: 2020-11-24 13:56:14 7 | -- 服务器版本: 5.7.12 8 | -- PHP Version: 7.3.11 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET time_zone = "+00:00"; 12 | 13 | 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 17 | /*!40101 SET NAMES utf8mb4 */; 18 | 19 | -- 20 | -- Database: `web2020` 21 | -- 22 | 23 | -- -------------------------------------------------------- 24 | 25 | -- 26 | -- 表的结构 `web2020_admin` 27 | -- 28 | 29 | CREATE TABLE IF NOT EXISTS `web2020_admin` ( 30 | `id` mediumint(6) unsigned NOT NULL, 31 | `username` varchar(20) NOT NULL DEFAULT '', 32 | `password` varchar(32) NOT NULL DEFAULT '', 33 | `encrypt` varchar(6) NOT NULL DEFAULT '', 34 | `lastloginip` int(10) NOT NULL DEFAULT '0', 35 | `lastlogintime` int(10) unsigned NOT NULL DEFAULT '0', 36 | `email` varchar(40) NOT NULL DEFAULT '', 37 | `mobile` varchar(11) NOT NULL DEFAULT '', 38 | `realname` varchar(50) NOT NULL DEFAULT '', 39 | `openid` varchar(255) NOT NULL DEFAULT '', 40 | `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否有效(2:无效,1:有效)', 41 | `updatetime` int(10) NOT NULL DEFAULT '0' 42 | ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; 43 | 44 | -- 45 | -- 转存表中的数据 `web2020_admin` 46 | -- 47 | 48 | INSERT INTO `web2020_admin` (`id`, `username`, `password`, `encrypt`, `lastloginip`, `lastlogintime`, `email`, `mobile`, `realname`, `openid`, `status`, `updatetime`) VALUES 49 | (1, 'admin', '1b0f51062fbe0ec6693dc392a419f5cc', '', 0, 1606209790, '', '', '', '', 1, 1477623198), 50 | (2, 'admin2', '1b0f51062fbe0ec6693dc392a419f5cc', '', 0, 1606219481, '', '', '', '', 1, 1477624790), 51 | (3, 'houqin', '1b0f51062fbe0ec6693dc392a419f5cc', '', 0, 1606221290, '', '', '', '', 1, 1477625400), 52 | (4, 'sushe', '1b0f51062fbe0ec6693dc392a419f5cc', '', 0, 1606221359, '', '', '', '', 1, 1479969550); 53 | 54 | -- -------------------------------------------------------- 55 | 56 | -- 57 | -- 表的结构 `web2020_admin_group` 58 | -- 59 | 60 | CREATE TABLE IF NOT EXISTS `web2020_admin_group` ( 61 | `id` tinyint(3) unsigned NOT NULL, 62 | `name` varchar(50) NOT NULL, 63 | `description` text, 64 | `rules` varchar(500) NOT NULL DEFAULT '' COMMENT '用户组拥有的规则id,多个规则 , 隔开', 65 | `listorder` smallint(5) unsigned NOT NULL DEFAULT '0', 66 | `updatetime` int(11) DEFAULT NULL 67 | ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; 68 | 69 | -- 70 | -- 转存表中的数据 `web2020_admin_group` 71 | -- 72 | 73 | INSERT INTO `web2020_admin_group` (`id`, `name`, `description`, `rules`, `listorder`, `updatetime`) VALUES 74 | (1, '系统管理员', '管理系统基本配置', '', 0, 1477622552), 75 | (2, '后勤管理员', '管理宿舍楼可用状态等', '32,31,33,34,35', 0, 1476067479), 76 | (3, '宿舍管理员', '分配宿舍', '31,33,34,35', 0, 1479969527), 77 | (4, '校领导', '查询统计功能', '', 0, 1479969527); 78 | 79 | -- -------------------------------------------------------- 80 | 81 | -- 82 | -- 表的结构 `web2020_admin_group_access` 83 | -- 84 | 85 | CREATE TABLE IF NOT EXISTS `web2020_admin_group_access` ( 86 | `uid` int(10) unsigned NOT NULL COMMENT '用户id', 87 | `group_id` mediumint(8) unsigned NOT NULL COMMENT '用户组id' 88 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 89 | 90 | -- 91 | -- 转存表中的数据 `web2020_admin_group_access` 92 | -- 93 | 94 | INSERT INTO `web2020_admin_group_access` (`uid`, `group_id`) VALUES 95 | (2, 1), 96 | (3, 2), 97 | (3, 3), 98 | (4, 3); 99 | 100 | -- -------------------------------------------------------- 101 | 102 | -- 103 | -- 表的结构 `web2020_admin_log` 104 | -- 105 | 106 | CREATE TABLE IF NOT EXISTS `web2020_admin_log` ( 107 | `id` int(10) unsigned NOT NULL, 108 | `m` varchar(15) NOT NULL, 109 | `c` varchar(20) NOT NULL, 110 | `a` varchar(20) NOT NULL, 111 | `querystring` varchar(255) NOT NULL, 112 | `userid` mediumint(8) unsigned NOT NULL DEFAULT '0', 113 | `username` varchar(20) NOT NULL, 114 | `ip` int(10) NOT NULL, 115 | `time` int(11) NOT NULL DEFAULT '0' 116 | ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; 117 | 118 | -- 119 | -- 转存表中的数据 `web2020_admin_log` 120 | -- 121 | 122 | INSERT INTO `web2020_admin_log` (`id`, `m`, `c`, `a`, `querystring`, `userid`, `username`, `ip`, `time`) VALUES 123 | (1, 'admin', 'Room', 'checkin', '', 4, 'sushe', 0, 1606221593), 124 | (2, 'admin', 'Room', 'checkin', '', 4, 'sushe', 0, 1606221594), 125 | (3, 'admin', 'Room', 'checkin', '', 4, 'sushe', 0, 1606221595), 126 | (4, 'admin', 'Room', 'checkin', '', 4, 'sushe', 0, 1606221621), 127 | (5, 'admin', 'Room', 'checkout', '', 4, 'sushe', 0, 1606221622), 128 | (6, 'admin', 'Room', 'checkin', '', 4, 'sushe', 0, 1606221623), 129 | (7, 'admin', 'Room', 'checkin', '', 4, 'sushe', 0, 1606221627), 130 | (8, 'admin', 'Room', 'checkout', '', 4, 'sushe', 0, 1606221627), 131 | (9, 'admin', 'Room', 'checkout', '', 4, 'sushe', 0, 1606221635); 132 | 133 | -- -------------------------------------------------------- 134 | 135 | -- 136 | -- 表的结构 `web2020_dorm_bed` 137 | -- 138 | 139 | CREATE TABLE IF NOT EXISTS `web2020_dorm_bed` ( 140 | `id` int(11) NOT NULL, 141 | `room_id` int(11) NOT NULL COMMENT 'room表的id', 142 | `bedNo` varchar(100) NOT NULL COMMENT '床位编号', 143 | `is_distributed` int(11) NOT NULL COMMENT '是否已分配', 144 | `student_id` int(11) NOT NULL COMMENT '学生表student的id', 145 | `status` int(11) NOT NULL COMMENT '是否可用,1为可用,0为不可用', 146 | `comments` varchar(500) NOT NULL 147 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; 148 | 149 | -- 150 | -- 转存表中的数据 `web2020_dorm_bed` 151 | -- 152 | 153 | INSERT INTO `web2020_dorm_bed` (`id`, `room_id`, `bedNo`, `is_distributed`, `student_id`, `status`, `comments`) VALUES 154 | (1, 1, '1号', 1, 1, 1, ''); 155 | 156 | -- -------------------------------------------------------- 157 | 158 | -- 159 | -- 表的结构 `web2020_dorm_building` 160 | -- 161 | 162 | CREATE TABLE IF NOT EXISTS `web2020_dorm_building` ( 163 | `id` int(11) NOT NULL, 164 | `buildingNo` varchar(50) NOT NULL COMMENT '宿舍楼号', 165 | `buildingName` varchar(200) NOT NULL COMMENT '楼名称', 166 | `status` int(11) NOT NULL COMMENT '是否有效,0-不可见,1-有效' 167 | ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; 168 | 169 | -- 170 | -- 转存表中的数据 `web2020_dorm_building` 171 | -- 172 | 173 | INSERT INTO `web2020_dorm_building` (`id`, `buildingNo`, `buildingName`, `status`) VALUES 174 | (1, '5', '5号楼', 1), 175 | (2, '8', '8号楼', 1), 176 | (3, '9', '9号楼', 1), 177 | (4, '10', '10号楼', 0), 178 | (5, '13', '13号楼', 1), 179 | (6, '14', '14号楼', 1); 180 | 181 | -- -------------------------------------------------------- 182 | 183 | -- 184 | -- 表的结构 `web2020_dorm_room` 185 | -- 186 | 187 | CREATE TABLE IF NOT EXISTS `web2020_dorm_room` ( 188 | `id` int(11) NOT NULL, 189 | `building_id` int(11) NOT NULL COMMENT '楼id,对应building表的id主键', 190 | `gender` int(11) NOT NULL COMMENT '性别: 1男,0女', 191 | `roomName` varchar(100) NOT NULL COMMENT '宿舍名称', 192 | `floor` varchar(100) NOT NULL COMMENT '楼层/单元', 193 | `status` int(11) NOT NULL COMMENT '可分配状态,1可分配,0不可分配', 194 | `emptyBedNum` int(11) NOT NULL COMMENT '空床数', 195 | `totalBenNum` int(11) NOT NULL COMMENT '总床位数' 196 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; 197 | 198 | -- 199 | -- 转存表中的数据 `web2020_dorm_room` 200 | -- 201 | 202 | INSERT INTO `web2020_dorm_room` (`id`, `building_id`, `gender`, `roomName`, `floor`, `status`, `emptyBedNum`, `totalBenNum`) VALUES 203 | (1, 1, 1, '5101', '5号楼1楼', 1, 0, 4); 204 | 205 | -- -------------------------------------------------------- 206 | 207 | -- 208 | -- 表的结构 `web2020_menu` 209 | -- 210 | 211 | CREATE TABLE IF NOT EXISTS `web2020_menu` ( 212 | `id` smallint(6) unsigned NOT NULL, 213 | `name` char(40) NOT NULL DEFAULT '', 214 | `parentid` smallint(6) DEFAULT '0', 215 | `icon` varchar(20) NOT NULL DEFAULT '', 216 | `c` varchar(20) DEFAULT NULL, 217 | `a` varchar(20) DEFAULT NULL, 218 | `data` varchar(50) NOT NULL DEFAULT '', 219 | `tip` varchar(255) NOT NULL DEFAULT '' COMMENT '提示', 220 | `group` varchar(50) DEFAULT '' COMMENT '分组', 221 | `listorder` smallint(6) unsigned NOT NULL DEFAULT '999', 222 | `display` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否显示(1:显示,2:不显示)', 223 | `updatetime` int(11) DEFAULT NULL 224 | ) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8; 225 | 226 | -- 227 | -- 转存表中的数据 `web2020_menu` 228 | -- 229 | 230 | INSERT INTO `web2020_menu` (`id`, `name`, `parentid`, `icon`, `c`, `a`, `data`, `tip`, `group`, `listorder`, `display`, `updatetime`) VALUES 231 | (1, '管理设置(系统管理员)', 0, 'xe6a3', 'Admin', 'admin', '', '', '', 1, 1, 1476175413), 232 | (2, '用户管理', 1, '', 'Admin', 'index', '', '', '', 0, 1, 1476175413), 233 | (3, '详情', 2, '', 'Admin', 'info', '', '', '', 0, 2, 1476175413), 234 | (4, '添加', 2, '', 'Admin', 'add', '', '', '', 0, 2, 1476175413), 235 | (5, '修改', 2, '', 'Admin', 'edit', '', '', '', 0, 2, 1476175413), 236 | (6, '删除', 2, '', 'Admin', 'del', '', '', '', 0, 2, 1476175413), 237 | (7, '分组管理', 1, '', 'Group', 'index', '', '', '', 0, 1, 1476175413), 238 | (8, '详情', 7, '', 'Group', 'info', '', '', '', 0, 2, 1476175413), 239 | (9, '添加', 7, '', 'Group', 'add', '', '', '', 0, 2, 1476175413), 240 | (10, '修改', 7, '', 'Group', 'edit', '', '', '', 0, 2, 1476175413), 241 | (11, '删除', 7, '', 'Group', 'del', '', '', '', 0, 2, 1476175413), 242 | (12, '菜单管理', 18, '', 'Menu', 'index', '', '', '', 0, 1, 1476175413), 243 | (13, '查看', 12, '', 'Menu', 'info', '', '', '', 0, 2, 1476175413), 244 | (14, '添加', 12, '', 'Menu', 'add', '', '', '', 0, 2, 1476175413), 245 | (15, '修改', 12, '', 'Menu', 'edit', '', '', '', 0, 2, 1476175413), 246 | (16, '删除', 12, '', 'Menu', 'del', '', '', '', 0, 2, 1476175413), 247 | (18, '系统设置(系统管理员)', 0, 'xe6a3', 'Menu', 'index', '', '', '', 2, 1, 1476175413), 248 | (22, '权限设置', 2, '', 'Group', 'rule', '', '', '', 999, 2, 1476175413), 249 | (23, '个人设置', 0, 'xe761', 'Admin', 'public_edit_info', '', '', '', 4, 1, 1476175413), 250 | (27, '日志管理', 18, '', 'Log', 'index', '', '', '', 999, 1, 1476175413), 251 | (31, '系统首页', 0, 'xe761', 'Index', 'index', '', '', '', 0, 1, 1476175413), 252 | (32, '后勤管理(后勤管理员)', 0, 'xe6a3', 'Building', 'index', '', '', '', 2, 1, 1476175413), 253 | (33, '宿舍管理(宿舍管理员)', 0, 'xe6a3', 'Room', 'index', '', '', '', 2, 1, 1476175413), 254 | (34, '入住', 33, '', 'Room', 'checkin', '', '', '', 2, 1, 1476175413), 255 | (35, '退宿', 33, '', 'Room', 'checkout', '', '', '', 2, 1, 1476175413); 256 | 257 | -- -------------------------------------------------------- 258 | 259 | -- 260 | -- 表的结构 `web2020_student` 261 | -- 262 | 263 | CREATE TABLE IF NOT EXISTS `web2020_student` ( 264 | `id` int(11) NOT NULL, 265 | `studentNo` varchar(50) NOT NULL COMMENT ' 学号', 266 | `studentName` varchar(100) NOT NULL COMMENT '姓名', 267 | `gender` int(11) NOT NULL COMMENT '性别 0女,1男', 268 | `code` varchar(10) NOT NULL COMMENT '随机校验码', 269 | `year` int(11) NOT NULL COMMENT '入学年月', 270 | `roomstatus` int(11) NOT NULL DEFAULT '0' COMMENT '目前宿舍状态', 271 | `keystatus` int(11) NOT NULL DEFAULT '0' COMMENT '钥匙状态', 272 | `onlinestatus` int(11) NOT NULL DEFAULT '0' COMMENT '是否可以在线选,1可以,0不可以' 273 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; 274 | 275 | -- 276 | -- 转存表中的数据 `web2020_student` 277 | -- 278 | 279 | INSERT INTO `web2020_student` (`id`, `studentNo`, `studentName`, `gender`, `code`, `year`, `roomstatus`, `keystatus`, `onlinestatus`) VALUES 280 | (1, '1000000101', '张三', 1, '123456', 2020, 0, 0, 1); 281 | 282 | -- 283 | -- Indexes for dumped tables 284 | -- 285 | 286 | -- 287 | -- Indexes for table `web2020_admin` 288 | -- 289 | ALTER TABLE `web2020_admin` 290 | ADD PRIMARY KEY (`id`), 291 | ADD KEY `username` (`username`), 292 | ADD KEY `status` (`status`); 293 | 294 | -- 295 | -- Indexes for table `web2020_admin_group` 296 | -- 297 | ALTER TABLE `web2020_admin_group` 298 | ADD PRIMARY KEY (`id`), 299 | ADD KEY `listorder` (`listorder`); 300 | 301 | -- 302 | -- Indexes for table `web2020_admin_group_access` 303 | -- 304 | ALTER TABLE `web2020_admin_group_access` 305 | ADD UNIQUE KEY `uid_group_id` (`uid`,`group_id`), 306 | ADD KEY `uid` (`uid`), 307 | ADD KEY `group_id` (`group_id`); 308 | 309 | -- 310 | -- Indexes for table `web2020_admin_log` 311 | -- 312 | ALTER TABLE `web2020_admin_log` 313 | ADD PRIMARY KEY (`id`); 314 | 315 | -- 316 | -- Indexes for table `web2020_dorm_bed` 317 | -- 318 | ALTER TABLE `web2020_dorm_bed` 319 | ADD PRIMARY KEY (`id`); 320 | 321 | -- 322 | -- Indexes for table `web2020_dorm_building` 323 | -- 324 | ALTER TABLE `web2020_dorm_building` 325 | ADD PRIMARY KEY (`id`); 326 | 327 | -- 328 | -- Indexes for table `web2020_dorm_room` 329 | -- 330 | ALTER TABLE `web2020_dorm_room` 331 | ADD PRIMARY KEY (`id`); 332 | 333 | -- 334 | -- Indexes for table `web2020_menu` 335 | -- 336 | ALTER TABLE `web2020_menu` 337 | ADD PRIMARY KEY (`id`), 338 | ADD KEY `listorder` (`listorder`), 339 | ADD KEY `parentid` (`parentid`); 340 | 341 | -- 342 | -- Indexes for table `web2020_student` 343 | -- 344 | ALTER TABLE `web2020_student` 345 | ADD PRIMARY KEY (`id`); 346 | 347 | -- 348 | -- AUTO_INCREMENT for dumped tables 349 | -- 350 | 351 | -- 352 | -- AUTO_INCREMENT for table `web2020_admin` 353 | -- 354 | ALTER TABLE `web2020_admin` 355 | MODIFY `id` mediumint(6) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5; 356 | -- 357 | -- AUTO_INCREMENT for table `web2020_admin_group` 358 | -- 359 | ALTER TABLE `web2020_admin_group` 360 | MODIFY `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5; 361 | -- 362 | -- AUTO_INCREMENT for table `web2020_admin_log` 363 | -- 364 | ALTER TABLE `web2020_admin_log` 365 | MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=10; 366 | -- 367 | -- AUTO_INCREMENT for table `web2020_dorm_bed` 368 | -- 369 | ALTER TABLE `web2020_dorm_bed` 370 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; 371 | -- 372 | -- AUTO_INCREMENT for table `web2020_dorm_building` 373 | -- 374 | ALTER TABLE `web2020_dorm_building` 375 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7; 376 | -- 377 | -- AUTO_INCREMENT for table `web2020_dorm_room` 378 | -- 379 | ALTER TABLE `web2020_dorm_room` 380 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; 381 | -- 382 | -- AUTO_INCREMENT for table `web2020_menu` 383 | -- 384 | ALTER TABLE `web2020_menu` 385 | MODIFY `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=36; 386 | -- 387 | -- AUTO_INCREMENT for table `web2020_student` 388 | -- 389 | ALTER TABLE `web2020_student` 390 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; 391 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 392 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 393 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 394 | --------------------------------------------------------------------------------