This commit is contained in:
2019-06-19 22:41:40 +08:00
parent 5c31e8e612
commit d3eef9c5fd
34 changed files with 1464 additions and 107 deletions

1
app/.htaccess Normal file
View File

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

103
app/BaseController.php Normal file
View File

@@ -0,0 +1,103 @@
<?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>
// +----------------------------------------------------------------------
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, '.')) {
// 支持场景
list($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);
}
}

68
app/ExceptionHandle.php Normal file
View File

@@ -0,0 +1,68 @@
<?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 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);
}
}

17
app/Request.php Normal file
View File

@@ -0,0 +1,17 @@
<?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 app;
class Request extends \think\Request
{
}

View File

@@ -0,0 +1,38 @@
<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\BaseController;
use think\facade\View;
/**
* @title 后台基类
*/
class Base extends BaseController {
public $data = array();
public $meta = array();
/**
* @title 显示类
*/
public function fetch($template){
// 使用内置PHP模板引擎渲染模板输出
$config = array(
'tpl_replace_string' => array(
'__static__' => '/static',
'__img__' => '/static/admin/images',
'__css__' => '/static/admin/css',
'__js__' => '/static/admin/js',
'__public__' => '/static/admin',
)
);
return View::config($config)->assign($this->data)->fetch($template);
}
}

View File

@@ -0,0 +1,25 @@
<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace app\admin\controller;
/**
* @title 后端公共模块
*/
class Index extends Base {
/**
* @title 系统首页
*/
public function index(){
$this->data['data'] = array(
'info' => 'ddd'
);
return $this->fetch('', $this->data, $this->meta);
}
}

View File

@@ -0,0 +1,18 @@
<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace app\admin\middleware;
/**
* @title 后台中间件
*/
class Admin {
public function handle($request, \Closure $next) {
}
}

View File

