}else{
return $this->getParentNames((int)$rs['parentId'], $data);
}
}
public function getById($id){
$userId = (int)session('WST_USER.userId');
$result = Db::name('manuals')->where(['id'=>$id,'dataFlag'=>1,'isShow'=>1])->find();
$result["content"] = htmlspecialchars_decode($result['content']);// 解义
$result["parentPath"] = explode('_',$result["parentPath"]);
if(!model('UserSites')->checkUserSys($userId,$result['sysTypeId'])){
if(stripos($result["content"],"<<以下内容授权查看>>")!==false){
$str = explode('<<以下内容授权查看>>',$result["content"]);
$result["content"] = $str[0]."<div class='wstaccredit'>======================更多内容,请在<a target='_blank' href='home/usersites/edit' style='color:red;'>用户中心-认证站点</a>,认证授权后查看======================</div>";
}
}else{
$result["content"] = str_replace('<<以下内容授权查看>>', '', $result["content"]);
}
return $result;