作者 anyv
1 个管道 的构建 通过 耗费 0 秒

首页

... ... @@ -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];
... ...
... ... @@ -42,7 +42,7 @@
<volist name="data_classif" id="vo">
<if condition="empty($vo.thumbnail)">
<else/>
<a href="nav_class.html">
<a href="{:url('Classify/classify_goods',array('classify_id'=>$vo.id))}">
<li>
<div class="in_navImg">
<img src="{:cmf_get_image_url($vo.thumbnail)}" alt="">
... ...