sgq 2 年之前
當前提交
1e91b7f6db
共有 96 個文件被更改,包括 6229 次插入0 次删除
  1. 1 0
      .example.env
  2. 5 0
      .gitignore
  3. 42 0
      .travis.yml
  4. 32 0
      LICENSE.txt
  5. 56 0
      README.md
  6. 1 0
      app/.htaccess
  7. 22 0
      app/AppService.php
  8. 94 0
      app/BaseController.php
  9. 58 0
      app/ExceptionHandle.php
  10. 8 0
      app/Request.php
  11. 19 0
      app/admin/api/RoleApi.php
  12. 27 0
      app/admin/common/AdminController.php
  13. 26 0
      app/admin/controller/Index.php
  14. 82 0
      app/admin/controller/Role.php
  15. 16 0
      app/admin/model/Enterprise.php
  16. 18 0
      app/admin/model/Menu.php
  17. 17 0
      app/admin/model/Notice.php
  18. 16 0
      app/admin/model/Person.php
  19. 21 0
      app/admin/model/Role.php
  20. 17 0
      app/admin/model/SysRelation.php
  21. 16 0
      app/admin/model/User.php
  22. 5 0
      app/admin/view/index/index.html
  23. 130 0
      app/admin/view/layout/content.html
  24. 53 0
      app/admin/view/layout/layout.html
  25. 267 0
      app/admin/view/layout/right.html
  26. 69 0
      app/admin/view/layout/tab.html
  27. 84 0
      app/admin/view/layout/theme.html
  28. 73 0
      app/admin/view/role/add.html
  29. 74 0
      app/admin/view/role/assign.html
  30. 73 0
      app/admin/view/role/edit.html
  31. 63 0
      app/admin/view/role/index.html
  32. 38 0
      app/common.php
  33. 102 0
      app/common/api/MenuApi.php
  34. 133 0
      app/common/api/UserApi.php
  35. 13 0
      app/common/controller/Error.php
  36. 36 0
      app/common/controller/Notice.php
  37. 29 0
      app/common/middleware/Auth.php
  38. 26 0
      app/common/middleware/Log.php
  39. 43 0
      app/common/middleware/Permission.php
  40. 10 0
      app/common/view/layout/404.html
  41. 130 0
      app/common/view/layout/content.html
  42. 53 0
      app/common/view/layout/layout.html
  43. 268 0
      app/common/view/layout/right.html
  44. 69 0
      app/common/view/layout/tab.html
  45. 84 0
      app/common/view/layout/theme.html
  46. 77 0
      app/common/view/notice/index.html
  47. 26 0
      app/enterprise/common/EnterpriseController.php
  48. 25 0
      app/enterprise/controller/Index.php
  49. 18 0
      app/enterprise/controller/Talent.php
  50. 5 0
      app/enterprise/view/index/index.html
  51. 130 0
      app/enterprise/view/layout/content.html
  52. 75 0
      app/enterprise/view/layout/layout.html
  53. 267 0
      app/enterprise/view/layout/right.html
  54. 73 0
      app/enterprise/view/layout/tab.html
  55. 84 0
      app/enterprise/view/layout/theme.html
  56. 17 0
      app/event.php
  57. 84 0
      app/index/controller/Auth.php
  58. 256 0
      app/index/view/auth/login.html
  59. 12 0
      app/middleware.php
  60. 26 0
      app/person/common/PersonController.php
  61. 130 0
      app/person/view/layout/content.html
  62. 74 0
      app/person/view/layout/layout.html
  63. 267 0
      app/person/view/layout/right.html
  64. 78 0
      app/person/view/layout/tab.html
  65. 84 0
      app/person/view/layout/theme.html
  66. 9 0
      app/provider.php
  67. 9 0
      app/service.php
  68. 50 0
      composer.json
  69. 1268 0
      composer.lock
  70. 30 0
      config/app.php
  71. 29 0
      config/cache.php
  72. 9 0
      config/console.php
  73. 20 0
      config/cookie.php
  74. 63 0
      config/database.php
  75. 24 0
      config/filesystem.php
  76. 27 0
      config/lang.php
  77. 45 0
      config/log.php
  78. 8 0
      config/middleware.php
  79. 45 0
      config/route.php
  80. 19 0
      config/session.php
  81. 10 0
      config/trace.php
  82. 25 0
      config/view.php
  83. 2 0
      extend/.gitignore
  84. 109 0
      jjrcuniflat.sql
  85. 7 0
      nbproject/project.properties
  86. 9 0
      nbproject/project.xml
  87. 8 0
      public/.htaccess
  88. 二進制
      public/favicon.ico
  89. 24 0
      public/index.php
  90. 2 0
      public/robots.txt
  91. 19 0
      public/router.php
  92. 2 0
      public/static/.gitignore
  93. 17 0
      route/app.php
  94. 2 0
      runtime/.gitignore
  95. 10 0
      think
  96. 1 0
      view/README.md

+ 1 - 0
.example.env

@@ -0,0 +1 @@
+APP_DEBUG = true

[APP]
DEFAULT_TIMEZONE = Asia/Shanghai

[DATABASE]
TYPE = mysql
HOSTNAME = 127.0.0.1
DATABASE = test
USERNAME = username
PASSWORD = password
HOSTPORT = 3306
CHARSET = utf8
DEBUG = true

[LANG]
default_lang = zh-cn

+ 5 - 0
.gitignore

@@ -0,0 +1,5 @@
+/.idea
+/.vscode
+/vendor
+*.log
+.env

+ 42 - 0
.travis.yml

@@ -0,0 +1,42 @@
+sudo: false
+
+language: php
+
+branches:
+  only:
+    - stable
+
+cache:
+  directories:
+    - $HOME/.composer/cache
+
+before_install:
+  - composer self-update
+
+install:
+  - composer install --no-dev --no-interaction --ignore-platform-reqs
+  - zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Core.zip .
+  - composer require --update-no-dev --no-interaction "topthink/think-image:^1.0"
+  - composer require --update-no-dev --no-interaction "topthink/think-migration:^1.0"
+  - composer require --update-no-dev --no-interaction "topthink/think-captcha:^1.0"
+  - composer require --update-no-dev --no-interaction "topthink/think-mongo:^1.0"
+  - composer require --update-no-dev --no-interaction "topthink/think-worker:^1.0"
+  - composer require --update-no-dev --no-interaction "topthink/think-helper:^1.0"
+  - composer require --update-no-dev --no-interaction "topthink/think-queue:^1.0"
+  - composer require --update-no-dev --no-interaction "topthink/think-angular:^1.0"
+  - composer require --dev --update-no-dev --no-interaction "topthink/think-testing:^1.0"
+  - zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Full.zip .
+
+script:
+  - php think unit
+
+deploy:
+  provider: releases
+  api_key:
+    secure: TSF6bnl2JYN72UQOORAJYL+CqIryP2gHVKt6grfveQ7d9rleAEoxlq6PWxbvTI4jZ5nrPpUcBUpWIJHNgVcs+bzLFtyh5THaLqm39uCgBbrW7M8rI26L8sBh/6nsdtGgdeQrO/cLu31QoTzbwuz1WfAVoCdCkOSZeXyT/CclH99qV6RYyQYqaD2wpRjrhA5O4fSsEkiPVuk0GaOogFlrQHx+C+lHnf6pa1KxEoN1A0UxxVfGX6K4y5g4WQDO5zT4bLeubkWOXK0G51XSvACDOZVIyLdjApaOFTwamPcD3S1tfvuxRWWvsCD5ljFvb2kSmx5BIBNwN80MzuBmrGIC27XLGOxyMerwKxB6DskNUO9PflKHDPI61DRq0FTy1fv70SFMSiAtUv9aJRT41NQh9iJJ0vC8dl+xcxrWIjU1GG6+l/ZcRqVx9V1VuGQsLKndGhja7SQ+X1slHl76fRq223sMOql7MFCd0vvvxVQ2V39CcFKao/LB1aPH3VhODDEyxwx6aXoTznvC/QPepgWsHOWQzKj9ftsgDbsNiyFlXL4cu8DWUty6rQy8zT2b4O8b1xjcwSUCsy+auEjBamzQkMJFNlZAIUrukL/NbUhQU37TAbwsFyz7X0E/u/VMle/nBCNAzgkMwAUjiHM6FqrKKBRWFbPrSIixjfjkCnrMEPw=
+  file:
+    - ThinkPHP_Core.zip
+    - ThinkPHP_Full.zip
+  skip_cleanup: true
+  on:
+    tags: true

+ 32 - 0
LICENSE.txt

@@ -0,0 +1,32 @@
+
+ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
+版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn)
+All rights reserved。
+ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
+
+Apache Licence是著名的非盈利开源组织Apache采用的协议。
+该协议和BSD类似,鼓励代码共享和尊重原作者的著作权,
+允许代码修改,再作为开源或商业软件发布。需要满足
+的条件: 
+1. 需要给代码的用户一份Apache Licence ;
+2. 如果你修改了代码,需要在被修改的文件中说明;
+3. 在延伸的代码中(修改和有源代码衍生的代码中)需要
+带有原来代码中的协议,商标,专利声明和其他原来作者规
+定需要包含的说明;
+4. 如果再发布的产品中包含一个Notice文件,则在Notice文
+件中需要带有本协议内容。你可以在Notice中增加自己的
+许可,但不可以表现为对Apache Licence构成更改。 
+具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.

+ 56 - 0
README.md

@@ -0,0 +1,56 @@
+ThinkPHP 6.0
+===============
+
+> 运行环境要求PHP7.2+,兼容PHP8.1
+
+[官方应用服务市场](https://market.topthink.com) | [`ThinkAPI`——官方统一API服务](https://docs.topthink.com/think-api)
+
+ThinkPHPV6.0版本由[亿速云](https://www.yisu.com/)独家赞助发布。
+
+## 主要新特性
+
+* 采用`PHP7`强类型(严格模式)
+* 支持更多的`PSR`规范
+* 原生多应用支持
+* 更强大和易用的查询
+* 全新的事件系统
+* 模型事件和数据库事件统一纳入事件系统
+* 模板引擎分离出核心
+* 内部功能中间件化
+* SESSION/Cookie机制改进
+* 对Swoole以及协程支持改进
+* 对IDE更加友好
+* 统一和精简大量用法
+
+## 安装
+
+~~~
+composer create-project topthink/think tp 6.0.*
+~~~
+
+如果需要更新框架使用
+~~~
+composer update topthink/framework
+~~~
+
+## 文档
+
+[完全开发手册](https://www.kancloud.cn/manual/thinkphp6_0/content)
+
+## 参与开发
+
+请参阅 [ThinkPHP 核心框架包](https://github.com/top-think/framework)。
+
+## 版权信息
+
+ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
+
+本项目包含的第三方源码和二进制文件之版权信息另行标注。
+
+版权所有Copyright © 2006-2021 by ThinkPHP (http://thinkphp.cn)
+
+All rights reserved。
+
+ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
+
+更多细节参阅 [LICENSE.txt](LICENSE.txt)

+ 1 - 0
app/.htaccess

@@ -0,0 +1 @@
+deny from all

+ 22 - 0
app/AppService.php

@@ -0,0 +1,22 @@
+<?php
+declare (strict_types = 1);
+
+namespace app;
+
+use think\Service;
+
+/**
+ * 应用服务类
+ */
+class AppService extends Service
+{
+    public function register()
+    {
+        // 服务注册
+    }
+
+    public function boot()
+    {
+        // 服务启动
+    }
+}

+ 94 - 0
app/BaseController.php

@@ -0,0 +1,94 @@
+<?php
+declare (strict_types = 1);
+
+namespace app;
+
+use think\App;
+use think\exception\ValidateException;
+use think\Validate;
+
+/**
+ * 控制器基础类
+ */
+abstract class BaseController
+{
+    /**
+     * Request实例
+     * @var \think\Request
+     */
+    protected $request;
+
+    /**
+     * 应用实例
+     * @var \think\App
+     */
+    protected $app;
+
+    /**
+     * 是否批量验证
+     * @var bool
+     */
+    protected $batchValidate = false;
+
+    /**
+     * 控制器中间件
+     * @var array
+     */
+    protected $middleware = [];
+
+    /**
+     * 构造方法
+     * @access public
+     * @param  App  $app  应用对象
+     */
+    public function __construct(App $app)
+    {
+        $this->app     = $app;
+        $this->request = $this->app->request;
+
+        // 控制器初始化
+        $this->initialize();
+    }
+
+    // 初始化
+    protected function initialize()
+    {}
+
+    /**
+     * 验证数据
+     * @access protected
+     * @param  array        $data     数据
+     * @param  string|array $validate 验证器名或者验证规则数组
+     * @param  array        $message  提示信息
+     * @param  bool         $batch    是否批量验证
+     * @return array|string|true
+     * @throws ValidateException
+     */
+    protected function validate(array $data, $validate, array $message = [], bool $batch = false)
+    {
+        if (is_array($validate)) {
+            $v = new Validate();
+            $v->rule($validate);
+        } else {
+            if (strpos($validate, '.')) {
+                // 支持场景
+                [$validate, $scene] = explode('.', $validate);
+            }
+            $class = false !== strpos($validate, '\\') ? $validate : $this->app->parseClass('validate', $validate);
+            $v     = new $class();
+            if (!empty($scene)) {
+                $v->scene($scene);
+            }
+        }
+
+        $v->message($message);
+
+        // 是否批量验证
+        if ($batch || $this->batchValidate) {
+            $v->batch(true);
+        }
+
+        return $v->failException(true)->check($data);
+    }
+
+}

+ 58 - 0
app/ExceptionHandle.php

@@ -0,0 +1,58 @@
+<?php
+namespace app;
+
+use think\db\exception\DataNotFoundException;
+use think\db\exception\ModelNotFoundException;
+use think\exception\Handle;
+use think\exception\HttpException;
+use think\exception\HttpResponseException;
+use think\exception\ValidateException;
+use think\Response;
+use Throwable;
+
+/**
+ * 应用异常处理类
+ */
+class ExceptionHandle extends Handle
+{
+    /**
+     * 不需要记录信息(日志)的异常类列表
+     * @var array
+     */
+    protected $ignoreReport = [
+        HttpException::class,
+        HttpResponseException::class,
+        ModelNotFoundException::class,
+        DataNotFoundException::class,
+        ValidateException::class,
+    ];
+
+    /**
+     * 记录异常信息(包括日志或者其它方式记录)
+     *
+     * @access public
+     * @param  Throwable $exception
+     * @return void
+     */
+    public function report(Throwable $exception): void
+    {
+        // 使用内置的方式记录异常日志
+        parent::report($exception);
+    }
+
+    /**
+     * Render an exception into an HTTP response.
+     *
+     * @access public
+     * @param \think\Request   $request
+     * @param Throwable $e
+     * @return Response
+     */
+    public function render($request, Throwable $e): Response
+    {
+        // 添加自定义异常处理机制
+
+        // 其他错误交给系统处理
+        return parent::render($request, $e);
+    }
+}

+ 8 - 0
app/Request.php

@@ -0,0 +1,8 @@
+<?php
+namespace app;
+
+// 应用请求对象类
+class Request extends \think\Request
+{
+
+}

+ 19 - 0
app/admin/api/RoleApi.php

@@ -0,0 +1,19 @@
+<?php
+
+namespace app\admin\api;
+
+use app\admin\model\Role;
+
+/**
+ * Description of RoleApi
+ *
+ * @author sgq
+ */
+class RoleApi {
+
+    public static function getList($where = "") {
+        $list = Role::where($where)->select()->toArray();
+        return $list;
+    }
+
+}

+ 27 - 0
app/admin/common/AdminController.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace app\admin\common;
+
+use app\BaseController;
+use app\common\middleware\Auth;
+use app\common\middleware\Permission;
+
+/**
+ * Description of AdminController
+ *
+ * @author sgq
+ */
+class AdminController extends BaseController {
+
+    protected $middleware = [Auth::class, Permission::class];
+    protected $user;
+
+    //put your code here
+    public function __construct(\think\App $app) {
+        parent::__construct($app);
+        $this->user = session("user");
+        if ($this->user["usertype"] != 1)
+            session("user", null);
+    }
+
+}

+ 26 - 0
app/admin/controller/Index.php

@@ -0,0 +1,26 @@
+<?php
+
+namespace app\admin\controller;
+
+use app\admin\common\AdminController;
+
+/**
+ * Description of Login
+ *
+ * @author sgq
+ */
+class Index extends AdminController {
+
+    public function index() {
+        $vars["user"] = [
+            "name" => $this->user["name"],
+            "rolename" => $this->user["rolename"],
+            "avatar" => $this->user["avatar"],
+            "sex" => $this->user["sex"]
+        ];
+        $menus = \app\common\api\MenuApi::getMenuListByRoleid($this->user["roleid"]);
+        $vars["menus"] = $menus;
+        return view("", $vars);
+    }
+
+}

+ 82 - 0
app/admin/controller/Role.php

@@ -0,0 +1,82 @@
+<?php
+
+namespace app\admin\controller;
+
+use app\admin\common\AdminController;
+use app\admin\api\RoleApi;
+
+/**
+ * Description of Role
+ *
+ * @author sgq
+ */
+class Role extends AdminController {
+
+    /**
+     * @auth {{/role}}
+     * @return type
+     */
+    public function index() {
+        return view();
+    }
+
+    /**
+     * @auth {{/role/list}}
+     * @return type
+     */
+    public function list() {
+        $name = trim($this->request->param("roleName"));
+        $where = [];
+        if ($name) {
+            $where = [["name", "like", "%" . $name . "%"]];
+        }
+        $list = RoleApi::getList($where);
+        return json($list);
+    }
+
+    /**
+     * @auth {{/role/add}}
+     * @return type
+     */
+    public function add() {
+        return view();
+    }
+
+    /**
+     * @auth {{/role/edit}}
+     * @return type
+     */
+    public function edit() {
+        return view();
+    }
+
+    /**
+     * @auth {{/role/role_edit}}
+     */
+    public function role_edit() {
+        
+    }
+
+    /**
+     * @auth {{/role/role_assign}}
+     * @return type
+     */
+    public function assign() {
+        
+    }
+
+    /**
+     * @auth {{/role/setAuthority}}
+     */
+    public function set_authority() {
+        
+    }
+
+    /**
+     * @auth {{/role/remove}}
+     */
+    public function remove() {
+        
+    }
+
+}

+ 16 - 0
app/admin/model/Enterprise.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace app\admin\model;
+
+use think\Model;
+
+/**
+ * Description of Enterprise
+ *
+ * @author sgq
+ */
+class Enterprise extends Model {
+
+    protected $table = "un_enterprise";
+
+}

+ 18 - 0
app/admin/model/Menu.php

@@ -0,0 +1,18 @@
+<?php
+
+/**
+ * Description of Menu
+ *
+ * @author sgq
+ */
+
+namespace app\admin\model;
+
+use think\Model;
+
+class Menu extends Model {
+
+    protected $table = "sys_menu";
+    
+    
+}

+ 17 - 0
app/admin/model/Notice.php

@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * Description of Notice
+ *
+ * @author sgq
+ */
+
+namespace app\admin\model;
+
+use think\Model;
+
+class Notice extends Model {
+
+    protected $table = "sys_notice";
+
+}

+ 16 - 0
app/admin/model/Person.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace app\admin\model;
+
+use think\Model;
+
+/**
+ * Description of Person
+ *
+ * @author sgq
+ */
+class Person extends Model {
+
+    protected $table = "un_person";
+
+}

+ 21 - 0
app/admin/model/Role.php

@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * Description of Role
+ *
+ * @author sgq
+ */
+
+namespace app\admin\model;
+
+use think\Model;
+
+class Role extends Model {
+
+    protected $table = "sys_role";
+
+    public function sysRelation() {
+        return $this->hasMany(SysRelation::class, "roleid", "id");
+    }
+
+}

+ 17 - 0
app/admin/model/SysRelation.php

@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * Description of SysRelation
+ *
+ * @author sgq
+ */
+
+namespace app\admin\model;
+
+use think\Model;
+
+class SysRelation extends Model {
+
+    protected $table = "sys_relation";
+
+}

+ 16 - 0
app/admin/model/User.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace app\admin\model;
+
+use think\Model;
+
+/**
+ * Description of User
+ *
+ * @author sgq
+ */
+class User extends Model {
+
+    protected $table = "sys_user";
+
+}

+ 5 - 0
app/admin/view/index/index.html

@@ -0,0 +1,5 @@
+{extend name="layout/layout" /}
+{block name="tab"}{include file="layout/tab" /}{/block}
+{block name="right"}{include file="layout/right" /}{/block}
+{block name="theme"}{include file="layout/theme" /}{/block}
+

+ 130 - 0
app/admin/view/layout/content.html

@@ -0,0 +1,130 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta name="renderer" content="webkit"/><!-- 让360浏览器默认选择webkit内核 -->
+    <meta http-equiv="Pragma" content="no-cache">
+    <meta http-equiv="Cache-Control" content="no-cache">
+    <meta http-equiv="Expires" CONTENT="0">
+    <!-- 全局css -->
+    <link rel="shortcut icon" href="/static/favicon.ico">
+    <link href="/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
+    <link href="/static/css/font-awesome.css?v=4.4.0" rel="stylesheet">
+    <link href="/static/css/plugins/chosen/chosen.css" rel="stylesheet">
+    <link href="/static/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
+    <link href="/static/css/plugins/validate/bootstrapValidator.min.css" rel="stylesheet">
+    <link href="/static/css/style.css?v=4.1.0" rel="stylesheet">
+    <link href="/static/css/_fstyle.css" rel="stylesheet">
+    <link href="/static/css/plugins/iCheck/custom.css" rel="stylesheet">
+    <link href="/static/css/plugins/webuploader/webuploader.css" rel="stylesheet">
+    <link href="/static/css/plugins/ztree/zTreeStyle.css" rel="stylesheet">
+    <link href="/static/css/plugins/bootstrap-treetable/bootstrap-treetable.css" rel="stylesheet"/>
+    <link href="/static/js/plugins/webuiPopover/dist/jquery.webui-popover.min.css" rel="stylesheet">
+    <link href="/static/js/plugins/viewer/viewer.min.css" rel="stylesheet">
+    <link href="/static/css/lockScreen.css" rel="stylesheet">
+    <link href="/static/css/plugins/toastr/toastr.css" rel="stylesheet">
+    <link href="/static/css/plugins/bootstrap-table/bootstrap-table-jumpto.css" rel="stylesheet">
+<!--    &lt;!&ndash; kendo ui &ndash;&gt;-->
+<!--    <link href="/static/js/plugins/kendoui/styles/kendo.common.min.css" rel="stylesheet">-->
+<!--    <link href="/static/js/plugins/kendoui/styles/kendo.bootstrap.min.css" rel="stylesheet">-->
+
+    <!-- 全局js -->
+    <script src="/static/js/jquery.min.js?v=2.1.4"></script>
+    <script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
+    <script src="/static/js/plugins/webuiPopover/dist/jquery.webui-popover.min.js"></script>
+    <script src="/static/js/plugins/ztree/jquery.ztree.all.min.js"></script>
+    <script src="/static/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
+    <script src="/static/js/plugins/validate/bootstrapValidator.min.js"></script>
+    <script src="/static/js/plugins/validate/zh_CN.js"></script>
+    <script src="/static/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
+    <script src="/static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
+    <script src="/static/js/plugins/bootstrap-treetable/bootstrap-treetable.js"></script>
+    <script src="/static/js/plugins/layer/layer.js"></script>
+    <script src="/static/js/plugins/chosen/chosen.jquery.js"></script>
+    <script src="/static/js/plugins/iCheck/icheck.min.js"></script>
+    <script src="/static/js/plugins/laydate/laydate.js"></script>
+    <script src="/static/js/plugins/webuploader/webuploader.min.js"></script>
+    <script src="/static/js/common/ajax-object.js"></script>
+    <script src="/static/js/common/bootstrap-table-object.js"></script>
+    <script src="/static/js/common/tree-table-object.js"></script>
+    <script src="/static/js/common/web-upload-object.js"></script>
+    <script src="/static/js/common/ztree-object.js"></script>
+    <script type="text/javascript">
+        document.write('<script src="/static/js/common/Feng.js?v=' + (new Date()).getTime() + '"><\/script>');
+        document.write('<script src="/static/modular/common/config.js?v=' + (new Date()).getTime() + '"><\/script>');
+        document.write('<script src="/static/modular/common/upload.js?v=' + (new Date()).getTime() + '"><\/script>');
+        // document.write('<script src="/static/js/plugins/kendoui/js/kendo.all.min.js?v=' + (new Date()).getTime() + '"><\/script>');
+        // document.write('<script src="/static/js/plugins/kendoui/js/messages/kendo.messages.zh-CN.min.js?v=' + (new Date()).getTime() + '"><\/script>');
+        // document.write('<script src="/static/js/common/kendo-table-object.js?v=' + (new Date()).getTime() + '"><\/script>');
+    </script>
+    <script src="/static/js/plugins/viewer/viewer.min.js"></script>
+    <script src="/static/js/plugins/viewer/viewer-jquery.min.js"></script>
+    <script src="/static/js/bootstrap-treeview.js"></script>
+    <script src="/static/js/plugins/toastr/toastr.js"></script>
+
+    <script src="/static/js/plugins/resizable/bootstrap-table-resizable.min.js"></script>
+    <script src="/static/js/plugins/resizable/jquery.resizableColumns.min.js"></script>
+    <script src="/static/js/plugins/bootstrap-pageation/bootstrap-paginator.js"></script>
+
+    <script src="/static/js/plugins/bootstrap-table/bootstrap-table-jumpto.js"></script>
+
+
+    <style type="text/css">
+        table {
+            width: 100px;
+            table-layout: fixed; /* 只有定义了表格的布局算法为fixed,下面td的定义才能起作用。 */
+        }
+
+        td {
+            width: 100%;
+            word-break: keep-all; /* 不换行 */
+            white-space: nowrap; /* 不换行 */
+            overflow: hidden; /* 内容超出宽度时隐藏超出部分的内容 */
+            text-overflow: ellipsis; /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用*/
+        }
+
+        .layui-layer-btn .layui-layer-btn1 {
+            border-color: #009688;
+            background-color: #009688;
+            color: #fff;
+        }
+
+        #fileTable td {
+            word-break: break-word;
+            white-space: inherit;
+        }
+
+        /*.table-hover > tbody > tr:hover {*/
+        /*    background-color: #b1ffb2 !important;      !*修改表格悬浮样式*!*/
+        /*}*/
+
+        .fixed-table-container tbody .selected td {
+            background-color: #b1ffb2 !important;       /*修改表格选中样式*/
+        }
+
+        /*网页统一边灰白色*/
+        /*body{*/
+        /*    filter:grayscale(100%)!important;*/
+        /*    -webkit-filter:grayscale(100%)!important;*/
+        /*    -moz-filter:grayscale(100%)!important;*/
+        /*    -ms-filter:grayscale(100%)!important;*/
+        /*    -o-filter:grayscale(100%)!important;*/
+        /*    filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)!important;*/
+        /*    -webkit-filter:grayscale(1)!important;*/
+        /*}*/
+    </style>
+
+    <script type="text/javascript">
+        Feng.addCtx("");
+        Feng.sessionTimeoutRegistry();
+    </script>
+</head>
+
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+    {block name="content"}{/block}
+</div>
+<script src="/static/js/content.js?v=1.0.0"></script>
+</body>
+</html>

+ 53 - 0
app/admin/view/layout/layout.html

@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="utf-8">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        <meta name="renderer" content="webkit">
+        <title>晋江市人才综合服务平台</title>
+        <link rel="shortcut icon" href="/static/favicon.ico">
+        <link href="/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
+        <link href="/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
+        <link href="/static/css/style.css?v=4.1.0" rel="stylesheet">
+        <link href="/static/js/plugins/viewer/viewer.min.css" rel="stylesheet">
+    </head>
+
+    <body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
+        <div id="wrapper">
+            <!--左侧导航开始-->            
+            {block name="tab"}{/block}
+            <!--左侧导航结束-->
+
+            <!--右侧部分开始-->
+            {block name="right"}{/block}
+            <!--右侧部分结束-->
+
+            <!--右侧边栏开始-->      
+            {block name="theme"}{/block}
+            <!--右侧边栏结束-->
+
+        </div>
+
+        <!-- 全局js -->
+        <script src="/static/js/jquery.min.js?v=2.1.4"></script>
+        <script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
+        <script src="/static/js/plugins/metisMenu/jquery.metisMenu.js"></script>
+        <script src="/static/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
+        <script src="/static/js/plugins/layer/layer.js"></script>
+
+        <!-- 自定义js -->
+        <script src="/static/js/hplus.js?v=4.1.0"></script>
+        <script type="text/javascript" src="/static/js/contabs.js"></script>
+
+        <!-- 第三方插件 -->
+        <script src="/static/js/plugins/pace/pace.min.js"></script>
+        <!-- 放大查看图片 -->
+        <script type="text/javascript" src="/static/js/plugins/viewer/viewer.min.js"></script>
+        <script type="text/javascript" src="/static/js/plugins/viewer/viewer-jquery.min.js"></script>
+
+        <div id="showBigPic" style="margin: 0px; padding: 0px;"></div>
+
+    </body>
+
+</html>
+

+ 267 - 0
app/admin/view/layout/right.html

@@ -0,0 +1,267 @@
+<input type="hidden" id="avatar"
+       {if condition="!$user['avatar']"}
+       value="/static/img/girl.gif"
+       {else/}
+       value="{$user.avatar}"
+       {/if}
+    />
+<input type="hidden" id="name" value="{$user.name}">
+<input type="hidden" id="roleName" value="{$user.rolename}">
+<div id="page-wrapper" class="gray-bg dashbard-1">
+    <div class="row border-bottom">
+        <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
+            <ul class="nav navbar-top-links navbar-right">
+                <!--
+                <li class="dropdown">
+                    <a class="dropdown-toggle count-info" data-toggle="dropdown" href="#" onmouseover="$('.dropdown-toggle').dropdown()">
+                        <i class="fa fa-bell"></i>
+                        @if(dbsx>0){
+                            <span class="label label-danger">${dbsx}</span>
+                        @}
+                    </a>
+                    @if(tool.isEmpty(tasks)){
+                    @}else{
+                        <ul class="dropdown-menu dropdown-alerts" style="height: 300px;overflow: auto">
+                            @for(item in tasks){
+                                <li>
+                                    <a href="javascript:void(0)">
+                                        <div>
+                                            <i class="fa fa-envelope fa-fw"></i> ${item.description}
+                                            <span class="pull-right text-muted small">${item.createTime}</span>
+                                        </div>
+                                    </a>
+                                </li>
+                                <li class="divider"></li>
+                            @}
+                        </ul>
+                    @}
+                </li>-->
+                <li class="dropdown hidden-xs">
+                    <a class="dropdown-toggle" aria-expanded="false" style="font-weight: 900" onclick="javascript:lockScreen();">
+                        <i class="fa fa-lock"></i> 锁屏
+                    </a>
+                </li>
+                <li class="dropdown hidden-xs">
+                    <a class="right-sidebar-toggle" aria-expanded="false">
+                        <i class="fa fa-tasks"></i> 主题
+                    </a>
+                </li>
+            </ul>
+        </nav>
+    </div>
+    <div class="row content-tabs">
+        <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
+        </button>
+        <nav class="page-tabs J_menuTabs">
+            <div class="page-tabs-content">
+                <a href="javascript:;" class="active J_menuTab" data-id="/common/notice">公告栏</a>
+            </div>
+        </nav>
+        <div class="btn-group roll-nav roll-right">
+            <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span>
+            </button>
+            <ul role="menu" class="dropdown-menu dropdown-menu-right">
+                <li class="J_tabShowActive"><a>定位当前选项卡</a>
+                </li>
+                <li class="divider"></li>
+                <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
+                </li>
+                <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
+                </li>
+            </ul>
+        </div>
+        <a href="/index/auth/logout" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a>
+    </div>
+
+    <div class="row J_mainContent" id="content-main">
+        <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="/common/notice" frameborder="0" data-id="/common/notice" seamless></iframe>
+    </div>
+</div>
+<link href="/static/css/lockScreen.css" rel="stylesheet">
+<script src="/static/js/jquery.min.js?v=2.1.4"></script>
+<script src="/static/js/common/Feng.js"></script>
+<style type="text/css">
+    .dbsx{
+        line-height: 12px;
+        padding: 1px 3px;
+        position: absolute;
+        top: 8px;
+        background-color: #1ab394;
+        color: #FFFFFF;
+        font-size: 3px;
+    }
+    .dropdown-menu .divider {
+        height: 1px;
+        overflow: hidden;
+        background-color: #333;
+    }
+</style>
+<script type="text/javascript">
+    var task = null;
+    var time = 10;
+    window.onload=function (){
+        var locked = sessionStorage.getItem('locked');
+        if(locked)lockScreen();
+        // setTimeLockScreen();
+        initTime(time);
+    }
+
+    // 锁屏
+    function lockScreen() {
+        document.onkeydown = function () {
+            var e = window.event || arguments[0];
+            // 屏蔽 F12
+            if (e.keyCode === 123) {
+                return false;
+                // 屏蔽 Ctrl+Shift+I
+            } else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode === 73)) {
+                return false;
+                // 屏蔽 Shift+F10
+            } else if ((e.shiftKey) && (e.keyCode === 121)) {
+                return false;
+            }
+        };
+        // 屏蔽右键单击
+        document.oncontextmenu = function () {
+            return false;
+        };
+        $('#locking').remove();
+        if ($("#avatar").val()) {
+            $('body').append('<div id="locking"><figure onclick="lockInput(this);"><img src="' +$("#avatar").val() + '" ></figure><h3>' + $("#name").val() + '</h3></div>');
+        }
+        setTimeout(function () {
+            $('#locking').addClass('lock-ani');
+        }, 200);
+        sessionStorage.setItem('locked', true);
+    }
+
+    // 锁屏输入
+    function lockInput(dom) {
+        $(dom).find('img').unwrap();
+        $('#locking').append('<div class="input-group">' +
+            '                   <input class="form-control form-control-lg" id="lockPassword" style="color: #333;" type="password" placeholder="请输入登录密码解锁">' +
+            '                   <div class="input-group-addon" style="background-color: #ccc;border: 1px solid #ccc;" onclick="unlockScreen();">' +
+            '                       <span class="input-group-text">' +
+            '                           <i class="fa fa-key " style="color: #555;font-weight: 900;"></i>' +
+            '                       </span>' +
+            '                   </div>' +
+            '                  </div>');
+        setTimeout(function () {
+            $('#locking .input-group').addClass('lock-input-ani');
+        }, 200);
+        $('#locking input').focus();
+    }
+
+    // 解锁
+    function unlockScreen() {
+        var password = $('#lockPassword').val();
+        var url = "/index/auth/valid_password";
+        $.ajax({
+            type: "post",
+            url: url,
+            dataType: "json",
+            async: false,
+            data: {"password":password},
+            contentType : 'application/x-www-form-urlencoded ',
+            success: function(data) {
+                if(data.code==200){
+                    $('#locking').fadeOut(300, function () {
+                        $('#locking').remove();
+                    });
+                    sessionStorage.removeItem('locked');
+                    document.onkeydown = function () {
+                        var e = window.event || arguments[0];
+                        // 屏蔽 F12
+                        if (e.keyCode === 123) {
+                            return true;
+                            // 屏蔽 Ctrl+Shift+I
+                        } else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode === 73)) {
+                            return true;
+                            // 屏蔽 Shift+F10
+                        } else if ((e.shiftKey) && (e.keyCode === 121)) {
+                            return true;
+                        }
+                    };
+                    // 屏蔽右键单击
+                    document.oncontextmenu = function () {
+                        return true;
+                    };
+                }else{
+                    if(data.status==1){
+                        Feng.error(data.msg);
+                    }else if(data.status==2){
+                        window.location.href = "/index/auth/login";
+                    }
+                }
+            },
+            error: function(data) {
+                window.location.href = "/index/auth/login";
+            }
+        });
+    }
+
+    function initTime(time) {
+        var locked = sessionStorage.getItem('locked');
+        var maxTime = 60*time;
+        task = setInterval(function () {
+            if(!locked){
+                lockScreen();
+            }
+        },1000*maxTime);
+        listenTime();
+    }
+    function listenTime() {
+        var body = document.querySelector('html');
+        body.addEventListener("click",restTime);
+        body.addEventListener("keyup",restTime);
+        body.addEventListener("keypress",restTime);
+        body.addEventListener("keydown",restTime);
+        body.addEventListener("mousemove",restTime);
+        body.addEventListener("mousewheel",restTime);
+    }
+    function restTime(){
+        if (task!=null){
+            clearInterval(task);
+        }
+        initTime(time);
+    }
+
+
+
+    // function setTimeLockScreen(){
+    //     var locked = sessionStorage.getItem('locked');
+    //     (function($){
+    //         funObj = {
+    //             timeUserFun:'timeUserFun',
+    //         }
+    //         $[funObj.timeUserFun] = function(time){
+    //             var time = time || 5;    // 默认参数
+    //             var userTime = time*60;
+    //             var testUser = "";
+    //             var objTime = {
+    //                 init:0,
+    //                 time:function(){
+    //                     objTime.init += 1;
+    //                     if(objTime.init == userTime && !locked){
+    //                         lockScreen();
+    //                     }
+    //                 },
+    //                 eventFun:function(){
+    //                     clearInterval(testUser);
+    //                     objTime.init = 0;
+    //                     testUser = setInterval(objTime.time,1000);
+    //                 }
+    //             }
+    //             testUser = setInterval(objTime.time,1000);
+    //             var body = document.querySelector('html');
+    //             body.addEventListener("click",objTime.eventFun);
+    //             body.addEventListener("keyup",objTime.eventFun);
+    //             body.addEventListener("keypress",objTime.eventFun);
+    //             body.addEventListener("keydown",objTime.eventFun);
+    //             body.addEventListener("mousemove",objTime.eventFun);
+    //             body.addEventListener("mousewheel",objTime.eventFun);
+    //         }
+    //     })(window);
+    //     timeUserFun(5);
+    // }
+</script>

