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

s

@@ -149,120 +149,117 @@ @@ -149,120 +149,117 @@
149 }); 149 });
150 } 150 }
151 }*/ 151 }*/
152 - $(function(){  
153 - $('.pro_btn').click(function(){  
154 - $('.pro_right_txt').removeClass('pro_height');  
155 - })  
156 152
157 - $(document).ready(function(){  
158 -  
159 - $('.ce1'+{$category}).trigger('click');  
160 - $('.ce1'+{$category}).children('h2').css({color:"red"});  
161 - $('.ce'+{$category}).parent().parent().prev().trigger('click');  
162 - $('.ce'+{$category}).children('h3').css({color:"red"}); 153 + $('.pro_btn').click(function(){
  154 + $('.pro_right_txt').removeClass('pro_height');
163 }) 155 })
164 156
165 - //点击产品中心  
166 - function chanpin(id){ 157 + $(document).ready(function(){
167 158
168 - $('.ce1_title').children('h2').css({color:""});  
169 - $('.ce1_2_Li_title').children('h3').css({color:""}); 159 + $('.ce1'+{$category}).trigger('click');
  160 + $('.ce1'+{$category}).children('h2').css({color:"red"});
  161 + $('.ce'+{$category}).parent().parent().prev().trigger('click');
  162 + $('.ce'+{$category}).children('h3').css({color:"red"});
  163 + })
170 164
171 - $.post("{:url('Product/chanpins')}", {:}, function(data) {  
172 - shuju = JSON.parse(data);  
173 - $('.biaoti').text(shuju.post_title);  
174 - $('.zhaiyao').text(shuju.post_excerpt);  
175 - $('.pro_right_txt').html(shuju.post_content);  
176 - }); 165 + //点击产品中心
  166 + function chanpin(id){
177 167
178 - } 168 + $('.ce1_title').children('h2').css({color:""});
  169 + $('.ce1_2_Li_title').children('h3').css({color:""});
179 170
  171 + $.post("{:url('Product/chanpins')}", {:}, function(data) {
  172 + shuju = JSON.parse(data);
  173 + $('.biaoti').text(shuju.post_title);
  174 + $('.zhaiyao').text(shuju.post_excerpt);
  175 + $('.pro_right_txt').html(shuju.post_content);
  176 + });
180 177
  178 + }
181 179
182 - //点击查询单个文章  
183 - function neiro(id){  
184 - $('.ce1'+{$category}).children('h2').css({color:""});  
185 - $('.ce1_2_Li_title').children('h3').css({color:""});  
186 - $('.ce'+id).children('h3').css({color:"red"});  
187 180
188 - $.post("{:url('Product/danwz')}", {id:id}, function(data) {  
189 - shuju = JSON.parse(data);  
190 - $('.biaoti').text(shuju.post_title);  
191 - $('.zhaiyao').text(shuju.post_excerpt);  
192 - $('.pro_right_txt').html(shuju.post_content);  
193 181
194 - /* $('.pro_btn').remove();  
195 - $('.pro_right_txt').after("<div class='pro_btn'>显示更多</div>");*/  
196 - $('.aside_son').remove(); 182 + //点击查询单个文章
  183 + function neiro(id){
  184 + $('.ce1'+{$category}).children('h2').css({color:""});
  185 + $('.ce1_2_Li_title').children('h3').css({color:""});
  186 + $('.ce'+id).children('h3').css({color:"red"});
197 187
198 - $.post("{:url('Product/commps')}", {id:id}, function(data) {  
199 - coa = JSON.parse(data);  
200 - for (var i = 0; i <coa.length; i++) {  
201 - if(coa[i].fenlei == 1){  
202 - $('.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>");  
203 - }  
204 - if(coa[i].fenlei == 2){  
205 - $('.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>");  
206 - }  
207 - if(coa[i].fenlei == 3){  
208 - $('.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>");  
209 - } 188 + $.post("{:url('Product/danwz')}", {id:id}, function(data) {
  189 + shuju = JSON.parse(data);
  190 + $('.biaoti').text(shuju.post_title);
  191 + $('.zhaiyao').text(shuju.post_excerpt);
  192 + $('.pro_right_txt').html(shuju.post_content);
210 193
211 - }  
212 - }); 194 + /* $('.pro_btn').remove();
  195 + $('.pro_right_txt').after("<div class='pro_btn'>显示更多</div>");*/
  196 + $('.aside_son').remove();
213 197
214 - }); 198 + $.post("{:url('Product/commps')}", {id:id}, function(data) {
  199 + coa = JSON.parse(data);
  200 + for (var i = 0; i <coa.length; i++) {
  201 + if(coa[i].fenlei == 1){
  202 + $('.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>");
  203 + }
  204 + if(coa[i].fenlei == 2){
  205 + $('.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>");
  206 + }
  207 + if(coa[i].fenlei == 3){
  208 + $('.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>");
  209 + }
215 210
  211 + }
  212 + });
216 213
217 - } 214 + });
218 215
219 216
220 - //跳转到详细页面  
221 - function tiaozhuan(id){  
222 - window.location.href = "{:url('Product/details')}?id="+id;  
223 - } 217 + }
224 218
225 - // 头部下拉  
226 - $('.header2_box>ul>li').each(function () {  
227 - $(this).mouseover(function () {  
228 - $(this).children('.header2_box2').show();  
229 - }).mouseout(function () {  
230 - $(this).children('.header2_box2').hide();  
231 - })  
232 - });  
233 219
234 - //左侧列表下拉  
235 - $('.ce1_title').each(function () {  
236 - $(this).click(function () {  
237 - if($(this).children('img').attr('src') == "__TMPL__/public/assets/images/aicon09.png"){  
238 - $(this).children('img').attr('src','__TMPL__/public/assets/images/aicon10.png')  
239 - $(this).next('.ce1_2').slideToggle();  
240 - }else {  
241 - $(this).children('img').attr('src','__TMPL__/public/assets/images/aicon09.png');  
242 - $(this).next('.ce1_2').slideToggle();  
243 - }  
244 - })  
245 - });  
246 - $('.ce1_2_Li_title').each(function () {  
247 - $(this).click(function () {  
248 - if($(this).children('img').attr('src') == "__TMPL__/public/assets/images/aicon09.png"){  
249 - $(this).children('img').attr('src','__TMPL__/public/assets/images/aicon10.png')  
250 - $(this).next('.ce1_3').slideToggle();  
251 - }else {  
252 - $(this).children('img').attr('src','__TMPL__/public/assets/images/aicon09.png');  
253 - $(this).next('.ce1_3').slideToggle();  
254 - }  
255 - })  
256 - })  
257 - $('.cel_3_Li').each(function () {  
258 - $(this).click(function () {  
259 - $(this).addClass('cel_3_Li_act').siblings().removeClass('cel_3_Li_act');  
260 - })  
261 - }) 220 + //跳转到详细页面
  221 + function tiaozhuan(id){
  222 + window.location.href = "{:url('Product/details')}?id="+id;
  223 + }
262 224
  225 + // 头部下拉
  226 + $('.header2_box>ul>li').each(function () {
  227 + $(this).mouseover(function () {
  228 + $(this).children('.header2_box2').show();
  229 + console.log(11)
  230 + }).mouseout(function () {
  231 + $(this).children('.header2_box2').hide();
263 }) 232 })
264 -  
265 - 233 + });
  234 +
  235 + //左侧列表下拉
  236 + $('.ce1_title').each(function () {
  237 + $(this).click(function () {
  238 + if($(this).children('img').attr('src') == "__TMPL__/public/assets/images/aicon09.png"){
  239 + $(this).children('img').attr('src','__TMPL__/public/assets/images/aicon10.png')
  240 + $(this).next('.ce1_2').slideToggle();
  241 + }else {
  242 + $(this).children('img').attr('src','__TMPL__/public/assets/images/aicon09.png');
  243 + $(this).next('.ce1_2').slideToggle();
  244 + }
  245 + })
  246 + });
  247 + $('.ce1_2_Li_title').each(function () {
  248 + $(this).click(function () {
  249 + if($(this).children('img').attr('src') == "__TMPL__/public/assets/images/aicon09.png"){
  250 + $(this).children('img').attr('src','__TMPL__/public/assets/images/aicon10.png')
  251 + $(this).next('.ce1_3').slideToggle();
  252 + }else {
  253 + $(this).children('img').attr('src','__TMPL__/public/assets/images/aicon09.png');
  254 + $(this).next('.ce1_3').slideToggle();
  255 + }
  256 + })
  257 + })
  258 + $('.cel_3_Li').each(function () {
  259 + $(this).click(function () {
  260 + $(this).addClass('cel_3_Li_act').siblings().removeClass('cel_3_Li_act');
  261 + })
  262 + })
266 </script> 263 </script>
267 </body> 264 </body>
268 </html> 265 </html>