...
|
...
|
@@ -41,8 +41,14 @@ class ClassifyController extends WeChatBaseController{ |
|
|
*/
|
|
|
public function classify_goods(){
|
|
|
|
|
|
$classify_id = $_POST['classify_id'];
|
|
|
$data_classify_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where("a.type = 1 and a.classify_id =".$classify_id) -> select() -> toArray();
|
|
|
if($this -> request -> isPost()){
|
|
|
$classify_id = $_POST['classify_id'];
|
|
|
$data_classify_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where("a.type = 1 and a.classify_id =".$classify_id) -> select() -> toArray();
|
|
|
}else{
|
|
|
$id = $this -> request -> param();
|
|
|
$classify_id = $id['classify_id'];
|
|
|
$data_classify_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> 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];
|
...
|
...
|
|