@@ -0,0 +1,871 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"/>
<meta charset="utf-8">
<title>SentCMS后台管理系统</title>
<link href="__static__/libs/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
<link href="__static__/libs/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
<link rel="stylesheet" href="__static__/libs/nanoscroller/nanoscroller.css" />
<link href="__css__/theme_styles.css" rel="stylesheet"/>
</meta>
</head>
<body>
<div id="theme-wrapper">
<header class="navbar" id="header-navbar">
<div class="container">
<a class="navbar-brand" href="index.html" id="logo">
<img alt="" class="normal-logo logo-white" src="__static__/images/logo.png"/>
<img alt="" class="normal-logo logo-black" src="__static__/images/logo.png"/>
<img alt="" class="small-logo hidden-xs hidden-sm hidden" src="__static__/images/logo.png"/>
</a>
<div class="clearfix">
<button class="navbar-toggle" data-target=".navbar-ex1-collapse" data-toggle="collapse" type="button">
<span class="sr-only">菜单</span>
<span class="fa fa-bars">
</span>
</button>
<div class="nav-no-collapse navbar-left pull-left hidden-sm hidden-xs">
<ul class="nav navbar-nav pull-left">
<li>
<a class="btn" id="make-small-nav">
<i class="fa fa-bars">
</i>
</a>
</li>
<li class="dropdown hidden-xs">
<a class="btn dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell">
</i>
<span class="count">
8
</span>
</a>
<ul class="dropdown-menu notifications-list">
<li class="pointer">
<div class="pointer-inner">
<div class="arrow">
</div>
</div>
</li>
<li class="item-header">
You have 6 new notifications
</li>
<li class="item">
<a href="#">
<i class="fa fa-comment">
</i>
<span class="content">
New comment on Awesome P...
</span>
<span class="time">
<i class="fa fa-clock-o">
</i>
13 min.
</span>
</a>
</li>
<li class="item">
<a href="#">
<i class="fa fa-plus">
</i>
<span class="content">
New user registration
</span>
<span class="time">
<i class="fa fa-clock-o">
</i>
13 min.
</span>
</a>
</li>
<li class="item">
<a href="#">
<i class="fa fa-envelope">
</i>
<span class="content">
New Message from George
</span>
<span class="time">
<i class="fa fa-clock-o">
</i>
13 min.
</span>
</a>
</li>
<li class="item">
<a href="#">
<i class="fa fa-shopping-cart">
</i>
<span class="content">
New purchase
</span>
<span class="time">
<i class="fa fa-clock-o">
</i>
13 min.
</span>
</a>
</li>
<li class="item">
<a href="#">
<i class="fa fa-eye">
</i>
<span class="content">
New order
</span>
<span class="time">
<i class="fa fa-clock-o">
</i>
13 min.
</span>
</a>
</li>
<li class="item-footer">
<a href="#">
View all notifications
</a>
</li>
</ul>
</li>
<li class="dropdown hidden-xs">
<a class="btn dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-envelope-o">
</i>
<span class="count">
16
</span>
</a>
<ul class="dropdown-menu notifications-list messages-list">
<li class="pointer">
<div class="pointer-inner">
<div class="arrow">
</div>
</div>
</li>
<li class="item first-item">
<a href="#">
<img alt="" src="__img__/samples/messages-photo-1.png"/>
<span class="content">
<span class="content-headline">
George Clooney
</span>
<span class="content-text">
Look, just because I don't be givin' no man a foot massage don't make it
right for Marsellus to throw...
</span>
</span>
<span class="time">
<i class="fa fa-clock-o">
</i>
13 min.
</span>
</a>
</li>
<li class="item">
<a href="#">
<img alt="" src="__img__/samples/messages-photo-2.png"/>
<span class="content">
<span class="content-headline">
Emma Watson
</span>
<span class="content-text">
Look, just because I don't be givin' no man a foot massage don't make it
right for Marsellus to throw...
</span>
</span>
<span class="time">
<i class="fa fa-clock-o">
</i>
13 min.
</span>
</a>
</li>
<li class="item">
<a href="#">
<img alt="" src="__img__/samples/messages-photo-3.png"/>
<span class="content">
<span class="content-headline">
Robert Downey Jr.
</span>
<span class="content-text">
Look, just because I don't be givin' no man a foot massage don't make it
right for Marsellus to throw...
</span>
</span>
<span class="time">
<i class="fa fa-clock-o">
</i>
13 min.
</span>
</a>
</li>
<li class="item-footer">
<a href="#">
View all messages
</a>
</li>
</ul>
</li>
<li class="dropdown hidden-xs">
<a class="btn dropdown-toggle" data-toggle="dropdown">
New Item
<i class="fa fa-caret-down">
</i>
</a>
<ul class="dropdown-menu">
<li class="item">
<a href="#">
<i class="fa fa-archive">
</i>
New Product
</a>
</li>
<li class="item">
<a href="#">
<i class="fa fa-shopping-cart">
</i>
New Order
</a>
</li>
<li class="item">
<a href="#">
<i class="fa fa-sitemap">
</i>
New Category
</a>
</li>
<li class="item">
<a href="#">
<i class="fa fa-file-text">
</i>
New Page
</a>
</li>
</ul>
</li>
<li class="dropdown hidden-xs">
<a class="btn dropdown-toggle" data-toggle="dropdown">
English
<i class="fa fa-caret-down">
</i>
</a>
<ul class="dropdown-menu">
<li class="item">
<a href="#">
Spanish
</a>
</li>
<li class="item">
<a href="#">
German
</a>
</li>
<li class="item">
<a href="#">
Italian
</a>
</li>
</ul>
</li>
</ul>
</div>
<div class="nav-no-collapse pull-right" id="header-nav">
<ul class="nav navbar-nav pull-right">
<li class="mobile-search">
<a class="btn">
<i class="fa fa-search">
</i>
</a>
<div class="drowdown-search">
<form role="search">
<div class="form-group">
<input class="form-control" placeholder="Search..." type="text">
<i class="fa fa-search nav-search-icon">
</i>
</input>
</div>
</form>
</div>
</li>
<li class="dropdown profile-dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<img alt="" src="__img__/samples/scarlet-159.png"/>
<span class="hidden-xs">
Scarlett Johansson
</span>
<b class="caret">
</b>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a href="user-profile.html">
<i class="fa fa-user">
</i>
Profile
</a>
</li>
<li>
<a href="#">
<i class="fa fa-cog">
</i>
Settings
</a>
</li>
<li>
<a href="#">
<i class="fa fa-envelope-o">
</i>
Messages
</a>
</li>
<li>
<a href="#">
<i class="fa fa-power-off">
</i>
Logout
</a>
</li>
</ul>
</li>
<li class="hidden-xxs">
<a class="btn">
<i class="fa fa-power-off">
</i>
</a>
</li>
</ul>
</div>
</div>
</div>
</header>
<div class="container" id="page-wrapper">
<div class="row">
<div id="nav-col">
<section class="col-left-nano" id="col-left">
<div class="col-left-nano-content" id="col-left-inner">
<div class="clearfix hidden-sm hidden-xs dropdown profile2-dropdown" id="user-left-box">
<img alt="" src="__img__/samples/scarlet-159.png"/>
<div class="user-box">
<span class="name">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
Scarlett J.
<i class="fa fa-angle-down">
</i>
</a>
<ul class="dropdown-menu">
<li>
<a href="user-profile.html">
<i class="fa fa-user">
</i>
Profile
</a>
</li>
<li>
<a href="#">
<i class="fa fa-cog">
</i>
Settings
</a>
</li>
<li>
<a href="#">
<i class="fa fa-envelope-o">
</i>
Messages
</a>
</li>
<li>
<a href="#">
<i class="fa fa-power-off">
</i>
Logout
</a>
</li>
</ul>
</span>
<span class="status">
<i class="fa fa-circle">
</i>
Online
</span>
</div>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse" id="sidebar-nav">
<ul class="nav nav-pills nav-stacked">
<li class="nav-header nav-header-first hidden-sm hidden-xs">
Navigation
</li>
<li class="active">
<a href="index.html">
<i class="fa fa-dashboard">
</i>
<span>
Dashboard
</span>
<span class="label label-primary label-circle pull-right">
28
</span>
</a>
</li>
<li>
<a class="dropdown-toggle" href="#">
<i class="fa fa-table">
</i>
<span>
Tables
</span>
<i class="fa fa-angle-right drop-icon">
</i>
</a>
<ul class="submenu">
<li>
<a href="tables.html">
Simple
</a>
</li>
<li>
<a href="tables-advanced.html">
Advanced
</a>
</li>
<li>
<a href="users.html">
Users
</a>
</li>
<li>
<a href="tables-footables.html">
FooTables
</a>
</li>
</ul>
</li>
<li>
<a class="dropdown-toggle" href="#">
<i class="fa fa-envelope">
</i>
<span>
Email
</span>
<i class="fa fa-angle-right drop-icon">
</i>
</a>
<ul class="submenu">
<li>
<a href="email-inbox.html">
Inbox
</a>
</li>
<li>
<a href="email-detail.html">
Detail
</a>
</li>
<li>
<a href="email-compose.html">
Compose
</a>
</li>
</ul>
</li>
<li>
<a class="dropdown-toggle" href="#">
<i class="fa fa-bar-chart-o">
</i>
<span>
Graphs
</span>
<i class="fa fa-angle-right drop-icon">
</i>
</a>
<ul class="submenu">
<li>
<a href="graphs-morris.html">
Morris & Mixed
</a>
</li>
<li>
<a href="graphs-flot.html">
Flot
</a>
</li>
<li>
<a href="graphs-dygraphs.html">
Dygraphs
</a>
</li>
<li>
<a href="graphs-xcharts.html">
xCharts
</a>
</li>
</ul>
</li>
<li>
<a href="widgets.html">
<i class="fa fa-th-large">
</i>
<span>
Widgets
</span>
<span class="label label-success pull-right">
New
</span>
</a>
</li>
<li>
<a class="dropdown-toggle" href="#">
<i class="fa fa-copy">
</i>
<span>
Pages
</span>
<i class="fa fa-angle-right drop-icon">
</i>
</a>
<ul class="submenu">
<li>
<a href="calendar.html">
Calendar
</a>
</li>
<li>
<a href="gallery.html">
Gallery
</a>
</li>
<li>
<a href="gallery-v2.html">
Gallery v2
</a>
</li>
<li>
<a href="pricing.html">
Pricing
</a>
</li>
<li>
<a href="projects.html">
Projects
</a>
</li>
<li>
<a href="team-members.html">
Team Members
</a>
</li>
<li>
<a href="timeline.html">
Timeline
</a>
</li>
<li>
<a href="timeline-grid.html">
Timeline Grid
</a>
</li>
<li>
<a href="user-profile.html">
User Profile
</a>
</li>
<li>
<a href="search.html">
Search Results
</a>
</li>
<li>
<a href="invoice.html">
Invoice
</a>
</li>
<li>
<a href="intro.html">
Tour Layout
</a>
</li>
</ul>
</li>
<li class="nav-header hidden-sm hidden-xs">
Components
</li>
<li>
<a class="dropdown-toggle" href="#">
<i class="fa fa-edit">
</i>
<span>
Forms
</span>
<i class="fa fa-angle-right drop-icon">
</i>
</a>
<ul class="submenu">
<li>
<a href="form-elements.html">
Elements
</a>
</li>
<li>
<a href="x-editable.html">
X-Editable
</a>
</li>
<li>
<a href="form-wizard.html">
Wizard
</a>
</li>
<li>
<a href="form-wizard-popup.html">
Wizard popup
</a>
</li>
<li>
<a href="form-wysiwyg.html">
WYSIWYG
</a>
</li>
<li>
<a href="form-summernote.html">
WYSIWYG Summernote
</a>
</li>
<li>
<a href="form-ckeditor.html">
WYSIWYG CKEditor
</a>
</li>
<li>
<a href="form-dropzone.html">
Multiple File Upload
</a>
</li>
</ul>
</li>
<li>
<a class="dropdown-toggle" href="#">
<i class="fa fa-desktop">
</i>
<span>
UI Kit
</span>
<i class="fa fa-angle-right drop-icon">
</i>
</a>
<ul class="submenu">
<li>
<a href="ui-elements.html">
Elements
</a>
</li>
<li>
<a href="notifications.html">
Notifications & Alerts
</a>
</li>
<li>
<a href="modals.html">
Modals
</a>
</li>
<li>
<a href="video.html">
Video
</a>
</li>
<li>
<a class="dropdown-toggle" href="#">
Icons
<i class="fa fa-angle-right drop-icon">
</i>
</a>
<ul class="submenu">
<li>
<a href="icons-awesome.html">
Awesome Icons
</a>
</li>
<li>
<a href="icons-halflings.html">
Halflings Icons
</a>
</li>
</ul>
</li>
<li>
<a href="ui-nestable.html">
Nestable List
</a>
</li>
<li>
<a href="typography.html">
Typography
</a>
</li>
<li>
<a class="dropdown-toggle" href="#">
3 Level Menu
<i class="fa fa-angle-right drop-icon">
</i>
</a>
<ul class="submenu">
<li>
<a href="#">
3rd Level
</a>
</li>
<li>
<a href="#">
3rd Level
</a>
</li>
<li>
<a href="#">
3rd Level
</a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="maps.html">
<i class="fa fa-map-marker">
</i>
<span>
Google Maps
</span>
<span class="label label-danger pull-right">
Updated
</span>
</a>
</li>
<li>
<a class="dropdown-toggle" href="#">
<i class="fa fa-file-text-o">
</i>
<span>
Extra pages
</span>
<i class="fa fa-angle-right drop-icon">
</i>
</a>
<ul class="submenu">
<li>
<a href="faq.html">
FAQ
</a>
</li>
<li>
<a href="emails.html">
Email Templates
</a>
</li>
<li>
<a href="login.html">
Login
</a>
</li>
<li>
<a href="login-full.html">
Login Full
</a>
</li>
<li>
<a href="registration.html">
Registration
</a>
</li>
<li>
<a href="registration-full.html">
Registration Full
</a>
</li>
<li>
<a href="forgot-password.html">
Forgot Password
</a>
</li>
<li>
<a href="forgot-password-full.html">
Forgot Password Full
</a>
</li>
<li>
<a href="lock-screen.html">
Lock Screen
</a>
</li>
<li>
<a href="lock-screen-full.html">
Lock Screen Full
</a>
</li>
<li>
<a href="error-404.html">
Error 404
</a>
</li>
<li>
<a href="error-404-v2.html">
Error 404 Nested
</a>
</li>
<li>
<a href="error-500.html">
Error 500
</a>
</li>
<li>
<a href="extra-grid.html">
Grid
</a>
</li>
</ul>
</li>
<li>
<a href="/angularjs">
<i class="fa fa-google">
</i>
<span>
AngularJS Demo
</span>
</a>
</li>
</ul>
</div>
</div>
</section>
<div id="nav-col-submenu">
</div>
</div>
<div id="content-wrapper">
<div class="row">
<div class="col-lg-12">
</div>
</div>
<footer class="row" id="footer-bar">
<p class="col-xs-12" id="footer-copyright">
Powered by Cube Theme.
</p>
</footer>
</div>
</div>
</div>
</div>
{include file="setting"}
<script src="__js__/skin-changer.js"></script>
<script src="__static__/libs/jquery/jquery.min.js"></script>
<script src="__static__/libs/bootstrap/js/bootstrap.min.js"></script>
<script src="__static__/libs/nanoscroller/jquery.nanoscroller.min.js"></script>
<script type="text/javascript" src="__js__/app.js"></script>
<script>
$(document).ready(function() {
})
</script>
</body>
</html>