+ 69 - 0
app/admin/view/layout/tab.html

@@ -0,0 +1,69 @@
+<nav class="navbar-default navbar-static-side" role="navigation">
+    <div class="nav-close"><i class="fa fa-times-circle"></i>
+    </div>
+    <div class="sidebar-collapse">
+        <ul class="nav" id="side-menu">
+            <li class="nav-header">
+                <div class="dropdown profile-element" style="text-align: center">
+                    <span><img alt="image" class="img-circle" 
+                               {if condition="$user['avatar']"}src="{$user.avatar}"{else/}{if condition="$user['sex'] eq 1"}src="/static/img/photoBoy.png"{else/}src="/static/img/photoGirl.jpg"{/if}{/if}
+                               width="64px" height="64px"/></span>
+                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
+                        <span class="clear">
+                            <span class="text-muted text-xs block">{$user.rolename}<b class="caret"></b></span>
+                            <span class="block m-t-xs"><strong class="font-bold">{$user.name}</strong></span>
+                        </span>
+                    </a>
+                    <ul class="dropdown-menu m-t-xs">
+                        <li><a class="J_menuItem" href="/admin/user/info">个人资料</a></li>
+                        <li><a class="J_menuItem" href="/admin/user/modify_pwd">修改密码</a></li>
+                        <li class="divider"></li>
+                        <li><a href="/admin/auth/logout">安全退出</a>
+                        </li>
+                    </ul>
+                </div>
+                <div class="logo-element">GS
+                </div>
+            </li>
+            {volist name="menus" id="menu"}
+            {if condition="!$menu['children']"}
+            <li>
+                <a class="J_menuItem" href="{$menu.new_url}" name="tabMenuItem">
+                    <i class="fa {$menu.icon}"></i>
+                    <span class="nav-label">{$menu.name}</span>
+                </a>
+            </li>
+            {else/}
+            <li>
+                <a href="#">
+                    <i class="fa {$menu.icon}"></i>
+                    <span class="nav-label">{$menu.name}</span>
+                    <span class="fa arrow"></span>
+                </a>
+                <ul class="nav nav-second-level">
+                    {volist name="menu.children" id="second"}                        
+                    {if condition="!$second['children']"}
+                    <li>
+                        <a class="J_menuItem" href="{$second.new_url}" name="tabMenuItem">{$second.name}</a>
+                    </li>
+                    {else/}
+                    <li>
+                        <a href="#">{$second.name} <span class="fa arrow"></span></a>
+                        <ul class="nav nav-third-level">
+                            {volist name="second.children" id="third"}  
+                            <li>
+                                <a class="J_menuItem" href="{$third.new_url}" name="tabMenuItem">{$third.name}</a>
+                            </li>
+                            {/volist}
+                        </ul>
+                    </li>
+                    {/if}
+                    {/volist}
+                </ul>
+            </li>
+            {/if}
+            {/volist}
+
+        </ul>
+    </div>
+</nav>

+ 84 - 0
app/admin/view/layout/theme.html

@@ -0,0 +1,84 @@
+<div id="right-sidebar">
+    <div class="sidebar-container">
+
+        <ul class="nav nav-tabs navs-3">
+            <li class="active"><a data-toggle="tab" href="#tab-1"> <i
+                        class="fa fa-gear"></i> 主题
+                </a></li>
+        </ul>
+
+        <div class="tab-content">
+            <div id="tab-1" class="tab-pane active">
+                <div class="sidebar-title">
+                    <h3>
+                        <i class="fa fa-comments-o"></i> 主题设置
+                    </h3>
+                    <small><i class="fa fa-tim"></i>
+                        你可以从这里选择和预览主题的布局和样式,这些设置会被保存在本地,下次打开的时候会直接应用这些设置。</small>
+                </div>
+                <div class="skin-setttings">
+                    <div class="title">主题设置</div>
+                    <div class="setings-item">
+                        <span>收起左侧菜单</span>
+                        <div class="switch">
+                            <div class="onoffswitch">
+                                <input type="checkbox" name="collapsemenu"
+                                       class="onoffswitch-checkbox" id="collapsemenu"> <label
+                                       class="onoffswitch-label" for="collapsemenu"> <span
+                                        class="onoffswitch-inner"></span> <span
+                                        class="onoffswitch-switch"></span>
+                                </label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="setings-item">
+                        <span>固定顶部</span>
+
+                        <div class="switch">
+                            <div class="onoffswitch">
+                                <input type="checkbox" name="fixednavbar"
+                                       class="onoffswitch-checkbox" id="fixednavbar"> <label
+                                       class="onoffswitch-label" for="fixednavbar"> <span
+                                        class="onoffswitch-inner"></span> <span
+                                        class="onoffswitch-switch"></span>
+                                </label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="setings-item">
+                        <span> 固定宽度 </span>
+
+                        <div class="switch">
+                            <div class="onoffswitch">
+                                <input type="checkbox" name="boxedlayout"
+                                       class="onoffswitch-checkbox" id="boxedlayout"> <label
+                                       class="onoffswitch-label" for="boxedlayout"> <span
+                                        class="onoffswitch-inner"></span> <span
+                                        class="onoffswitch-switch"></span>
+                                </label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="title">皮肤选择</div>
+                    <div class="setings-item default-skin nb">
+                        <span class="skin-name "> <a href="#" class="s-skin-0">
+                                默认皮肤 </a>
+                        </span>
+                    </div>
+                    <div class="setings-item blue-skin nb">
+                        <span class="skin-name "> <a href="#" class="s-skin-1">
+                                蓝色主题 </a>
+                        </span>
+                    </div>
+                    <div class="setings-item yellow-skin nb">
+                        <span class="skin-name "> <a href="#" class="s-skin-3">
+                                黄色/紫色主题 </a>
+                        </span>
+                    </div>
+                </div>
+            </div>
+
+        </div>
+
+    </div>
+</div>

+ 73 - 0
app/admin/view/role/add.html

@@ -0,0 +1,73 @@
+{extend name="layout/content"}
+{block name="content"}
+<div class="ibox float-e-margins">
+    <div class="ibox-content">
+        <div class="form-horizontal" id="roleInfoForm">
+            <input type="hidden" id="id" value="">
+            <div class="row">
+                <div class="col-sm-6">
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label">角色名称</label>
+                        <div class="col-sm-9">
+                            <input class="form-control" id="name" name="name" type="text">
+                        </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label">上级名称</label>
+                        <div class="col-sm-9">
+                            <input class="form-control" id="pName" name="pName" type="text" style="background-color: #ffffff !important;" onclick="RolInfoDlg.showPNameSelectTree(); return false;" readonly="">
+                            <input id="pid" type="hidden"/>
+                        </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label">部门名称</label>
+                        <div class="col-sm-9">
+                            <input class="form-control" id="deptName" name="deptName" type="text" style="background-color: #ffffff !important;" onclick="RolInfoDlg.showDeptSelectTree(); return false;" readonly="">
+                            <input id="deptid" type="hidden"/>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-sm-6">
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label">别名</label>
+                        <div class="col-sm-9">
+                            <input class="form-control" id="tips" name="tips" type="text" >
+                        </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label">排序</label>
+                        <div class="col-sm-9">
+                            <input class="form-control" id="num" name="num" type="text">
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+            <!-- 这是部门下拉框 -->
+            <div id="deptContent" class="menuContent"
+                 style="display: none; position: absolute; z-index: 200;">
+                <ul id="deptTree" class="ztree tree-box" style="width: 250px !important;"></ul>
+            </div>
+
+            <!-- 这是父级菜单下拉框 -->
+            <div id="pNameContent" class="menuContent"
+                 style="display: none; position: absolute; z-index: 200;">
+                <ul id="pNameTree" class="ztree tree-box" style="width: 250px !important;"></ul>
+            </div>
+
+            <div class="row btn-group-m-t">
+                <div class="col-sm-12" style="text-align: center">
+                    <button type="button" class="btn btn-sm btn-info" onclick="RolInfoDlg.addSubmit()" id="ensure">
+                        <i class="fa fa-check"></i>&nbsp;提交
+                    </button>
+                    <button type="button" class="btn btn-sm btn-danger" onclick="RolInfoDlg.close()" id="cancel">
+                        <i class="fa fa-eraser"></i>&nbsp;取消
+                    </button>
+                </div>
+            </div>
+        </div>
+
+    </div>
+</div>
+<script src="/static/modular/system/role/role_info.js"></script>
+{/block}

+ 74 - 0
app/admin/view/role/assign.html

@@ -0,0 +1,74 @@
+{extend name="layout/content"}
+{block name="content"}
+<script type="text/javascript">
+    $(function () {
+        var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
+
+        $("#btn_close").bind("click", function () {
+            parent.layer.close(index);
+        });
+
+        $("#btn_save").bind("click", function () {
+            var ids = Feng.zTreeCheckedNodes("zTree");
+            var ajax = new $ax("/admin/role/set_authority", function (data) {
+                Feng.success("分配角色成功!");
+                window.parent.Role.table.refresh();
+                parent.layer.close(index);
+            }, function (data) {
+                Feng.error("分配角色失败!"
+                    + data.responseJSON.message + "!");
+            });
+            ajax.set("roleId", "{$role.id}");
+            ajax.set("ids", ids);
+            ajax.start();
+        });
+
+        initZtree();
+    });
+
+    function initZtree() {
+        var setting = {
+            check: {
+                enable: true,
+                chkboxType: { "Y": "ps", "N": "ps" }
+            },
+            data: {
+                simpleData: {
+                    enable: true
+                }
+            }
+        };
+
+        var ztree = new $ZTree("zTree", "/admin/menu/menuTreeListByRoleId/"
+            + "${roleId}");
+        ztree.setSettings(setting);
+        ztree.init();
+    }
+</script>
+
+
+<!-- 配置grid -->
+<div class="container" style="padding:  0px 10px !important;margin-top: -10px;text-align: center !important;">
+    <div class="row">
+        <div class="ibox float-e-margins">
+            <div class="ibox-title">
+                <h5>{$role.name}</h5>
+            </div>
+            <div class="ibox-content">
+                <ul id="zTree" class="ztree"></ul>
+            </div>
+        </div>
+    </div>
+    <div class="row">
+        <div class="col-md-12">
+            <button class="btn btn-sm btn-info" type="button" id="btn_save">
+                <i class="ace-icon fa fa-check bigger-110"></i>保存
+            </button>
+            &nbsp;
+            <button class="btn btn-sm btn-danger" type="button" id="btn_close">
+                <i class="ace-icon fa fa-close bigger-110"></i>关闭
+            </button>
+        </div>
+    </div>
+</div>
+{/block}

