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

首页

... ... @@ -30,7 +30,7 @@ class ClassifyController extends WeChatBaseController{
}else{
//获取默认分类商品
$data_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 =".$data_classify[0]['id']) -> select() -> toArray();
$this -> assign('class',0);
$this -> assign('class',$data_classify[0]['id']);
}
foreach($data_goods as $key => $val){
$price = explode('.',$data_goods[$key]['price']);
... ...
... ... @@ -25,7 +25,7 @@
<div class="cl_nav">
<ul>
<volist name="data_classify" id="vo">
<li onclick="classify_goods({$vo.id})" class="<eq name='$key' value='$class'>cl_navActive</eq>" data-id="{$vo.id}">{$vo.name}</li>
<li onclick="classify_goods({$vo.id})" class="<eq name='{$vo.id}' value='$class'>cl_navActive</eq>" data-id="{$vo.id}">{$vo.name}</li>
</volist>
</ul>
</div>
... ...