6
0
Fork 0

调整后台批零问题

release
vine_liutk 2022-02-10 16:37:55 +08:00
parent e4d21a633b
commit 1f41bb4ec1
3 changed files with 14 additions and 2 deletions

View File

@ -54,7 +54,7 @@ class HomeController extends Controller
// 'title' => $menu->title, // 'title' => $menu->title,
// 'uri' => $menu->uri, // 'uri' => $menu->uri,
// ]); // ]);
// dump($activeMenu->isActive($menu->toArray(), 'dealer-orders/21')); // dump($activeMenu->isActive($menu->toArray(), 'dealer-earnings-manage?filter-earningable_type%5B0%5D=dealer_manage_subsidy&_pjax=%23pjax-container&page=2'));
// } // }
// dd(123465); // dd(123465);
// } // }

View File

@ -60,7 +60,7 @@ class DealerEarningStatusIn extends Filter
$query->where('status', 1); $query->where('status', 1);
break; break;
case 5: case 5:
$query->where('status', 1); $query->where('status', 5);
break; break;
} }
} }

View File

@ -26,6 +26,12 @@ class Menu extends DcatLayoutMenu
if (empty($_uri) && $path !== 'admin') { if (empty($_uri) && $path !== 'admin') {
return false; return false;
} }
if (strpos($path, '?')) {
$path = substr($path, 0, strpos($path, '?'));
}
if (strpos($_uri, '?')) {
$_uri = substr($_uri, 0, strpos($_uri, '?'));
}
return strpos('/'.$path, $_uri) !== false; return strpos('/'.$path, $_uri) !== false;
} }
@ -34,6 +40,12 @@ class Menu extends DcatLayoutMenu
if (empty($_uri) && $path !== 'admin') { if (empty($_uri) && $path !== 'admin') {
return false; return false;
} }
if (strpos($path, '?')) {
$path = substr($path, 0, strpos($path, '?'));
}
if (strpos($_uri, '?')) {
$_uri = substr($_uri, 0, strpos($_uri, '?'));
}
if (strpos('/'.$path, $_uri) !== false) { if (strpos('/'.$path, $_uri) !== false) {
return true; return true;
} }