Merge branch 'master' of https://gitee.com/dxtc/chaoyu
commit
3bbaa18a83
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
namespace app\controller;
|
namespace app\controller;
|
||||||
|
|
||||||
use app\model\{Category, Block, Article};
|
use app\model\{Category, Block, Article, Slide};
|
||||||
|
|
||||||
class Index extends Base
|
class Index extends Base
|
||||||
{
|
{
|
||||||
|
@ -14,6 +14,8 @@ class Index extends Base
|
||||||
$blocks = Block::getByCategoryId($categoryId);
|
$blocks = Block::getByCategoryId($categoryId);
|
||||||
$blocks = Block::analysisBlock($blocks);
|
$blocks = Block::analysisBlock($blocks);
|
||||||
$this->data['blocks'] = $blocks;
|
$this->data['blocks'] = $blocks;
|
||||||
|
// 轮播图
|
||||||
|
$this->data['slides'] = Slide::getList();
|
||||||
// 网络营销栏目ID
|
// 网络营销栏目ID
|
||||||
$this->data['marketingCId'] = Category::$CIdList['marketing_network'];
|
$this->data['marketingCId'] = Category::$CIdList['marketing_network'];
|
||||||
// 关联产品中心
|
// 关联产品中心
|
||||||
|
|
|
@ -3,16 +3,16 @@
|
||||||
<div class="banner-box w-100">
|
<div class="banner-box w-100">
|
||||||
<div class="swiper-container">
|
<div class="swiper-container">
|
||||||
<div class="swiper-wrapper">
|
<div class="swiper-wrapper">
|
||||||
{if isset($blocks['banner_top']) && count($blocks['banner_top']) > 0}
|
{if isset($slides) && count($slides) > 0}
|
||||||
{foreach $blocks['banner_top']['value'] as $banner}
|
{foreach $slides as $banner}
|
||||||
<div class="swiper-slide center-center" style="background-image: url({$banner['src']});">
|
<div class="swiper-slide center-center" style="background-image: url({$banner.src});">
|
||||||
<div class="w-1500">
|
<div class="w-1500">
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<p>{$banner['alt']|raw}</p>
|
<p>{:nl2br($banner.title ?? '')}</p>
|
||||||
<i>{$banner['desc']|raw}</i>
|
<i>{:nl2br($banner.description ?? '')}</i>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">标题</label>
|
<label class="layui-form-label">标题</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input class="layui-input" type="text" name="item[title]" />
|
<textarea class="layui-textarea" name="item[title]" maxlength="200" onkeyup="limitContentLength(this, 200)" placeholder="200字以内"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">简介</label>
|
<label class="layui-form-label">简介</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<textarea class="layui-textarea" name="item[description]"></textarea>
|
<textarea class="layui-textarea" name="item[description]" maxlength="500" onkeyup="limitContentLength(this, 500)" placeholder="500字以内"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-clear"></div>
|
<div class="layui-clear"></div>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="layui-form-item ">
|
<div class="layui-form-item ">
|
||||||
<label class="layui-form-label">标题</label>
|
<label class="layui-form-label">标题</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input class="layui-input" type="text" name="item[title]" value="{$item.title??''}" />
|
<textarea class="layui-textarea" name="item[title]" maxlength="200" onkeyup="limitContentLength(this, 200)" placeholder="200字以内">{$item.title??''}</textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">简介</label>
|
<label class="layui-form-label">简介</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<textarea class="layui-textarea" name="item[description]">{$item.description}</textarea>
|
<textarea class="layui-textarea" name="item[description]" onkeyup="limitContentLength(this, 200)" placeholder="200字以内">{$item.description}</textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-clear"></div>
|
<div class="layui-clear"></div>
|
||||||
|
|
Loading…
Reference in New Issue