index.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <?php
  2. /**
  3. * FecShop file.
  4. *
  5. * @link http://www.fecshop.com/
  6. * @copyright Copyright (c) 2016 FecShop Software LLC
  7. * @license http://www.fecshop.com/license/
  8. */
  9. ?>
  10. <div class="swiper-container" data-space-between='10'>
  11. <div class="swiper-wrapper">
  12. <div class="swiper-slide"><img class="lazy" data-src="<?= Yii::$service->image->getImgUrl('custom/banner-1.jpg','apphtml5'); ?>" alt="" ></div>
  13. <div class="swiper-slide"><img class="lazy" data-src="<?= Yii::$service->image->getImgUrl('custom/banner-2.jpg','apphtml5'); ?>" alt="" ></div>
  14. <div class="swiper-slide"><img class="lazy" data-src="<?= Yii::$service->image->getImgUrl('custom/banner-3.jpg','apphtml5'); ?>" alt="" ></div>
  15. <div class="swiper-slide"><img class="lazy" data-src="<?= Yii::$service->image->getImgUrl('custom/banner-4.jpg','apphtml5'); ?>" alt="" ></div>
  16. </div>
  17. <div class="swiper-pagination"></div>
  18. </div>
  19. <div style="padding:10px; padding-bottom: 0px;">
  20. <div class="row">
  21. <div class="pb-20">
  22. <a href=""> <img class="lazy" data-src="<?= Yii::$service->image->getImgUrl('custom/index-1.jpg','apphtml5'); ?>" alt="" style='width: 100%'></a>
  23. </div>
  24. <div class="mb-10">
  25. <a href=""> <img class="lazy" data-src="<?= Yii::$service->image->getImgUrl('custom/index-2.jpg','apphtml5'); ?>" alt="" style='width: 100%'></a>
  26. </div>
  27. <div class="mb-10">
  28. <a href=""> <img class="lazy" data-src="<?= Yii::$service->image->getImgUrl('custom/index-3.jpg','apphtml5'); ?>" alt="" style='width: 100%'></a>
  29. </div>
  30. <div class="mb-10">
  31. <a href=""> <img class="lazy" data-src="<?= Yii::$service->image->getImgUrl('custom/index-4.jpg','apphtml5'); ?>" alt="" style='width: 100%'></a>
  32. </div>
  33. <div class="mb-10">
  34. <a href=""> <img class="lazy" data-src="<?= Yii::$service->image->getImgUrl('custom/index-5.jpg','apphtml5'); ?>" alt="" style='width: 100%'></a>
  35. </div>
  36. <div class="mb-10">
  37. <a href=""> <img class="lazy" data-src="<?= Yii::$service->image->getImgUrl('custom/index-6.jpg','apphtml5'); ?>" alt="" style='width: 100%'></a>
  38. </div>
  39. </div>
  40. </div>
  41. <style type="text/css">
  42. .infinite-scroll-preloader {
  43. margin-top:-20px;
  44. }
  45. </style>
  46. <div style="clear:both;"></div>
  47. <div style="padding:10px; display: none">
  48. <!-- 添加 class infinite-scroll 和 data-distance 向下无限滚动可不加infinite-scroll-bottom类,这里加上是为了和下面的向上无限滚动区分-->
  49. <div class=" infinite-scroll infinite-scroll-bottom" data-distance="100">
  50. <div class="list-block">
  51. <div class="list-container">
  52. <?php
  53. $parentThis['products'] = $bestFeaturedProducts;
  54. $parentThis['name'] = 'featured';
  55. $config = [
  56. 'view' => 'cms/home/index/product.php',
  57. ];
  58. echo Yii::$service->page->widget->renderContent('category_product_price',$config,$parentThis);
  59. ?>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="footer_bar">
  65. <div class="change-bar">
  66. <div class="c_left"><?= Yii::$service->page->translate->__('Language'); ?>: </div>
  67. <div class="c_right">
  68. <select class="lang" rel="">
  69. <?php foreach($stores as $store=> $langName): ?>
  70. <?php $selected = ""; ?>
  71. <?php if($store == $currentStore){ $selected = 'selected = "selected"'; } ?>
  72. <option <?= $selected ?> value="<?= '//'.$store ?>"><?= $langName ?></option>
  73. <?php endforeach; ?>
  74. </select>
  75. </div>
  76. <div class="clear"></div>
  77. </div>
  78. <div class="change-bar">
  79. <div class="c_left"><?= Yii::$service->page->translate->__('Currency'); ?>: </div>
  80. <div class="c_right">
  81. <select class="currency">
  82. <?php foreach($currencys as $c): ?>
  83. <?php $selected = ""; ?>
  84. <?php if($c['code'] == $currency['code']){ $selected = 'selected = "selected"'; } ?>
  85. <option <?= $selected ?> value="<?= $c['code'] ?>"><label><?= $c['symbol'] ?></label><?= $c['code'] ?></option>
  86. <?php endforeach; ?>
  87. </select>
  88. </div>
  89. <div class="clear"></div>
  90. </div>
  91. </div>
  92. <div class="footer-bottom">
  93. <?= Yii::$service->cms->staticblock->getStoreContentByIdentify('copy_right_apphtml5','appfront') ?>
  94. </div>
  95. <script>
  96. <?php $this->beginBlock('owl_fecshop_slider') ?>
  97. $.init();
  98. $(document).ready(function(){
  99. currentBaseUrl = "<?= $currentBaseUrl; ?>";
  100. $(".footer_bar .change-bar .lang").change(function(){
  101. redirectUrl = $(this).val();
  102. location.href=redirectUrl;
  103. });
  104. $(".footer_bar .change-bar .currency").change(function(){
  105. currency = $(this).val();
  106. htmlobj=$.ajax({url:currentBaseUrl+"/cms/home/changecurrency?currency="+currency,async:false});
  107. //alert(htmlobj.responseText);
  108. location.reload() ;
  109. });
  110. });
  111. <?php $this->endBlock(); ?>
  112. </script>
  113. <?php $this->registerJs($this->blocks['owl_fecshop_slider'],\yii\web\View::POS_END);//将编写的js代码注册到页面底部 ?>