25 lines
686 B
PHP
Executable File
25 lines
686 B
PHP
Executable File
<?php
|
|
|
|
namespace Home\Widget;
|
|
use Gy_Library\DBCont;
|
|
use Gy_Library\HomeController;
|
|
|
|
class NavMenuWidget extends HomeController{
|
|
public function index($style=true)
|
|
{
|
|
$cate_id = I('get.id');
|
|
if(!empty($cate_id)){
|
|
$this->cate_id=$cate_id;
|
|
}
|
|
$word = I('get.word');
|
|
if(!empty($word)){
|
|
$this->word =$word;
|
|
}
|
|
$map = ['status'=>DBCont::YES_BOOL_STATUS];
|
|
$news_cate = D('NewsCate')->where($map)->order('sort asc,id asc')->select();
|
|
$this->news_cate = $news_cate;
|
|
$hasLine = $style ? 'has-line' : '';
|
|
$this->hasLine=$hasLine;
|
|
$this->display('Widget/navMenu');
|
|
}
|
|
} |