zoukankan      html  css  js  c++  java
  • ECSHOP首页成功实现订单上下滚动

    首先在library/下新建一个gundong.lbi文件代码如下

    <div style="1020px; margin-bottom:5px;height:29px;overflow:hidden; background:url(/themes/Fuu%20Lace/images/new_order.gif)">
    
    
        <div id="noticev2" style="white-space:nowrap; padding-left:150px; line-height:29px;">
    
    
        {foreach from=$order_list item=order}
    
    
          <span style="padding-left:100px">{$order.order_sn}</span><span style="padding-left:100px">{$order.user_name}</span>  <span style="padding-left:100px">
    
    {$order.region_name}</span> <span style="padding-left:100px"> ${$order.order_amount}</span> <span id="order_status" style="padding-left:100px">{if $order.order_status eq 5}
    
    Deliveried{else}{$order.order_status}{/if}</span><br>
    
    
        {/foreach}
    
    
        </div>
    
    
    </div>
    
     
    
    
    <script>
    
    
    var tID;
    
    
    var tn;
    
    
    var nStopTime=3000
    
    
    var nSpeed=50
    
    
    var isMove=true;
    
    
    var nHeight=29;
    
    
    var nS=0
    
    
    var nNewsCount=0
    
    function moveT(n)
    
    
    {
        clearTimeout(tID)
    
    
        var noticev2= document.getElementById("noticev2")
    
    
        if(n)
    
    
        {
            noticev2.style.lineHeight=nHeight+"px";
    
    
            var theText=noticev2.innerHTML.toLowerCase();   
    
            nNewsCount=theText.split("<br>").length    
    
     
            noticev2.innerHTML+="<br>"+noticev2.innerHTML;
    
    
            tn=nHeight;
    
    
        }
    
    
        nS=nSpeed;
    
    
        if(isMove)
    
    
        {
    
    
            noticev2.style.marginTop=tn+"px";
    
    
            if((tn-2)%nHeight==0)
    
    
            {
                nS=nSpeed+nStopTime;
            }
               
            tn--;
    
    
            if(Math.abs(tn)==(nNewsCount*nHeight*2-nHeight))
    
    
            tn=(nNewsCount-1)*nHeight*-1;
    
    
        }
       
        tID=setTimeout("moveT()",nS);
    
    
    }
    
    
    
    moveT(1);
    
    </script>

    2. 然后在首页想插入的地方插入以下代码


    <!-- #BeginLibraryItem "/library/gundong.lbi" --><!-- #EndLibraryItem -->


    这种方法还会出现问题,就是非注册用户购买时,用户名就不显示了。

  • 相关阅读:
    mysql 加入列,改动列,删除列。
    C语言中的static 具体分析
    [Python网络编程]gevent httpclient以及网页编码
    iOS学习之 plist文件的读写
    数据库设计中的14个技巧
    最简单的基于FFMPEG的封装格式转换器(无编解码)
    一次重要的爱情婚姻抉择,您怎么看?
    2014年到期的myeclipse5.5.1注冊码
    24点经典算法
    使用val()方法设置表单中的默认选中项
  • 原文地址:https://www.cnblogs.com/wangblognet/p/2809943.html
Copyright © 2011-2022 走看看