qiushang 1 tahun lalu
induk
melakukan
6f49088c42

+ 36 - 37
resources/views/home/http/newsdetail.blade.php

@@ -1,50 +1,47 @@
 <!DOCTYPE html>
 <html>
+
 <head>
     @include('common.head')
 </head>
+
 <body>
-<div class="header">
-    @include('common.header')
-</div>
-<div id="app">
-    <!-- 頭部導航 -->
     <div class="header">
-        <!-- 导航栏 -->
-        @include('common.nav')
+        @include('common.header')
     </div>
+    <div id="app">
 
-    <!--- 解决方案 --->
-    <div class="index-about" style="padding-top: 40px;">
-        <div class="width-1200">
-            <div class="flex-start">
-                <div class="about-list news-detail">
-                    <p class="news-title overflow">{{$info->title}}</p>
-                    <p class="news-time">发布日期:{{ date("Y-m-d H:i",$info->created_at)}}</p>
+        <!--- 解决方案 --->
+        <div class="index-about" style="padding-top: 40px;">
+            <div class="width-1200">
+                <div class="flex-start">
+                    <div class="about-list news-detail">
+                        <p class="news-title overflow">{{ $info->title }}</p>
+                        <p class="news-time">发布日期:{{ date('Y-m-d H:i', $info->created_at) }}</p>
 
-                    <div class="news-content" id="news-content">
-                        {!! $info->content !!}
+                        <div class="news-content" id="news-content">
+                            {!! $info->content !!}
+                        </div>
                     </div>
-                </div>
-                <div class="about-detail">
-                    <div class="about-area">
-                        <div class="about-title">栏目分类</div>
-                        @foreach($category as $item)
-                            <div class="news-item">
-                                <a href="{{'/news/category/'.$item->mid}}">{{$item->name}}</a>
-                            </div>
-                        @endforeach
+                    <div class="about-detail">
+                        <div class="about-area">
+                            <div class="about-title">栏目分类</div>
+                            @foreach ($category as $item)
+                                <div class="news-item">
+                                    <a href="{{ '/news/category/' . $item->mid }}">{{ $item->name }}</a>
+                                </div>
+                            @endforeach
+                        </div>
                     </div>
                 </div>
-            </div>
 
+            </div>
         </div>
-    </div>
 
 
-    @include('common.footer')
+        @include('common.footer')
 
-</div>
+    </div>
 
 
 </body>
@@ -59,7 +56,7 @@
             newsInfo: [],
             categoryList: [],
         },
-        mounted: function () {
+        mounted: function() {
             var mySwiper = new Swiper('.swiper-container', {
                 loop: true,
                 // 如果需要分页器
@@ -71,19 +68,20 @@
         },
         //方法
         methods: {
-            init: function () {
+            init: function() {
                 let _this = this;
                 let mid = this.getQueryVariable('mid');
                 axios.post(_this.target + '/api/index/m_news_info', {
                     mid: mid
-                }).then(function (response) {
+                }).then(function(response) {
                     if (response.data.result) {
                         this.newsInfo = response.data.data;
-                        this.newsInfo.created_at = new Date(this.newsInfo.created_at * 1000).toLocaleString();
+                        this.newsInfo.created_at = new Date(this.newsInfo.created_at * 1000)
+                            .toLocaleString();
                         let dom = document.getElementById('news-content');
                         dom.innerHTML = this.newsInfo.content;
                     }
-                }.bind(_this)).catch(function (error) {
+                }.bind(_this)).catch(function(error) {
                     console.log(error);
                 });
 
@@ -91,16 +89,16 @@
                 axios.post(_this.target + '/api/index/m_category_list', {
                     size: 10,
                     page: 1
-                }).then(function (response) {
+                }).then(function(response) {
                     if (response.data.result) {
                         this.categoryList = response.data.data.list;
                     }
-                }.bind(_this)).catch(function (error) {
+                }.bind(_this)).catch(function(error) {
                     console.log(error);
                 });
             },
 
-            getQueryVariable: function (variable) {
+            getQueryVariable: function(variable) {
                 var query = window.location.search.substring(1);
                 var vars = query.split("&");
                 for (var i = 0; i < vars.length; i++) {
@@ -114,4 +112,5 @@
         },
     });
 </script>
+
 </html>

+ 39 - 42
resources/views/home/http/newslist.blade.php

@@ -6,57 +6,54 @@
 </head>
 
 <body>
-<div class="header">
-    @include('common.header')
-</div>
-<div id="app">
-    <!-- 頭部導航 -->
     <div class="header">
-        <!-- 导航栏 -->
-        @include('common.nav')
+        @include('common.header')
     </div>
+    <div id="app">
 
-    <!--- 解决方案 --->
-    <div class="index-about" style="padding-top: 40px;">
-        <div class="width-1200">
-            <div class="flex-start">
-                <div class="about-list">
-                    @foreach ($list as $item)
-                        <div class="about-item">
-                            <div class="i-time">
-                                <a href="{{ url('/news/detail/'. $item->mid) }}">
-                                    @if($item->logo)
-                                        <img src="{{ $item->logo }}" class="new-img"/>
-                                    @else
-                                        <img src="/static/images/30.png" class="new-img"/>
-                                    @endif
-                                </a>
-                            </div>
-                            <div class="i-content">
-                                <a href="{{ url('/news/detail/'.$item->mid) }}">
-                                    <p class="i-title overflow">{{ $item->title }}</p>
-                                    <p class="i-desc more-overflow">{{ $item->introduction }}</p>
-                                </a>
-                            </div>
-                        </div>
-                    @endforeach
-                </div>
-                <div class="about-detail">
-                    <div class="about-area">
-                        <div class="about-title">栏目分类</div>
-                        @foreach ($category as $item)
-                            <div class="news-item">
-                                <a href="{{ url('/news/category/'. $item->mid) }}" target="_blank">{{ $item->name }}</a>
+        <!--- 解决方案 --->
+        <div class="index-about" style="padding-top: 40px;">
+            <div class="width-1200">
+                <div class="flex-start">
+                    <div class="about-list">
+                        @foreach ($list as $item)
+                            <div class="about-item">
+                                <div class="i-time">
+                                    <a href="{{ url('/news/detail/' . $item->mid) }}">
+                                        @if ($item->logo)
+                                            <img src="{{ $item->logo }}" class="new-img" />
+                                        @else
+                                            <img src="/static/images/30.png" class="new-img" />
+                                        @endif
+                                    </a>
+                                </div>
+                                <div class="i-content">
+                                    <a href="{{ url('/news/detail/' . $item->mid) }}">
+                                        <p class="i-title overflow">{{ $item->title }}</p>
+                                        <p class="i-desc more-overflow">{{ $item->introduction }}</p>
+                                    </a>
+                                </div>
                             </div>
                         @endforeach
                     </div>
+                    <div class="about-detail">
+                        <div class="about-area">
+                            <div class="about-title">栏目分类</div>
+                            @foreach ($category as $item)
+                                <div class="news-item">
+                                    <a href="{{ url('/news/category/' . $item->mid) }}"
+                                        target="_blank">{{ $item->name }}</a>
+                                </div>
+                            @endforeach
+                        </div>
+                    </div>
                 </div>
-            </div>
 
+            </div>
         </div>
-    </div>
 
-    @include('common.footer')
-</div>
+        @include('common.footer')
+    </div>
 </body>
+
 </html>