更新前端文件

This commit is contained in:
2019-07-03 16:36:05 +08:00
parent 073a4de647
commit 777b452685
151 changed files with 158954 additions and 64 deletions
+4 -2
View File
@@ -26,6 +26,7 @@ class Admin {
}
if ($request->isAjax()) {
unset($this->data['config']);
return json($this->data);
} else {
return $response->data($this->fetch());
@@ -46,7 +47,8 @@ class Admin {
'__public__' => '/static/admin',
),
);
return View::config($config)->assign($this->data)->fetch($template);
$data = isset($this->data['data']) ? $this->data['data'] : [];
$data['config'] = isset($this->data['config']) ? $this->data['config'] : $data;
return View::config($config)->assign($data)->fetch($template);
}
}
+2 -2
View File
@@ -39,7 +39,7 @@ class AdminAuth {
* @title 显示菜单
*/
protected function getMenu($request) {
$current_controller = str_replace('.', '/', strtolower($request->controller()));
$current_controller = '/' . str_replace('.', '/', strtolower($request->controller()));
$current_url = $current_controller . '/' . strtolower($request->action());
$menu = Cache::get('menu');
if (!$menu) {
@@ -50,7 +50,7 @@ class AdminAuth {
}
$current_pid = 0;
foreach ($menu as $key => $value) {
if (strpos($value['url'], $current_controller) !== false) {
if (strpos($value['url'], $current_controller.'/') !== false) {
if ($value['pid'] == 0) {
$current_pid = $value['id'];
} else {