View File

@@ -0,0 +1,74 @@
<div class="closed" id="config-tool">
<a id="config-tool-cog"><i class="fa fa-cog"></i></a>
<div id="config-tool-options">
<h4>布局选项</h4>
<ul>
<li>
<div class="checkbox-nice">
<input id="config-fixed-header" type="checkbox"/>
<label for="config-fixed-header">固定头部</label>
</div>
</li>
<li>
<div class="checkbox-nice">
<input id="config-fixed-sidebar" type="checkbox"/>
<label for="config-fixed-sidebar">固定左侧菜单</label>
</div>
</li>
<li>
<div class="checkbox-nice">
<input id="config-fixed-footer" type="checkbox"/>
<label for="config-fixed-footer">固定底部</label>
</div>
</li>
<li>
<div class="checkbox-nice">
<input id="config-boxed-layout" type="checkbox"/>
<label for="config-boxed-layout">盒式布局</label>
</div>
</li>
<!-- <li>
<div class="checkbox-nice">
<input id="config-rtl-layout" type="checkbox"/>
<label for="config-rtl-layout">左右翻转</label>
</div>
</li> -->
</ul>
<br/>
<h4>主题颜色</h4>
<ul class="clearfix" id="skin-colors">
<li>
<a class="skin-changer" data-skin="" data-toggle="tooltip" style="background-color: #34495e;" title="Default">
</a>
</li>
<li>
<a class="skin-changer" data-skin="theme-white" data-toggle="tooltip" style="background-color: #2ecc71;" title="White/Green">
</a>
</li>
<li>
<a class="skin-changer blue-gradient" data-skin="theme-blue-gradient" data-toggle="tooltip" title="Gradient">
</a>
</li>
<li>
<a class="skin-changer" data-skin="theme-turquoise" data-toggle="tooltip" style="background-color: #1abc9c;" title="Green Sea">
</a>
</li>
<li>
<a class="skin-changer" data-skin="theme-amethyst" data-toggle="tooltip" style="background-color: #9b59b6;" title="Amethyst">
</a>
</li>
<li>
<a class="skin-changer" data-skin="theme-blue" data-toggle="tooltip" style="background-color: #2980b9;" title="Blue">
</a>
</li>
<li>
<a class="skin-changer" data-skin="theme-red" data-toggle="tooltip" style="background-color: #e74c3c;" title="Red">
</a>
</li>
<li>
<a class="skin-changer" data-skin="theme-whbl" data-toggle="tooltip" style="background-color: #3498db;" title="White/Blue">
</a>
</li>
</ul>
</div>
</div>

