优化首页模块
This commit is contained in:
parent
2aaac76e7d
commit
c0b2b29a61
@ -19,7 +19,7 @@ class Slider extends AdminController
|
|||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
//幻灯列表
|
//幻灯列表
|
||||||
$sliders = Db::name('slider')->select();
|
$sliders = SliderModel::select();
|
||||||
View::assign('slider',$sliders);
|
View::assign('slider',$sliders);
|
||||||
return View::fetch();
|
return View::fetch();
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,11 @@ class Slider extends Model
|
|||||||
protected $deleteTime = 'delete_time';
|
protected $deleteTime = 'delete_time';
|
||||||
protected $defaultSoftDelete = 0;
|
protected $defaultSoftDelete = 0;
|
||||||
|
|
||||||
|
public function getSlidTypeAttr($value)
|
||||||
|
{
|
||||||
|
$slid_type = [1=>'首页幻灯',2=>'通用右底',3=>'首页赞助',4=>'文章赞助',5=>'分类赞助',6=>'友情链接'];
|
||||||
|
return $slid_type[$value];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -15,7 +15,7 @@ Route::group(function () {
|
|||||||
Route::get('column/<ename?>/<type?>/<page?>','article/cate');
|
Route::get('column/<ename?>/<type?>/<page?>','article/cate');
|
||||||
Route::rule('add','article/add');
|
Route::rule('add','article/add');
|
||||||
Route::rule('del/:id','article/delete');
|
Route::rule('del/:id','article/delete');
|
||||||
//Route::rule('edit/:id','article/edit');
|
Route::rule('edit/[:id]','article/edit');
|
||||||
});
|
});
|
||||||
Route::group(function () {
|
Route::group(function () {
|
||||||
Route::rule('u/:id', 'user/home');
|
Route::rule('u/:id', 'user/home');
|
||||||
|
@ -53,16 +53,12 @@
|
|||||||
<!--span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss></i>{$top.pv}</span>
|
<!--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="layui-badge fly-badge-accept layui-hide-xs">已结</span-->
|
||||||
<span class="fly-list-nums">
|
<span class="fly-list-nums">
|
||||||
|
|
||||||
<i class="iconfont icon-pinglun1" title="回答"></i> {$top.comments_count}
|
<i class="iconfont icon-pinglun1" title="回答"></i> {$top.comments_count}
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="fly-list-badge">
|
<div class="fly-list-badge">
|
||||||
|
|
||||||
{if ($top.is_top == 1)} <span class="layui-badge layui-bg-black" >置顶</span> {/if}
|
{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}
|
{//if ($top.is_hot == 1) <span class="layui-badge layui-bg-red">精帖</span> {/if}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{/volist}
|
{/volist}
|
||||||
@ -125,7 +121,7 @@
|
|||||||
<div><a href="http://www.tp6.com/index/jie/25.html" target="_blank"> 应用说明 </a></div>
|
<div><a href="http://www.tp6.com/index/jie/25.html" target="_blank"> 应用说明 </a></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-col-xs6">
|
<div class="layui-col-xs6">
|
||||||
<div><a href="#" target="_blank"> 精贴集锦 </a></div>
|
<div><a href="#" target="_blank"> 申请Key </a></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-col-xs6">
|
<div class="layui-col-xs6">
|
||||||
<div><a href="https://gitee.com/toogee/TaoLer" target="_blank"> Git 仓库 </a></div>
|
<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">
|
||||||
<div class="fly-panel-title">
|
<div class="fly-panel-title">
|
||||||
这里可作为广告区域
|
官方产品
|
||||||
|
</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>
|
||||||
|
|
||||||
<div class="fly-panel" style="padding: 20px 0; text-align: center;">
|
<div class="fly-panel" style="padding: 20px 0; text-align: center;">
|
||||||
{volist name="ad_comm" id="vo"}
|
{volist name="ad_comm" id="vo"}
|
||||||
<a href="{$vo.slid_href}" target="_blank"><img src="{$vo.slid_img}" style="max-width: 100%;"></a>
|
<a href="{$vo.slid_href}" target="_blank"><img src="{$vo.slid_img}" style="max-width: 100%;"></a>
|
||||||
{/volist}
|
{/volist}
|
||||||
</div>
|
</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>
|
|
||||||
{include file="public/flink" /}
|
{include file="public/flink" /}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -339,8 +334,6 @@
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
Loading…
Reference in New Issue
Block a user