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

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);
}
}