+ 73 - 0
app/admin/view/role/edit.html

@@ -0,0 +1,73 @@
+{extend name="layout/content"}
+{block name="content"}
+<div class="ibox float-e-margins">
+    <div class="ibox-content">
+        <div class="form-horizontal" id="roleInfoForm">
+            <input type="hidden" id="id" value="{$role.id}">
+            <div class="row">                
+                <div class="col-sm-6">
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label">角色名称</label>
+                        <div class="col-sm-9">
+                            <input class="form-control" id="name" name="name" value="{$role.name}" type="text">
+                        </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label">上级名称</label>
+                        <div class="col-sm-9">
+                            <input class="form-control" id="pName" name="pName" value="{$role.pName}" type="text" style="background-color: #ffffff !important;" onclick="RolInfoDlg.showPNameSelectTree(); return false;" readonly="">
+                            <input id="pid" type="hidden"/>
+                        </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label">部门名称</label>
+                        <div class="col-sm-9">
+                            <input class="form-control" id="deptName" name="deptName" value="{$role.deptName}" type="text" style="background-color: #ffffff !important;" onclick="RolInfoDlg.showDeptSelectTree(); return false;" readonly="">
+                            <input id="deptid" type="hidden"/>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-sm-6">
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label">别名</label>
+                        <div class="col-sm-9">
+                            <input class="form-control" id="tips" name="tips" value="{$role.tips}" type="text" >
+                        </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label">排序</label>
+                        <div class="col-sm-9">
+                            <input class="form-control" id="num" name="num" value="{$role.num}" type="text">
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+            <!-- 这是部门下拉框 -->
+            <div id="deptContent" class="menuContent"
+                 style="display: none; position: absolute; z-index: 200;">
+                <ul id="deptTree" class="ztree tree-box" style="width: 250px !important;"></ul>
+            </div>
+
+            <!-- 这是父级菜单下拉框 -->
+            <div id="pNameContent" class="menuContent"
+                 style="display: none; position: absolute; z-index: 200;">
+                <ul id="pNameTree" class="ztree tree-box" style="width: 250px !important;"></ul>
+            </div>
+
+            <div class="row btn-group-m-t">
+                <div class="col-sm-12" style="text-align: center">
+                    <button type="button" class="btn btn-sm btn-info" onclick="RolInfoDlg.editSubmit()" id="ensure">
+                        <i class="fa fa-check"></i>&nbsp;提交
+                    </button>
+                    <button type="button" class="btn btn-sm btn-danger" onclick="RolInfoDlg.close()" id="cancel">
+                        <i class="fa fa-eraser"></i>&nbsp;取消
+                    </button>
+                </div>
+            </div>
+        </div>
+
+    </div>
+</div>
+<script src="/static/modular/system/role/role_info.js"></script>
+{/block}

+ 63 - 0
app/admin/view/role/index.html

@@ -0,0 +1,63 @@
+{extend name="layout/content"}
+{block name="content"}
+<div class="row">
+    <div class="col-sm-12">
+        <div class="ibox float-e-margins">
+            <div class="ibox-title">
+                <h5>角色管理</h5>
+            </div>
+            <div class="ibox-content">
+                <div class="row row-lg">
+                    <div class="col-sm-12">
+                        <div class="row">
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">角色名称</button>
+                                    </div>
+                                    <input type="text" class="form-control" id="roleName" placeholder="" />
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <button type="button" class="btn btn-sm btn-primary " onclick="Role.search()">
+                                    <i class="fa fa-search"></i>搜索
+                                </button>
+                            </div>
+                        </div>
+                        <div class="hidden-xs" id="roleTableToolbar" role="group">
+                            <if condition="chkCommission('/admin/role/add','/role/add')">                                
+                                <button type="button" class="btn btn-sm btn-primary " onclick="Role.openAddRole()">
+                                    <i class="fa fa-search"></i>添加
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/role/edit','/role/edit')"> 
+                                <button type="button" class="btn btn-sm btn-primary " onclick="Role.openChangeRole()">
+                                    <i class="fa fa-search"></i>修改
+                                </button>  
+                            </if>
+                            <if condition="chkCommission('/admin/role/remove','/role/remove')">   
+                                <button type="button" class="btn btn-sm btn-primary " onclick="Role.delRole()">
+                                    <i class="fa fa-search"></i>删除
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/role/setAuthority','/role/setAuthority')">   
+                                <button type="button" class="btn btn-sm btn-primary " onclick="Role.assign()">
+                                    <i class="fa fa-search"></i>权限配置
+                                </button>
+                            </if>
+                        </div>
+                        <table id="roleTable" class="table-condensed" style="font-size: 10px;table-layout: fixed!important;" data-mobile-responsive="true" data-click-to-select="true">
+                            <thead>
+                                <tr>
+                                    <th data-field="selectItem" data-checkbox="true"></th>
+                                </tr>
+                            </thead>
+                        </table>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<script src="/static/modular/system/role/role.js"></script>
+{/block}

+ 38 - 0
app/common.php

@@ -0,0 +1,38 @@
+<?php
+
+// 应用公共文件
+
+/**
+ * 
+ * @param type $algo
+ * @param type $password
+ * @param type $salt
+ * @param type $hash_iterations
+ * @return type
+ */
+function simple_hash($algo = 'md5', $password = '', $salt = '', $hash_iterations = 2) {
+    $res = '';
+    $pass = $salt . $password;
+    $encoded = hash($algo, $pass, true);
+    $iteration = $hash_iterations - 1;
+    if ($iteration > 0) {
+        for ($i = 0; $i < $iteration; $i++) {
+            $encoded = hash($algo, $encoded, true);
+        }
+    }
+    $tmp = unpack('H*', $encoded);
+    if (!empty($tmp) && !empty($tmp[1])) {
+        $res = $tmp[1];
+    }
+    return $res;
+}
+
+/**
+ * 检查权限
+ * @param type $url
+ * @param type $old_url
+ * @return type
+ */
+function chkCommission($url, $old_url) {
+    return app\common\api\MenuApi::chkPermission($url, $old_url);
+}

+ 102 - 0
app/common/api/MenuApi.php

@@ -0,0 +1,102 @@
+<?php
+
+namespace app\common\api;
+
+use app\admin\model\Role;
+use app\admin\model\SysRelation;
+use app\admin\model\Menu;
+
+/**
+ * Description of MenuApi
+ *
+ * @author sgq
+ */
+class MenuApi {
+
+    public static function getMenuListByRoleid($roleid) {
+        $role = Role::find($roleid);
+        $menu_ids = $role->sysRelation->column("menuid");
+        $menus = Menu::where("id", "in", $menu_ids)->where("ismenu", 1)->where("status", 1)->order("levels asc,num asc")->select()->toArray();
+        return self::buildMenu($menus);
+    }
+
+    /**
+     * 递归获取多级菜单集合
+     * @param type $menus
+     * @param type $pcode
+     * @return type
+     */
+    private static function buildMenu($menus, $pcode = "0") {
+        $result = [];
+        foreach ($menus as $key => $menu) {
+            if ($pcode == $menu["pcode"]) {
+                unset($menus[$key]);
+                $menu["children"] = self::buildMenu($menus, $menu["code"]);
+                if ($menu["pcode"] == 0) {
+                    $result[] = $menu;
+                }
+            }
+        }
+        return $result;
+    }
+
+    /**
+     * 权限检查
+     * @param type $url 新权限url
+     * @param type $old_url 旧系统权限url
+     * @return boolean
+     */
+    public static function chkPermission($url, $old_url) {
+        $url = strtolower($url);
+        $old_url = strtolower($old_url);
+        $menu = Menu::whereRaw("`status`=1 and (new_url=:new_url or `url`=:url)", ["new_url" => $url, "url" => $old_url])->findOrEmpty()->toArray();
+        if (!$menu)
+            return true;
+        $menuid = $menu["id"];
+        $roleid = session("user")["roleid"];
+        $role = Role::find($roleid);
+        $menu_ids = $role->sysRelation->column("menuid");
+        return in_array($menuid, $menu_ids);
+    }
+
+    public static function getEnterpriseMenuByType($type) {
+        $menus = [];
+        $menus[] = ["type" => [1, 2, 3], "code" => "qyzx", "pcode" => "0", "name" => "企业用户中心", "url" => "", "icon" => "fa-user"];
+        $menus[] = ["type" => [1, 2], "code" => "yhfk", "pcode" => "0", "name" => "用户反馈", "url" => "", "icon" => "fa-bug"];
+        $menus[] = ["type" => [1, 2], "code" => "rcrd", "pcode" => "0", "name" => "人才认定", "url" => "", "icon" => "fa-thumbs-o-up"];
+        $menus[] = ["type" => [1, 2], "code" => "rcrdsb", "pcode" => "rcrd", "name" => "人才认定申报", "url" => "", "icon" => "fa-thumbs-up"];
+        $menus[] = ["type" => [1, 2], "code" => "yxrck", "pcode" => "rcrd", "name" => "优秀人才库", "url" => "", "icon" => "fa-thumbs-up"];
+        $menus[] = ["type" => [1, 2], "code" => "lzsb", "pcode" => "rcrd", "name" => "离职申报", "url" => "", "icon" => "fa-thumbs-up"];
+        $menus[] = ["type" => [1, 2], "code" => "gzdwbg", "pcode" => "rcrd", "name" => "工作单位变更", "url" => "", "icon" => "fa-thumbs-up"];
+        $menus[] = ["type" => [1, 2], "code" => "yhzhbg", "pcode" => "rcrd", "name" => "银行账号变更", "url" => "", "icon" => "fa-thumbs-up"];
+        $menus[] = ["type" => [1, 2], "code" => "rcccbg", "pcode" => "rcrd", "name" => "人才层次变更", "url" => "", "icon" => "fa-thumbs-up"];
+        $menus[] = ["type" => [1, 2], "code" => "jcxxbg", "pcode" => "rcrd", "name" => "基础信息变更", "url" => "", "icon" => "fa-thumbs-up"];
+        $menus[] = ["type" => [1, 2], "code" => "jbtmanage", "pcode" => "0", "name" => "津补贴申报", "url" => "", "icon" => "fa-money"];
+        $menus[] = ["type" => [1, 2], "code" => "jbtsb", "pcode" => "jbtmanage", "name" => "津补贴申报", "url" => "", "icon" => "fa-thumbs-up"];
+        $menus[] = ["type" => [1, 2], "code" => "gfbt", "pcode" => "0", "name" => "购房补贴", "url" => "", "icon" => "fa-university"];
+        $menus[] = ["type" => [1, 2], "code" => "gfbtsb", "pcode" => "gfbt", "name" => "购房补贴申报", "url" => "", "icon" => "fa-thumbs-up"];
+        $menus[] = ["type" => [2], "code" => "pxbtmanage", "pcode" => "0", "name" => "培训补贴", "url" => "", "icon" => "fa-building"];
+        $menus[] = ["type" => [2], "code" => "pxbt", "pcode" => "pxbtmanage", "name" => "培训补贴", "url" => "", "icon" => "fa-thumbs-up"];
+        $menus[] = ["type" => [2], "code" => "zdzxmanage", "pcode" => "0", "name" => "重大专项", "url" => "", "icon" => "fa-life-ring"];
+        $menus[] = ["type" => [2], "code" => "zdzx", "pcode" => "zdzxmanage", "name" => "重大专项", "url" => "", "icon" => "fa-thumbs-up"];
+        $menus[] = ["type" => [2], "code" => "znjy", "pcode" => "0", "name" => "子女教育", "url" => "", "icon" => "fa-graduation-cap"];
+        $menus[] = ["type" => [2], "code" => "xzfbz", "pcode" => "znjy", "name" => "学杂费补助", "url" => "", "icon" => "fa-thumbs-up"];
+        $menus[] = ["type" => [2], "code" => "ylbzmanage", "pcode" => "0", "name" => "医疗补助", "url" => "", "icon" => "fa-hospital-o"];
+        $menus[] = ["type" => [2], "code" => "ylbz", "pcode" => "ylbzmanage", "name" => "医疗补助", "url" => "", "icon" => "fa-thumbs-up"];
+        $menus[] = ["type" => [2], "code" => "zfbz", "pcode" => "0", "name" => "住房保障", "url" => "", "icon" => "fa-home"];
+        $menus[] = ["type" => [2], "code" => "zfsq", "pcode" => "zfbz", "name" => "租房申请", "url" => "", "icon" => "fa-home"];
+        $menus[] = ["type" => [2], "code" => "fzbz", "pcode" => "zfbz", "name" => "房租补助", "url" => "", "icon" => "fa-money"];
+        $menus[] = ["type" => [2], "code" => "gfsq", "pcode" => "zfbz", "name" => "购房申请", "url" => "", "icon" => "fa-envira"];
+        $menus[] = ["type" => [2], "code" => "gfbz", "pcode" => "zfbz", "name" => "购房补助", "url" => "", "icon" => "fa-envira"];
+        $menus[] = ["type" => [1], "code" => "sbrc", "pcode" => "0", "name" => "硕博人才", "url" => "", "icon" => "fa-graduation-cap"];
+        $menus[] = ["type" => [1], "code" => "shbt", "pcode" => "sbrc", "name" => "生活补贴", "url" => "", "icon" => "fa-graduation-cap"];
+        $menus[] = ["type" => [3], "code" => "hxjh", "pcode" => "0", "name" => "海峡计划", "url" => "", "icon" => "fa-plane"];
+        $menus[] = ["type" => [3], "code" => "hxjhsb", "pcode" => "hxjh", "name" => "海峡计划申报", "url" => "", "icon" => "fa-pencil"];
+        foreach ($menus as $key => $menu) {
+            if (!in_array($type, $menu["type"]))
+                unset($menus[$key]);
+        }
+        return self::buildMenu($menus);
+    }
+
+}

+ 133 - 0
app/common/api/UserApi.php

@@ -0,0 +1,133 @@
+<?php
+
+namespace app\common\api;
+
+use app\admin\model\User;
+use app\admin\model\Enterprise;
+use app\admin\model\Person;
+use app\admin\model\Role;
+
+const MAX_ERROR_TIMES = 5;
+const FREEZETIME = 5;
+const FREEZE_NO = 1;
+const FREEZE_YES = 2;
+
+/**
+ * Description of UserApi
+ *
+ * @author sgq
+ */
+class UserApi {
+
+    protected $username, $password, $usertype, $info;
+
+    public function __construct($username, $password, $usertype) {
+        $this->username = $username;
+        $this->password = $password;
+        $this->usertype = $usertype;
+        switch ($usertype) {
+            case 2:
+                //企业
+                $user = Enterprise::where(['username' => $username])->find();
+                break;
+            case 3:
+                //个人
+                $user = Person::where('username', $username)->find();
+                break;
+            default:
+                //管理员
+                $user = User::where(['account' => $username])->find();
+                break;
+        }
+        $this->info = $user;
+        return $this;
+    }
+
+    public function getRole() {
+        $role = Role::find($this->info["roleid"]);
+        return $role->toArray();
+    }
+
+    /**
+     * 返回用户信息
+     * @return type
+     */
+    public function getUserInfo() {
+        return $this->info->toArray();
+    }
+
+    /**
+     * 检查密码
+     * @return type
+     */
+    public function checkPwd() {
+        switch ($this->usertype) {
+            case 1:
+                $salt = hash("md5", $this->info["salt"], true);
+                $password = simple_hash("md5", $this->password, $salt, 1024);
+                break;
+            case 2:
+            case 3:
+                $password = hash("md5", $this->password);
+                break;
+        }
+        return $password == $this->info["password"];
+    }
+
+    /**
+     * 设置冻结与否
+     * @param type $freezetype
+     */
+    public function setFreeze($freezetype = FREEZE_NO) {
+        $this->info->freeze = $freezetype;
+        if ($freezetype == FREEZE_NO) {
+            $this->info->errorCount = null;
+            $this->info->freezeTime = null;
+        } else {
+            $this->info->freezeTime = strtotime(sprintf("+%d minutes", FREEZETIME));
+        }
+        $this->info->save();
+    }
+
+    public function setSession() {
+        $user = $this->getUserInfo();
+        switch ($this->usertype) {
+            case 1:
+                session("user", [
+                    "uid" => $user["id"],
+                    "roleid" => $user["roleid"],
+                    "account" => $user["account"],
+                    "name" => $user["name"],
+                    "avatar" => $user["avatar"],
+                    "sex" => $user["sex"],
+                    "rolename" => $this->getRole()["name"],
+                    "usertype" => $this->usertype
+                ]);
+                break;
+            case 2:
+                session("user", [
+                    "uid" => $user["id"],
+                    "account" => $user["username"],
+                    "name" => $user["name"],
+                    "avatar" => $user["headPortrait"],
+                    "rolename" => "企业用户",
+                    "usertype" => $this->usertype,
+                    "type" => $user["type"]
+                ]);
+                break;
+            case 3:
+                session("user", [
+                    "uid" => $user["id"],
+                    "account" => $user["username"],
+                    "name" => $user["name"],
+                    "avatar" => $user["headPortrait"],
+                    "sex" => $user["sex"],
+                    "rolename" => "个人用户",
+                    "usertype" => $this->usertype,
+                    "type" => $user["type"]
+                ]);
+                break;
+        }
+    }
+
+}

+ 13 - 0
app/common/controller/Error.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace app\common\controller;
+
+use app\BaseController;
+
+class Error extends BaseController {
+
+    public function __call($method, $args) {
+        return view("/layout/404", [], 404);
+    }
+
+}

+ 36 - 0
app/common/controller/Notice.php

@@ -0,0 +1,36 @@
+<?php
+
+namespace app\common\controller;
+
+use app\BaseController;
+use app\common\middleware\Auth;
+use app\admin\model\Notice as NoticeModel;
+
+/**
+ * Description of Notice
+ *
+ * @author sgq
+ */
+class Notice extends BaseController {
+
+    protected $middleware = [Auth::class];
+
+    /**
+     * 通知列表
+     * @return type
+     */
+    public function index() {
+        $total = NoticeModel::count();
+        return view("", ["total" => $total]);
+    }
+
+    public function list() {
+        if ($this->request->isAjax()) {
+            $pageSize = $this->request->param("pageSize") ?: 6;
+            $page = $this->request->param("page") ?: 1;
+            $list = NoticeModel::order(["isTop", "topTime" => "desc", "createTime" => "desc"])->page($page, $pageSize)->select();
+            return json($list);
+        }
+    }
+
+}

+ 29 - 0
app/common/middleware/Auth.php

@@ -0,0 +1,29 @@
+<?php
+
+declare (strict_types=1);
+
+namespace app\common\middleware;
+
+/**
+ * Description of Auth
+ *
+ * @author sgq
+ */
+class Auth {
+
+    /**
+     * 处理请求
+     *
+     * @param \think\Request $request
+     * @param \Closure       $next
+     * @return Response
+     */
+    public function handle($request, \Closure $next) {
+        $controller = $request->controller();
+        if (strtolower($controller) != "auth" && empty(session('user'))) {
+            return redirect('/index/auth/login');
+        }
+        return $next($request);
+    }
+
+}

+ 26 - 0
app/common/middleware/Log.php

@@ -0,0 +1,26 @@
+<?php
+
+declare (strict_types=1);
+
+namespace app\common\middleware;
+
+/**
+ * Description of Log
+ * 日志中间件
+ * @author sgq
+ */
+class Log {
+
+    /**
+     * 处理请求
+     *
+     * @param \think\Request $request
+     * @param \Closure       $next
+     * @return Response
+     */
+    public function handle($request, \Closure $next) {
+        $controller = $request->controller();
+        return $next($request);
+    }
+
+}

+ 43 - 0
app/common/middleware/Permission.php

@@ -0,0 +1,43 @@
+<?php
+
+declare (strict_types=1);
+
+namespace app\common\middleware;
+
+/**
+ * Description of Permission
+ * 访问权限中间件
+ * @author sgq
+ */
+class Permission {
+
+    /**
+     * 处理请求
+     *
+     * @param \think\Request $request
+     * @param \Closure       $next
+     * @return Response
+     */
+    public function handle($request, \Closure $next) {
+        $controller = $request->controller();
+        $ref = new \ReflectionClass("\app\admin\controller\\" . $controller);
+        $action = $request->action();
+        $comment = $ref->getMethod($action)->getDocComment();
+        $old_auth_url = "";
+        if ($comment) {
+            if (preg_match("/(?<=@auth {{).*?(?=}})/", $comment, $result)) {
+                //成功提取@auth {{}}出中间内容则需要判断权限
+                $old_auth_url = strtolower($result[0]);
+                //对比权限
+            }
+        }
+        $module = strtolower(app("http")->getName());
+        $controller = strtolower($request->controller());
+        $action = strtolower($request->action());
+        $url = sprintf("/%s/%s/%s", $module, $controller, $action);
+        if (!\app\common\api\MenuApi::chkPermission($url, $old_auth_url))
+            return json(["code" => 403, "msg" => "没有权限"])->code(403);
+        return $next($request);
+    }
+
+}

+ 10 - 0
app/common/view/layout/404.html

@@ -0,0 +1,10 @@
+<html>
+    <head>
+        <title>发生了不可描述的错误</title>
+        <meta charset="UTF-8">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    </head>
+    <body>
+        <div>404 No Found!</div>
+    </body>
+</html>

+ 130 - 0
app/common/view/layout/content.html

