人人商城

index.html 7.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. {template 'common/_header'}
  2. <div id="myCarousel" class="carousel slide">
  3. <!-- 轮播(Carousel)指标 -->
  4. <ol class="carousel-indicators">
  5. {loop $banner $index $item}
  6. <li data-target="#myCarousel" data-slide-to="{$index}" class="{if $index == 0}active{/if}"></li>
  7. {/loop}
  8. </ol>
  9. <!-- 轮播(Carousel)项目 -->
  10. <div class="carousel-inner">
  11. {loop $banner $index $item}
  12. <div class="item {if $index == 0}active{/if}" {if $item['url']}onclick="window.open('{$item['url']}')"{/if}>
  13. <img src="{php echo pctomedia($item['thumb'])}" width="100%" alt="{$item['title']}">
  14. </div>
  15. {/loop}
  16. </div>
  17. </div>
  18. <script type="text/javascript">
  19. $('.carousel').carousel(5000)
  20. </script>
  21. {if $casus}
  22. <div class="lynn-case-index">
  23. <div class="lynn-article-top">
  24. <i></i>
  25. <h3>案例展示</h3>
  26. <p>{$basicset['casesubtitle']}</p>
  27. </div>
  28. <div class="lynn-case-info">
  29. <div class="slider multiple-items">
  30. {loop $casus $index $item}
  31. <div class="slider-img">
  32. <img src="{php echo pctomedia($item['thumb'])}" alt="{$item['title']}">
  33. <span class="rcode">
  34. <img src="{php echo pctomedia($item['qr'])}" width="142" height="142" alt="{$item['title']}">
  35. <p>扫面二维码关注店铺</p>
  36. </span>
  37. </div>
  38. {/loop}
  39. </div>
  40. <div style="clear:both;"></div>
  41. </div>
  42. </div>
  43. {/if}
  44. {if $companyArticle}
  45. <div class="lynn-news">
  46. <div class="lynn-article-top">
  47. <i></i>
  48. <h3>新闻动态</h3>
  49. <p>{$basicset['newsubtitle']}</p>
  50. </div>
  51. <div class="lynn-news-index">
  52. <ul class="lynn-news-index-ul">
  53. {loop $companyArticle $index $item}
  54. <li onclick="javascript:window.open('{php echo webUrl(array('news/detail','id'=>$item['id']))}')">
  55. <div class="lynn-news-index-li-left">
  56. <span>{php echo date('M',$item['createtime'])}</span><strong>{php echo date('d',$item['createtime'])}</strong>
  57. </div>
  58. <div class="lynn-news-index-li-right">
  59. <div class="lynn-news-index-li-right-top">
  60. <i>+</i>
  61. <h3>{$item['title']}</h3>
  62. <p><span>{$item['name']}</span></p>
  63. </div>
  64. <div class="lynn-news-index-li-right-bot">
  65. {php echo mb_substr(strip_tags(htmlspecialchars_decode($item['content'])),0,30,'utf-8')}
  66. </div>
  67. </div>
  68. <div style="clear:both;"></div>
  69. </li>
  70. {/loop}
  71. </ul>
  72. <div style="clear:both;"></div>
  73. </div>
  74. </div>
  75. {/if}
  76. {if $article}
  77. <div class="lynn-article-index">
  78. <div class="lynn-article-top">
  79. <i></i>
  80. <h3>最新文章</h3>
  81. <p>{$basicset['articlesubtitle']}</p>
  82. </div>
  83. <div class="lynn-article-bot">
  84. <ul class="lynn-article-bot-ul">
  85. {loop $article $index $item}
  86. <li onclick="javascript:window.open('{php echo webUrl(array('article/detail','id'=>$item['id']))}')">
  87. <h3>{$item['title']}</h3>
  88. <span>{$item['name']}</span>|<span>{php echo date('Y-m-d',$item['createtime'])}</span>
  89. <p>
  90. {php echo mb_substr(strip_tags(htmlspecialchars_decode($item['content'])),0,60,'utf-8')}
  91. </p>
  92. <a href="{php echo webUrl(array('article/detail','id'=>$item['id']))}" style="display: none;">more>></a>
  93. </li>
  94. {/loop}
  95. </ul>
  96. <div style="clear:both;"></div>
  97. </div>
  98. </div>
  99. {/if}
  100. {if $link}
  101. <div class="lynn-link-index">
  102. <div class="lynn-article-top">
  103. <i></i>
  104. <h3>友情链接</h3>
  105. <p>{$basicset['linksubtitle']}</p>
  106. </div>
  107. <div class="lynn-flink-info">
  108. <div class="lynn-flink-info-top">
  109. <a href="javascript:void(0);" id="flink-prev"><</a>
  110. <a href="javascript:void(0);" id="flink-next">></a>
  111. </div>
  112. <div class="lynn-flink-info-bot">
  113. {loop $link $index $item}
  114. <a href="{$item['url']}" target="_blank"><img src="{php echo pctomedia($item['thumb'])}" alt="{$item['title']}"></a>
  115. {/loop}
  116. </div>
  117. <div style="clear:both;"></div>
  118. </div>
  119. <div style="clear:both;"></div>
  120. </div>
  121. {/if}
  122. <div class="lynn-contact-index">
  123. <div class="lynn-article-top">
  124. <i></i>
  125. <h3>联系我们</h3>
  126. <p>{$basicset['contactsubtitle']}</p>
  127. </div>
  128. <div class="lynn-contact-bottom">
  129. <form id="guestbookform">
  130. <div class="lynn-contact-form-top">
  131. <input type="text" name="nickname" placeholder="姓名" class="lynn-input-name" value=""><input name="mobile" type="text" class="lynn-input-tel" placeholder="电话" value=""><input name="email" class="lynn-input-email" type="text" placeholder="邮箱" value="">
  132. </div>
  133. <div class="lynn-contact-form-bottom">
  134. <textarea name="content" id="" cols="30" rows="10" class="lynn-textarea" placeholder="留言内容"></textarea>
  135. <span style="color:red;font-size: 12px;display: inline-block;" id="content-span"></span>
  136. </div>
  137. <input type="button" id="subguestbook" class="lynn-btn-submit" value="提交留言">
  138. </form>
  139. </div>
  140. </div>
  141. <script type="text/javascript">
  142. $(function(){
  143. /*案例展示*/
  144. $('.multiple-items').slick({
  145. dots: true,
  146. infinite: true,
  147. slidesToShow: 4,
  148. slidesToScroll: 4
  149. });
  150. $(".slider-img").on("mouseenter",function(){
  151. $(this).find(".rcode").show()
  152. }).on("mouseleave",function(){
  153. $(this).find(".rcode").hide()
  154. })
  155. /*新闻动态*/
  156. $(".lynn-news-index-ul li").mouseenter(function(){
  157. $(this).addClass("active")
  158. }).mouseleave(function(){
  159. $(this).removeClass("active")
  160. })
  161. /*友情链接*/
  162. var flinkcount = $(".lynn-flink-info-bot a").length;
  163. if(flinkcount>=14){
  164. $("#flink-prev").on("click",function(){
  165. $(".lynn-flink-info-bot a:lt(2)").insertAfter(".lynn-flink-info-bot a:last")
  166. })
  167. $("#flink-next").on("click",function(){
  168. flinkcount = flinkcount -3;
  169. $(".lynn-flink-info-bot a:gt("+flinkcount+")").insertBefore(".lynn-flink-info-bot a:first")
  170. })
  171. }
  172. /*联系我们*/
  173. $("#subguestbook").on("click",function(e){
  174. e.preventDefault();
  175. $.post('{php echo webUrl(array("home/ajaxguestbook"))}',$("#guestbookform").serialize(),
  176. function(data){
  177. console.log(data);
  178. if(data.status == 'success')
  179. {
  180. $(this).attr('placeholder',data.message)
  181. $("#content-span").html(data.message);
  182. }else
  183. {
  184. $("[name='"+data.type+"']").attr('placeholder',data.message).css("background-color","#f6d064")
  185. }
  186. }, "json");
  187. })
  188. })
  189. </script>
  190. {template 'common/_footer'}
  191. </body>
  192. </html>