$count = $Product->getProductCountByAttention($list);
$page = new \Think\Page($count,16);
// 分页显示输出
$show = $page->show();
//根据传进来的method值,来显示页面内容,最新分类
if($method == 'latest'){
//获取最新的上传作品
$list = $Product->getIndexProductByTimestamp($page);
}
//method == 'hot'
if($method =='hot'){
$list = $Product->getIndexProductByHot($page);
}
//将获取的数组赋值给模板
$this->assign('list',$list);
// 赋值分页输出
$this->assign('page',$show);
$this->display('index');
最佳答案
