Commit ab806788 authored by xieyishang's avatar xieyishang

addxx

parent bc11f9d7
Pipeline #43 failed with stages
......@@ -80,7 +80,8 @@ class Index extends Frontend
public function news(){
//获取当前方法名
$newslist = Db::name('news')->select();
$need_field = ['news_id','news_img','news_title','news_comtent','news_view','news_sort', 'FROM_UNIXTIME(news_createtime,"%Y-%m-%d") as news_createtime'];
$newslist = Db::name('news')->field($need_field)->select();
// var_dump($newslist);die;
$action=request()->action();
$this->assign('action',$action);
......
......@@ -31,17 +31,16 @@
<a href="newsdataile.html" class="newsitems">
<div class="row">
<div class="newsitems_left col-xl-3 col-lg-3 col-md-4 col-sm-5 col-12">
<img src="__CDN__/static/images/news/newss.jpg" alt="">
<img src="__CDN__{$vo.news_img}" alt="">
</div>
<div class="newsitems_right col-xl-9 col-lg-9 col-md-8 col-sm-7 col-12">
<h5>{$vo.news_title}</h5>
<p>{$vo.news_title}</p>
<span>2020-06-15</span>
<span>{$vo.news_createtime}</span>
</div>
</div>
</a>
</div>
{/foreach}
......
<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:79:"D:\phpstudy_pro\WWW\www.fa.com\public/../application/index\view\index\news.html";i:1615020168;s:72:"D:\phpstudy_pro\WWW\www.fa.com\application\index\view\layout\topnav.html";i:1615017144;s:72:"D:\phpstudy_pro\WWW\www.fa.com\application\index\view\layout\footer.html";i:1615017258;}*/ ?>
<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:79:"D:\phpstudy_pro\WWW\www.fa.com\public/../application/index\view\index\news.html";i:1615020764;s:72:"D:\phpstudy_pro\WWW\www.fa.com\application\index\view\layout\topnav.html";i:1615017144;s:72:"D:\phpstudy_pro\WWW\www.fa.com\application\index\view\layout\footer.html";i:1615017258;}*/ ?>
<!DOCTYPE html>
<html lang="zh-cn">
<!-- 完美兼容所有屏幕 基于 bootstrap4.1 -->
......@@ -89,17 +89,16 @@
<a href="newsdataile.html" class="newsitems">
<div class="row">
<div class="newsitems_left col-xl-3 col-lg-3 col-md-4 col-sm-5 col-12">
<img src="/static/images/news/newss.jpg" alt="">
<img src="<?php echo $vo['news_img']; ?>" alt="">
</div>
<div class="newsitems_right col-xl-9 col-lg-9 col-md-8 col-sm-7 col-12">
<h5><?php echo $vo['news_title']; ?></h5>
<p><?php echo $vo['news_title']; ?></p>
<span>2020-06-15</span>
<span><?php echo $vo['news_createtime']; ?></span>
</div>
</div>
</a>
</div>
<?php endforeach; ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment