index.blade.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!DOCTYPE html>
  2. <html lang="{{ config('app.locale') }}">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <title>{{ Admin::title() }} @if($header) | {{ $header }}@endif - {{subsite_config('aix.system.site.site.site_name')}}</title>
  7. <!-- Tell the browser to be responsive to screen width -->
  8. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  9. {!! Admin::css() !!}
  10. <script src="{{ Admin::jQuery() }}"></script>
  11. <script src="{{"https://api.map.baidu.com/api?v=2.0&ak=".subsite_config('aix.system.map.map.map_ak')}}&s=1"></script>
  12. <script src="{{ theme_asset('app/js/echarts.common.min.js') }}"></script>
  13. {!! Admin::headerJs() !!}
  14. <!--[if lt IE 9]>
  15. <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  16. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  17. <![endif]-->
  18. </head>
  19. <body class="hold-transition {{config('admin.skin')}} {{join(' ', config('admin.layout'))}}">
  20. <div class="wrapper">
  21. @include('admin::partials.header')
  22. @include('admin::partials.sidebar')
  23. <div class="content-wrapper" id="pjax-container">
  24. <div id="app">
  25. @yield('content')
  26. </div>
  27. {!! Admin::script() !!}
  28. </div>
  29. @include('admin::partials.footer')
  30. </div>
  31. <script>
  32. function LA() {}
  33. LA.token = "{{ csrf_token() }}";
  34. function getMenuMessage() {
  35. $.ajax({
  36. method: 'get',
  37. url: "{{route('admin.home.message')}}",
  38. success: function (data) {
  39. $(".menu_message_num").html("");
  40. $.each(data, function (key, value) {
  41. if (value.num > 0) {
  42. right_class="";
  43. if (value.has_child == false) {
  44. right_class= "show-num";
  45. }
  46. $("#menu_message_"+value.id).html("<small class=\"red-tips "+right_class+"\">"+value.num+"</small>");
  47. }
  48. });
  49. }
  50. });
  51. }
  52. $(function () {
  53. getMenuMessage();
  54. setInterval(function () {
  55. getMenuMessage();
  56. }, 30000);
  57. });
  58. $(document).on('pjax:complete', function (xhr) {
  59. getMenuMessage();
  60. });
  61. </script>
  62. <!-- REQUIRED JS SCRIPTS -->
  63. {!! Admin::js() !!}
  64. </body>
  65. </html>