mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-03-03 16:24:28 +08:00
优化分类说明
This commit is contained in:
@@ -21,10 +21,11 @@ class Index extends Common
|
||||
{
|
||||
//
|
||||
$sub_category = [];
|
||||
$current_category = [];
|
||||
|
||||
if(!empty($this->request->param('category_id'))){
|
||||
$sub_category = Category::where('pid',$this->request->param('category_id'))->where('type',3)->select();
|
||||
|
||||
$current_category = Category::find($this->request->param('category_id'));
|
||||
if(empty($this->request->param('sub_category_id'))){
|
||||
$categorys = [$this->request->param('category_id')];
|
||||
|
||||
@@ -52,6 +53,7 @@ class Index extends Common
|
||||
|
||||
$list_post = $model_post->paginate();
|
||||
|
||||
View::assign('current_category',$current_category);
|
||||
View::assign('sub_category',$sub_category);
|
||||
|
||||
View::assign('list_post',$list_post);
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<td>
|
||||
<div class="layui-btn-container">
|
||||
<a class="layui-btn layui-btn-sm" href="{:url('index/Category/read',['id'=>$vo.id,'type'=>$Request.param.type])}">查看</a>
|
||||
<a class="layui-btn layui-btn-sm" href="{:url('edit',['id'=>$vo.id])}">编辑</a>
|
||||
<a class="layui-btn layui-btn-sm" href="{:url('edit',['id'=>$vo.id,'type'=>$Request.param.type])}">编辑</a>
|
||||
<div class="layui-btn layui-btn-sm delete">删除</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -50,7 +50,11 @@
|
||||
{/volist}
|
||||
</div>
|
||||
{/notempty}
|
||||
|
||||
{notempty name='$current_category.desc'}
|
||||
<div class="category-plus-title">
|
||||
<blockquote class="layui-elem-quote layui-quote-nm">{$current_category.desc}</blockquote>
|
||||
</div>
|
||||
{/notempty}
|
||||
<div class="post-container">
|
||||
<div class="post-list">
|
||||
{volist name='list_post' id='post'}
|
||||
|
||||
Reference in New Issue
Block a user