更换后台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
+8 -1
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;