@@ -0,0 +1,130 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta name="renderer" content="webkit"/><!-- 让360浏览器默认选择webkit内核 -->
+    <meta http-equiv="Pragma" content="no-cache">
+    <meta http-equiv="Cache-Control" content="no-cache">
+    <meta http-equiv="Expires" CONTENT="0">
+    <!-- 全局css -->
+    <link rel="shortcut icon" href="/static/favicon.ico">
+    <link href="/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
+    <link href="/static/css/font-awesome.css?v=4.4.0" rel="stylesheet">
+    <link href="/static/css/plugins/chosen/chosen.css" rel="stylesheet">
+    <link href="/static/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
+    <link href="/static/css/plugins/validate/bootstrapValidator.min.css" rel="stylesheet">
+    <link href="/static/css/style.css?v=4.1.0" rel="stylesheet">
+    <link href="/static/css/_fstyle.css" rel="stylesheet">
+    <link href="/static/css/plugins/iCheck/custom.css" rel="stylesheet">
+    <link href="/static/css/plugins/webuploader/webuploader.css" rel="stylesheet">
+    <link href="/static/css/plugins/ztree/zTreeStyle.css" rel="stylesheet">
+    <link href="/static/css/plugins/bootstrap-treetable/bootstrap-treetable.css" rel="stylesheet"/>
+    <link href="/static/js/plugins/webuiPopover/dist/jquery.webui-popover.min.css" rel="stylesheet">
+    <link href="/static/js/plugins/viewer/viewer.min.css" rel="stylesheet">
+    <link href="/static/css/lockScreen.css" rel="stylesheet">
+    <link href="/static/css/plugins/toastr/toastr.css" rel="stylesheet">
+    <link href="/static/css/plugins/bootstrap-table/bootstrap-table-jumpto.css" rel="stylesheet">
+<!--    &lt;!&ndash; kendo ui &ndash;&gt;-->
+<!--    <link href="/static/js/plugins/kendoui/styles/kendo.common.min.css" rel="stylesheet">-->
+<!--    <link href="/static/js/plugins/kendoui/styles/kendo.bootstrap.min.css" rel="stylesheet">-->
+
+    <!-- 全局js -->
+    <script src="/static/js/jquery.min.js?v=2.1.4"></script>
+    <script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
+    <script src="/static/js/plugins/webuiPopover/dist/jquery.webui-popover.min.js"></script>
+    <script src="/static/js/plugins/ztree/jquery.ztree.all.min.js"></script>
+    <script src="/static/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
+    <script src="/static/js/plugins/validate/bootstrapValidator.min.js"></script>
+    <script src="/static/js/plugins/validate/zh_CN.js"></script>
+    <script src="/static/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
+    <script src="/static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
+    <script src="/static/js/plugins/bootstrap-treetable/bootstrap-treetable.js"></script>
+    <script src="/static/js/plugins/layer/layer.js"></script>
+    <script src="/static/js/plugins/chosen/chosen.jquery.js"></script>
+    <script src="/static/js/plugins/iCheck/icheck.min.js"></script>
+    <script src="/static/js/plugins/laydate/laydate.js"></script>
+    <script src="/static/js/plugins/webuploader/webuploader.min.js"></script>
+    <script src="/static/js/common/ajax-object.js"></script>
+    <script src="/static/js/common/bootstrap-table-object.js"></script>
+    <script src="/static/js/common/tree-table-object.js"></script>
+    <script src="/static/js/common/web-upload-object.js"></script>
+    <script src="/static/js/common/ztree-object.js"></script>
+    <script type="text/javascript">
+        document.write('<script src="/static/js/common/Feng.js?v=' + (new Date()).getTime() + '"><\/script>');
+        document.write('<script src="/static/modular/common/config.js?v=' + (new Date()).getTime() + '"><\/script>');
+        document.write('<script src="/static/modular/common/upload.js?v=' + (new Date()).getTime() + '"><\/script>');
+        // document.write('<script src="/static/js/plugins/kendoui/js/kendo.all.min.js?v=' + (new Date()).getTime() + '"><\/script>');
+        // document.write('<script src="/static/js/plugins/kendoui/js/messages/kendo.messages.zh-CN.min.js?v=' + (new Date()).getTime() + '"><\/script>');
+        // document.write('<script src="/static/js/common/kendo-table-object.js?v=' + (new Date()).getTime() + '"><\/script>');
+    </script>
+    <script src="/static/js/plugins/viewer/viewer.min.js"></script>
+    <script src="/static/js/plugins/viewer/viewer-jquery.min.js"></script>
+    <script src="/static/js/bootstrap-treeview.js"></script>
+    <script src="/static/js/plugins/toastr/toastr.js"></script>
+
+    <script src="/static/js/plugins/resizable/bootstrap-table-resizable.min.js"></script>
+    <script src="/static/js/plugins/resizable/jquery.resizableColumns.min.js"></script>
+    <script src="/static/js/plugins/bootstrap-pageation/bootstrap-paginator.js"></script>
+
+    <script src="/static/js/plugins/bootstrap-table/bootstrap-table-jumpto.js"></script>
+
+
+    <style type="text/css">
+        table {
+            width: 100px;
+            table-layout: fixed; /* 只有定义了表格的布局算法为fixed,下面td的定义才能起作用。 */
+        }
+
+        td {
+            width: 100%;
+            word-break: keep-all; /* 不换行 */
+            white-space: nowrap; /* 不换行 */
+            overflow: hidden; /* 内容超出宽度时隐藏超出部分的内容 */
+            text-overflow: ellipsis; /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用*/
+        }
+
+        .layui-layer-btn .layui-layer-btn1 {
+            border-color: #009688;
+            background-color: #009688;
+            color: #fff;
+        }
+
+        #fileTable td {
+            word-break: break-word;
+            white-space: inherit;
+        }
+
+        /*.table-hover > tbody > tr:hover {*/
+        /*    background-color: #b1ffb2 !important;      !*修改表格悬浮样式*!*/
+        /*}*/
+
+        .fixed-table-container tbody .selected td {
+            background-color: #b1ffb2 !important;       /*修改表格选中样式*/
+        }
+
+        /*网页统一边灰白色*/
+        /*body{*/
+        /*    filter:grayscale(100%)!important;*/
+        /*    -webkit-filter:grayscale(100%)!important;*/
+        /*    -moz-filter:grayscale(100%)!important;*/
+        /*    -ms-filter:grayscale(100%)!important;*/
+        /*    -o-filter:grayscale(100%)!important;*/
+        /*    filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)!important;*/
+        /*    -webkit-filter:grayscale(1)!important;*/
+        /*}*/
+    </style>
+
+    <script type="text/javascript">
+        Feng.addCtx("");
+        Feng.sessionTimeoutRegistry();
+    </script>
+</head>
+
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+    {block name="content"}{/block}
+</div>
+<script src="/static/js/content.js?v=1.0.0"></script>
+</body>
+</html>

+ 53 - 0
app/common/view/layout/layout.html

@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="utf-8">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        <meta name="renderer" content="webkit">
+        <title>晋江市人才综合服务平台</title>
+        <link rel="shortcut icon" href="/static/favicon.ico">
+        <link href="/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
+        <link href="/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
+        <link href="/static/css/style.css?v=4.1.0" rel="stylesheet">
+        <link href="/static/js/plugins/viewer/viewer.min.css" rel="stylesheet">
+    </head>
+
+    <body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
+        <div id="wrapper">
+            <!--左侧导航开始-->            
+            {block name="tab"}{/block}
+            <!--左侧导航结束-->
+
+            <!--右侧部分开始-->
+            {block name="right"}{/block}
+            <!--右侧部分结束-->
+
+            <!--右侧边栏开始-->      
+            {block name="theme"}{/block}
+            <!--右侧边栏结束-->
+
+        </div>
+
+        <!-- 全局js -->
+        <script src="/static/js/jquery.min.js?v=2.1.4"></script>
+        <script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
+        <script src="/static/js/plugins/metisMenu/jquery.metisMenu.js"></script>
+        <script src="/static/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
+        <script src="/static/js/plugins/layer/layer.js"></script>
+
+        <!-- 自定义js -->
+        <script src="/static/js/hplus.js?v=4.1.0"></script>
+        <script type="text/javascript" src="/static/js/contabs.js"></script>
+
+        <!-- 第三方插件 -->
+        <script src="/static/js/plugins/pace/pace.min.js"></script>
+        <!-- 放大查看图片 -->
+        <script type="text/javascript" src="/static/js/plugins/viewer/viewer.min.js"></script>
+        <script type="text/javascript" src="/static/js/plugins/viewer/viewer-jquery.min.js"></script>
+
+        <div id="showBigPic" style="margin: 0px; padding: 0px;"></div>
+
+    </body>
+
+</html>
+

+ 268 - 0
app/common/view/layout/right.html

@@ -0,0 +1,268 @@
+<input type="hidden" id="avatar"
+       {if condition="!$user['avatar']"}
+       value="/static/img/girl.gif"
+       {else/}
+       value="{$user.avatar}"
+       {/if}
+    />
+<input type="hidden" id="name" value="{$user.name}">
+<input type="hidden" id="roleName" value="{$user.rolename}">
+<div id="page-wrapper" class="gray-bg dashbard-1">
+    <div class="row border-bottom">
+        <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
+            <ul class="nav navbar-top-links navbar-right">
+                <!--
+                <li class="dropdown">
+                    <a class="dropdown-toggle count-info" data-toggle="dropdown" href="#" onmouseover="$('.dropdown-toggle').dropdown()">
+                        <i class="fa fa-bell"></i>
+                        @if(dbsx>0){
+                            <span class="label label-danger">${dbsx}</span>
+                        @}
+                    </a>
+                    @if(tool.isEmpty(tasks)){
+                    @}else{
+                        <ul class="dropdown-menu dropdown-alerts" style="height: 300px;overflow: auto">
+                            @for(item in tasks){
+                                <li>
+                                    <a href="javascript:void(0)">
+                                        <div>
+                                            <i class="fa fa-envelope fa-fw"></i> ${item.description}
+                                            <span class="pull-right text-muted small">${item.createTime}</span>
+                                        </div>
+                                    </a>
+                                </li>
+                                <li class="divider"></li>
+                            @}
+                        </ul>
+                    @}
+                </li>-->
+                <li class="dropdown hidden-xs">
+                    <a class="dropdown-toggle" aria-expanded="false" style="font-weight: 900" onclick="javascript:lockScreen();">
+                        <i class="fa fa-lock"></i> 锁屏
+                    </a>
+                </li>
+                <li class="dropdown hidden-xs">
+                    <a class="right-sidebar-toggle" aria-expanded="false">
+                        <i class="fa fa-tasks"></i> 主题
+                    </a>
+                </li>
+            </ul>
+        </nav>
+    </div>
+    <div class="row content-tabs">
+        <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
+        </button>
+        <nav class="page-tabs J_menuTabs">
+            <div class="page-tabs-content">
+                <a href="javascript:;" class="active J_menuTab" data-id="/common/notice">公告栏</a>
+            </div>
+        </nav>
+        <div class="btn-group roll-nav roll-right">
+            <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span>
+            </button>
+            <ul role="menu" class="dropdown-menu dropdown-menu-right">
+                <li class="J_tabShowActive"><a>定位当前选项卡</a>
+                </li>
+                <li class="divider"></li>
+                <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
+                </li>
+                <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
+                </li>
+            </ul>
+        </div>
+        <a href="/admin/auth/logout" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a>
+    </div>
+
+    <div class="row J_mainContent" id="content-main">
+        <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="/common/notice" frameborder="0" data-id="/common/notice" seamless></iframe>
+    </div>
+</div>
+<link href="/static/css/lockScreen.css" rel="stylesheet">
+<script src="/static/js/jquery.min.js?v=2.1.4"></script>
+<script src="/static/js/common/Feng.js"></script>
+<style type="text/css">
+    .dbsx{
+        line-height: 12px;
+        padding: 1px 3px;
+        position: absolute;
+        top: 8px;
+        background-color: #1ab394;
+        color: #FFFFFF;
+        font-size: 3px;
+    }
+    .dropdown-menu .divider {
+        height: 1px;
+        overflow: hidden;
+        background-color: #333;
+    }
+</style>
+<script type="text/javascript">
+    var task = null;
+    var time = 10;
+    window.onload=function (){
+        var locked = sessionStorage.getItem('locked');
+        if(locked)lockScreen();
+        // setTimeLockScreen();
+        initTime(time);
+    }
+
+    // 锁屏
+    function lockScreen() {
+        document.onkeydown = function () {
+            var e = window.event || arguments[0];
+            // 屏蔽 F12
+            if (e.keyCode === 123) {
+                return false;
+                // 屏蔽 Ctrl+Shift+I
+            } else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode === 73)) {
+                return false;
+                // 屏蔽 Shift+F10
+            } else if ((e.shiftKey) && (e.keyCode === 121)) {
+                return false;
+            }
+        };
+        // 屏蔽右键单击
+        document.oncontextmenu = function () {
+            return false;
+        };
+        $('#locking').remove();
+        if ($("#avatar").val()) {
+            $('body').append('<div id="locking"><figure onclick="lockInput(this);"><img src="' +$("#avatar").val() + '" ></figure><h3>' + $("#name").val() + '</h3></div>');
+        }
+        setTimeout(function () {
+            $('#locking').addClass('lock-ani');
+        }, 200);
+        sessionStorage.setItem('locked', true);
+    }
+
+    // 锁屏输入
+    function lockInput(dom) {
+        $(dom).find('img').unwrap();
+        $('#locking').append('<div class="input-group">' +
+            '                   <input class="form-control form-control-lg" id="lockPassword" style="color: #333;" type="password" placeholder="请输入登录密码解锁">' +
+            '                   <div class="input-group-addon" style="background-color: #ccc;border: 1px solid #ccc;" onclick="unlockScreen();">' +
+            '                       <span class="input-group-text">' +
+            '                           <i class="fa fa-key " style="color: #555;font-weight: 900;"></i>' +
+            '                       </span>' +
+            '                   </div>' +
+            '                  </div>');
+        setTimeout(function () {
+            $('#locking .input-group').addClass('lock-input-ani');
+        }, 200);
+        $('#locking input').focus();
+    }
+
+    // 解锁
+    function unlockScreen() {
+        var password = $('#lockPassword').val();
+        var url = "/admin/auth/valid_password";
+        $.ajax({
+            type: "post",
+            url: url,
+            dataType: "json",
+            async: false,
+            data: {"password":password},
+            contentType : 'application/x-www-form-urlencoded ',
+            success: function(data) {
+                if(data.code==200){
+                    $('#locking').fadeOut(300, function () {
+                        $('#locking').remove();
+                    });
+                    sessionStorage.removeItem('locked');
+                    document.onkeydown = function () {
+                        var e = window.event || arguments[0];
+                        // 屏蔽 F12
+                        if (e.keyCode === 123) {
+                            return true;
+                            // 屏蔽 Ctrl+Shift+I
+                        } else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode === 73)) {
+                            return true;
+                            // 屏蔽 Shift+F10
+                        } else if ((e.shiftKey) && (e.keyCode === 121)) {
+                            return true;
+                        }
+                    };
+                    // 屏蔽右键单击
+                    document.oncontextmenu = function () {
+                        return true;
+                    };
+                }else{
+                    if(data.status==1){
+                        Feng.error(data.msg);
+                    }else if(data.status==2){
+                        window.location.href = "/admin/auth/login";
+                    }
+                }
+            },
+            error: function(data) {
+                console.log(data);return;
+                window.location.href = "/admin/auth/login";
+            }
+        });
+    }
+
+    function initTime(time) {
+        var locked = sessionStorage.getItem('locked');
+        var maxTime = 60*time;
+        task = setInterval(function () {
+            if(!locked){
+                lockScreen();
+            }
+        },1000*maxTime);
+        listenTime();
+    }
+    function listenTime() {
+        var body = document.querySelector('html');
+        body.addEventListener("click",restTime);
+        body.addEventListener("keyup",restTime);
+        body.addEventListener("keypress",restTime);
+        body.addEventListener("keydown",restTime);
+        body.addEventListener("mousemove",restTime);
+        body.addEventListener("mousewheel",restTime);
+    }
+    function restTime(){
+        if (task!=null){
+            clearInterval(task);
+        }
+        initTime(time);
+    }
+
+
+
+    // function setTimeLockScreen(){
+    //     var locked = sessionStorage.getItem('locked');
+    //     (function($){
+    //         funObj = {
+    //             timeUserFun:'timeUserFun',
+    //         }
+    //         $[funObj.timeUserFun] = function(time){
+    //             var time = time || 5;    // 默认参数
+    //             var userTime = time*60;
+    //             var testUser = "";
+    //             var objTime = {
+    //                 init:0,
+    //                 time:function(){
+    //                     objTime.init += 1;
+    //                     if(objTime.init == userTime && !locked){
+    //                         lockScreen();
+    //                     }
+    //                 },
+    //                 eventFun:function(){
+    //                     clearInterval(testUser);
+    //                     objTime.init = 0;
+    //                     testUser = setInterval(objTime.time,1000);
+    //                 }
+    //             }
+    //             testUser = setInterval(objTime.time,1000);
+    //             var body = document.querySelector('html');
+    //             body.addEventListener("click",objTime.eventFun);
+    //             body.addEventListener("keyup",objTime.eventFun);
+    //             body.addEventListener("keypress",objTime.eventFun);
+    //             body.addEventListener("keydown",objTime.eventFun);
+    //             body.addEventListener("mousemove",objTime.eventFun);
+    //             body.addEventListener("mousewheel",objTime.eventFun);
+    //         }
+    //     })(window);
+    //     timeUserFun(5);
+    // }
+</script>

+ 69 - 0
app/common/view/layout/tab.html

@@ -0,0 +1,69 @@
+<nav class="navbar-default navbar-static-side" role="navigation">
+    <div class="nav-close"><i class="fa fa-times-circle"></i>
+    </div>
+    <div class="sidebar-collapse">
+        <ul class="nav" id="side-menu">
+            <li class="nav-header">
+                <div class="dropdown profile-element" style="text-align: center">
+                    <span><img alt="image" class="img-circle" 
+                               {if condition="$user['avatar']"}src="{$user.avatar}"{else/}{if condition="$user['sex'] eq 1"}src="/static/img/photoBoy.png"{else/}src="/static/img/photoGirl.jpg"{/if}{/if}
+                               width="64px" height="64px"/></span>
+                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
+                        <span class="clear">
+                            <span class="text-muted text-xs block">{$user.rolename}<b class="caret"></b></span>
+                            <span class="block m-t-xs"><strong class="font-bold">{$user.name}</strong></span>
+                        </span>
+                    </a>
+                    <ul class="dropdown-menu m-t-xs">
+                        <li><a class="J_menuItem" href="/admin/user/info">个人资料</a></li>
+                        <li><a class="J_menuItem" href="/admin/user/modify_pwd">修改密码</a></li>
+                        <li class="divider"></li>
+                        <li><a href="/admin/auth/logout">安全退出</a>
+                        </li>
+                    </ul>
+                </div>
+                <div class="logo-element">GS
+                </div>
+            </li>
+            {volist name="menus" id="menu"}
+            {if condition="!$menu['children']"}
+            <li>
+                <a class="J_menuItem" href="{$menu.new_url}" name="tabMenuItem">
+                    <i class="fa {$menu.icon}"></i>
+                    <span class="nav-label">{$menu.name}</span>
+                </a>
+            </li>
+            {else/}
+            <li>
+                <a href="#">
+                    <i class="fa {$menu.icon}"></i>
+                    <span class="nav-label">{$menu.name}</span>
+                    <span class="fa arrow"></span>
+                </a>
+                <ul class="nav nav-second-level">
+                    {volist name="menu.children" id="second"}                        
+                    {if condition="!$second['children']"}
+                    <li>
+                        <a class="J_menuItem" href="{$second.new_url}" name="tabMenuItem">{$second.name}</a>
+                    </li>
+                    {else/}
+                    <li>
+                        <a href="#">{$second.name} <span class="fa arrow"></span></a>
+                        <ul class="nav nav-third-level">
+                            {volist name="second.children" id="third"}  
+                            <li>
+                                <a class="J_menuItem" href="{$third.new_url}" name="tabMenuItem">{$third.name}</a>
+                            </li>
+                            {/volist}
+                        </ul>
+                    </li>
+                    {/if}
+                    {/volist}
+                </ul>
+            </li>
+            {/if}
+            {/volist}
+
+        </ul>
+    </div>
+</nav>

+ 84 - 0
app/common/view/layout/theme.html

@@ -0,0 +1,84 @@
+<div id="right-sidebar">
+    <div class="sidebar-container">
+
+        <ul class="nav nav-tabs navs-3">
+            <li class="active"><a data-toggle="tab" href="#tab-1"> <i
+                        class="fa fa-gear"></i> 主题
+                </a></li>
+        </ul>
+
+        <div class="tab-content">
+            <div id="tab-1" class="tab-pane active">
+                <div class="sidebar-title">
+                    <h3>
+                        <i class="fa fa-comments-o"></i> 主题设置
+                    </h3>
+                    <small><i class="fa fa-tim"></i>
+                        你可以从这里选择和预览主题的布局和样式,这些设置会被保存在本地,下次打开的时候会直接应用这些设置。</small>
+                </div>
+                <div class="skin-setttings">
+                    <div class="title">主题设置</div>
+                    <div class="setings-item">
+                        <span>收起左侧菜单</span>
+                        <div class="switch">
+                            <div class="onoffswitch">
+                                <input type="checkbox" name="collapsemenu"
+                                       class="onoffswitch-checkbox" id="collapsemenu"> <label
+                                       class="onoffswitch-label" for="collapsemenu"> <span
+                                        class="onoffswitch-inner"></span> <span
+                                        class="onoffswitch-switch"></span>
+                                </label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="setings-item">
+                        <span>固定顶部</span>
+
+                        <div class="switch">
+                            <div class="onoffswitch">
+                                <input type="checkbox" name="fixednavbar"
+                                       class="onoffswitch-checkbox" id="fixednavbar"> <label
+                                       class="onoffswitch-label" for="fixednavbar"> <span
+                                        class="onoffswitch-inner"></span> <span
+                                        class="onoffswitch-switch"></span>
+                                </label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="setings-item">
+                        <span> 固定宽度 </span>
+
+                        <div class="switch">
+                            <div class="onoffswitch">
+                                <input type="checkbox" name="boxedlayout"
+                                       class="onoffswitch-checkbox" id="boxedlayout"> <label
+                                       class="onoffswitch-label" for="boxedlayout"> <span
+                                        class="onoffswitch-inner"></span> <span
+                                        class="onoffswitch-switch"></span>
+                                </label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="title">皮肤选择</div>
+                    <div class="setings-item default-skin nb">
+                        <span class="skin-name "> <a href="#" class="s-skin-0">
+                                默认皮肤 </a>
+                        </span>
+                    </div>
+                    <div class="setings-item blue-skin nb">
+                        <span class="skin-name "> <a href="#" class="s-skin-1">
+                                蓝色主题 </a>
+                        </span>
+                    </div>
+                    <div class="setings-item yellow-skin nb">
+                        <span class="skin-name "> <a href="#" class="s-skin-3">
+                                黄色/紫色主题 </a>
+                        </span>
+                    </div>
+                </div>
+            </div>
+
+        </div>
+
+    </div>
+</div>

+ 77 - 0
app/common/view/notice/index.html

@@ -0,0 +1,77 @@
+{extend name="layout/content" /}
+{block name="content"}
+<div class="container-fluid" style="padding: 0 !important;">
+    <div class="row">
+        <input type="hidden" id="noticeCount" value="{$total}">
+        <div class="col-sm-12" id="notices">
+        </div>
+    </div>
+    <div class="page" style="text-align: center;height: 80px;width: 100%;position: fixed;bottom: 0;">
+        <ul class="pagination"></ul>
+    </div>
+</div>
+
+<link href="/static/css/bootstrapv3.min.css" rel="stylesheet">
+<link href="/static/css/notice.css" rel="stylesheet">
+<script type="text/javascript">
+
+    let pageSize = 6;
+    let currentPage = 1;
+    var totalPages = $("#noticeCount").val();
+    $(function () {
+        render();
+    });
+    function render() {
+        $.ajax({
+            url: "/common/notice/list",
+            data: {
+                page: currentPage,
+                pageSize: pageSize
+            },
+            dataType: "json",
+            success: function (result) {
+                var html = "";
+                for (var key in result) {
+                    html = html + "<div class=\"alert alert-success alert-dismissable\" style='background-color: #f5f5f5;position: relative;min-height: 75px;'>\n" +
+                            "<button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button>\n" +
+                            result[key].content +
+                            "<span style='right: 50px;bottom: 5px;position: absolute'><i class='fa fa-calendar'></i> &emsp;" + result[key].createtime + "</span>" +
+                            "</div>";
+                }
+                $("#notices").empty().append(html);
+                setPage(currentPage, Math.ceil(totalPages / pageSize), render)
+            }
+        })
+
+    }
+    function setPage(pageCurrent, pageSum, callback) {
+        $('.pagination').bootstrapPaginator({
+            currentPage: pageCurrent, //当前页。
+            totalPages: pageSum, //总页数。
+            size: "large", //应该是页眉的大小。
+            bootstrapMajorVersion: 3, //bootstrap的版本要求。
+            alignment: "center",
+            numberOfPages: 6, //显示的页数
+            itemTexts: function (type, page, current) {
+                switch (type) {
+                    case "first":
+                        return "首页";
+                    case "prev":
+                        return "上一页";
+                    case "next":
+                        return "下一页";
+                    case "last":
+                        return "末页";
+                    case "page":
+                        return page;
+                }
+            },
+            onPageClicked: function (event, originalEvent, type, page) {
+                // 把当前点击的页码赋值给currentPage, 调用ajax,渲染页面
+                currentPage = page;
+                callback && callback()
+            }
+        });
+    }
+</script>
+{/block}

+ 26 - 0
app/enterprise/common/EnterpriseController.php

@@ -0,0 +1,26 @@
+<?php
+
+namespace app\enterprise\common;
+
+use app\BaseController;
+use app\common\middleware\Auth;
+
+/**
+ * Description of EnterpriseController
+ *
+ * @author sgq
+ */
+class EnterpriseController extends BaseController {
+
+    protected $middleware = [Auth::class];
+    protected $user;
+
+    //put your code here
+    public function __construct(\think\App $app) {
+        parent::__construct($app);
+        $this->user = session("user");
+        if ($this->user["usertype"] != 2)
+            session("user", null);
+    }
+
+}

+ 25 - 0
app/enterprise/controller/Index.php

