You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
5.6 KiB

7 years ago
  1. <!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
  2. <title><?php echo sysconfig('CMS_WEBNAME'); ?></title><meta name="keywords" content="{dede:field.keywords/}" /><meta name="description" content="{dede:field.description function='html2text(@me)'/}" /><link rel="stylesheet" href="<?php echo sysconfig('CMS_BASEHOST'); ?>/css/style.css"></head><body>
  3. @include('home.common.header')
  4. <style>
  5. .cat-menu-h {padding:8px 0;background-color: #fff;}
  6. .cat-menu-h ul {font-size: 14px;}
  7. .cat-menu-h ul li {float: left;}
  8. .cat-menu-h ul a {display: block;padding: 2px 10px;text-align: center;color: #666;white-space: nowrap;}
  9. .cat-menu-h ul a:hover,.cat-menu-h ul .hover{background-color: #e61414;color: #fff;}
  10. .cat-menu-h ul a.forecast:hover {background-color: #26a96d;color: #fff;}
  11. .cat-menu-h ul a.forecast {color: #26a96d;}
  12. </style>
  13. <div class="box">
  14. <div class="cat-menu-h">
  15. <ul class="clearfix">
  16. <?php if($goods_type_list){foreach($goods_type_list as $k=>$v){ ?>
  17. <li><a<?php if($v['id']==$id){echo ' class="hover"';} ?> href="<?php echo route('home_goodslist',array('id'=>$v['id'])); ?>"><?php echo $v['name']; ?></a></li><?php }} ?>
  18. <li><a class="forecast" target="_blank" href="//ju.taobao.com/tg/forecast.htm"> [明日预告] </a></li>
  19. </ul>
  20. <form method="get" target="_blank" class="m-sch fr" name="formsearch" action="/plus/search.php"><input class="sch-txt" name="q" type="text" value="搜索 按Enter键" onfocus="if(value=='搜索 按Enter键') {value=''}" onblur="if(value=='') {value='搜索 按Enter键'}"></form>
  21. <div class="cl"></div></div>
  22. </div>
  23. <div style="background-color:#f6f6f6;padding:15px 0;">
  24. <div class="box">
  25. <ul class="pul">
  26. <?php if($posts){foreach($posts as $k=>$v){ ?>
  27. <li><a href="<?php echo route('home_goods',array('id'=>$v['id'])); ?>" target="_blank"><img src="<?php echo $v['litpic']; ?>" alt="<?php echo $v['title']; ?>">
  28. <p class="title"><?php echo $v['title']; ?></p>
  29. <p class="desc"><span class="price-point"><i></i>库存(<?php echo $v['goods_number']; ?>)</span> <?php echo $v['title']; ?>撒个地方官发个话说得好电话公司电话</p>
  30. <div class="item-prices red"><div class="item-link">立即<br>抢购</div><div class="item-info"><div class="price"><i>¥</i><em class="J_actPrice"><span class="yen"><?php echo $v['price']; ?></span></em></div>
  31. <div class="dock"><div class="dock-price"><del class="orig-price">¥<?php echo $v['market_price']; ?></del> <span class="benefit">退货赔运费</span></div><div class="prompt"><div class="sold-num"><em><?php echo $v['sale']; ?></em> 件已付款</div></div></div>
  32. </div></div>
  33. </a></li>
  34. <?php }} ?>
  35. </ul></div>
  36. <div class="pages"><ul><?php echo $pagenav; ?></ul><div class="cl"></div></div>
  37. </div><!-- box end -->@include('home.common.footer')
  38. <script>//图片幻灯
  39. var glide =new function(){
  40. function $id(id){return document.getElementById(id);};
  41. this.layerGlide=function(auto,oEventCont,oTxtCont,oSlider,sSingleSize,second,fSpeed,point){
  42. var oSubLi = $id(oEventCont).getElementsByTagName('li');
  43. var oTxtLi = $id(oTxtCont).getElementsByTagName('li');
  44. var interval,timeout,oslideRange;
  45. var time=1;
  46. var speed = fSpeed
  47. var sum = oSubLi.length;
  48. var a=0;
  49. var delay=second * 1000;
  50. var setValLeft=function(s){
  51. return function(){
  52. oslideRange = Math.abs(parseInt($id(oSlider).style[point]));
  53. $id(oSlider).style[point] =-Math.floor(oslideRange+(parseInt(s*sSingleSize) - oslideRange)*speed) +'px';
  54. if(oslideRange==[(sSingleSize * s)]){
  55. clearInterval(interval);
  56. a=s;
  57. }
  58. }
  59. };
  60. var setValRight=function(s){
  61. return function(){
  62. oslideRange = Math.abs(parseInt($id(oSlider).style[point]));
  63. $id(oSlider).style[point] =-Math.ceil(oslideRange+(parseInt(s*sSingleSize) - oslideRange)*speed) +'px';
  64. if(oslideRange==[(sSingleSize * s)]){
  65. clearInterval(interval);
  66. a=s;
  67. }
  68. }
  69. }
  70. function autoGlide(){
  71. for(var c=0;c<sum;c++){oSubLi[c].className='';oTxtLi[c].className='';};
  72. clearTimeout(interval);
  73. if(a==(parseInt(sum)-1)){
  74. for(var c=0;c<sum;c++){oSubLi[c].className='';oTxtLi[c].className='';};
  75. a=0;
  76. oSubLi[a].className="active";
  77. oTxtLi[a].className = "active";
  78. interval = setInterval(setValLeft(a),time);
  79. timeout = setTimeout(autoGlide,delay);
  80. }else{
  81. a++;
  82. oSubLi[a].className="active";
  83. oTxtLi[a].className = "active";
  84. interval = setInterval(setValRight(a),time);
  85. timeout = setTimeout(autoGlide,delay);
  86. }
  87. }
  88. if(auto){timeout = setTimeout(autoGlide,delay);};
  89. for(var i=0;i<sum;i++){
  90. oSubLi[i].onmouseover = (function(i){
  91. return function(){
  92. for(var c=0;c<sum;c++){oSubLi[c].className='';oTxtLi[c].className='';};
  93. clearTimeout(timeout);
  94. clearInterval(interval);
  95. oSubLi[i].className = "active";
  96. oTxtLi[i].className = "active";
  97. if(Math.abs(parseInt($id(oSlider).style[point]))>[(sSingleSize * i)]){
  98. interval = setInterval(setValLeft(i),time);
  99. this.onmouseout=function(){if(auto){timeout = setTimeout(autoGlide,delay);};};
  100. }else if(Math.abs(parseInt($id(oSlider).style[point]))<[(sSingleSize * i)]){
  101. interval = setInterval(setValRight(i),time);
  102. this.onmouseout=function(){if(auto){timeout = setTimeout(autoGlide,delay);};};
  103. }
  104. }
  105. })(i)
  106. }
  107. }
  108. }
  109. //调用语句
  110. glide.layerGlide(
  111. true, //设置是否自动滚动
  112. 'iconBall', //对应索引按钮
  113. 'textBall', //标题内容文本
  114. 'show_pic', //焦点图片容器
  115. 740, //设置滚动图片位移像素
  116. 2, //设置滚动时间2秒
  117. 0.1, //设置过渡滚动速度
  118. 'left' //设置滚动方向“向左”
  119. );</script></body></html>