优化首页模块

This commit is contained in:
toogee 2020-01-06 16:31:30 +08:00
parent 2aaac76e7d
commit c0b2b29a61
4 changed files with 15 additions and 18 deletions

View File

@ -19,7 +19,7 @@ class Slider extends AdminController
public function index()
{
//幻灯列表
$sliders = Db::name('slider')->select();
$sliders = SliderModel::select();
View::assign('slider',$sliders);
return View::fetch();
}

View File

@ -11,7 +11,11 @@ class Slider extends Model
protected $deleteTime = 'delete_time';
protected $defaultSoftDelete = 0;
public function getSlidTypeAttr($value)
{
$slid_type = [1=>'首页幻灯',2=>'通用右底',3=>'首页赞助',4=>'文章赞助',5=>'分类赞助',6=>'友情链接'];
return $slid_type[$value];
}
}

View File

@ -15,7 +15,7 @@ Route::group(function () {
Route::get('column/<ename?>/<type?>/<page?>','article/cate');
Route::rule('add','article/add');
Route::rule('del/:id','article/delete');
//Route::rule('edit/:id','article/edit');
Route::rule('edit/[:id]','article/edit');
});
Route::group(function () {
Route::rule('u/:id', 'user/home');

View File

@ -53,16 +53,12 @@
<!--span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss></i>{$top.pv}</span>
<span class="layui-badge fly-badge-accept layui-hide-xs">已结</span-->
<span class="fly-list-nums">
<i class="iconfont icon-pinglun1" title="回答"></i> {$top.comments_count}
</span>
</div>
<div class="fly-list-badge">
{if ($top.is_top == 1)} <span class="layui-badge layui-bg-black" >置顶</span> {/if}
{//if ($top.is_hot == 1) <span class="layui-badge layui-bg-red">精帖</span> {/if}
</div>
</li>
{/volist}
@ -125,7 +121,7 @@
<div><a href="http://www.tp6.com/index/jie/25.html" target="_blank"> 应用说明 </a></div>
</div>
<div class="layui-col-xs6">
<div><a href="#" target="_blank"> 精贴集锦 </a></div>
<div><a href="#" target="_blank"> 申请Key </a></div>
</div>
<div class="layui-col-xs6">
<div><a href="https://gitee.com/toogee/TaoLer" target="_blank"> Git 仓库 </a></div>
@ -195,19 +191,18 @@
<div class="fly-panel">
<div class="fly-panel-title">
这里可作为广告区域
官方产品
</div>
<div class="fly-panel" style="padding: 20px 0; text-align: center;">
{volist name="ad_comm" id="vo"}
<a href="{$vo.slid_href}" target="_blank"><img src="{$vo.slid_img}" style="max-width: 100%;"></a>
{/volist}
</div>
<div class="fly-panel-main">
<a href="http://www.aieok.com" target="_blank" class="fly-zanzhu" style="background-color: #5FB878;">TaoLer 1.0 - 旗舰之作</a>
</div>
</div>
<div class="fly-panel" style="padding: 20px 0; text-align: center;">
{volist name="ad_comm" id="vo"}
<a href="{$vo.slid_href}" target="_blank"><img src="{$vo.slid_img}" style="max-width: 100%;"></a>
{/volist}
</div>
{include file="public/flink" /}
</div>
@ -339,8 +334,6 @@
return false;
});
</script>
<script>