@@ -0,0 +1,25 @@
+<?php
+
+namespace app\enterprise\controller;
+
+use app\enterprise\common\EnterpriseController;
+
+/**
+ * Description of Index
+ *
+ * @author sgq
+ */
+class Index extends EnterpriseController {
+
+    public function index() {
+        $vars["user"] = [
+            "name" => $this->user["name"],
+            "rolename" => $this->user["rolename"],
+            "avatar" => $this->user["avatar"]
+        ];
+        $menus = \app\common\api\MenuApi::getEnterpriseMenuByType($this->user["type"]);
+        $vars["menus"] = $menus;
+        return view("", $vars);
+    }
+
+}

+ 18 - 0
app/enterprise/controller/Talent.php

@@ -0,0 +1,18 @@
+<?php
+
+namespace app\enterprise\controller;
+
+use app\enterprise\common\EnterpriseController;
+
+/**
+ * Description of Talent
+ *
+ * @author sgq
+ */
+class Talent extends EnterpriseController {
+
+    public function gotoTalentInfo() {
+        
+    }
+
+}

+ 5 - 0
app/enterprise/view/index/index.html

@@ -0,0 +1,5 @@
+{extend name="layout/layout" /}
+{block name="tab"}{include file="layout/tab" /}{/block}
+{block name="right"}{include file="layout/right" /}{/block}
+{block name="theme"}{include file="layout/theme" /}{/block}
+

+ 130 - 0
app/enterprise/view/layout/content.html

@@ -0,0 +1,130 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta name="renderer" content="webkit"/><!-- 让360浏览器默认选择webkit内核 -->
+    <meta http-equiv="Pragma" content="no-cache">
+    <meta http-equiv="Cache-Control" content="no-cache">
+    <meta http-equiv="Expires" CONTENT="0">
+    <!-- 全局css -->
+    <link rel="shortcut icon" href="/static/favicon.ico">
+    <link href="/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
+    <link href="/static/css/font-awesome.css?v=4.4.0" rel="stylesheet">
+    <link href="/static/css/plugins/chosen/chosen.css" rel="stylesheet">
+    <link href="/static/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
+    <link href="/static/css/plugins/validate/bootstrapValidator.min.css" rel="stylesheet">
+    <link href="/static/css/style.css?v=4.1.0" rel="stylesheet">
+    <link href="/static/css/_fstyle.css" rel="stylesheet">
+    <link href="/static/css/plugins/iCheck/custom.css" rel="stylesheet">
+    <link href="/static/css/plugins/webuploader/webuploader.css" rel="stylesheet">
+    <link href="/static/css/plugins/ztree/zTreeStyle.css" rel="stylesheet">
+    <link href="/static/css/plugins/bootstrap-treetable/bootstrap-treetable.css" rel="stylesheet"/>
+    <link href="/static/js/plugins/webuiPopover/dist/jquery.webui-popover.min.css" rel="stylesheet">
+    <link href="/static/js/plugins/viewer/viewer.min.css" rel="stylesheet">
+    <link href="/static/css/lockScreen.css" rel="stylesheet">
+    <link href="/static/css/plugins/toastr/toastr.css" rel="stylesheet">
+    <link href="/static/css/plugins/bootstrap-table/bootstrap-table-jumpto.css" rel="stylesheet">
+<!--    &lt;!&ndash; kendo ui &ndash;&gt;-->
+<!--    <link href="/static/js/plugins/kendoui/styles/kendo.common.min.css" rel="stylesheet">-->
+<!--    <link href="/static/js/plugins/kendoui/styles/kendo.bootstrap.min.css" rel="stylesheet">-->
+
+    <!-- 全局js -->
+    <script src="/static/js/jquery.min.js?v=2.1.4"></script>
+    <script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
+    <script src="/static/js/plugins/webuiPopover/dist/jquery.webui-popover.min.js"></script>
+    <script src="/static/js/plugins/ztree/jquery.ztree.all.min.js"></script>
+    <script src="/static/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
+    <script src="/static/js/plugins/validate/bootstrapValidator.min.js"></script>
+    <script src="/static/js/plugins/validate/zh_CN.js"></script>
+    <script src="/static/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
+    <script src="/static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
+    <script src="/static/js/plugins/bootstrap-treetable/bootstrap-treetable.js"></script>
+    <script src="/static/js/plugins/layer/layer.js"></script>
+    <script src="/static/js/plugins/chosen/chosen.jquery.js"></script>
+    <script src="/static/js/plugins/iCheck/icheck.min.js"></script>
+    <script src="/static/js/plugins/laydate/laydate.js"></script>
+    <script src="/static/js/plugins/webuploader/webuploader.min.js"></script>
+    <script src="/static/js/common/ajax-object.js"></script>
+    <script src="/static/js/common/bootstrap-table-object.js"></script>
+    <script src="/static/js/common/tree-table-object.js"></script>
+    <script src="/static/js/common/web-upload-object.js"></script>
+    <script src="/static/js/common/ztree-object.js"></script>
+    <script type="text/javascript">
+        document.write('<script src="/static/js/common/Feng.js?v=' + (new Date()).getTime() + '"><\/script>');
+        document.write('<script src="/static/modular/common/config.js?v=' + (new Date()).getTime() + '"><\/script>');
+        document.write('<script src="/static/modular/common/upload.js?v=' + (new Date()).getTime() + '"><\/script>');
+        // document.write('<script src="/static/js/plugins/kendoui/js/kendo.all.min.js?v=' + (new Date()).getTime() + '"><\/script>');
+        // document.write('<script src="/static/js/plugins/kendoui/js/messages/kendo.messages.zh-CN.min.js?v=' + (new Date()).getTime() + '"><\/script>');
+        // document.write('<script src="/static/js/common/kendo-table-object.js?v=' + (new Date()).getTime() + '"><\/script>');
+    </script>
+    <script src="/static/js/plugins/viewer/viewer.min.js"></script>
+    <script src="/static/js/plugins/viewer/viewer-jquery.min.js"></script>
+    <script src="/static/js/bootstrap-treeview.js"></script>
+    <script src="/static/js/plugins/toastr/toastr.js"></script>
+
+    <script src="/static/js/plugins/resizable/bootstrap-table-resizable.min.js"></script>
+    <script src="/static/js/plugins/resizable/jquery.resizableColumns.min.js"></script>
+    <script src="/static/js/plugins/bootstrap-pageation/bootstrap-paginator.js"></script>
+
+    <script src="/static/js/plugins/bootstrap-table/bootstrap-table-jumpto.js"></script>
+
+
+    <style type="text/css">
+        table {
+            width: 100px;
+            table-layout: fixed; /* 只有定义了表格的布局算法为fixed,下面td的定义才能起作用。 */
+        }
+
+        td {
+            width: 100%;
+            word-break: keep-all; /* 不换行 */
+            white-space: nowrap; /* 不换行 */
+            overflow: hidden; /* 内容超出宽度时隐藏超出部分的内容 */
+            text-overflow: ellipsis; /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用*/
+        }
+
+        .layui-layer-btn .layui-layer-btn1 {
+            border-color: #009688;
+            background-color: #009688;
+            color: #fff;
+        }
+
+        #fileTable td {
+            word-break: break-word;
+            white-space: inherit;
+        }
+
+        /*.table-hover > tbody > tr:hover {*/
+        /*    background-color: #b1ffb2 !important;      !*修改表格悬浮样式*!*/
+        /*}*/
+
+        .fixed-table-container tbody .selected td {
+            background-color: #b1ffb2 !important;       /*修改表格选中样式*/
+        }
+
+        /*网页统一边灰白色*/
+        /*body{*/
+        /*    filter:grayscale(100%)!important;*/
+        /*    -webkit-filter:grayscale(100%)!important;*/
+        /*    -moz-filter:grayscale(100%)!important;*/
+        /*    -ms-filter:grayscale(100%)!important;*/
+        /*    -o-filter:grayscale(100%)!important;*/
+        /*    filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)!important;*/
+        /*    -webkit-filter:grayscale(1)!important;*/
+        /*}*/
+    </style>
+
+    <script type="text/javascript">
+        Feng.addCtx("");
+        Feng.sessionTimeoutRegistry();
+    </script>
+</head>
+
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+    {block name="content"}{/block}
+</div>
+<script src="/static/js/content.js?v=1.0.0"></script>
+</body>
+</html>

+ 75 - 0
app/enterprise/view/layout/layout.html

@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="utf-8">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        <meta name="renderer" content="webkit">
+        <title>企业用户主页</title>
+        <link rel="shortcut icon" href="/static/favicon.ico">
+        <link href="/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
+        <link href="/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
+        <link href="/static/css/style.css?v=4.1.0" rel="stylesheet">
+        <link href="/static/js/plugins/viewer/viewer.min.css" rel="stylesheet">
+    </head>
+
+    <body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
+
+        <div id="wrapper">
+            <!--左侧导航开始-->            
+            {block name="tab"}{/block}
+            <!--左侧导航结束-->
+
+            <!--右侧部分开始-->
+            {block name="right"}{/block}
+            <!--右侧部分结束-->
+
+            <!--右侧边栏开始-->      
+            {block name="theme"}{/block}
+            <!--右侧边栏结束-->
+
+        </div>
+
+        <!-- 全局js -->
+        <script src="/static/js/jquery.min.js?v=2.1.4"></script>
+        <script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
+        <script src="/static/js/plugins/metisMenu/jquery.metisMenu.js"></script>
+        <script src="/static/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
+        <script src="/static/js/plugins/layer/layer.js"></script>
+
+        <script src="/static/js/common/Feng.js"></script>
+        <!-- 自定义js -->
+        <script src="/static/js/hplus.js?v=4.1.0"></script>
+        <script type="text/javascript" src="/static/js/contabs.js"></script>
+
+        <!-- 第三方插件 -->
+        <script src="/static/js/plugins/pace/pace.min.js"></script>
+        <!-- 放大查看图片 -->
+        <script type="text/javascript" src="/static/js/plugins/viewer/viewer.min.js"></script>
+        <script type="text/javascript" src="/static/js/plugins/viewer/viewer-jquery.min.js"></script>
+
+        <div id="showBigPic" style="margin: 0px; padding: 0px;"></div>
+        <script type="text/javascript">
+            //跳转到更换头像页面
+            var basePath = '';
+            function gotoChangeHeadPortraitPage() {
+                var index = layer.open({
+                    type: 2,
+                    title: '修改头像',
+                    area: ['830px', '500px'], //宽高
+                    fix: false, //不固定
+                    maxmin: true,
+                    content: basePath + '/api/enterpriseUser/gotoChangeHeadPortraitPage',
+                    btn: ['<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
+                    btn1: function (index, layero) {
+                        layer.close(index);
+                    }
+                });
+            }
+            //更换主页头像url
+            function changeHeadPortrait() {
+
+            }
+        </script>
+    </body>
+
+</html>

+ 267 - 0
app/enterprise/view/layout/right.html

@@ -0,0 +1,267 @@
+<input type="hidden" id="avatar"
+       {if condition="!$user['avatar']"}
+       value="/static/img/girl.gif"
+       {else/}
+       value="{$user.avatar}"
+       {/if}
+    />
+<input type="hidden" id="name" value="{$user.name}">
+<input type="hidden" id="roleName" value="{$user.rolename}">
+<div id="page-wrapper" class="gray-bg dashbard-1">
+    <div class="row border-bottom">
+        <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
+            <ul class="nav navbar-top-links navbar-right">
+                <!--
+                <li class="dropdown">
+                    <a class="dropdown-toggle count-info" data-toggle="dropdown" href="#" onmouseover="$('.dropdown-toggle').dropdown()">
+                        <i class="fa fa-bell"></i>
+                        @if(dbsx>0){
+                            <span class="label label-danger">${dbsx}</span>
+                        @}
+                    </a>
+                    @if(tool.isEmpty(tasks)){
+                    @}else{
+                        <ul class="dropdown-menu dropdown-alerts" style="height: 300px;overflow: auto">
+                            @for(item in tasks){
+                                <li>
+                                    <a href="javascript:void(0)">
+                                        <div>
+                                            <i class="fa fa-envelope fa-fw"></i> ${item.description}
+                                            <span class="pull-right text-muted small">${item.createTime}</span>
+                                        </div>
+                                    </a>
+                                </li>
+                                <li class="divider"></li>
+                            @}
+                        </ul>
+                    @}
+                </li>-->
+                <li class="dropdown hidden-xs">
+                    <a class="dropdown-toggle" aria-expanded="false" style="font-weight: 900" onclick="javascript:lockScreen();">
+                        <i class="fa fa-lock"></i> 锁屏
+                    </a>
+                </li>
+                <li class="dropdown hidden-xs">
+                    <a class="right-sidebar-toggle" aria-expanded="false">
+                        <i class="fa fa-tasks"></i> 主题
+                    </a>
+                </li>
+            </ul>
+        </nav>
+    </div>
+    <div class="row content-tabs">
+        <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
+        </button>
+        <nav class="page-tabs J_menuTabs">
+            <div class="page-tabs-content">
+                <a href="javascript:;" class="active J_menuTab" data-id="/common/notice">公告栏</a>
+            </div>
+        </nav>
+        <div class="btn-group roll-nav roll-right">
+            <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span>
+            </button>
+            <ul role="menu" class="dropdown-menu dropdown-menu-right">
+                <li class="J_tabShowActive"><a>定位当前选项卡</a>
+                </li>
+                <li class="divider"></li>
+                <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
+                </li>
+                <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
+                </li>
+            </ul>
+        </div>
+        <a href="/index/auth/logout" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a>
+    </div>
+
+    <div class="row J_mainContent" id="content-main">
+        <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="/common/notice" frameborder="0" data-id="/common/notice" seamless></iframe>
+    </div>
+</div>
+<link href="/static/css/lockScreen.css" rel="stylesheet">
+<script src="/static/js/jquery.min.js?v=2.1.4"></script>
+<script src="/static/js/common/Feng.js"></script>
+<style type="text/css">
+    .dbsx{
+        line-height: 12px;
+        padding: 1px 3px;
+        position: absolute;
+        top: 8px;
+        background-color: #1ab394;
+        color: #FFFFFF;
+        font-size: 3px;
+    }
+    .dropdown-menu .divider {
+        height: 1px;
+        overflow: hidden;
+        background-color: #333;
+    }
+</style>
+<script type="text/javascript">
+    var task = null;
+    var time = 10;
+    window.onload=function (){
+        var locked = sessionStorage.getItem('locked');
+        if(locked)lockScreen();
+        // setTimeLockScreen();
+        initTime(time);
+    }
+
+    // 锁屏
+    function lockScreen() {
+        document.onkeydown = function () {
+            var e = window.event || arguments[0];
+            // 屏蔽 F12
+            if (e.keyCode === 123) {
+                return false;
+                // 屏蔽 Ctrl+Shift+I
+            } else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode === 73)) {
+                return false;
+                // 屏蔽 Shift+F10
+            } else if ((e.shiftKey) && (e.keyCode === 121)) {
+                return false;
+            }
+        };
+        // 屏蔽右键单击
+        document.oncontextmenu = function () {
+            return false;
+        };
+        $('#locking').remove();
+        if ($("#avatar").val()) {
+            $('body').append('<div id="locking"><figure onclick="lockInput(this);"><img src="' +$("#avatar").val() + '" ></figure><h3>' + $("#name").val() + '</h3></div>');
+        }
+        setTimeout(function () {
+            $('#locking').addClass('lock-ani');
+        }, 200);
+        sessionStorage.setItem('locked', true);
+    }
+
+    // 锁屏输入
+    function lockInput(dom) {
+        $(dom).find('img').unwrap();
+        $('#locking').append('<div class="input-group">' +
+            '                   <input class="form-control form-control-lg" id="lockPassword" style="color: #333;" type="password" placeholder="请输入登录密码解锁">' +
+            '                   <div class="input-group-addon" style="background-color: #ccc;border: 1px solid #ccc;" onclick="unlockScreen();">' +
+            '                       <span class="input-group-text">' +
+            '                           <i class="fa fa-key " style="color: #555;font-weight: 900;"></i>' +
+            '                       </span>' +
+            '                   </div>' +
+            '                  </div>');
+        setTimeout(function () {
+            $('#locking .input-group').addClass('lock-input-ani');
+        }, 200);
+        $('#locking input').focus();
+    }
+
+    // 解锁
+    function unlockScreen() {
+        var password = $('#lockPassword').val();
+        var url = "/index/auth/valid_password";
+        $.ajax({
+            type: "post",
+            url: url,
+            dataType: "json",
+            async: false,
+            data: {"password":password},
+            contentType : 'application/x-www-form-urlencoded ',
+            success: function(data) {
+                if(data.code==200){
+                    $('#locking').fadeOut(300, function () {
+                        $('#locking').remove();
+                    });
+                    sessionStorage.removeItem('locked');
+                    document.onkeydown = function () {
+                        var e = window.event || arguments[0];
+                        // 屏蔽 F12
+                        if (e.keyCode === 123) {
+                            return true;
+                            // 屏蔽 Ctrl+Shift+I
+                        } else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode === 73)) {
+                            return true;
+                            // 屏蔽 Shift+F10
+                        } else if ((e.shiftKey) && (e.keyCode === 121)) {
+                            return true;
+                        }
+                    };
+                    // 屏蔽右键单击
+                    document.oncontextmenu = function () {
+                        return true;
+                    };
+                }else{
+                    if(data.status==1){
+                        Feng.error(data.msg);
+                    }else if(data.status==2){
+                        window.location.href = "/index/auth/login";
+                    }
+                }
+            },
+            error: function(data) {
+                window.location.href = "/index/auth/login";
+            }
+        });
+    }
+
+    function initTime(time) {
+        var locked = sessionStorage.getItem('locked');
+        var maxTime = 60*time;
+        task = setInterval(function () {
+            if(!locked){
+                lockScreen();
+            }
+        },1000*maxTime);
+        listenTime();
+    }
+    function listenTime() {
+        var body = document.querySelector('html');
+        body.addEventListener("click",restTime);
+        body.addEventListener("keyup",restTime);
+        body.addEventListener("keypress",restTime);
+        body.addEventListener("keydown",restTime);
+        body.addEventListener("mousemove",restTime);
+        body.addEventListener("mousewheel",restTime);
+    }
+    function restTime(){
+        if (task!=null){
+            clearInterval(task);
+        }
+        initTime(time);
+    }
+
+
+
+    // function setTimeLockScreen(){
+    //     var locked = sessionStorage.getItem('locked');
+    //     (function($){
+    //         funObj = {
+    //             timeUserFun:'timeUserFun',
+    //         }
+    //         $[funObj.timeUserFun] = function(time){
+    //             var time = time || 5;    // 默认参数
+    //             var userTime = time*60;
+    //             var testUser = "";
+    //             var objTime = {
+    //                 init:0,
+    //                 time:function(){
+    //                     objTime.init += 1;
+    //                     if(objTime.init == userTime && !locked){
+    //                         lockScreen();
+    //                     }
+    //                 },
+    //                 eventFun:function(){
+    //                     clearInterval(testUser);
+    //                     objTime.init = 0;
+    //                     testUser = setInterval(objTime.time,1000);
+    //                 }
+    //             }
+    //             testUser = setInterval(objTime.time,1000);
+    //             var body = document.querySelector('html');
+    //             body.addEventListener("click",objTime.eventFun);
+    //             body.addEventListener("keyup",objTime.eventFun);
+    //             body.addEventListener("keypress",objTime.eventFun);
+    //             body.addEventListener("keydown",objTime.eventFun);
+    //             body.addEventListener("mousemove",objTime.eventFun);
+    //             body.addEventListener("mousewheel",objTime.eventFun);
+    //         }
+    //     })(window);
+    //     timeUserFun(5);
+    // }
+</script>

+ 73 - 0
app/enterprise/view/layout/tab.html

@@ -0,0 +1,73 @@
+<nav class="navbar-default navbar-static-side" role="navigation">
+    <div class="nav-close"><i class="fa fa-times-circle"></i>
+    </div>
+    <div class="sidebar-collapse">
+        <ul class="nav" id="side-menu">
+            <li class="nav-header">
+                <div class="dropdown profile-element" style="text-align: center">
+                    <span onclick="gotoChangeHeadPortraitPage()"><img id="head_portrait" alt="image" class="img-circle"
+                               {if condition="!$user['avatar']"}src="/static/img/photoGirl.jpg"
+                               {else/}
+                                    src="{$user.avatar}"
+                               {/if}
+                               width="64px" height="64px"/></span>
+                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
+                        <span class="clear">
+                        <span class="text-muted text-xs block">{$user.rolename}</span>
+                        <span class="block m-t-xs"><strong class="font-bold">{$user.name}</strong></span>
+                        </span>
+                    </a>
+                    <!-- 
+                    <ul class="dropdown-menu m-t-xs">
+                        <li><a class="J_menuItem" href="${ctxPath}/mgr/user_info">个人资料</a></li>
+                        <li><a class="J_menuItem" href="${ctxPath}/mgr/user_chpwd">修改密码</a></li>
+                        <li class="divider"></li>
+                        <li><a href="${ctxPath}/logout">安全退出</a>
+                        </li>
+                    </ul>
+                     -->
+                </div>
+                <div class="logo-element">GS
+                </div>
+            </li>
+            {volist name="menus" id="menu"}
+            {if condition="!$menu['children']"}
+            <li>
+                <a class="J_menuItem" href="{$menu.url}" name="tabMenuItem">
+                    <i class="fa {$menu.icon}"></i>
+                    <span class="nav-label">{$menu.name}</span>
+                </a>
+            </li>
+            {else/}
+            <li>
+                <a href="#">
+                    <i class="fa {$menu.icon}"></i>
+                    <span class="nav-label">{$menu.name}</span>
+                    <span class="fa arrow"></span>
+                </a>
+                <ul class="nav nav-second-level">
+                    {volist name="menu.children" id="second"}                        
+                    {if condition="!$second['children']"}
+                    <li>
+                        <a class="J_menuItem" href="{$second.url}" name="tabMenuItem">{$second.name}</a>
+                    </li>
+                    {else/}
+                    <li>
+                        <a href="#">{$second.name} <span class="fa arrow"></span></a>
+                        <ul class="nav nav-third-level">
+                            {volist name="second.children" id="third"}  
+                            <li>
+                                <a class="J_menuItem" href="{$third.url}" name="tabMenuItem">{$third.name}</a>
+                            </li>
+                            {/volist}
+                        </ul>
+                    </li>
+                    {/if}
+                    {/volist}
+                </ul>
+            </li>
+            {/if}
+            {/volist}
+        </ul>
+    </div>
+</nav>

+ 84 - 0
app/enterprise/view/layout/theme.html

@@ -0,0 +1,84 @@
+<div id="right-sidebar">
+    <div class="sidebar-container">
+
+        <ul class="nav nav-tabs navs-3">
+            <li class="active"><a data-toggle="tab" href="#tab-1"> <i
+                        class="fa fa-gear"></i> 主题
+                </a></li>
+        </ul>
+
+        <div class="tab-content">
+            <div id="tab-1" class="tab-pane active">
+                <div class="sidebar-title">
+                    <h3>
+                        <i class="fa fa-comments-o"></i> 主题设置
+                    </h3>
+                    <small><i class="fa fa-tim"></i>
+                        你可以从这里选择和预览主题的布局和样式,这些设置会被保存在本地,下次打开的时候会直接应用这些设置。</small>
+                </div>
+                <div class="skin-setttings">
+                    <div class="title">主题设置</div>
+                    <div class="setings-item">
+                        <span>收起左侧菜单</span>
+                        <div class="switch">
+                            <div class="onoffswitch">
+                                <input type="checkbox" name="collapsemenu"
+                                       class="onoffswitch-checkbox" id="collapsemenu"> <label
+                                       class="onoffswitch-label" for="collapsemenu"> <span
+                                        class="onoffswitch-inner"></span> <span
+                                        class="onoffswitch-switch"></span>
+                                </label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="setings-item">
+                        <span>固定顶部</span>
+
+                        <div class="switch">
+                            <div class="onoffswitch">
+                                <input type="checkbox" name="fixednavbar"
+                                       class="onoffswitch-checkbox" id="fixednavbar"> <label
+                                       class="onoffswitch-label" for="fixednavbar"> <span
+                                        class="onoffswitch-inner"></span> <span
+                                        class="onoffswitch-switch"></span>
+                                </label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="setings-item">
+                        <span> 固定宽度 </span>
+
+                        <div class="switch">
+                            <div class="onoffswitch">
+                                <input type="checkbox" name="boxedlayout"
+                                       class="onoffswitch-checkbox" id="boxedlayout"> <label
+                                       class="onoffswitch-label" for="boxedlayout"> <span
+                                        class="onoffswitch-inner"></span> <span
+                                        class="onoffswitch-switch"></span>
+                                </label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="title">皮肤选择</div>
+                    <div class="setings-item default-skin nb">
+                        <span class="skin-name "> <a href="#" class="s-skin-0">
+                                默认皮肤 </a>
+                        </span>
+                    </div>
+                    <div class="setings-item blue-skin nb">
+                        <span class="skin-name "> <a href="#" class="s-skin-1">
+                                蓝色主题 </a>
+                        </span>
+                    </div>
+                    <div class="setings-item yellow-skin nb">
+                        <span class="skin-name "> <a href="#" class="s-skin-3">
+                                黄色/紫色主题 </a>
+                        </span>
+                    </div>
+                </div>
+            </div>
+
+        </div>
+
+    </div>
+</div>

