...
|
...
|
@@ -23,11 +23,13 @@ class ClassifyController extends WeChatBaseController{ |
|
|
//所有标签
|
|
|
$data_label = Db::name('label') -> select();
|
|
|
//获取默认分类商品
|
|
|
$data_goods = Db::name('goods') -> alias('a') -> join('classification b','a.classify_id = b.id','LEFT') -> where("a.type = 1 and a.classify_id =".$data_classify[0]['id']) -> select();
|
|
|
dump($data_goods);die;
|
|
|
$data_goods = Db::name('goods') -> alias('a') -> join('classification b','a.classify_id = b.id','LEFT') -> where("a.type = 1 and a.classify_id =".$data_classify[0]['id']) -> select() -> toArray();
|
|
|
foreach($data_goods as $key => $val){
|
|
|
|
|
|
$price = explode(',',$data_goods[$key]['price']);
|
|
|
$data_goods[$key]['price0'] = $price[0];
|
|
|
$data_goods[$key]['price01'] = $price[1];
|
|
|
}
|
|
|
dump($data_goods);die;
|
|
|
$this -> assign('data_goods',$data_goods);
|
|
|
$this -> assign('data_label',$data_label);
|
|
|
$this -> assign('data_classify',$data_classify);
|
...
|
...
|
|