时间:2021-07-01 10:21:17 帮助过:23人阅读
后台代码:
$this->mokuai('mokuai',类别的数字号码);
if(isset($_GET['lawid'])){
$this->mokuaixi('mokuai',$_GET['lawid']);
}
//自己封装的方法
function mokuai($chart='',$pid=''){
$user=D($chart);
$list=$user->where("products_category=".$pid."")->select();
//thumbRemoveOrigin
$this->assign("mokuai",$list);
}
function mokuaixi($chart='',$pid=''){
$user=D($chart);
$list=$user->where("products_id=".$pid."")->select();
//thumbRemoveOrigin
$this->assign("mokuaixi",$list);
}
前台显示
导航栏:
与导航栏对应的内容
{$vo.products_content}
{$vo.products_name}
发布时间:{$vo.products_uptime}