+ 17 - 0
app/event.php

@@ -0,0 +1,17 @@
+<?php
+// 事件定义文件
+return [
+    'bind'      => [
+    ],
+
+    'listen'    => [
+        'AppInit'  => [],
+        'HttpRun'  => [],
+        'HttpEnd'  => [],
+        'LogLevel' => [],
+        'LogWrite' => [],
+    ],
+
+    'subscribe' => [
+    ],
+];

+ 84 - 0
app/index/controller/Auth.php

@@ -0,0 +1,84 @@
+<?php
+
+namespace app\index\controller;
+
+use app\BaseController;
+use app\common\api\UserApi;
+
+/**
+ * Description of Login
+ *
+ * @author sgq
+ */
+class Auth extends BaseController {
+
+    /**
+     * 登录
+     * @return type
+     */
+    public function login() {
+        $msg = "";
+        if ($this->request->isPost()) {
+            $username = $this->request["username"];
+            $pwd = $this->request["password"];
+            $usertype = $this->request["usertype"];
+            $user = new UserApi($username, $pwd, $usertype);
+            if (!$userinfo = $user->getUserInfo()) {
+                $msg = "用户不存在";
+            }
+            if (!$user->checkPwd()) {
+                $msg = "用户名或者密码错误";
+            }
+            $url = "/admin";
+            switch ($usertype) {
+                case 1:
+                    //验证错误
+                    break;
+                case 2:
+                    //验证错误
+                    $url = "/enterprise";
+                    break;
+                case 3:
+                    //验证错误
+                    $url = "/person";
+                    break;
+            }
+            if (!$msg) {
+                $user->setSession();
+                if (session("user")) {
+                    return redirect($url);
+                }
+            }
+        }
+        return view("", ["msg" => $msg]);
+    }
+
+    /**
+     * 退出
+     * @return type
+     */
+    public function logout() {
+        session("user", null);
+        return redirect("/index/auth/login");
+    }
+
+    /**
+     * 验证密码
+     */
+    public function valid_password() {
+        if ($user = session("user")) {
+            $username = $user["account"];
+            $usertype = $user["usertype"];
+            $pwd = $this->request["password"];
+            $user = new UserApi($username, $pwd, $usertype);
+            if (!$user->checkPwd()) {
+                return json()->data(["status" => 1, "msg" => "密码错误"]);
+            } else {
+                return json(["code" => 200]);
+            }
+        } else {
+            return json()->data(["status" => 2]);
+        }
+    }
+
+}

+ 256 - 0
app/index/view/auth/login.html

@@ -0,0 +1,256 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="utf-8">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        <title>晋江市人才综合服务平台-登录</title>
+        <link rel="shortcut icon" href="/static/favicon.ico">
+        <link href="/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
+        <link href="/static/css/font-awesome.css?v=4.4.0" rel="stylesheet">
+        <link href="/static/css/style.css?v=4.1.0" rel="stylesheet">
+        <script>if (window.top !== window.self) {
+                window.top.location = window.location;
+            }</script>
+        <script src="/static/js/jquery.min.js?v=2.1.4"></script>
+        <script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
+        <script src="/static/js/plugins/layer/layer.js"></script>
+        <script src="/static/js/common/Feng.js"></script>
+        <script src="/static/js/common/ajax-object.js"></script>
+        <style>
+            .bg{
+                background: url(/static/img/yjqx.png);
+            }
+            input:-webkit-autofill { box-shadow: 0 0 0px 1000px white inset;}
+            #pwd-form .row{
+                padding-top: 10px;
+            }
+        </style>
+    </head>
+
+    <body class="gray-bg" style="background: url(/static/img/login3.jpg) no-repeat center;  overflow: hidden;min-width:1200px;">
+
+        <div class="middle-box text-center loginscreen" style=" margin-left: 51%;margin-top: 11%;">
+            <br/>
+            <form style="position:absolute;top:35%;margin:0 auto;width:300px;" id="login_form" class="m-t" role="form" action="/index/auth/login" method="post">
+                <h4 style="color: red;">{$msg}</h4>
+                <div class="form-group bg" >
+                    <select name="usertype" id="userType" class="form-control" placeholder="用户类型" required="">
+                        <option value="">--- 请选择用户类型 ---</option>
+                        <option value="1">管理员用户</option>
+                        <option value="2">企业用户</option>
+                        <option value="3">个人用户</option>
+                    </select>
+                </div>
+                <div class="form-group">
+                    <input type="text" name="username" class="form-control" placeholder="用户名" autocomplete="off" required="" style="background: url(/static/img/user.png) 6px 9px no-repeat;padding-left: 25px;">
+                </div>
+                <div class="form-group">
+                    <input type="password" name="password" class="form-control" placeholder="密码" autocomplete="off"  required="" style="background: url(/static/img/mm.png) 6px 9px no-repeat;padding-left: 25px;">
+                </div>
+                <div class="form-group" style="float: left;">
+                    <div class="checkbox" style="text-align: left">
+                        <label>
+                            <input type="checkbox" name="remember" style="margin-top: 2px;">记住我
+                        </label>
+                    </div>
+                </div>
+                <button type="submit" class="btn btn-primary block full-width m-b" style="background:url(/static/img/btn.png);height: 34px;"></button>
+                </p>
+                <button onclick="Login.gotoRegisterPage('/api/common/gotoRegisterPage')" type="button" style="border:none; background: #fff;color: #008ef9;margin-left: 150px;">注册新用户</button>
+                <button onclick="Login.openEditPassword()" type="button" style="border:none; background: #fff;float: right;color: #008ef9;">忘记密码</button>
+            </form>
+        </div>
+        <iframe id="hiddenIframe" name="hiddenIframe" style="display: none;"></iframe>
+        <script>
+            Feng.addCtx("");
+            $(function () {
+                sessionStorage.removeItem('locked');
+                $("#kaptcha").on('click', function () {
+                    $("#kaptcha").attr('src', '/kaptcha?' + Math.floor(Math.random() * 100)).fadeIn();
+                });
+                //获取链接参数
+                var param = window.location.search;
+                var userType = Feng.getUrlValue("userType");
+                var username = Feng.getUrlValue("username");
+                var name = Feng.getUrlValue("name");
+                var idCard = Feng.getUrlValue("idCard");
+                var type = Feng.getUrlValue("type");
+                if (param != null && param != '' && userType != null && userType != null && username != null && username != null
+                        && name != null && name != '' && idCard != null && idCard != '') {
+                    Login.gotoRegisterPage('/api/common/gotoRegisterPage' + param);
+                }
+            });
+            var Login = {layerIndex: -1};
+
+            Login.gotoRegisterPage = function (url) {
+                var index = layer.open({
+                    type: 2,
+                    title: '注册新用户',
+                    area: ['950px', '700px'], //宽高
+                    fix: false, //不固定
+                    maxmin: true,
+                    content: Feng.ctxPath + url,
+                    btn: ['<i class="fa fa-check"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
+                    yes: function (index, layero) {
+                        var iframeWin = window[layero.find('iframe')[0]['name']];
+                        //按钮【按钮一】的回调
+                        iframeWin.Register.addSubmit();
+                    }
+                });
+                layer.full(index);
+                this.layerIndex = index;
+            }
+
+            Login.openEditPassword = function () {
+                var index = layer.open({
+                    type: 1,
+                    title: '忘记密码',
+                    area: ['550px', '400px'], //宽高
+                    fix: false, //不固定
+                    maxmin: true,
+                    content: '<form id="pwd-form" class="form-horizontal" >\n' +
+                            '<div class="col-sm-12 form-group">\n' +
+                            '<div class="row">\n' +
+                            '<label class="col-sm-3 control-label spacing"><span class="text-danger">*</span>账号类型</label>\n' +
+                            '<div class="col-sm-9 spacing">\n' +
+                            '<select type="text" class="form-control" id="type" name="type" >' +
+                            '<option value="">请选择</option>' +
+                            '<option value="1">企业账户</option>' +
+                            '<option value="2">个人账户</option>' +
+                            '</select>\n' +
+                            '</div>\n' +
+                            '</div>\n' +
+                            '<div class="row">\n' +
+                            '<label class="col-sm-3 control-label spacing"><span class="text-danger">*</span>账号</label>\n' +
+                            '<div class="col-sm-9 spacing">\n' +
+                            '<input type="text" autocomplete="off" class="form-control" id="username" name="username" />\n' +
+                            '</div>\n' +
+                            '</div>\n' +
+                            '<div class="row">\n' +
+                            '<label class="col-sm-3 control-label spacing"><span class="text-danger">*</span>新密码</label>\n' +
+                            '<div class="col-sm-9 spacing">\n' +
+                            '<input type="password" autocomplete="off" class="form-control" id="password" name="password" />\n' +
+                            '</div>\n' +
+                            '</div>\n' +
+                            '<div class="row">\n' +
+                            '<label class="col-sm-3 control-label spacing"><span class="text-danger">*</span>重复新密码</label>\n' +
+                            '<div class="col-sm-9 spacing">\n' +
+                            '<input autocomplete="off" type="password" class="form-control" id="re_password" />\n' +
+                            '</div>\n' +
+                            '</div>\n' +
+                            '<div class="row">\n' +
+                            '<label class="col-sm-3 control-label spacing"><span class="text-danger">*</span>手机号</label>\n' +
+                            '<div class="col-sm-9 spacing form-inline">\n' +
+                            '<input autocomplete="off" type="text" style="width: 250px;" class="form-control" id="phone" name="phone" placeholder="企业账号请填写经办人手机号码"/>\n' +
+                            '<button id="smsBtn" style="margin-bottom: 0px;" onclick="Login.sendSms()" type="button" class="btn btn-xs btn-info">获取验证码</button>\n' +
+                            '</div>\n' +
+                            '</div>\n' +
+                            '<div class="row">\n' +
+                            '<label class="col-sm-3 control-label spacing"><span class="text-danger">*</span>手机验证码</label>\n' +
+                            '<div class="col-sm-9 spacing">\n' +
+                            '<input autocomplete="off" type="text" class="form-control" id="verificationCode" name="verificationCode" />\n' +
+                            '</div>\n' +
+                            '</div>\n' +
+                            '</div>\n' +
+                            '</form>',
+                    btn: ['<i class="fa fa-check"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
+                    btnAlign: 'c',
+                    yes: function (index, layero) {
+                        var type = $("#type").val();
+                        var username = $("#username").val();
+                        var password = $("#password").val();
+                        var rePassword = $("#re_password").val();
+                        var phone = $("#phone").val();
+                        var verificationCode = $("#verificationCode").val();
+                        if (type == null || type == "") {
+                            Feng.info("请选择账号类型!");
+                            return;
+                        }
+                        if (username == null || username == '') {
+                            Feng.info("请填写账号名!");
+                            return;
+                        }
+                        if (password == null || password == '') {
+                            Feng.info("请填写密码!");
+                            return;
+                        }
+                        if (rePassword == null || rePassword == '') {
+                            Feng.info("请填写重复密码!");
+                            return;
+                        }
+                        if (password != rePassword) {
+                            Feng.info("两次密码填写不一致!");
+                            return;
+                        }
+                        if (phone == null || phone == '') {
+                            Feng.info("请填写手机号!");
+                            return;
+                        }
+                        if (verificationCode == null || verificationCode == '') {
+                            Feng.info("请填写手机验证码!");
+                            return;
+                        }
+                        if (!/0?(13|14|15|17|18|19)[0-9]{9}/.test(phone)) {
+                            Feng.info("手机号格式不合法!");
+                            return;
+                        }
+                        var da = {"type": type, "username": username, "password": password, "rePassword": rePassword, "phone": phone, "verificationCode": verificationCode};
+                        var ajax = new $ax(Feng.ctxPath + "/api/common/findBackPassword", function (data) {
+                            Feng.info(data.msg);
+                            if (data.code == 200) {
+                                layer.close(index);
+                            }
+                        }, function (data) {
+                            Feng.error("操作失败!" + data.responseJSON.message + "!");
+                        });
+                        ajax.set(da);
+                        ajax.start();
+                    }
+                });
+            }
+
+            var countDown = 0;
+            Login.sendSms = function () {
+                var phone = $("#phone").val();
+                if (phone == null || phone == "") {
+                    Feng.info("请填写手机号!");
+                    return;
+                }
+                phone = $.trim(phone);
+                if (!Feng.checkMobilePhoneNum(phone)) {
+                    Feng.info("手机号格式有误,请填写正确的手机号码!");
+                    return;
+                }
+                Login.BtnCountDown();
+                var ajax = new $ax(Feng.ctxPath + "/api/common/verificationCode?phone=" + phone + "&type=1", function (data) {
+                    Feng.info(data.msg);
+                }, function (data) {
+                    Feng.error("操作失败!" + data.responseJSON.message + "!");
+                });
+                ajax.set(null);
+                ajax.start();
+            }
+
+            Login.BtnCountDown = function () {
+                if (countDown == 0) {
+                    countDown = 60;
+                } else if (countDown == 1) {
+                    $("#smsBtn").removeAttr("disabled");
+                    $("#smsBtn").html("获取验证码");
+                    countDown = 0;
+                    return;
+                }
+                $("#smsBtn").attr("disabled", true);
+                $("#smsBtn").html(countDown + "秒");
+                countDown--;
+                setTimeout("Login.BtnCountDown()", 1000);
+            }
+
+            Login.callBack = function (data) {
+
+            }
+        </script>
+
+    </body>
+
+</html>

+ 12 - 0
app/middleware.php

@@ -0,0 +1,12 @@
+<?php
+
+// 全局中间件定义文件
+return [
+    // 全局请求缓存
+    // \think\middleware\CheckRequestCache::class,
+    // 多语言加载
+    // \think\middleware\LoadLangPack::class,
+    // Session初始化
+    \think\middleware\SessionInit::class,
+    app\common\middleware\Log::class
+];

+ 26 - 0
app/person/common/PersonController.php

@@ -0,0 +1,26 @@
+<?php
+
+namespace app\person\common;
+
+use app\BaseController;
+use app\common\middleware\Auth;
+
+/**
+ * Description of PersonController
+ *
+ * @author sgq
+ */
+class PersonController extends BaseController {
+
+    protected $middleware = [Auth::class];
+    protected $user;
+
+    //put your code here
+    public function __construct(\think\App $app) {
+        parent::__construct($app);
+        $this->user = session("user");
+        if ($this->user["usertype"] != 3)
+            session("user", null);
+    }
+
+}

+ 130 - 0
app/person/view/layout/content.html

@@ -0,0 +1,130 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta name="renderer" content="webkit"/><!-- 让360浏览器默认选择webkit内核 -->
+    <meta http-equiv="Pragma" content="no-cache">
+    <meta http-equiv="Cache-Control" content="no-cache">
+    <meta http-equiv="Expires" CONTENT="0">
+    <!-- 全局css -->
+    <link rel="shortcut icon" href="/static/favicon.ico">
+    <link href="/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
+    <link href="/static/css/font-awesome.css?v=4.4.0" rel="stylesheet">
+    <link href="/static/css/plugins/chosen/chosen.css" rel="stylesheet">
+    <link href="/static/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
+    <link href="/static/css/plugins/validate/bootstrapValidator.min.css" rel="stylesheet">
+    <link href="/static/css/style.css?v=4.1.0" rel="stylesheet">
+    <link href="/static/css/_fstyle.css" rel="stylesheet">
+    <link href="/static/css/plugins/iCheck/custom.css" rel="stylesheet">
+    <link href="/static/css/plugins/webuploader/webuploader.css" rel="stylesheet">
+    <link href="/static/css/plugins/ztree/zTreeStyle.css" rel="stylesheet">
+    <link href="/static/css/plugins/bootstrap-treetable/bootstrap-treetable.css" rel="stylesheet"/>
+    <link href="/static/js/plugins/webuiPopover/dist/jquery.webui-popover.min.css" rel="stylesheet">
+    <link href="/static/js/plugins/viewer/viewer.min.css" rel="stylesheet">
+    <link href="/static/css/lockScreen.css" rel="stylesheet">
+    <link href="/static/css/plugins/toastr/toastr.css" rel="stylesheet">
+    <link href="/static/css/plugins/bootstrap-table/bootstrap-table-jumpto.css" rel="stylesheet">
+<!--    &lt;!&ndash; kendo ui &ndash;&gt;-->
+<!--    <link href="/static/js/plugins/kendoui/styles/kendo.common.min.css" rel="stylesheet">-->
+<!--    <link href="/static/js/plugins/kendoui/styles/kendo.bootstrap.min.css" rel="stylesheet">-->
+
+    <!-- 全局js -->
+    <script src="/static/js/jquery.min.js?v=2.1.4"></script>
+    <script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
+    <script src="/static/js/plugins/webuiPopover/dist/jquery.webui-popover.min.js"></script>
+    <script src="/static/js/plugins/ztree/jquery.ztree.all.min.js"></script>
+    <script src="/static/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
+    <script src="/static/js/plugins/validate/bootstrapValidator.min.js"></script>
+    <script src="/static/js/plugins/validate/zh_CN.js"></script>
+    <script src="/static/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
+    <script src="/static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
+    <script src="/static/js/plugins/bootstrap-treetable/bootstrap-treetable.js"></script>
+    <script src="/static/js/plugins/layer/layer.js"></script>
+    <script src="/static/js/plugins/chosen/chosen.jquery.js"></script>
+    <script src="/static/js/plugins/iCheck/icheck.min.js"></script>
+    <script src="/static/js/plugins/laydate/laydate.js"></script>
+    <script src="/static/js/plugins/webuploader/webuploader.min.js"></script>
+    <script src="/static/js/common/ajax-object.js"></script>
+    <script src="/static/js/common/bootstrap-table-object.js"></script>
+    <script src="/static/js/common/tree-table-object.js"></script>
+    <script src="/static/js/common/web-upload-object.js"></script>
+    <script src="/static/js/common/ztree-object.js"></script>
+    <script type="text/javascript">
+        document.write('<script src="/static/js/common/Feng.js?v=' + (new Date()).getTime() + '"><\/script>');
+        document.write('<script src="/static/modular/common/config.js?v=' + (new Date()).getTime() + '"><\/script>');
+        document.write('<script src="/static/modular/common/upload.js?v=' + (new Date()).getTime() + '"><\/script>');
+        // document.write('<script src="/static/js/plugins/kendoui/js/kendo.all.min.js?v=' + (new Date()).getTime() + '"><\/script>');
+        // document.write('<script src="/static/js/plugins/kendoui/js/messages/kendo.messages.zh-CN.min.js?v=' + (new Date()).getTime() + '"><\/script>');
+        // document.write('<script src="/static/js/common/kendo-table-object.js?v=' + (new Date()).getTime() + '"><\/script>');
+    </script>
+    <script src="/static/js/plugins/viewer/viewer.min.js"></script>
+    <script src="/static/js/plugins/viewer/viewer-jquery.min.js"></script>
+    <script src="/static/js/bootstrap-treeview.js"></script>
+    <script src="/static/js/plugins/toastr/toastr.js"></script>
+
+    <script src="/static/js/plugins/resizable/bootstrap-table-resizable.min.js"></script>
+    <script src="/static/js/plugins/resizable/jquery.resizableColumns.min.js"></script>
+    <script src="/static/js/plugins/bootstrap-pageation/bootstrap-paginator.js"></script>
+
+    <script src="/static/js/plugins/bootstrap-table/bootstrap-table-jumpto.js"></script>
+
+
+    <style type="text/css">
+        table {
+            width: 100px;
+            table-layout: fixed; /* 只有定义了表格的布局算法为fixed,下面td的定义才能起作用。 */
+        }
+
+        td {
+            width: 100%;
+            word-break: keep-all; /* 不换行 */
+            white-space: nowrap; /* 不换行 */
+            overflow: hidden; /* 内容超出宽度时隐藏超出部分的内容 */
+            text-overflow: ellipsis; /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用*/
+        }
+
+        .layui-layer-btn .layui-layer-btn1 {
+            border-color: #009688;
+            background-color: #009688;
+            color: #fff;
+        }
+
+        #fileTable td {
+            word-break: break-word;
+            white-space: inherit;
+        }
+
+        /*.table-hover > tbody > tr:hover {*/
+        /*    background-color: #b1ffb2 !important;      !*修改表格悬浮样式*!*/
+        /*}*/
+
+        .fixed-table-container tbody .selected td {
+            background-color: #b1ffb2 !important;       /*修改表格选中样式*/
+        }
+
+        /*网页统一边灰白色*/
+        /*body{*/
+        /*    filter:grayscale(100%)!important;*/
+        /*    -webkit-filter:grayscale(100%)!important;*/
+        /*    -moz-filter:grayscale(100%)!important;*/
+        /*    -ms-filter:grayscale(100%)!important;*/
+        /*    -o-filter:grayscale(100%)!important;*/
+        /*    filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)!important;*/
+        /*    -webkit-filter:grayscale(1)!important;*/
+        /*}*/
+    </style>
+
+    <script type="text/javascript">
+        Feng.addCtx("");
+        Feng.sessionTimeoutRegistry();
+    </script>
+</head>
+
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+    {block name="content"}{/block}
+</div>
+<script src="/static/js/content.js?v=1.0.0"></script>
+</body>
+</html>

+ 74 - 0
app/person/view/layout/layout.html

@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="utf-8">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        <meta name="renderer" content="webkit">
+        <title>个人用户主页</title>
+        <link rel="shortcut icon" href="/static/favicon.ico">
+        <link href="/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
+        <link href="/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
+        <link href="/static/css/style.css?v=4.1.0" rel="stylesheet">
+        <link href="/static/js/plugins/viewer/viewer.min.css" rel="stylesheet">
+    </head>
+
+    <body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">    
+        <div id="wrapper">
+            <!--左侧导航开始-->            
+            {block name="tab"}{/block}
+            <!--左侧导航结束-->
+
+            <!--右侧部分开始-->
+            {block name="right"}{/block}
+            <!--右侧部分结束-->
+
+            <!--右侧边栏开始-->      
+            {block name="theme"}{/block}
+            <!--右侧边栏结束-->
+
+        </div>
+
+        <!-- 全局js -->
+        <script src="/static/js/jquery.min.js?v=2.1.4"></script>
+        <script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
+        <script src="/static/js/plugins/metisMenu/jquery.metisMenu.js"></script>
+        <script src="/static/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
+        <script src="/static/js/plugins/layer/layer.js"></script>
+        <script src="/static/js/common/Feng.js"></script>
+
+        <!-- 自定义js -->
+        <script src="/static/js/hplus.js?v=4.1.0"></script>
+        <script type="text/javascript" src="/static/js/contabs.js"></script>
+
+        <!-- 第三方插件 -->
+        <script src="/static/js/plugins/pace/pace.min.js"></script>
+        <!-- 放大查看图片 -->
+        <script type="text/javascript" src="/static/js/plugins/viewer/viewer.min.js"></script>
+        <script type="text/javascript" src="/static/js/plugins/viewer/viewer-jquery.min.js"></script>
+
+        <div id="showBigPic" style="margin: 0px; padding: 0px;"></div>
+        <script type="text/javascript">
+            //跳转到更换头像页面
+            var basePath = '';
+            function gotoChangeHeadPortraitPage() {
+                var index = layer.open({
+                    type: 2,
+                    title: '修改头像',
+                    area: ['830px', '500px'], //宽高
+                    fix: false, //不固定
+                    maxmin: true,
+                    content: basePath + '/api/personalUser/gotoChangeHeadPortraitPage',
+                    btn: ['<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
+                    btn1: function (index, layero) {
+                        layer.close(index);
+                    }
+                });
+            }
+            //更换主页头像url
+            function changeHeadPortrait() {
+
+            }
+        </script>
+    </body>
+
+</html>

+ 267 - 0
app/person/view/layout/right.html

@@ -0,0 +1,267 @@
+<input type="hidden" id="avatar"
+       {if condition="!$user['avatar']"}
+       value="/static/img/girl.gif"
+       {else/}
+       value="{$user.avatar}"
+       {/if}
+    />
+<input type="hidden" id="name" value="{$user.name}">
+<input type="hidden" id="roleName" value="{$user.rolename}">
+<div id="page-wrapper" class="gray-bg dashbard-1">
+    <div class="row border-bottom">
+        <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
+            <ul class="nav navbar-top-links navbar-right">
+                <!--
+                <li class="dropdown">
+                    <a class="dropdown-toggle count-info" data-toggle="dropdown" href="#" onmouseover="$('.dropdown-toggle').dropdown()">
+                        <i class="fa fa-bell"></i>
+                        @if(dbsx>0){
+                            <span class="label label-danger">${dbsx}</span>
+                        @}
+                    </a>
+                    @if(tool.isEmpty(tasks)){
+                    @}else{
+                        <ul class="dropdown-menu dropdown-alerts" style="height: 300px;overflow: auto">
+                            @for(item in tasks){
+                                <li>
+                                    <a href="javascript:void(0)">
+                                        <div>
+                                            <i class="fa fa-envelope fa-fw"></i> ${item.description}
+                                            <span class="pull-right text-muted small">${item.createTime}</span>
+                                        </div>
+                                    </a>
+                                </li>
+                                <li class="divider"></li>
+                            @}
+                        </ul>
+                    @}
+                </li>-->
+                <li class="dropdown hidden-xs">
+                    <a class="dropdown-toggle" aria-expanded="false" style="font-weight: 900" onclick="javascript:lockScreen();">
+                        <i class="fa fa-lock"></i> 锁屏
+                    </a>
+                </li>
+                <li class="dropdown hidden-xs">
+                    <a class="right-sidebar-toggle" aria-expanded="false">
+                        <i class="fa fa-tasks"></i> 主题
+                    </a>
+                </li>
+            </ul>
+        </nav>
+    </div>
+    <div class="row content-tabs">
+        <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
+        </button>
+        <nav class="page-tabs J_menuTabs">
+            <div class="page-tabs-content">
+                <a href="javascript:;" class="active J_menuTab" data-id="/common/notice">公告栏</a>
+            </div>
+        </nav>
+        <div class="btn-group roll-nav roll-right">
+            <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span>
+            </button>
+            <ul role="menu" class="dropdown-menu dropdown-menu-right">
+                <li class="J_tabShowActive"><a>定位当前选项卡</a>
+                </li>
+                <li class="divider"></li>
+                <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
+                </li>
+                <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
+                </li>
+            </ul>
+        </div>
+        <a href="/index/auth/logout" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a>
+    </div>
+
+    <div class="row J_mainContent" id="content-main">
+        <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="/common/notice" frameborder="0" data-id="/common/notice" seamless></iframe>
+    </div>
+</div>
+<link href="/static/css/lockScreen.css" rel="stylesheet">
+<script src="/static/js/jquery.min.js?v=2.1.4"></script>
+<script src="/static/js/common/Feng.js"></script>
+<style type="text/css">
+    .dbsx{
+        line-height: 12px;
+        padding: 1px 3px;
+        position: absolute;
+        top: 8px;
+        background-color: #1ab394;
+        color: #FFFFFF;
+        font-size: 3px;
+    }
+    .dropdown-menu .divider {
+        height: 1px;
+        overflow: hidden;
+        background-color: #333;
+    }
+</style>
+<script type="text/javascript">
+    var task = null;
+    var time = 10;
+    window.onload=function (){
+        var locked = sessionStorage.getItem('locked');
+        if(locked)lockScreen();
+        // setTimeLockScreen();
+        initTime(time);
+    }
+
+    // 锁屏
+    function lockScreen() {
+        document.onkeydown = function () {
+            var e = window.event || arguments[0];
+            // 屏蔽 F12
+            if (e.keyCode === 123) {
+                return false;
+                // 屏蔽 Ctrl+Shift+I
+            } else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode === 73)) {
+                return false;
+                // 屏蔽 Shift+F10
+            } else if ((e.shiftKey) && (e.keyCode === 121)) {
+                return false;
+            }
+        };
+        // 屏蔽右键单击
+        document.oncontextmenu = function () {
+            return false;
+        };
+        $('#locking').remove();
+        if ($("#avatar").val()) {
+            $('body').append('<div id="locking"><figure onclick="lockInput(this);"><img src="' +$("#avatar").val() + '" ></figure><h3>' + $("#name").val() + '</h3></div>');
+        }
+        setTimeout(function () {
+            $('#locking').addClass('lock-ani');
+        }, 200);
+        sessionStorage.setItem('locked', true);
+    }
+
+    // 锁屏输入
+    function lockInput(dom) {
+        $(dom).find('img').unwrap();
+        $('#locking').append('<div class="input-group">' +
+            '                   <input class="form-control form-control-lg" id="lockPassword" style="color: #333;" type="password" placeholder="请输入登录密码解锁">' +
+            '                   <div class="input-group-addon" style="background-color: #ccc;border: 1px solid #ccc;" onclick="unlockScreen();">' +
+            '                       <span class="input-group-text">' +
+            '                           <i class="fa fa-key " style="color: #555;font-weight: 900;"></i>' +
+            '                       </span>' +
+            '                   </div>' +
+            '                  </div>');
+        setTimeout(function () {
+            $('#locking .input-group').addClass('lock-input-ani');
+        }, 200);
+        $('#locking input').focus();
+    }
+
+    // 解锁
+    function unlockScreen() {
+        var password = $('#lockPassword').val();
+        var url = "/index/auth/valid_password";
+        $.ajax({
+            type: "post",
+            url: url,
+            dataType: "json",
+            async: false,
+            data: {"password":password},
+            contentType : 'application/x-www-form-urlencoded ',
+            success: function(data) {
+                if(data.code==200){
+                    $('#locking').fadeOut(300, function () {
+                        $('#locking').remove();
+                    });
+                    sessionStorage.removeItem('locked');
+                    document.onkeydown = function () {
+                        var e = window.event || arguments[0];
+                        // 屏蔽 F12
+                        if (e.keyCode === 123) {
+                            return true;
+                            // 屏蔽 Ctrl+Shift+I
+                        } else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode === 73)) {
+                            return true;
+                            // 屏蔽 Shift+F10
+                        } else if ((e.shiftKey) && (e.keyCode === 121)) {
+                            return true;
+                        }
+                    };
+                    // 屏蔽右键单击
+                    document.oncontextmenu = function () {
+                        return true;
+                    };
+                }else{
+                    if(data.status==1){
+                        Feng.error(data.msg);
+                    }else if(data.status==2){
+                        window.location.href = "/index/auth/login";
+                    }
+                }
+            },
+            error: function(data) {
+                window.location.href = "/index/auth/login";
+            }
+        });
+    }
+
+    function initTime(time) {
+        var locked = sessionStorage.getItem('locked');
+        var maxTime = 60*time;
+        task = setInterval(function () {
+            if(!locked){
+                lockScreen();
+            }
+        },1000*maxTime);
+        listenTime();
+    }
+    function listenTime() {
+        var body = document.querySelector('html');
+        body.addEventListener("click",restTime);
+        body.addEventListener("keyup",restTime);
+        body.addEventListener("keypress",restTime);
+        body.addEventListener("keydown",restTime);
+        body.addEventListener("mousemove",restTime);
+        body.addEventListener("mousewheel",restTime);
+    }
+    function restTime(){
+        if (task!=null){
+            clearInterval(task);
+        }
+        initTime(time);
+    }
+
+
+
+    // function setTimeLockScreen(){
+    //     var locked = sessionStorage.getItem('locked');
+    //     (function($){
+    //         funObj = {
+    //             timeUserFun:'timeUserFun',
+    //         }
+    //         $[funObj.timeUserFun] = function(time){
+    //             var time = time || 5;    // 默认参数
+    //             var userTime = time*60;
+    //             var testUser = "";
+    //             var objTime = {
+    //                 init:0,
+    //                 time:function(){
+    //                     objTime.init += 1;
+    //                     if(objTime.init == userTime && !locked){
+    //                         lockScreen();
+    //                     }
+    //                 },
+    //                 eventFun:function(){
+    //                     clearInterval(testUser);
+    //                     objTime.init = 0;
+    //                     testUser = setInterval(objTime.time,1000);
+    //                 }
+    //             }
+    //             testUser = setInterval(objTime.time,1000);
+    //             var body = document.querySelector('html');
+    //             body.addEventListener("click",objTime.eventFun);
+    //             body.addEventListener("keyup",objTime.eventFun);
+    //             body.addEventListener("keypress",objTime.eventFun);
+    //             body.addEventListener("keydown",objTime.eventFun);
+    //             body.addEventListener("mousemove",objTime.eventFun);
+    //             body.addEventListener("mousewheel",objTime.eventFun);
+    //         }
+    //     })(window);
+    //     timeUserFun(5);
+    // }
+</script>

