作者 王晓刚
1 个管道 的构建 通过 耗费 32 秒

首页修改

... ... @@ -201,7 +201,7 @@ class IndexController extends WeChatBaseController
$this -> assign('data_goods',$data_goods);
//推荐新品
if($limit_num != 0){
$data_goods_recommend_new = Db::name('goods') -> alias('a') -> field('a.*,b.name') -> join('classification b','a.classify_id = b.id','LEFT') -> where("recommend_new=1 and is_out = 1 and type = 1") -> limit($limit_num) -> select() -> toArray();
$data_goods_recommend_new = Db::name('goods') -> alias('a') -> field('a.*,b.name') -> join('classification b','a.classify_id = b.id','LEFT') -> where("recommend_new=1 and is_out = 1 and type = 1") -> limit(0) -> select() -> toArray();
}else{
$data_goods_recommend_new = null;
}
... ...