product.html
8.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>产品中心</title>
<link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
<style>
.ce1_2,.ce1_3{
display: none;
}
</style>
</head>
<body>
<div class="aside">
</div>
<include file="public@nav"/>
<div class="product_main">
<div class="prp_tit">
<a href="">首页</a>
<img src="__TMPL__/public/assets/images/aicon09.png" alt="">
<a href="">产品中心</a>
<!--<img src="img/aicon09.png" alt="">-->
<!--<a href="">诊断产品</a>-->
</div>
<div class="product_mainBox" style="margin-top: 10px">
<div class="pro_left">
<!-- <h1 class="proTitle" onclick="chanpin()">产品中心</h1> -->
<volist name="shuju" id="vol">
<div class="ce1">
<div class="ce1_title ce{$vol.id}" onclick="erji({$vol.id})">
<img src="__TMPL__/public/assets/images/aicon09.png" alt="">
<h2>{$vol.name}</h2>
</div>
<div class="ce1_2" style="margin-top: 28px;">
<volist name="$vol.son" id="vo">
<div class="ce1_2_Ul">
<div class="ce1_2_Li_title ce1{$vo.id}" onclick="neiro({$vo.id})" >
<h3>{$vo.name}</h3>
</div>
<!-- <div class="ce1_3 tj{$vo.id}">
</div> -->
</div>
</volist>
</div>
</div>
</volist>
</div>
<div class="pro_right">
<div class="pro_right_tit">
<!-- <p class="biaoti">{$zuixin.post_title}</p> -->
<p class="zhaiyao"> {$zuixin.post_excerpt}</p>
</div>
<!-- <img class="pro_rightImg" src="__TMPL__/public/assets/images/aicon12.png" alt=""> -->
<div class="pro_right_txt pro_height">
{$zuixin.post_content}
</div>
<!-- <div class='pro_btn'>显示更多</div> -->
</div>
</div>
</div>
<include file="public@footer" />
<script type="text/javascript" src="__TMPL__/public/assets/js/jquery.js"></script>
<script>
//点击查询类下的所有文章
/* function dianji(id){
cunza = $('div').hasClass('cel'+id);
if(cunza){
$('.cel'+id).remove();
}else{
$.post("{:url('Product/wenzhang')}", {id:id}, function(data) {
$shuju = JSON.parse(data);
for (var i = 0; i < $shuju.length; i++) {
$('.tj'+id).append("<div class='cel_3_Li cel"+id+"' onclick='neiro("+$shuju[i].id+")'><h4>"+$shuju[i].post_title+"</h4><img src='__TMPL__/public/assets/images/aicon03.png' alt=''></div>");
}
});
}
}*/
$('.pro_btn').click(function(){
$('.pro_right_txt').removeClass('pro_height');
})
//点击产品中心
function chanpin(){
$('.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);
});
}
//点击二级分类
function erji(id){
$('.ce1_title').children('h2').css({color:""});
$('.ce1_2_Li_title').children('h3').css({color:""});
$('.ce'+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);
});
}
//点击查询单个文章
function neiro(id){
$('.ce1_title').children('h2').css({color:''});
$('.ce1_2_Li_title').children('h3').css({color:''});
$('.ce1'+id).children('h3').css({color:'red'});
$.post("{:url('Product/danwz')}", {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);
/*$('.pro_btn').remove();
$('.pro_right_txt').after("<div class='pro_btn'>显示更多</div>");*/
$('.aside_son').remove();
$.post("{:url('Product/commps')}", {id:id}, function(data) {
coa = JSON.parse(data);
for (var i = 0; i <coa.length; i++) {
if(coa[i].fenlei == 1){
$('.aside').append("<a href='{:url('Product/commp')}?id="+coa[i].id+"' class='aside_son'><div class='aside_1'><img src='__TMPL__/public/assets/images/aicon13.png'><p>说明书</p></div></a>");
}
if(coa[i].fenlei == 2){
$('.aside').append("<a href='{:url('Product/commp')}?id="+coa[i].id+"' class='aside_son'><div class='aside_1'><img src='__TMPL__/public/assets/images/aicon14.png'><p>文献</p></div></a>");
}
if(coa[i].fenlei == 3){
$('.aside').append("<a href='{:url('Product/commp')}?id="+coa[i].id+"' class='aside_son'><div class='aside_1'><img src='__TMPL__/public/assets/images/aicon15.png'><p>COA</p></div></a>");
}
}
});
});
}
//跳转到详细页面
function tiaozhuan(id){
window.location.href = "{:url('Product/details')}?id="+id;
}
</script>
<script>
// 头部下拉
$('.header2_box>ul>li').each(function () {
$(this).mouseover(function () {
$(this).children('.header2_box2').show();
}).mouseout(function () {
$(this).children('.header2_box2').hide();
})
});
//左侧列表下拉
$('.ce1_title').each(function () {
$(this).click(function () {
if($(this).children('img').attr('src') == "__TMPL__/public/assets/images/aicon09.png"){
$(this).children('img').attr('src','__TMPL__/public/assets/images/aicon10.png')
$(this).next('.ce1_2').slideToggle();
}else {
$(this).children('img').attr('src','__TMPL__/public/assets/images/aicon09.png');
$(this).next('.ce1_2').slideToggle();
}
})
});
$('.ce1_2_Li_title').each(function () {
$(this).click(function () {
if($(this).children('img').attr('src') == "__TMPL__/public/assets/images/aicon09.png"){
$(this).children('img').attr('src','__TMPL__/public/assets/images/aicon10.png')
$(this).next('.ce1_3').slideToggle();
}else {
$(this).children('img').attr('src','__TMPL__/public/assets/images/aicon09.png');
$(this).next('.ce1_3').slideToggle();
}
})
})
$('.cel_3_Li').each(function () {
$(this).click(function () {
$(this).addClass('cel_3_Li_act').siblings().removeClass('cel_3_Li_act');
})
})
</script>
</body>
</html>