+ 78 - 0
app/person/view/layout/tab.html

@@ -0,0 +1,78 @@
+<nav class="navbar-default navbar-static-side" role="navigation">
+    <div class="nav-close"><i class="fa fa-times-circle"></i>
+    </div>
+    <div class="sidebar-collapse">
+        <ul class="nav" id="side-menu">
+            <li class="nav-header">
+                <div class="dropdown profile-element" style="text-align: center">
+                    <span onclick="gotoChangeHeadPortraitPage()"><img id="head_portrait" alt="image" class="img-circle"
+                               @if(isEmpty(avatar)){
+                                  @if(sex==1){
+                                  src="${ctxPath}/static/img/photoBoy.png"
+                                  @}else{
+                                  src="${ctxPath}/static/img/photoGirl.jpg"
+                                  @}
+                               @}else{
+                                    src="${avatar}"
+                               @}
+                               width="64px" height="64px"/></span>
+                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
+                        <span class="clear">
+                        <span class="text-muted text-xs block">${role}</span>
+                        <span class="block m-t-xs"><strong class="font-bold">${name}</strong></span>
+                        </span>
+                    </a>
+                    <!-- 
+                    <ul class="dropdown-menu m-t-xs">
+                        <li><a class="J_menuItem" href="${ctxPath}/mgr/user_info">个人资料</a></li>
+                        <li><a class="J_menuItem" href="${ctxPath}/mgr/user_chpwd">修改密码</a></li>
+                        <li class="divider"></li>
+                        <li><a href="${ctxPath}/logout">安全退出</a>
+                        </li>
+                    </ul>
+                     -->
+                </div>
+            </li>
+            
+            @for(title in titles){
+                @if(tool.isEmpty(title.children)){
+                    <li>
+                        <a class="J_menuItem" href="${ctxPath}${title.url}" name="tabMenuItem">
+                            <i class="fa ${title.icon}"></i>
+                            <span class="nav-label">${title.name}</span>
+                        </a>
+                    </li>
+                @}else{
+                    <li>
+                        <a href="#">
+                            <i class="fa ${title.icon}"></i>
+                            <span class="nav-label">${title.name}</span>
+                            <span class="fa arrow"></span>
+                        </a>
+                        <ul class="nav nav-second-level">
+                            @for(subTitle in title.children){
+                                @if(tool.isEmpty(subTitle.children)){
+                                    <li>
+                                        <a class="J_menuItem" href="${ctxPath}${subTitle.url}" name="tabMenuItem">${subTitle.name}</a>
+                                    </li>
+                                @}else{
+                                    <li>
+                                        <a href="#">${subTitle.name} <span class="fa arrow"></span></a>
+                                        <ul class="nav nav-third-level">
+                                            @for(thirdTitle in subTitle.children){
+                                            <li>
+                                                <a class="J_menuItem" href="${ctxPath}${thirdTitle.url}" name="tabMenuItem">${thirdTitle.name}</a>
+                                            </li>
+                                            @}
+                                        </ul>
+                                    </li>
+                                @}
+                            @}
+                        </ul>
+                    </li>
+                @}
+            @}
+
+        </ul>
+    </div>
+</nav>

+ 84 - 0
app/person/view/layout/theme.html

@@ -0,0 +1,84 @@
+<div id="right-sidebar">
+    <div class="sidebar-container">
+
+        <ul class="nav nav-tabs navs-3">
+            <li class="active"><a data-toggle="tab" href="#tab-1"> <i
+                        class="fa fa-gear"></i> 主题
+                </a></li>
+        </ul>
+
+        <div class="tab-content">
+            <div id="tab-1" class="tab-pane active">
+                <div class="sidebar-title">
+                    <h3>
+                        <i class="fa fa-comments-o"></i> 主题设置
+                    </h3>
+                    <small><i class="fa fa-tim"></i>
+                        你可以从这里选择和预览主题的布局和样式,这些设置会被保存在本地,下次打开的时候会直接应用这些设置。</small>
+                </div>
+                <div class="skin-setttings">
+                    <div class="title">主题设置</div>
+                    <div class="setings-item">
+                        <span>收起左侧菜单</span>
+                        <div class="switch">
+                            <div class="onoffswitch">
+                                <input type="checkbox" name="collapsemenu"
+                                       class="onoffswitch-checkbox" id="collapsemenu"> <label
+                                       class="onoffswitch-label" for="collapsemenu"> <span
+                                        class="onoffswitch-inner"></span> <span
+                                        class="onoffswitch-switch"></span>
+                                </label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="setings-item">
+                        <span>固定顶部</span>
+
+                        <div class="switch">
+                            <div class="onoffswitch">
+                                <input type="checkbox" name="fixednavbar"
+                                       class="onoffswitch-checkbox" id="fixednavbar"> <label
+                                       class="onoffswitch-label" for="fixednavbar"> <span
+                                        class="onoffswitch-inner"></span> <span
+                                        class="onoffswitch-switch"></span>
+                                </label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="setings-item">
+                        <span> 固定宽度 </span>
+
+                        <div class="switch">
+                            <div class="onoffswitch">
+                                <input type="checkbox" name="boxedlayout"
+                                       class="onoffswitch-checkbox" id="boxedlayout"> <label
+                                       class="onoffswitch-label" for="boxedlayout"> <span
+                                        class="onoffswitch-inner"></span> <span
+                                        class="onoffswitch-switch"></span>
+                                </label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="title">皮肤选择</div>
+                    <div class="setings-item default-skin nb">
+                        <span class="skin-name "> <a href="#" class="s-skin-0">
+                                默认皮肤 </a>
+                        </span>
+                    </div>
+                    <div class="setings-item blue-skin nb">
+                        <span class="skin-name "> <a href="#" class="s-skin-1">
+                                蓝色主题 </a>
+                        </span>
+                    </div>
+                    <div class="setings-item yellow-skin nb">
+                        <span class="skin-name "> <a href="#" class="s-skin-3">
+                                黄色/紫色主题 </a>
+                        </span>
+                    </div>
+                </div>
+            </div>
+
+        </div>
+
+    </div>
+</div>

+ 9 - 0
app/provider.php

@@ -0,0 +1,9 @@
+<?php
+use app\ExceptionHandle;
+use app\Request;
+
+// 容器Provider定义文件
+return [
+    'think\Request'          => Request::class,
+    'think\exception\Handle' => ExceptionHandle::class,
+];

+ 9 - 0
app/service.php

@@ -0,0 +1,9 @@
+<?php
+
+use app\AppService;
+
+// 系统服务定义文件
+// 服务在完成全局初始化之后执行
+return [
+    AppService::class,
+];

+ 50 - 0
composer.json

@@ -0,0 +1,50 @@
+{
+    "name": "topthink/think",
+    "description": "the new thinkphp framework",
+    "type": "project",
+    "keywords": [
+        "framework",
+        "thinkphp",
+        "ORM"
+    ],
+    "homepage": "https://www.thinkphp.cn/",
+    "license": "Apache-2.0",
+    "authors": [
+        {
+            "name": "liu21st",
+            "email": "liu21st@gmail.com"
+        },
+        {
+            "name": "yunwuxin",
+            "email": "448901948@qq.com"
+        }        
+    ],
+    "require": {
+        "php": ">=7.2.5",
+        "topthink/framework": "^6.0.0",
+        "topthink/think-orm": "^2.0",
+        "topthink/think-view": "^1.0",
+        "topthink/think-multi-app": "^1.0"
+    },
+    "require-dev": {
+        "symfony/var-dumper": "^4.2",
+        "topthink/think-trace":"^1.0"
+    },
+    "autoload": {
+        "psr-4": {
+            "app\\": "app"
+        },
+        "psr-0": {
+            "": "extend/"
+        }
+    },
+    "config": {
+        "preferred-install": "dist"
+    },
+    "scripts": {
+        "post-autoload-dump": [
+            "@php think service:discover",
+            "@php think vendor:publish"
+        ]
+    }
+}

+ 1268 - 0
composer.lock

