Explorar o código

手机端公告

linwu hai 1 ano
pai
achega
2f7aaa9d1d

+ 3 - 2
app/Services/Content/ArticleService.php

@@ -149,7 +149,8 @@ class ArticleService
     }
     public function getArticleCache($params, $type = 'home')
     {
-        $lists = Cache::get('article_index_list_'.$type.'_'.get_subsite_id());
+//        $lists = Cache::get('article_index_list_'.$type.'_'.get_subsite_id());
+        $lists = null;
         if ($lists === null) {
             //获取指定分类的资讯信息
             $where = array(
@@ -196,7 +197,7 @@ class ArticleService
                     }
                 }
             }
-            Cache::put('article_index_list_'.$type.'_'.get_subsite_id(), $lists, '1800');
+//            Cache::put('article_index_list_'.$type.'_'.get_subsite_id(), $lists, '1800');
         }
         return $lists;
     }

+ 5 - 1
public/themes/default/views/mobile/app/index.blade.php

@@ -293,7 +293,11 @@
                 @if(array_has($articles2, '58') && $articles2['58'])
                     @foreach($articles2['58'] as $k=>$v)
                         <li>
-                            <a href="{{route('mobile.news.show',['id'=>$v->id])}}" target="_blank" rel="nofollow noopener noreferrer"><b class="b2"></b>{{cut_str($v->title, 25, 0, '...')}}</a>
+                            @if(empty($v->is_url))
+                                <a href="{{route('mobile.news.show',['id'=>$v->id])}}" target="_blank" rel="nofollow noopener noreferrer"><b>&gt;</b>{{cut_str($v->title, 15, 0, '...')}}<span class="jc_rt">{{date('Y-m-d',strtotime($v->created_at))}}</span></a>
+                            @else
+                                <a href="{{$v->is_url}}" target="_blank" rel="nofollow noopener noreferrer"><b>&gt;</b>{{cut_str($v->title, 15, 0, '...')}}<span class="jc_rt">{{date('Y-m-d',strtotime($v->created_at))}}</span></a>
+                            @endif
                         </li>
                     @endforeach
                         <div onclick="window.location='{{route($sub_site."mobile.news.list",['id'=>58])}}';" style="text-align:center;height:.8rem;line-height:.8rem;background:#fff;">查看更多</div>