作者 zhl

view

@@ -74,8 +74,8 @@ class Index extends Base @@ -74,8 +74,8 @@ class Index extends Base
74 74
75 $web = [ 75 $web = [
76 'title' => $data['blog_title'], 76 'title' => $data['blog_title'],
77 - 'keywords' => $data['blog_seo_keywords'],  
78 - 'description' => $data['blog_seo_description'], 77 + 'keywords' => $data['blog_seo_keywords'] ?? $data['blog_title'],
  78 + 'description' => $data['blog_seo_description'] ?? $data['blog_title'],
79 ]; 79 ];
80 80
81 return view('v2/blog/info',[ 81 return view('v2/blog/info',[
@@ -101,8 +101,8 @@ class Index extends Base @@ -101,8 +101,8 @@ class Index extends Base
101 101
102 $web = [ 102 $web = [
103 'title' => $page['page_title'], 103 'title' => $page['page_title'],
104 - 'keywords' => implode(', ', $page['page_seo_keywords']),  
105 - 'description' => $page['page_seo_description'], 104 + 'keywords' => $page['page_seo_keywords'] ? implode(', ', $page['page_seo_keywords']) : $page['page_title'],
  105 + 'description' => $page['page_seo_description'] ?? $page['page_title'],
106 ]; 106 ];
107 107
108 return view('v2/page', [ 108 return view('v2/page', [
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 </div> 31 </div>
32 @endif 32 @endif
33 <div class="item-text"> 33 <div class="item-text">
34 - {!! $list['blog_seo_description'] !!} 34 + {!! mb_substr(strip_tags($list['body']['blog_body']), 0, 400) !!}
35 </div> 35 </div>
36 <div class="item-els flex_row"> 36 <div class="item-els flex_row">
37 <a href="/blog/{{$list['blog_id']}}" class="btn-learnmore item-more">read more</a> 37 <a href="/blog/{{$list['blog_id']}}" class="btn-learnmore item-more">read more</a>