change news start index
This commit is contained in:
parent
d5328efa93
commit
4b359fb331
|
@ -120,14 +120,14 @@
|
|||
<div class="col-xs-12"><span class="all"><a href="">全部 》</a></span></div>
|
||||
<div class="col-xs-12"><h1>新闻</h1></div>
|
||||
<div class="col-xs-6 news-con">
|
||||
<?php for($i = 1; $i <= 3; $i++){ ?>
|
||||
<?php for($i = 0; $i <= 3; $i++){ ?>
|
||||
<div class="news-wrapper">
|
||||
<h5><a href="<?= $this->list_news[$i]['url'] ?>"><?= $this->list_news[$i]['title'] ?></a></h5>
|
||||
<p><?php
|
||||
$description = "";
|
||||
if (mb_strlen($this->list_news[$i]['description'])>160)
|
||||
if (mb_strlen($this->list_news[$i]['description'])>100)
|
||||
{
|
||||
$description = mb_substr($this->list_news[$i]['description'],0,160,'utf-8').'...';
|
||||
$description = mb_substr($this->list_news[$i]['description'],0,100,'utf-8').'...';
|
||||
}else{
|
||||
$description = $this->list_news[$i]['description'];
|
||||
}
|
||||
|
@ -137,7 +137,7 @@
|
|||
<?php } ?>
|
||||
</div>
|
||||
<div class="col-xs-6 news-con">
|
||||
<?php for($i = 4; $i <= 6; $i++){ ?>
|
||||
<?php for($i = 4; $i <= 7; $i++){ ?>
|
||||
<div class="news-wrapper">
|
||||
<h5><a href="<?= $this->list_news[$i]['url'] ?>"><?= $this->list_news[$i]['title'] ?></a></h5>
|
||||
<p><?php
|
||||
|
|
Loading…
Reference in New Issue