浏览代码

首页展示

zhangdehua 1 年之前
父节点
当前提交
66f30f56e2
共有 2 个文件被更改,包括 29 次插入31 次删除
  1. 1 0
      app/api/controller/Index.php
  2. 28 31
      app/api/view/index/index.html

+ 1 - 0
app/api/controller/Index.php

@@ -45,6 +45,7 @@ class Index extends Controller
         foreach ($article as &$datum){
             $datum['year'] = substr($datum['create_time'],0,4);
             $datum['month_day'] = substr($datum['create_time'],5,5);
+            $datum['date'] = substr($datum['create_time'],0,10);
         }
         //dd($article);
 

+ 28 - 31
app/api/view/index/index.html

@@ -240,12 +240,9 @@
                                  alt="">
                         </div>
                         <div class="newConterInfo">
-                            <h3 class="newConterTitle">Explore a Variety of ChoicesExplore a Variety of Choices
-                                Whether yoExplore a Variety of Choices Whether yoExplore a Variety of Choices
-                                Whether yo Whether you're
-                                aseasonedvaper or</h3>
+                            <h3 class="newConterTitle">{$art['title']}</h3>
                             <div class="newsInfoRl">
-                                <p class="rlDate">2024-02-06</p>
+                                <p class="rlDate">{$art['date']}</p>
                                 <div class="newsMore">
                                     <p class="textEllipsis">More</p>
                                     <span>+</span>
@@ -255,32 +252,32 @@
                     </div>
                 </a>
                 {/foreach}
-                <a href="">
-                    <div class="newConterItem">
-                        <div class="newsDateBox">
-                            <p>02-06</p>
-                            <p class="year">2024</p>
-                        </div>
-                        <div class="newConterImg">
-                            <img class="lazy" src="/assets/api/asstes/icon/transparent.png"
-                                 data-original="https://img0.baidu.com/it/u=3316636492,2799302396&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1709398800&t=0b33f33f41e44709ced5e8c8a1113b6b"
-                                 alt="">
-                        </div>
-                        <div class="newConterInfo">
-                            <h3 class="newConterTitle">Explore a Variety of ChoicesExplore a Variety of Choices
-                                Whether yoExplore a Variety of Choices Whether yoExplore a Variety of Choices
-                                Whether yo Whether you're
-                                aseasonedvaper or</h3>
-                            <div class="newsInfoRl">
-                                <p class="rlDate">2024-02-06</p>
-                                <div class="newsMore active">
-                                    <p class="textEllipsis">More</p>
-                                    <span>+</span>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </a>
+<!--                <a href="">-->
+<!--                    <div class="newConterItem">-->
+<!--                        <div class="newsDateBox">-->
+<!--                            <p>02-06</p>-->
+<!--                            <p class="year">2024</p>-->
+<!--                        </div>-->
+<!--                        <div class="newConterImg">-->
+<!--                            <img class="lazy" src="/assets/api/asstes/icon/transparent.png"-->
+<!--                                 data-original="https://img0.baidu.com/it/u=3316636492,2799302396&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1709398800&t=0b33f33f41e44709ced5e8c8a1113b6b"-->
+<!--                                 alt="">-->
+<!--                        </div>-->
+<!--                        <div class="newConterInfo">-->
+<!--                            <h3 class="newConterTitle">Explore a Variety of ChoicesExplore a Variety of Choices-->
+<!--                                Whether yoExplore a Variety of Choices Whether yoExplore a Variety of Choices-->
+<!--                                Whether yo Whether you're-->
+<!--                                aseasonedvaper or</h3>-->
+<!--                            <div class="newsInfoRl">-->
+<!--                                <p class="rlDate">2024-02-06</p>-->
+<!--                                <div class="newsMore active">-->
+<!--                                    <p class="textEllipsis">More</p>-->
+<!--                                    <span>+</span>-->
+<!--                                </div>-->
+<!--                            </div>-->
+<!--                        </div>-->
+<!--                    </div>-->
+<!--                </a>-->
             </div>
         </div>
     </article>