Commit ef3b4768 authored by 章建武's avatar 章建武

dep

parent ddbe6dac
...@@ -16,7 +16,13 @@ class AboutController extends Controller ...@@ -16,7 +16,13 @@ class AboutController extends Controller
{ {
public function index() public function index()
{ {
// dd(strstr(url()->full(),'?'));
// dd(substr($_SERVER['REQUEST_URI'],0,strrpos($_SERVER['REQUEST_URI'],'/')));
// dd(!strstr(url()->current(),'?'));
// dd(substr_count($_SERVER['REQUEST_URI'],'/'));
// dd($_SERVER['REQUEST_URI']);
$url = url()->full(); $url = url()->full();
$pathinfo = parse_url($url); $pathinfo = parse_url($url);
$path = $pathinfo['path']; $path = $pathinfo['path'];
$en = substr($path,1,2); $en = substr($path,1,2);
......
...@@ -86,7 +86,12 @@ ...@@ -86,7 +86,12 @@
@endif @endif
</li> </li>
@foreach($IndexNav as $topNav) @foreach($IndexNav as $topNav)
<li class="@if (strstr(URL::full(),'?') && substr($_SERVER['REQUEST_URI'],0,strrpos($_SERVER['REQUEST_URI'],'/')) == $topNav['url']) current @endif @if(!strstr(url()->current(),'?') && substr($_SERVER['REQUEST_URI'],0,strrpos($_SERVER['REQUEST_URI'],'/'))== $topNav['url']) current @endif @if(substr_count($_SERVER['REQUEST_URI'],'/')==1 && $_SERVER['REQUEST_URI']== $topNav['url'])current @endif "> <li class="
@if (strstr(URL::full(),'?') && substr($_SERVER['REQUEST_URI'],0,strrpos($_SERVER['REQUEST_URI'],'/')) == $topNav['url']) current @endif
@if(!strstr(url()->current(),'?') && substr($_SERVER['REQUEST_URI'],0,strrpos($_SERVER['REQUEST_URI'],'/'))== $topNav['url']) current @endif
@if(substr_count($_SERVER['REQUEST_URI'],'/')==1 && $_SERVER['REQUEST_URI']== $topNav['url'])current @endif
@if(substr_count($_SERVER['REQUEST_URI'],'/')==2 && $_SERVER['REQUEST_URI']== $topNav['url'])current @endif
">
@if(isset($topNav['children']) && $topNav['children']) @if(isset($topNav['children']) && $topNav['children'])
<a href="{{$topNav['url']}}"> <a href="{{$topNav['url']}}">
{{$topNav['name']}} {{$topNav['name']}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment