//$home_rote[''.$v['catdir'].'-:catId/:id'] = 'home/'.$v['catdir'].'/index';
$cate = Db::name('cate')->field('id,catdir,moduleid')->where('id',$v['catid'])->find();
$moduleurl = Db::name('module')->where('id',$cate['moduleid'])->value('name');
if($cate['catdir']){
$url = url(request()->module().'/'.$cate['catdir'].'/info', ['catId'=>$cate['id'],'id'=>$v['id']]);
}else{
$url = url(request()->module().'/'.$moduleurl.'/info', ['catId'=>$cate['id'],'id'=>$v['id']] );
}
}
return $url;
}
//获取所有模版
function getTemplate(){
//查找设置的模版
$system = Db::name('system')->where('id',1)->find();
$path = './template/home/'.$system['template'].'/'.$system['html'].'/';
$tpl['list'] = get_file_folder_List($path , 2, '*_list*');
$tpl['show'] = get_file_folder_List($path , 2, '*_show*');