@@ -0,0 +1,1268 @@
+{
+    "_readme": [
+        "This file locks the dependencies of your project to a known state",
+        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+        "This file is @generated automatically"
+    ],
+    "content-hash": "dfd7aef3ee01e0361a2d01950dff982a",
+    "packages": [
+        {
+            "name": "league/flysystem",
+            "version": "1.1.9",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/thephpleague/flysystem.git",
+                "reference": "094defdb4a7001845300334e7c1ee2335925ef99"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/094defdb4a7001845300334e7c1ee2335925ef99",
+                "reference": "094defdb4a7001845300334e7c1ee2335925ef99",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "ext-fileinfo": "*",
+                "league/mime-type-detection": "^1.3",
+                "php": "^7.2.5 || ^8.0"
+            },
+            "conflict": {
+                "league/flysystem-sftp": "<1.0.6"
+            },
+            "require-dev": {
+                "phpspec/prophecy": "^1.11.1",
+                "phpunit/phpunit": "^8.5.8"
+            },
+            "suggest": {
+                "ext-ftp": "Allows you to use FTP server storage",
+                "ext-openssl": "Allows you to use FTPS server storage",
+                "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2",
+                "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3",
+                "league/flysystem-azure": "Allows you to use Windows Azure Blob storage",
+                "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching",
+                "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem",
+                "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files",
+                "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib",
+                "league/flysystem-webdav": "Allows you to use WebDAV storage",
+                "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter",
+                "spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
+                "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "League\\Flysystem\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Frank de Jonge",
+                    "email": "info@frenky.net"
+                }
+            ],
+            "description": "Filesystem abstraction: Many filesystems, one API.",
+            "keywords": [
+                "Cloud Files",
+                "WebDAV",
+                "abstraction",
+                "aws",
+                "cloud",
+                "copy.com",
+                "dropbox",
+                "file systems",
+                "files",
+                "filesystem",
+                "filesystems",
+                "ftp",
+                "rackspace",
+                "remote",
+                "s3",
+                "sftp",
+                "storage"
+            ],
+            "support": {
+                "issues": "https://github.com/thephpleague/flysystem/issues",
+                "source": "https://github.com/thephpleague/flysystem/tree/1.1.9"
+            },
+            "funding": [
+                {
+                    "url": "https://offset.earth/frankdejonge",
+                    "type": "other"
+                }
+            ],
+            "time": "2021-12-09T09:40:50+00:00"
+        },
+        {
+            "name": "league/flysystem-cached-adapter",
+            "version": "1.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/thephpleague/flysystem-cached-adapter.git",
+                "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/d1925efb2207ac4be3ad0c40b8277175f99ffaff",
+                "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "league/flysystem": "~1.0",
+                "psr/cache": "^1.0.0"
+            },
+            "require-dev": {
+                "mockery/mockery": "~0.9",
+                "phpspec/phpspec": "^3.4",
+                "phpunit/phpunit": "^5.7",
+                "predis/predis": "~1.0",
+                "tedivm/stash": "~0.12"
+            },
+            "suggest": {
+                "ext-phpredis": "Pure C implemented extension for PHP"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "League\\Flysystem\\Cached\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "frankdejonge",
+                    "email": "info@frenky.net"
+                }
+            ],
+            "description": "An adapter decorator to enable meta-data caching.",
+            "support": {
+                "issues": "https://github.com/thephpleague/flysystem-cached-adapter/issues",
+                "source": "https://github.com/thephpleague/flysystem-cached-adapter/tree/master"
+            },
+            "time": "2020-07-25T15:56:04+00:00"
+        },
+        {
+            "name": "league/mime-type-detection",
+            "version": "1.11.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/thephpleague/mime-type-detection.git",
+                "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
+                "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "ext-fileinfo": "*",
+                "php": "^7.2 || ^8.0"
+            },
+            "require-dev": {
+                "friendsofphp/php-cs-fixer": "^3.2",
+                "phpstan/phpstan": "^0.12.68",
+                "phpunit/phpunit": "^8.5.8 || ^9.3"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "League\\MimeTypeDetection\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Frank de Jonge",
+                    "email": "info@frankdejonge.nl"
+                }
+            ],
+            "description": "Mime-type detection for Flysystem",
+            "support": {
+                "issues": "https://github.com/thephpleague/mime-type-detection/issues",
+                "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/frankdejonge",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/league/flysystem",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-04-17T13:12:02+00:00"
+        },
+        {
+            "name": "psr/cache",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/cache.git",
+                "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
+                "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Cache\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for caching libraries",
+            "keywords": [
+                "cache",
+                "psr",
+                "psr-6"
+            ],
+            "support": {
+                "source": "https://github.com/php-fig/cache/tree/master"
+            },
+            "time": "2016-08-06T20:24:11+00:00"
+        },
+        {
+            "name": "psr/container",
+            "version": "1.1.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/container.git",
+                "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
+                "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.2.0"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Container\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "https://www.php-fig.org/"
+                }
+            ],
+            "description": "Common Container Interface (PHP FIG PSR-11)",
+            "homepage": "https://github.com/php-fig/container",
+            "keywords": [
+                "PSR-11",
+                "container",
+                "container-interface",
+                "container-interop",
+                "psr"
+            ],
+            "support": {
+                "issues": "https://github.com/php-fig/container/issues",
+                "source": "https://github.com/php-fig/container/tree/1.1.1"
+            },
+            "time": "2021-03-05T17:36:06+00:00"
+        },
+        {
+            "name": "psr/http-message",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/http-message.git",
+                "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
+                "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Http\\Message\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for HTTP messages",
+            "homepage": "https://github.com/php-fig/http-message",
+            "keywords": [
+                "http",
+                "http-message",
+                "psr",
+                "psr-7",
+                "request",
+                "response"
+            ],
+            "support": {
+                "source": "https://github.com/php-fig/http-message/tree/master"
+            },
+            "time": "2016-08-06T14:39:51+00:00"
+        },
+        {
+            "name": "psr/log",
+            "version": "1.1.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/log.git",
+                "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
+                "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Log\\": "Psr/Log/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "https://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for logging libraries",
+            "homepage": "https://github.com/php-fig/log",
+            "keywords": [
+                "log",
+                "psr",
+                "psr-3"
+            ],
+            "support": {
+                "source": "https://github.com/php-fig/log/tree/1.1.4"
+            },
+            "time": "2021-05-03T11:20:27+00:00"
+        },
+        {
+            "name": "psr/simple-cache",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/simple-cache.git",
+                "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
+                "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\SimpleCache\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interfaces for simple caching",
+            "keywords": [
+                "cache",
+                "caching",
+                "psr",
+                "psr-16",
+                "simple-cache"
+            ],
+            "support": {
+                "source": "https://github.com/php-fig/simple-cache/tree/master"
+            },
+            "time": "2017-10-23T01:57:42+00:00"
+        },
+        {
+            "name": "topthink/framework",
+            "version": "v6.0.13",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/framework.git",
+                "reference": "126d5b2cbacb73d6e2a85cbc7a2c6ee59d0b3fa6"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/top-think/framework/zipball/126d5b2cbacb73d6e2a85cbc7a2c6ee59d0b3fa6",
+                "reference": "126d5b2cbacb73d6e2a85cbc7a2c6ee59d0b3fa6",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "ext-json": "*",
+                "ext-mbstring": "*",
+                "league/flysystem": "^1.1.4",
+                "league/flysystem-cached-adapter": "^1.0",
+                "php": ">=7.2.5",
+                "psr/container": "~1.0",
+                "psr/http-message": "^1.0",
+                "psr/log": "~1.0",
+                "psr/simple-cache": "^1.0",
+                "topthink/think-helper": "^3.1.1",
+                "topthink/think-orm": "^2.0"
+            },
+            "require-dev": {
+                "guzzlehttp/psr7": "^2.1.0",
+                "mikey179/vfsstream": "^1.6",
+                "mockery/mockery": "^1.2",
+                "phpunit/phpunit": "^7.0"
+            },
+            "type": "library",
+            "autoload": {
+                "files": [],
+                "psr-4": {
+                    "think\\": "src/think/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "liu21st",
+                    "email": "liu21st@gmail.com"
+                },
+                {
+                    "name": "yunwuxin",
+                    "email": "448901948@qq.com"
+                }
+            ],
+            "description": "The ThinkPHP Framework.",
+            "homepage": "http://thinkphp.cn/",
+            "keywords": [
+                "framework",
+                "orm",
+                "thinkphp"
+            ],
+            "support": {
+                "issues": "https://github.com/top-think/framework/issues",
+                "source": "https://github.com/top-think/framework/tree/v6.0.13"
+            },
+            "time": "2022-07-15T02:52:08+00:00"
+        },
+        {
+            "name": "topthink/think-helper",
+            "version": "v3.1.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-helper.git",
+                "reference": "769acbe50a4274327162f9c68ec2e89a38eb2aff"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/top-think/think-helper/zipball/769acbe50a4274327162f9c68ec2e89a38eb2aff",
+                "reference": "769acbe50a4274327162f9c68ec2e89a38eb2aff",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.5"
+            },
+            "type": "library",
+            "autoload": {
+                "files": [
+                    "src/helper.php"
+                ],
+                "psr-4": {
+                    "think\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "yunwuxin",
+                    "email": "448901948@qq.com"
+                }
+            ],
+            "description": "The ThinkPHP6 Helper Package",
+            "support": {
+                "issues": "https://github.com/top-think/think-helper/issues",
+                "source": "https://github.com/top-think/think-helper/tree/v3.1.6"
+            },
+            "time": "2021-12-15T04:27:55+00:00"
+        },
+        {
+            "name": "topthink/think-multi-app",
+            "version": "v1.0.14",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-multi-app.git",
+                "reference": "ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/top-think/think-multi-app/zipball/ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3",
+                "reference": "ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1.0",
+                "topthink/framework": "^6.0.0"
+            },
+            "type": "library",
+            "extra": {
+                "think": {
+                    "services": [
+                        "think\\app\\Service"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "think\\app\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "liu21st",
+                    "email": "liu21st@gmail.com"
+                }
+            ],
+            "description": "thinkphp6 multi app support",
+            "support": {
+                "issues": "https://github.com/top-think/think-multi-app/issues",
+                "source": "https://github.com/top-think/think-multi-app/tree/master"
+            },
+            "time": "2020-07-12T13:50:37+00:00"
+        },
+        {
+            "name": "topthink/think-orm",
+            "version": "v2.0.54",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-orm.git",
+                "reference": "97b061b47616301ff29fbd4c35ed9184e1162e4e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/top-think/think-orm/zipball/97b061b47616301ff29fbd4c35ed9184e1162e4e",
+                "reference": "97b061b47616301ff29fbd4c35ed9184e1162e4e",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "ext-json": "*",
+                "ext-pdo": "*",
+                "php": ">=7.1.0",
+                "psr/log": "^1.0|^2.0",
+                "psr/simple-cache": "^1.0|^2.0",
+                "topthink/think-helper": "^3.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7|^8|^9.5"
+            },
+            "type": "library",
+            "autoload": {
+                "files": [
+                    "stubs/load_stubs.php"
+                ],
+                "psr-4": {
+                    "think\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "liu21st",
+                    "email": "liu21st@gmail.com"
+                }
+            ],
+            "description": "think orm",
+            "keywords": [
+                "database",
+                "orm"
+            ],
+            "support": {
+                "issues": "https://github.com/top-think/think-orm/issues",
+                "source": "https://github.com/top-think/think-orm/tree/v2.0.54"
+            },
+            "time": "2022-07-05T05:25:51+00:00"
+        },
+        {
+            "name": "topthink/think-template",
+            "version": "v2.0.8",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-template.git",
+                "reference": "abfc293f74f9ef5127b5c416310a01fe42e59368"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/top-think/think-template/zipball/abfc293f74f9ef5127b5c416310a01fe42e59368",
+                "reference": "abfc293f74f9ef5127b5c416310a01fe42e59368",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1.0",
+                "psr/simple-cache": "^1.0"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "think\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "liu21st",
+                    "email": "liu21st@gmail.com"
+                }
+            ],
+            "description": "the php template engine",
+            "support": {
+                "issues": "https://github.com/top-think/think-template/issues",
+                "source": "https://github.com/top-think/think-template/tree/v2.0.8"
+            },
+            "time": "2020-12-10T07:52:03+00:00"
+        },
+        {
+            "name": "topthink/think-view",
+            "version": "v1.0.14",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-view.git",
+                "reference": "edce0ae2c9551ab65f9e94a222604b0dead3576d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/top-think/think-view/zipball/edce0ae2c9551ab65f9e94a222604b0dead3576d",
+                "reference": "edce0ae2c9551ab65f9e94a222604b0dead3576d",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1.0",
+                "topthink/think-template": "^2.0"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "think\\view\\driver\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "liu21st",
+                    "email": "liu21st@gmail.com"
+                }
+            ],
+            "description": "thinkphp template driver",
+            "support": {
+                "issues": "https://github.com/top-think/think-view/issues",
+                "source": "https://github.com/top-think/think-view/tree/v1.0.14"
+            },
+            "time": "2019-11-06T11:40:13+00:00"
+        }
+    ],
+    "packages-dev": [
+        {
+            "name": "symfony/polyfill-mbstring",
+            "version": "v1.26.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-mbstring.git",
+                "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+                "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "provide": {
+                "ext-mbstring": "*"
+            },
+            "suggest": {
+                "ext-mbstring": "For best performance"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-main": "1.26-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "bootstrap.php"
+                ],
+                "psr-4": {
+                    "Symfony\\Polyfill\\Mbstring\\": ""
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill for the Mbstring extension",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "mbstring",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "support": {
+                "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+            },
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-05-24T11:49:31+00:00"
+        },
+        {
+            "name": "symfony/polyfill-php72",
+            "version": "v1.26.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-php72.git",
+                "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2",
+                "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-main": "1.26-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "bootstrap.php"
+                ],
+                "psr-4": {
+                    "Symfony\\Polyfill\\Php72\\": ""
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "support": {
+                "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0"
+            },
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-05-24T11:49:31+00:00"
+        },
+        {
+            "name": "symfony/polyfill-php80",
+            "version": "v1.26.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-php80.git",
+                "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace",
+                "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-main": "1.26-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "bootstrap.php"
+                ],
+                "psr-4": {
+                    "Symfony\\Polyfill\\Php80\\": ""
+                },
+                "classmap": [
+                    "Resources/stubs"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Ion Bazan",
+                    "email": "ion.bazan@gmail.com"
+                },
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "support": {
+                "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0"
+            },
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-05-10T07:21:04+00:00"
+        },
+        {
+            "name": "symfony/var-dumper",
+            "version": "v4.4.44",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/var-dumper.git",
+                "reference": "f19951007dae942cc79b979c1fe26bfdfbeb54ed"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/var-dumper/zipball/f19951007dae942cc79b979c1fe26bfdfbeb54ed",
+                "reference": "f19951007dae942cc79b979c1fe26bfdfbeb54ed",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1.3",
+                "symfony/polyfill-mbstring": "~1.0",
+                "symfony/polyfill-php72": "~1.5",
+                "symfony/polyfill-php80": "^1.16"
+            },
+            "conflict": {
+                "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
+                "symfony/console": "<3.4"
+            },
+            "require-dev": {
+                "ext-iconv": "*",
+                "symfony/console": "^3.4|^4.0|^5.0",
+                "symfony/process": "^4.4|^5.0",
+                "twig/twig": "^1.43|^2.13|^3.0.4"
+            },
+            "suggest": {
+                "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
+                "ext-intl": "To show region name in time zone dump",
+                "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
+            },
+            "bin": [
+                "Resources/bin/var-dump-server"
+            ],
+            "type": "library",
+            "autoload": {
+                "files": [
+                    "Resources/functions/dump.php"
+                ],
+                "psr-4": {
+                    "Symfony\\Component\\VarDumper\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Provides mechanisms for walking through any arbitrary PHP variable",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "debug",
+                "dump"
+            ],
+            "support": {
+                "source": "https://github.com/symfony/var-dumper/tree/v4.4.44"
+            },
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-07-20T09:59:04+00:00"
+        },
+        {
+            "name": "topthink/think-trace",
+            "version": "v1.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-trace.git",
+                "reference": "9a9fa8f767b6c66c5a133ad21ca1bc96ad329444"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/top-think/think-trace/zipball/9a9fa8f767b6c66c5a133ad21ca1bc96ad329444",
+                "reference": "9a9fa8f767b6c66c5a133ad21ca1bc96ad329444",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.1.0",
+                "topthink/framework": "^6.0.0"
+            },
+            "type": "library",
+            "extra": {
+                "think": {
+                    "services": [
+                        "think\\trace\\Service"
+                    ],
+                    "config": {
+                        "trace": "src/config.php"
+                    }
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "think\\trace\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "liu21st",
+                    "email": "liu21st@gmail.com"
+                }
+            ],
+            "description": "thinkphp debug trace",
+            "support": {
+                "issues": "https://github.com/top-think/think-trace/issues",
+                "source": "https://github.com/top-think/think-trace/tree/v1.4"
+            },
+            "time": "2020-06-29T05:27:28+00:00"
+        }
+    ],
+    "aliases": [],
+    "minimum-stability": "stable",
+    "stability-flags": [],
+    "prefer-stable": false,
+    "prefer-lowest": false,
+    "platform": {
+        "php": ">=7.2.5"
+    },
+    "platform-dev": [],
+    "plugin-api-version": "2.2.0"
+}

+ 30 - 0
config/app.php

@@ -0,0 +1,30 @@
+<?php
+
+// +----------------------------------------------------------------------
+// | 应用设置
+// +----------------------------------------------------------------------
+
+return [
+    // 应用地址
+    'app_host' => env('app.host', ''),
+    // 应用的命名空间
+    'app_namespace' => '',
+    // 是否启用路由
+    'with_route' => true,
+    // 默认应用
+    'default_app' => 'index',
+    // 默认时区
+    'default_timezone' => 'Asia/Shanghai',
+    // 应用映射(自动多应用模式有效)
+    'app_map' => [],
+    // 域名绑定(自动多应用模式有效)
+    'domain_bind' => [],
+    // 禁止URL访问的应用列表(自动多应用模式有效)
+    'deny_app_list' => [],
+    // 异常页面的模板文件
+    'exception_tmpl' => app()->getThinkPath() . 'tpl/think_exception.tpl',
+    // 错误显示信息,非调试模式有效
+    'error_message' => '页面错误!请稍后再试~',
+    // 显示错误信息
+    'show_error_msg' => true
+];

+ 29 - 0
config/cache.php

@@ -0,0 +1,29 @@
+<?php
+
+// +----------------------------------------------------------------------
+// | 缓存设置
+// +----------------------------------------------------------------------
+
+return [
+    // 默认缓存驱动
+    'default' => env('cache.driver', 'file'),
+
+    // 缓存连接方式配置
+    'stores'  => [
+        'file' => [
+            // 驱动方式
+            'type'       => 'File',
+            // 缓存保存目录
+            'path'       => '',
+            // 缓存前缀
+            'prefix'     => '',
+            // 缓存有效期 0表示永久缓存
+            'expire'     => 0,
+            // 缓存标签前缀
+            'tag_prefix' => 'tag:',
+            // 序列化机制 例如 ['serialize', 'unserialize']
+            'serialize'  => [],
+        ],
+        // 更多的缓存连接
+    ],
+];

+ 9 - 0
config/console.php

@@ -0,0 +1,9 @@
+<?php
+// +----------------------------------------------------------------------
+// | 控制台配置
+// +----------------------------------------------------------------------
+return [
+    // 指令定义
+    'commands' => [
+    ],
+];

+ 20 - 0
config/cookie.php

@@ -0,0 +1,20 @@
+<?php
+// +----------------------------------------------------------------------
+// | Cookie设置
+// +----------------------------------------------------------------------
+return [
+    // cookie 保存时间
+    'expire'    => 0,
+    // cookie 保存路径
+    'path'      => '/',
+    // cookie 有效域名
+    'domain'    => '',
+    //  cookie 启用安全传输
+    'secure'    => false,
+    // httponly设置
+    'httponly'  => false,
+    // 是否使用 setcookie
+    'setcookie' => true,
+    // samesite 设置,支持 'strict' 'lax'
+    'samesite'  => '',
+];

+ 63 - 0
config/database.php

@@ -0,0 +1,63 @@
+<?php
+
+return [
+    // 默认使用的数据库连接配置
+    'default'         => env('database.driver', 'mysql'),
+
+    // 自定义时间查询规则
+    'time_query_rule' => [],
+
+    // 自动写入时间戳字段
+    // true为自动识别类型 false关闭
+    // 字符串则明确指定时间字段类型 支持 int timestamp datetime date
+    'auto_timestamp'  => true,
+
+    // 时间字段取出后的默认时间格式
+    'datetime_format' => 'Y-m-d H:i:s',
+
+    // 时间字段配置 配置格式:create_time,update_time
+    'datetime_field'  => '',
+
+    // 数据库连接配置信息
+    'connections'     => [
+        'mysql' => [
+            // 数据库类型
+            'type'            => env('database.type', 'mysql'),
+            // 服务器地址
+            'hostname'        => env('database.hostname', '127.0.0.1'),
+            // 数据库名
+            'database'        => env('database.database', 'jjrc'),
+            // 用户名
+            'username'        => env('database.username', 'root'),
+            // 密码
+            'password'        => env('database.password', ''),
+            // 端口
+            'hostport'        => env('database.hostport', '3306'),
+            // 数据库连接参数
+            'params'          => [],
+            // 数据库编码默认采用utf8
+            'charset'         => env('database.charset', 'utf8'),
+            // 数据库表前缀
+            'prefix'          => env('database.prefix', ''),
+
+            // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
+            'deploy'          => 0,
+            // 数据库读写是否分离 主从式有效
+            'rw_separate'     => false,
+            // 读写分离后 主服务器数量
+            'master_num'      => 1,
+            // 指定从服务器序号
+            'slave_no'        => '',
+            // 是否严格检查字段是否存在
+            'fields_strict'   => true,
+            // 是否需要断线重连
+            'break_reconnect' => false,
+            // 监听SQL
+            'trigger_sql'     => env('app_debug', true),
+            // 开启字段缓存
+            'fields_cache'    => false,
+        ],
+
+        // 更多的数据库配置信息
+    ],
+];

+ 24 - 0
config/filesystem.php

@@ -0,0 +1,24 @@
+<?php
+
+return [
+    // 默认磁盘
+    'default' => env('filesystem.driver', 'local'),
+    // 磁盘列表
+    'disks'   => [
+        'local'  => [
+            'type' => 'local',
+            'root' => app()->getRuntimePath() . 'storage',
+        ],
+        'public' => [
+            // 磁盘类型
+            'type'       => 'local',
+            // 磁盘路径
+            'root'       => app()->getRootPath() . 'public/storage',
+            // 磁盘路径对应的外部URL路径
+            'url'        => '/storage',
+            // 可见性
+            'visibility' => 'public',
+        ],
+        // 更多的磁盘配置信息
+    ],
+];

+ 27 - 0
config/lang.php

@@ -0,0 +1,27 @@
+<?php
+// +----------------------------------------------------------------------
+// | 多语言设置
+// +----------------------------------------------------------------------
+
+return [
+    // 默认语言
+    'default_lang'    => env('lang.default_lang', 'zh-cn'),
+    // 允许的语言列表
+    'allow_lang_list' => [],
+    // 多语言自动侦测变量名
+    'detect_var'      => 'lang',
+    // 是否使用Cookie记录
+    'use_cookie'      => true,
+    // 多语言cookie变量
+    'cookie_var'      => 'think_lang',
+    // 多语言header变量
+    'header_var'      => 'think-lang',
+    // 扩展语言包
+    'extend_list'     => [],
+    // Accept-Language转义为对应语言包名称
+    'accept_language' => [
+        'zh-hans-cn' => 'zh-cn',
+    ],
+    // 是否支持语言分组
+    'allow_group'     => false,
+];

+ 45 - 0
config/log.php

@@ -0,0 +1,45 @@
+<?php
+
+// +----------------------------------------------------------------------
+// | 日志设置
+// +----------------------------------------------------------------------
+return [
+    // 默认日志记录通道
+    'default'      => env('log.channel', 'file'),
+    // 日志记录级别
+    'level'        => [],
+    // 日志类型记录的通道 ['error'=>'email',...]
+    'type_channel' => [],
+    // 关闭全局日志写入
+    'close'        => false,
+    // 全局日志处理 支持闭包
+    'processor'    => null,
+
+    // 日志通道列表
+    'channels'     => [
+        'file' => [
+            // 日志记录方式
+            'type'           => 'File',
+            // 日志保存目录
+            'path'           => '',
+            // 单文件日志写入
+            'single'         => false,
+            // 独立日志级别
+            'apart_level'    => [],
+            // 最大日志文件数量
+            'max_files'      => 0,
+            // 使用JSON格式记录
+            'json'           => false,
+            // 日志处理
+            'processor'      => null,
+            // 关闭通道日志写入
+            'close'          => false,
+            // 日志输出格式化
+            'format'         => '[%s][%s] %s',
+            // 是否实时写入
+            'realtime_write' => false,
+        ],
+        // 其它日志通道配置
+    ],
+
+];

+ 8 - 0
config/middleware.php

@@ -0,0 +1,8 @@
+<?php
+// 中间件配置
+return [
+    // 别名或分组
+    'alias'    => [],
+    // 优先级设置,此数组中的中间件会按照数组中的顺序优先执行
+    'priority' => [],
+];

+ 45 - 0
config/route.php

@@ -0,0 +1,45 @@
+<?php
+// +----------------------------------------------------------------------
+// | 路由设置
+// +----------------------------------------------------------------------
+
+return [
+    // pathinfo分隔符
+    'pathinfo_depr'         => '/',
+    // URL伪静态后缀
+    'url_html_suffix'       => 'html',
+    // URL普通方式参数 用于自动生成
+    'url_common_param'      => true,
+    // 是否开启路由延迟解析
+    'url_lazy_route'        => false,
+    // 是否强制使用路由
+    'url_route_must'        => false,
+    // 合并路由规则
+    'route_rule_merge'      => false,
+    // 路由是否完全匹配
+    'route_complete_match'  => false,
+    // 访问控制器层名称
+    'controller_layer'      => 'controller',
+    // 空控制器名
+    'empty_controller'      => 'Error',
+    // 是否使用控制器后缀
+    'controller_suffix'     => false,
+    // 默认的路由变量规则
+    'default_route_pattern' => '[\w\.]+',
+    // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
+    'request_cache_key'     => false,
+    // 请求缓存有效期
+    'request_cache_expire'  => null,
+    // 全局请求缓存排除规则
+    'request_cache_except'  => [],
+    // 默认控制器名
+    'default_controller'    => 'Index',
+    // 默认操作名
+    'default_action'        => 'index',
+    // 操作方法后缀
+    'action_suffix'         => '',
+    // 默认JSONP格式返回的处理方法
+    'default_jsonp_handler' => 'jsonpReturn',
+    // 默认JSONP处理方法
+    'var_jsonp_handler'     => 'callback',
+];

+ 19 - 0
config/session.php

@@ -0,0 +1,19 @@
+<?php
+// +----------------------------------------------------------------------
+// | 会话设置
+// +----------------------------------------------------------------------
+
+return [
+    // session name
+    'name'           => 'PHPSESSID',
+    // SESSION_ID的提交变量,解决flash上传跨域
+    'var_session_id' => '',
+    // 驱动方式 支持file cache
+    'type'           => 'file',
+    // 存储连接标识 当type使用cache的时候有效
+    'store'          => null,
+    // 过期时间
+    'expire'         => 3600,
+    // 前缀
+    'prefix'         => 'jjtalent',
+];

+ 10 - 0
config/trace.php

@@ -0,0 +1,10 @@
+<?php
+// +----------------------------------------------------------------------
+// | Trace设置 开启调试模式后有效
+// +----------------------------------------------------------------------
+return [
+    // 内置Html和Console两种方式 支持扩展
+    'type'    => 'Html',
+    // 读取的日志通道名
+    'channel' => '',
+];

+ 25 - 0
config/view.php

@@ -0,0 +1,25 @@
+<?php
+// +----------------------------------------------------------------------
+// | 模板设置
+// +----------------------------------------------------------------------
+
+return [
+    // 模板引擎类型使用Think
+    'type'          => 'Think',
+    // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
+    'auto_rule'     => 1,
+    // 模板目录名
+    'view_dir_name' => 'view',
+    // 模板后缀
+    'view_suffix'   => 'html',
+    // 模板文件名分隔符
+    'view_depr'     => DIRECTORY_SEPARATOR,
+    // 模板引擎普通标签开始标记
+    'tpl_begin'     => '{',
+    // 模板引擎普通标签结束标记
+    'tpl_end'       => '}',
+    // 标签库标签开始标记
+    'taglib_begin'  => '{',
+    // 标签库标签结束标记
+    'taglib_end'    => '}',
+];

+ 2 - 0
extend/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

File diff suppressed because it is too large
+ 109 - 0
jjrcuniflat.sql


+ 7 - 0
nbproject/project.properties

@@ -0,0 +1,7 @@
+include.path=${php.global.include.path}
+php.version=PHP_73
+source.encoding=UTF-8
+src.dir=.
+tags.asp=false
+tags.short=false
+web.root=.

+ 9 - 0
nbproject/project.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.php.project</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/php-project/1">
+            <name>jjrcuniflat</name>
+        </data>
+    </configuration>
+</project>

+ 8 - 0
public/.htaccess

@@ -0,0 +1,8 @@
+<IfModule mod_rewrite.c>
+  Options +FollowSymlinks -Multiviews
+  RewriteEngine On
+
+  RewriteCond %{REQUEST_FILENAME} !-d
+  RewriteCond %{REQUEST_FILENAME} !-f
+  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
+</IfModule>

二進制
public/favicon.ico


+ 24 - 0
public/index.php

@@ -0,0 +1,24 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006-2019 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// [ 应用入口文件 ]
+namespace think;
+
+require __DIR__ . '/../vendor/autoload.php';
+
+// 执行HTTP应用并响应
+$http = (new App())->http;
+
+$response = $http->run();
+
+$response->send();
+
+$http->end($response);

+ 2 - 0
public/robots.txt

@@ -0,0 +1,2 @@
+User-agent: *
+Disallow:

+ 19 - 0
public/router.php

@@ -0,0 +1,19 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+// $Id$
+
+if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) {
+    return false;
+} else {
+    $_SERVER["SCRIPT_FILENAME"] = __DIR__ . '/index.php';
+
+    require __DIR__ . "/index.php";
+}

+ 2 - 0
public/static/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 17 - 0
route/app.php

@@ -0,0 +1,17 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+use think\facade\Route;
+
+Route::get('think', function () {
+    return 'hello,ThinkPHP6!';
+});
+
+Route::get('hello/:name', 'index/hello');

+ 2 - 0
runtime/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 10 - 0
think

@@ -0,0 +1,10 @@
+#!/usr/bin/env php
+<?php
+namespace think;
+
+// 命令行入口文件
+// 加载基础文件
+require __DIR__ . '/vendor/autoload.php';
+
+// 应用初始化
+(new App())->console->run();

+ 1 - 0
view/README.md

@@ -0,0 +1 @@
+如果不使用模板,可以删除该目录

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