首页 > 代码库 > 车展露出

车展露出

<!-- bbs列表页车展露出 --><link href="http://icon.xcar.com.cn/sq2013/2014gdauto/comeOut/css/out_bbs.css" rel="stylesheet" type="text/css" /><div class="l_All">    <div class="l_con">        <div class="l_conTop"><a href="http://www.xcar.com.cn/chezhan/guangzhou/" target="_blank" style="display:block; float: left;width: 212px;height: 47px;margin-left: 50px;"></a>            <a href="http://www.xcar.com.cn/chezhan/guangzhou/" target="_blank" class="czRight">所有<em>&nbsp;$guangzhou_sum&nbsp;</em>篇报道<i>&nbsp;&gt;&gt;</i></a>        </div>        <div class="l_conBom">            <div class="carousel ">                <div class="carouselChange">                    <ul>                        <!--{loop $guangzhou_plays $key $val}-->                        <li>                            <a href="{$val[‘url‘]}" target="_blank"><img src="{$val[‘thumb‘]}"></a>                            <span>                            </span>                            <div class="l_size"><a href="{$val[‘url‘]}" target="_blank">$val[‘title‘]</a></div>                        </li>                        <!--{/loop}-->                    </ul>                </div>                <div class="l_cursor">                    <em class="active"></em>                    <em></em>                    <em></em>                    <em></em>                    <em></em>                    <em></em>                </div>                <a href="javascript:void(0)"><em class="l_left Prev" style="display:none;"></em></a>                <a href="javascript:void(0)"><em class="l_right next" style="display:none;"></em></a>            </div>            <div class="like clearfix">                <span>最受欢迎车型排行</span>                <ul>                    <!--{loop $guangzhou_hot_car $key $val}-->                    <!--{if $key<5}-->                    {eval $key2=$key+1}                    <li>                        <!--{if $key<3}-->                        <label class="l_select">{$key2}</label><a href="{$val[‘url‘]}" target="_blank">$val[‘title‘]</a>                        <!--{else}-->                        <label>{$key2}</label><a href="{$val[‘url‘]}" target="_blank">$val[‘title‘]</a>                        <!--{/if}-->                    </li>                    <!--{/if}-->                    <!--{/loop}-->                </ul>                <ul>                    <!--{loop $guangzhou_hot_car $key $val}-->                    <!--{if $key>4}-->                    {eval $key2=$key+1}                    <li>                        <label>{$key2}</label><a href="{$val[‘url‘]}" target="_blank">$val[‘title‘]</a>                    </li>                    <!--{/if}-->                    <!--{/loop}-->                </ul>            </div>            <div class="l_Img clearfix">                <!--{loop $guangzhou_hot_model $key $val}-->                {eval $key=$key+1}                <div class="img_{$key}">                    <a href="{$val[‘url‘]}" target="_blank"><img src="{$val[‘thumb‘]}"></a>                    <span></span>                    <em><a href="{$val[‘url‘]}" target="_blank">$val[‘title‘]</a></em>                </div>                <!--{/loop}-->            </div>        </div>    </div>    <div class="l_nav02">        <div class="tit">车展活动</div>        <div class="con">            <!--{loop $guangzhou_cz_active_news $key $val}-->            <!--{if $key==1}-->            <a class=‘mid‘ href="{$val[‘url‘]}" target="_blank"><img width="221px" height="86px" src="{$val[‘thumb‘]}"></a>            <!--{else}-->            <a href="{$val[‘url‘]}" target="_blank"><img width="221px" height="86px" src="{$val[‘thumb‘]}"></a>            <!--{/if}-->            <!--{/loop}-->        </div>    </div></div><!-- bbs列表页车展露出 -->
//广州车展焦点图            /*焦点图*/            var Box=‘.carousel‘;//盒子            var Menu=$(Box+‘ .l_cursor em‘);//圆点菜单            var Con=$(Box+‘ .carouselChange li‘);//大图            var Text=$(Box+‘ .text li‘);//图注文字            var Prev=$(Box+‘ .Prev‘);//上一页            var Next=$(Box+‘ .next‘);//下一页            var Counts=$(Con).size();//获取li总数            var nowIndex=0;            var timer;            /* 点击切换 */            $(Menu).click(function(){                var i=$(Menu).index(this)                gotoPage(i);            });            /* 打开相应的标签 */            function gotoPage(i){                $(Menu).removeClass("active").eq(i).addClass("active");                $(Con).fadeOut(200).eq(i).fadeIn(200);                $(Text).hide().eq(i).fadeIn(200);                nowIndex=i;            };            /* 下一页 */            $(Next).click(function(){                gotoR();            });            function gotoR(){                nowIndex++;                if(nowIndex > Counts-1){                    nowIndex=0;                }                gotoPage(nowIndex);            };            /* 上一页 */            $(Prev).click(function(){                nowIndex--;                if(nowIndex < 0){                    nowIndex=Counts-1                }                gotoPage(nowIndex);            });            /* 自动轮播 */            function setAuto(){                if(Counts>1){                    timer=setInterval(gotoR,3000);                };            };            setAuto();            /* 鼠标经过暂停,离开继续轮播 */            $(Box).hover(function(){                        $(Prev).show();                        $(Next).show();                        if(timer){                            clearInterval(timer);                        }                    },                    function(){                        $(Prev).hide();                        $(Next).hide();                        setAuto();                    });            /*焦点图*/
//广州车展漏出   2014-11-4  Figo$guangzhou_tmp_key = ‘guangzhouchezhan‘;$guangzhou_arr = $memcache->get($guangzhou_tmp_key);if(!$guangzhou_arr){    $guangzhou_data = curl(‘http://hezuo.xcar.com.cn/chezhan/2014gz_interface.php‘);    if($guangzhou_data){        $guangzhou_arr=unserialize($guangzhou_data);        $memcache->set($guangzhou_tmp_key,$guangzhou_arr,MEMCACHE_COMPRESSED,600);    }}foreach($guangzhou_arr[‘plays‘] as $key=>$val){    $guangzhou_arr[‘plays‘][$key][‘title‘]=cutstr($val[‘title‘],18,"");}foreach($guangzhou_arr[‘hot_car‘] as $k=>$v){    $guangzhou_arr[‘hot_car‘][$k][‘url‘]="http://www.xcar.com.cn/chezhan/guangzhou/series_".$v[‘pserid‘].".htm";}$guangzhou_plays=$guangzhou_arr[‘plays‘];$guangzhou_hot_car=$guangzhou_arr[‘hot_car‘];$guangzhou_hot_model=$guangzhou_arr[‘hot_model‘];$guangzhou_cz_fast=$guangzhou_arr[‘cz_fast‘];$guangzhou_cz_active_pic=$guangzhou_arr[‘cz_active_pic‘];$guangzhou_sum=$guangzhou_arr[‘cz_cout‘];$guangzhou_cz_active_news=$guangzhou_arr[‘cz_active_news‘];//广州车展漏出   end

 

车展露出