更新功能

This commit is contained in:
2019-06-29 21:14:58 +08:00
parent d3eef9c5fd
commit 6bfc2db94a
23 changed files with 1046 additions and 955 deletions

25
app/controller/Admin.php Normal file
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\controller;
use app\BaseController;
/**
* @title 后端公共模块
*/
class Admin extends BaseController {
protected $middleware = [
'\app\middleware\AdminAuth' => ['except' => ['login']],
'\app\middleware\Admin'
];
protected $data = ['meta' => [], 'data' => [], 'code' => 0, 'msg' => ''];
}

17
app/controller/Index.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
namespace app\controller;
use app\BaseController;
class Index extends BaseController {
protected $middleware = ['\app\middleware\Front'];
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 miss($name = 'ThinkPHP6') {
return 'hello,' . $name;
}
}

View File

@@ -0,0 +1,30 @@
<?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\controller\admin;
use app\controller\Admin;
/**
* @title 后端公共模块
*/
class Index extends Admin{
/**
* @title 系统首页
*/
public function index(){
return $this->data;
}
public function login(){
if ($this->request->isAjax()) {
return $this->data;
}
}
}