找到文件
/application/common/traits/ModuleContent.php
再找到下面的代码
/**
* 分类读取
* @param int $pid
* @param int $list
*/
public function showthissorts($pid=0,$list=0){
$list++;
$show="<ul>\n";
//$lanmu=$this->s_model->where('pid',$pid)->select(); //之前代码改为下面这一句就OK
$lanmu=$this->s_model->where('pid',$pid)->order('list desc')->select();
foreach($lanmu as $k=>$rs){
$lanmu2=$this->s_model->get(['pid'=>$rs['id']]);
if(!$lanmu2){
if($rs['allowpost']&&!in_array($this->user['groupid'],explode(',',$rs['allowpost']))){ //设置了用户组权限.
$show.='';
}else{
$show.="<li><div><a href=\"".urls('add',['fid'=>$rs['id']])."\">".$rs['name']."</a></div></li>\n";
}
}else{
if($rs['allowpost']&&!in_array($this->user['groupid'],explode(',',$rs['allowpost']))){ //设置了用户组权限.
$show.='';
}else{
$show.="<li onClick=\"showmore(".$rs['id'].",".$list.",$(this))\"><div class=\"more\">".$rs['name']."</div></li>\n";
}
}
}
$show.="</ul>";
return $show;
}