更换后台UI,使用adminlteUI

This commit is contained in:
2020-04-07 12:47:03 +08:00
parent 209af6285a
commit c12a265034
462 changed files with 111399 additions and 948 deletions

View File

@@ -21,6 +21,7 @@ class Base extends BaseC {
// 使用内置PHP模板引擎渲染模板输出
protected $tpl_config = [
'view_dir_name' => 'view',
'tpl_replace_string' => [
'__static__' => '/static',
'__img__' => '/static/admin/images',
@@ -141,6 +142,7 @@ class Base extends BaseC {
}
protected function getMenu() {
$addon = $this->request->param('addon', false);
$hover_url = str_replace(".", "/", strtolower($this->request->controller()));
$controller = str_replace(".", "/", strtolower($this->request->controller()));
$menu = array(
@@ -161,7 +163,7 @@ class Base extends BaseC {
unset($menu['main'][$value['id']]);
continue; //继续循环
}
if ($controller == $value['url']) {
if (false !== strripos($controller, $value['url'])) {
$value['style'] = "active";
}
$menu['main'][$value['id']] = $value;
@@ -175,6 +177,11 @@ class Base extends BaseC {
//内容管理菜单
$pid = Menu::where("pid =0 AND url like '%admin/category%'")->value('id');
}
if ($addon) {
//扩展管理菜单
$pid = Menu::where("pid =0 AND url like '%admin/addons%'")->value('id');
$this->getAddonsMenu();
}
if ($pid) {
$map['pid'] = $pid;
$map['hide'] = 0;

View File

@@ -49,7 +49,8 @@ class Content extends Base {
'list' => $list,
'page' => $list->render(),
'model_name' => $this->modelInfo['name'],
'model_id' => $this->modelInfo['id']
'model_id' => $this->modelInfo['id'],
'meta_title' => $this->modelInfo['title'].'列表'
);
if ($this->modelInfo['template_list']) {
$template = 'admin/content/' . $this->modelInfo['template_list'];
@@ -74,11 +75,12 @@ class Content extends Base {
} else {
$info = [
'model_name' => $this->modelInfo['name'],
'model_id' => $this->modelInfo['id'],
'model_id' => $this->modelInfo['id']
];
$this->data = [
'info' => $info,
'fieldGroup' => Attribute::getField($this->modelInfo),
'meta_title' => $this->modelInfo['title'].'添加'
];
if ($this->modelInfo['template_add']) {
@@ -114,6 +116,7 @@ class Content extends Base {
$this->data = array(
'info' => $info,
'fieldGroup' => Attribute::getField($this->modelInfo, 'edit'),
'meta_title' => $this->modelInfo['title'].'修改'
);
if ($this->modelInfo['template_edit']) {
$template = 'admin/content/' . $this->modelInfo['template_edit'];