修改bug

master
ELF 5 years ago
parent aa0a2288a7
commit 39c0aff9f0

@ -10,7 +10,7 @@
<div class="cf main-place top_nav_list navtab_list"> <div class="cf main-place top_nav_list navtab_list">
{:W('Index/navigation',array('value'=>'Site/media'))} {:W('Index/navigation',array('value'=>'Site/media', 'compare' => '', 'title' => '站点设置'))}
<h3 class="page_title">站点设置</h3> <h3 class="page_title">站点设置</h3>
<p class="description_text">说明针对PC官网的显示进行基本配置</p> <p class="description_text">说明针对PC官网的显示进行基本配置</p>

@ -4,9 +4,13 @@ use Think\Controller;
class IndexWidget extends Controller{ class IndexWidget extends Controller{
public function navigation($value='',$compare='') public function navigation($value='',$compare='',$title='')
{ {
$mainID = M('Menu')->where("pid !=0 AND url like '%".$value."%'")->getField('id'); $where = "pid !=0 AND url like '%".$value."%'";
if ($title != '') {
$where .= ' AND title=\'' . $title . '\'';
}
$mainID = M('Menu')->where($where)->getField('id');
$MainMenu = M('Menu')->field("id,pid,title,url,status,hide")->where(array('pid'=>$mainID,'hide'=>0))->order("sort asc")->select(); $MainMenu = M('Menu')->field("id,pid,title,url,status,hide")->where(array('pid'=>$mainID,'hide'=>0))->order("sort asc")->select();
$this->assign("data",$MainMenu); $this->assign("data",$MainMenu);
$compare = empty($compare)?CONTROLLER_NAME."/".ACTION_NAME:$compare; $compare = empty($compare)?CONTROLLER_NAME."/".ACTION_NAME:$compare;

Loading…
Cancel
Save