Просмотр исходного кода

刚需购房登录页样式问题

linwu 3 лет назад
Родитель
Сommit
fede3b57d6

+ 1 - 1
app/Http/Controllers/Web/Content/BuyhouseController.php

@@ -58,7 +58,7 @@ class BuyhouseController extends WebBaseController
         $return_data['house'] = $house;
 
         //新闻
-        $news = Article::where('type_id', 56)->where('is_display', 1)->select(['id', 'title', 'updated_at','created_at'])->orderBy('list_order', 'desc')->limit(10)->get();
+        $news = Article::where('type_id', 56)->where('is_display', 1)->select(['id', 'title', 'updated_at','created_at'])->orderBy('list_order', 'desc')->limit(6)->get();
         foreach ($news as $v) {
             $v['created_at_text'] = date('Y-m-d', strtotime($v['created_at']));
             $v['updated_at_text'] = date('Y-m-d', strtotime($v['updated_at']));

+ 3 - 4
public/themes/default/views/app/content/buyhouse/login.blade.php

@@ -47,13 +47,12 @@
             height:527px;
         }
 
+        .article_item {padding:5px 0;}
+
         .news_item{
             text-decoration:none;
             color:#4689e2;
             width:500px;
-            overflow:hidden;
-            text-overflow:ellipsis;
-            white-space:nowrap;
         }
 
         .news_item:hover{
@@ -198,7 +197,7 @@
                                            @click="location.href='{{route('buyhouse.news')}}'">更多
                                 </el-button>
                             </div>
-                            <div v-for="item in news" class="text item" @click="toNews(item.url)">
+                            <div v-for="item in news" class="text item article_item" @click="toNews(item.url)">
                                 <a href="javascript:void(0)" class="news_item">
                                     <span>@{{ item.title }}</span>
                                 </a>