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

产品

... ... @@ -192,6 +192,21 @@ class ProductController extends HomeBaseController{
}
//显示产品中心
public function chanpins(){
$data = Db::name('portal_category_post') -> where('category_id',15) -> 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);
}
}
... ...
... ... @@ -74,7 +74,7 @@
<div class="product_mainBox">
<div class="pro_left">
<h1 class="proTitle">产品中心</h1>
<h1 class="proTitle" onclick="chanpin()">产品中心</h1>
... ... @@ -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()">
<img src="__TMPL__/public/assets/images/aicon09.png" alt="">
<h2>{$vo.name}</h2>
</div>
... ... @@ -162,6 +162,21 @@
$('.ce'+{$category}).children('h3').css({color:"red"});
})
//点击产品中心
function chanpin(id){
$('.ce1_title').children('h2').css({color:""});
$('.ce1_2_Li_title').children('h3').css({color:""});
$.post("{:url('Product/chanpins')}", {:}, function(data) {
shuju = JSON.parse(data);
$('.biaoti').text(shuju.post_title);
$('.zhaiyao').text(shuju.post_excerpt);
$('.pro_right_txt').html(shuju.post_content);
});
}
//点击查询单个文章
... ...
... ... @@ -262,7 +262,6 @@ p{word-wrap:break-word}
color:white;
}
.footer_input input:-ms-input-placeholder,.footer_left textarea:-ms-input-placeholder{ /* Internet Explorer 10+ */
font-size:14px;
border:0;
... ...