index.blade.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. @extends('module.layouts.content')
  2. @push('meta')
  3. @endpush
  4. @push('css')
  5. <link href="{{ theme_asset('app/css/common.css') }}" rel="stylesheet">
  6. <link rel="stylesheet" type="text/css" href="{{ theme_asset('app/css/help/help.css') }}"/>
  7. @endpush
  8. @push('js')
  9. @endpush
  10. @section('content')
  11. <div class="help_banner">
  12. @if($ads->toArray())
  13. @foreach($ads as $k=>$ad)
  14. {!! $ad->html !!}
  15. @endforeach
  16. @else
  17. <img src="{{theme_asset('app/images/banner/help.jpg')}}" border="0">
  18. @endif
  19. </div>
  20. <div class="help">
  21. <div class="l">
  22. <div class="catbox">
  23. @if($categories->toArray())
  24. @foreach($categories as $k=>$v)
  25. <div class="J_helplist help_category @if($k==0) open @endif">
  26. <div class="titl J_helplistT">{{$v->category_name}}</div>
  27. <ul class="link_gray6 help_category_list J_helplistG">
  28. @if($v->children->toArray())
  29. @foreach($v->children as $key=>$child)
  30. <li><a href="{{route('help.list',['id'=>$child->id])}}">{{$child->category_name}}</a></li>
  31. @endforeach
  32. @endif
  33. </ul>
  34. </div>
  35. @endforeach
  36. @endif
  37. </div>
  38. </div>
  39. <div class="r">
  40. <div class="main">
  41. <div class="topso">
  42. <div class="t">搜索您的问题</div>
  43. <div class="lso">
  44. <div class="sobg">
  45. <form action="{{route('help.search')}}" method="post">
  46. <input name="key" type="text" class="sinput" value=""/>
  47. {{ csrf_field() }}
  48. <input type="submit" value="" class="btn"/>
  49. </form>
  50. </div>
  51. </div>
  52. <div class="rhot link_gray6">常见问题:
  53. <a href="{{route('help.search',['filter'=>'找回密码'])}}">找回密码</a>
  54. <a href="{{route('help.search',['filter'=>'置顶'])}}">置顶</a>
  55. <a href="{{route('help.search',['filter'=>'推荐模板'])}}">推荐模版</a>
  56. <a href="{{route('help.search',['filter'=>'电子地图'])}}">电子地图</a>
  57. </div>
  58. <div class="clear"></div>
  59. </div>
  60. @if($categories->toArray())
  61. @foreach($categories as $k=>$v)
  62. <div class="lbox link_gray6">
  63. <div class="tit">{{$v->category_name}}</div>
  64. <ul>
  65. @if($v->helps)
  66. @foreach($v->helps as $key=>$help)
  67. @if($key<8)
  68. <li><a href="{{route('help.show',array('id'=>$help->id))}}">{{$help->title}}</a></li>
  69. @endif
  70. @endforeach
  71. @endif
  72. </ul>
  73. @if(count($v->helps)>3)
  74. <div class="more"><a href="{{route('help.list',['id'=>$v->id])}}">更多</a></div>
  75. @endif
  76. </div>
  77. @endforeach
  78. @endif
  79. <div class="clear"></div>
  80. </div>
  81. </div>
  82. <div class="clear"></div>
  83. </div>
  84. {{-- 页脚 --}}
  85. {{--@include('module.section.content_footer')--}}
  86. @endsection
  87. @section('script')
  88. <script>
  89. // 左侧菜单展开收起
  90. $('.J_helplistT').click(function() {
  91. var $thisParent = $(this).closest('.J_helplist');
  92. $thisParent.toggleClass('open');
  93. if ($thisParent.hasClass('open')) {
  94. $('.J_helplist.open').not($thisParent).each(function(index, el) {
  95. $(this).removeClass('open');
  96. });
  97. };
  98. });
  99. </script>
  100. @endsection