...
|
...
|
@@ -166,10 +166,12 @@ class IndexController extends WeChatBaseController |
|
|
}
|
|
|
if(empty($data_goods)) {
|
|
|
$data_goods = null;
|
|
|
$limit_num = 3;
|
|
|
}
|
|
|
$limit_num = 3-count($data_goods);
|
|
|
$this -> assign('data_goods',$data_goods);
|
|
|
//推荐新品
|
|
|
$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 type = 1") -> 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 type = 1") -> limit($limit_num) -> select() -> toArray();
|
|
|
$this -> assign('data_goods_recommend_new',$data_goods_recommend_new);
|
|
|
$this -> assign('data_goods_hot',$data_goods_hot);
|
|
|
return $this -> fetch();
|
...
|
...
|
|