...
|
...
|
@@ -36,5 +36,30 @@ class ClassifyController extends WeChatBaseController{ |
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 分类下的商品
|
|
|
*/
|
|
|
public function classify_goods(){
|
|
|
|
|
|
$classify_id = $_POST['classify_id'];
|
|
|
$data_classify_goods = Db::name('goods') -> alias('a') -> join('classification b','a.classify_id = b.id','LEFT') -> where("a.type = 1 and a.classify_id =".$classify_id) -> select() -> toArray();
|
|
|
foreach($data_classify_goods as $key => $val){
|
|
|
$price = explode('.',$data_classify_goods[$key]['price']);
|
|
|
$data_classify_goods[$key]['price0'] = $price[0];
|
|
|
$data_classify_goods[$key]['price01'] = $price[1];
|
|
|
}
|
|
|
return json_encode($data_classify_goods);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|