更新:首页、产品等页面数据样式调整-1
parent
1a3dc0fda5
commit
7f6844207e
|
@ -123,7 +123,11 @@ class Article extends Base
|
||||||
$cateList = [];
|
$cateList = [];
|
||||||
$newsChildrenFlip = array_flip(Category::$CIdList['news_children']);
|
$newsChildrenFlip = array_flip(Category::$CIdList['news_children']);
|
||||||
foreach ($categoryChildren as $cate) {
|
foreach ($categoryChildren as $cate) {
|
||||||
$cate['items'] = MArticle::getLatestByCategory($cate['id'], 4, 1);
|
$num = 3;
|
||||||
|
if($cate['id'] == Category::$CIdList['news_children']['dynamics']) {
|
||||||
|
$num = 4;
|
||||||
|
}
|
||||||
|
$cate['items'] = MArticle::getLatestByCategory($cate['id'], $num, 1);
|
||||||
$cateList[$newsChildrenFlip[$cate['id']]] = $cate;
|
$cateList[$newsChildrenFlip[$cate['id']]] = $cate;
|
||||||
}
|
}
|
||||||
$this->data['cateList'] = $cateList;
|
$this->data['cateList'] = $cateList;
|
||||||
|
|
|
@ -19,9 +19,15 @@ class Index extends Base
|
||||||
// 网络营销栏目ID
|
// 网络营销栏目ID
|
||||||
$this->data['marketingCId'] = Category::$CIdList['marketing'];
|
$this->data['marketingCId'] = Category::$CIdList['marketing'];
|
||||||
// 关联产品中心
|
// 关联产品中心
|
||||||
|
$productsCId = Category::$CIdList['products'];
|
||||||
|
$productChildren = Category::getChildrenByParentId($productsCId);
|
||||||
|
$productsCIds[] = $productsCId;
|
||||||
|
foreach ($productChildren as $cate) {
|
||||||
|
$productsCIds[] = $cate['id'];
|
||||||
|
}
|
||||||
$this->data['products'] = [
|
$this->data['products'] = [
|
||||||
'category' => Category::getById(Category::$CIdList['products']),
|
'category' => Category::getById($productsCId),
|
||||||
'items' => Article::getLatestByCategory(Category::$CIdList['products'], 4, 1)
|
'items' => Article::getListByCategoryIds($productsCIds, 4, '', [], 1, ['create_time'=>'desc'])
|
||||||
];
|
];
|
||||||
// 关联新闻
|
// 关联新闻
|
||||||
$this->data['newsCenter'] = Category::getById(Category::$CIdList['news']);
|
$this->data['newsCenter'] = Category::getById(Category::$CIdList['news']);
|
||||||
|
|
|
@ -248,8 +248,10 @@ input,select,textarea{outline:medium none; resize: none;}
|
||||||
.service-box3 .box-info .pull-right ul li .info{ width: 100%; padding-left: 5.625rem; font-size: 15px; color: #999; line-height: 1.8;}
|
.service-box3 .box-info .pull-right ul li .info{ width: 100%; padding-left: 5.625rem; font-size: 15px; color: #999; line-height: 1.8;}
|
||||||
.service-box3 .box-info .pull-right ul li .info strong{ color: #555;}
|
.service-box3 .box-info .pull-right ul li .info strong{ color: #555;}
|
||||||
.service-box3 .box-info .pull-right ul li .info i{ font-size: 36px; color: #00418f; font-weight: bold;}
|
.service-box3 .box-info .pull-right ul li .info i{ font-size: 36px; color: #00418f; font-weight: bold;}
|
||||||
|
/*
|
||||||
.service-box3 .box-info .pull-right::before{ content: ''; width: 3.125rem; height: 3.125rem; border-top: 0.25rem solid #ccc; border-left: 0.25rem solid #ccc; position: absolute; left: 0; top: 0;}
|
.service-box3 .box-info .pull-right::before{ content: ''; width: 3.125rem; height: 3.125rem; border-top: 0.25rem solid #ccc; border-left: 0.25rem solid #ccc; position: absolute; left: 0; top: 0;}
|
||||||
.service-box3 .box-info .pull-right::after{ content: ''; width: 3.125rem; height: 3.125rem; border-bottom: 0.25rem solid #ccc; border-right: 0.25rem solid #ccc; position: absolute; right: 0; bottom: 0;}
|
.service-box3 .box-info .pull-right::after{ content: ''; width: 3.125rem; height: 3.125rem; border-bottom: 0.25rem solid #ccc; border-right: 0.25rem solid #ccc; position: absolute; right: 0; bottom: 0;}
|
||||||
|
*/
|
||||||
|
|
||||||
.marketing-box1{ padding: 10rem 0 0;}
|
.marketing-box1{ padding: 10rem 0 0;}
|
||||||
.marketing-box1 .box-info{ padding-bottom: 4.5rem;}
|
.marketing-box1 .box-info{ padding-bottom: 4.5rem;}
|
||||||
|
|
|
@ -12,12 +12,14 @@
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<div class="all-center-box">
|
<div class="all-center-box">
|
||||||
<div class="news-box1 w-100">
|
<div class="news-box1 w-100">
|
||||||
|
<!--
|
||||||
<div class="w-1200 search-form-box">
|
<div class="w-1200 search-form-box">
|
||||||
<form action="{:url('article/index', ['category_id'=> $categoryId])}" method="get" class="layui-form between-center w-100">
|
<form action="{:url('article/index', ['category_id'=> $categoryId])}" method="get" class="layui-form between-center w-100">
|
||||||
<input class="layui-input" name="keyword" placeholder="关键词查询..." value="{$keyword ?? ''}"/>
|
<input class="layui-input" name="keyword" placeholder="关键词查询..." value="{$keyword ?? ''}"/>
|
||||||
<button type="submit" class="layui-btn layui-btn-normal">查询</button>
|
<button type="submit" class="layui-btn layui-btn-normal">查询</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<div class="w-1200">
|
<div class="w-1200">
|
||||||
{if isset($items)}
|
{if isset($items)}
|
||||||
<div class="center-block w-100">
|
<div class="center-block w-100">
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
<a href="{:url('article/detail', ['id'=>$item['id']])}" class="between-center">
|
<a href="{:url('article/detail', ['id'=>$item['id']])}" class="between-center">
|
||||||
<div class="pull-left">{$item['create_time']|date="Y.m.d"}</div>
|
<div class="pull-left">{$item['create_time']|date="Y.m.d"}</div>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<div class="imgs"><img src="image/img_6.png" ></div>
|
<div class="imgs"><img src="{:getImgSrc($item, '__IMG__/default_bg.jpg')}" ></div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<span>{$item['title'] ?? ''}</span>
|
<span>{$item['title'] ?? ''}</span>
|
||||||
<p>{:nl2br($item['summary'] ?? '')}</p>
|
<p>{:nl2br($item['summary'] ?? '')}</p>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<div class="all-center-box">
|
<div class="all-center-box">
|
||||||
<div class="product-box w-100">
|
<div class="product-box w-100">
|
||||||
|
<!--
|
||||||
<div class="w-1200 search-form-box">
|
<div class="w-1200 search-form-box">
|
||||||
<form action="{:url('products.search')}" class="layui-form between-center w-100" method="get">
|
<form action="{:url('products.search')}" class="layui-form between-center w-100" method="get">
|
||||||
<select name="category_id">
|
<select name="category_id">
|
||||||
|
@ -26,6 +27,7 @@
|
||||||
<button type="submit" class="layui-btn layui-btn-normal">查询</button>
|
<button type="submit" class="layui-btn layui-btn-normal">查询</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<div class="w-1200">
|
<div class="w-1200">
|
||||||
{if isset($items)}
|
{if isset($items)}
|
||||||
<div class="center-block w-100">
|
<div class="center-block w-100">
|
||||||
|
|
|
@ -32,7 +32,8 @@
|
||||||
<div class="all-center-box">
|
<div class="all-center-box">
|
||||||
<div class="home-box1 w-100">
|
<div class="home-box1 w-100">
|
||||||
<div class="w-1500">
|
<div class="w-1500">
|
||||||
<div class="all-title-box1 w-100"><span>{$products['category']['title'] ?? '产品中心'}</span><p>{$products['category']['description'] ?? 'product center'}</p></div>
|
<div class="all-title-box1 w-100"><span>{$products['category']['title'] ?? '产品中心'}</span>
|
||||||
|
<p>{$products['category']['description'] ?? 'product center'}</p></div>
|
||||||
<div class="center-block w-100">
|
<div class="center-block w-100">
|
||||||
{if isset($products) && count($products['items']) > 0}
|
{if isset($products) && count($products['items']) > 0}
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -58,7 +59,8 @@
|
||||||
<div class="home-box2 w-100" style="background-image: url({$blocks['marketing_background']['value'] ?? ''});">
|
<div class="home-box2 w-100" style="background-image: url({$blocks['marketing_background']['value'] ?? ''});">
|
||||||
<div class="w-1500">
|
<div class="w-1500">
|
||||||
<div class="pull-left column-between">
|
<div class="pull-left column-between">
|
||||||
<div class="all-title-box1 w-100"><span>{$blocks['marketing_name']['value'] ?? ''}</span><p>{$blocks['marketing_describe']['value'] ?? ''}</p></div>
|
<div class="all-title-box1 w-100"><span>{$blocks['marketing_name']['value'] ?? ''}</span>
|
||||||
|
<p>{:nl2br($blocks['marketing_describe']['value'] ?? '')}</p></div>
|
||||||
{php}
|
{php}
|
||||||
$marketingLink = url('page/index', ['category_id'=>$marketingCId]);
|
$marketingLink = url('page/index', ['category_id'=>$marketingCId]);
|
||||||
if(isset($blocks['marketing_background']['link']) && !empty($blocks['marketing_background']['link'])) {
|
if(isset($blocks['marketing_background']['link']) && !empty($blocks['marketing_background']['link'])) {
|
||||||
|
@ -82,7 +84,7 @@
|
||||||
<li>
|
<li>
|
||||||
<a href="{:url('article/detail', ['id'=>$news['id']])}">
|
<a href="{:url('article/detail', ['id'=>$news['id']])}">
|
||||||
<span>{$news['title']|raw}</span>
|
<span>{$news['title']|raw}</span>
|
||||||
<i>{$news['create_time']|date='Y-m-d'}</i>
|
<i>{$news['create_time']|date='Y年m月d日'}</i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
Loading…
Reference in New Issue