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

产品

... ... @@ -204,6 +204,19 @@ class ProductController extends HomeBaseController{
}
public function erji(){
$id = input('post.id');
$data = Db::name('portal_category_post') -> where('category_id',$id) -> find();
$shuju = Db::name('portal_post') -> where('id',$data['post_id']) -> find();
$shuju['post_content'] = cmf_replace_content_file_url(htmlspecialchars_decode($shuju['post_content']));
return json_encode($shuju);
}
... ...
... ... @@ -84,7 +84,7 @@
<volist name="jdata" id="vo">
<div class="ce1">
<div class="ce1_title ce1{$vo.id}" >
<div class="ce1_title ce1{$vo.id}" onclick="title($vo.id)" >
<img src="__TMPL__/public/assets/images/aicon09.png" alt="">
<h2>{$vo.name}</h2>
</div>
... ... @@ -177,6 +177,21 @@
}
//点击二级分类
function title(id){
$('.ce1_title').children('h2').css({color:""});
$('.ce1_2_Li_title').children('h3').css({color:""});
$('.ce1'+id).children('h2').css({color:"red"});
$.post("{:url('Product/erji')}",{id:id},function(data){
shuju = JSON.parse(data);
$('.biaoti').text(shuju.post_title);
$('.zhaiyao').text(shuju.post_excerpt);
$('.pro_right_txt').html(shuju.post_content);
});
}
//点击查询单个文章
... ...