12
app/common.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 流年 <liu21st@gmail.com>
// +----------------------------------------------------------------------
// 应用公共文件

27
app/event.php Normal file
View File

@@ -0,0 +1,27 @@
<?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>
// +----------------------------------------------------------------------
// 事件定义文件
return [
'bind' => [
],
'listen' => [
'AppInit' => [],
'HttpRun' => [],
'HttpEnd' => [],
'LogLevel' => [],
'LogWrite' => [],
],
'subscribe' => [
],
];

View File

@@ -0,0 +1,17 @@
<?php
namespace app\index\controller;
use app\BaseController;
class Index extends BaseController
{
public function index()
{
return '<style type="text/css">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }</style><div style="padding: 24px 48px;"> <h1>:) </h1><p> ThinkPHP V6<br/><span style="font-size:30px">13载初心不改 - 你值得信赖的PHP框架</span></p></div><script type="text/javascript" src="https://tajs.qq.com/stats?sId=64890268" charset="UTF-8"></script><script type="text/javascript" src="https://e.topthink.com/Public/static/client.js"></script><think id="eab4b9f840753f8e7"></think>';
}
public function hello($name = 'ThinkPHP6')
{
return 'hello,' . $name;
}
}

12
app/middleware.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
return [
// 全局请求缓存
// \think\middleware\CheckRequestCache::class,
// 多语言加载
// \think\middleware\LoadLangPack::class,
// Session初始化
// \think\middleware\SessionInit::class,
// 页面Trace调试
// \think\middleware\TraceDebug::class,
];

19
app/provider.php Normal file
View File

@@ -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>
// +----------------------------------------------------------------------
use app\ExceptionHandle;
use app\Request;
// 容器Provider定义文件
return [
'think\Request' => Request::class,
'think\exception\Handle' => ExceptionHandle::class,
];