作者 景龙
1 个管道 的构建 通过 耗费 1 秒

增加关于我们页面

... ... @@ -12,6 +12,7 @@ namespace app\portal\controller;
use cmf\controller\HomeBaseController;
use app\portal\model\CityCategoryModel;
use app\portal\model\PortalPostModel;
use think\Db;
class IndexController extends HomeBaseController
{
... ... @@ -193,4 +194,13 @@ class IndexController extends HomeBaseController
}
return $res;
}
//关于我们
public function aboutUs(){
$res = Db::name('about_us')->where('id',1)->find();
$contentModel = new PortalPostModel();
$res['content'] = $contentModel->getPostContentAttr($res['content']);
$this->assign('res',$res);
return $this->fetch();
}
}
... ...
... ... @@ -182,25 +182,6 @@
</div>
</div>
</volist>
<volist name="res_stsy" id="vo">
<div class="swiper-slide">
<div class="Feast_item">
<a href="/portal/enjoy/getEnjoyDetail?id={$vo.id}">
<div class="Feast_item_img">
<img src="{:cmf_get_image_url($vo.thumbnail)}" alt="">
</div>
<div class="Feast_item_bottom">
<div class="Feast_item_bottom_title">
{$vo.post_title}
</div>
<div class="Feast_item_bottom_text">
{$vo.post_excerpt}
</div>
</div>
</a>
</div>
</div>
</volist>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination"></div>
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>关于我们</title>
<link rel="stylesheet" href="__TMPL__/public/assets/css/show.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/mask.css">
<style>
.show_2 {
width: 1200px;
margin: auto;
margin-bottom:100px;
}
.excerpt{
font-size: 14px;
margin: 30px 0 40px 0;
color: rgba(153, 153, 153, 1);
line-height: 22px;
}
</style>
</head>
<body>
<!--头部-->
<include file="public@header"/>
<!--彈出框-->
<div class="mask">
</div>
<!--主体内容-->
<div class="show_2">
<!--banner-->
<div class="show_banner">
<notempty name="res.image_url">
<img src="{:cmf_get_image_url($res.thumbnail)}" alt="">
<else/>
<img src="__TMPL__/public/assets/starImg/aicon_80.png" alt="">
</notempty>
</div>
<!--main-->
<div class="show_main">
<!-- 头部 -->
<div class="show_main_Tit clearfix">
<h1>{$res.name}</h1>
</div>
<div class="excerpt">
<p>{$res.excerpt}</p>
</div>
<!-- 文字内容 -->
<div class="show_main_txt">
{$res.content}
</div>
</div>
</div>
<!-- 底部 -->
<include file="public@footer"/>
</body>
<script src="__TMPL__/public/assets/js/jquery-3.2.1.min.js"></script>
<script src="__TMPL__/public/assets/js/public.js"></script>
</html>
\ No newline at end of file
... ...
... ... @@ -26,8 +26,8 @@
<div class="show_7_con">
<!-- 内容模块1 -->
<volist name="res['data']" id="vo" offset="0" length="1">
<a href="/portal/region/getNewsDetail?id={$vo.id}">
<div class="show_7_con1 clearfix">
<div class="show_7_con1 clearfix">
<a href="/portal/region/getNewsDetail?id={$vo.id}">
<img src="{:cmf_get_image_url($vo.thumbnail)}" alt="">
<div class="show_7_con1_txt">
<h1>{$vo.post_title}</h1>
... ... @@ -36,13 +36,13 @@
</p>
<span>{$vo.create_time|date="Y-m-d",###}</span>
</div>
</div>
</a>
</a>
</div>
</volist>
<!-- 内容模块2 -->
<volist name="res['data']" id="vo" offset="1" length="2">
<a href="/portal/region/getNewsDetail?id={$vo.id}">
<div class="show_7_con2 clearfix">
<div class="show_7_con2 clearfix">
<a href="/portal/region/getNewsDetail?id={$vo.id}">
<img src="{:cmf_get_image_url($vo.thumbnail)}" alt="">
<div class="show_7_con2_txt">
<h1>{$vo.post_title}</h1>
... ... @@ -51,13 +51,13 @@
</p>
<span>{$vo.create_time|date="Y-m-d",###}</span>
</div>
</div>
</a>
</a>
</div>
</volist>
<!-- 内容模块3 -->
<volist name="res['data']" id="vo" offset="3" length="1">
<a href="/portal/region/getNewsDetail?id={$vo.id}">
<div class="show_7_con3 clearfix">
<div class="show_7_con3 clearfix">
<a href="/portal/region/getNewsDetail?id={$vo.id}">
<div class="show_7_con3_txt">
<h1>{$vo.post_title}</h1>
<p>
... ... @@ -66,14 +66,14 @@
<span>{$vo.create_time|date="Y-m-d",###}</span>
</div>
<img src="{:cmf_get_image_url($vo.thumbnail)}" alt="">
</div>
</a>
</a>
</div>
</volist>
<!-- 内容模块2 -->
<volist name="res['data']" id="vo" offset="4" length="2">
<a href="/portal/region/getNewsDetail?id={$vo.id}">
<div class="show_7_con2 clearfix">
<div class="show_7_con2 clearfix">
<a href="/portal/region/getNewsDetail?id={$vo.id}">
<img src="{:cmf_get_image_url($vo.thumbnail)}" alt="">
<div class="show_7_con2_txt">
<h1>{$vo.post_title}</h1>
... ... @@ -82,8 +82,8 @@
</p>
<span>{$vo.create_time|date="Y-m-d",###}</span>
</div>
</div>
</a>
</a>
</div>
</volist>
<!--分页-->
<div class="pagination">
... ...
... ... @@ -13,6 +13,9 @@
width:260px;
height:375px;
}
.show_INMain_con5_2 p, .show_INMain_con6_1 p {
height: 45px;
}
</style>
</head>
... ...
... ... @@ -11,6 +11,9 @@
margin: 0 auto;
}
#about_us{
cursor: pointer;
}
/* 上部 */
... ...
... ... @@ -1294,6 +1294,7 @@ body {
display: -webkit-box;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
height: 100px;
}
.show_7_con1_txt span,
... ... @@ -1314,7 +1315,7 @@ body {
.show_7_con2 img {
width: 230px;
height: 100%;
height: 150px;
float: left;
}
... ... @@ -1335,6 +1336,7 @@ body {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
height: 50px;
}
.show_7_con3 {
... ...
... ... @@ -106,6 +106,10 @@ $(function(){
}
});
});
//关于我们
$('#about_us').click(function(){
window.location.href = '/portal/index/aboutUs';
});
});
//弹框
... ...
<link rel="stylesheet" href="__TMPL__/public/assets/css/footer.css">
<!-- 底部 -->
<div id="footer">
<section>
... ... @@ -72,7 +71,7 @@
</div>
<!-- 下部 -->
<div class="footer_bot ">
<p>Copyright © 2004-2019 独角星球 版权所有</p>
<p id="about_us">Copyright © 2004-2019 独角星球 版权所有</p>
</div>
</section>
</div>
\ No newline at end of file
... ...