36 lines
1.1 KiB
PHTML
Executable File
36 lines
1.1 KiB
PHTML
Executable File
<!-- 轮播 s -->
|
|
<?php
|
|
$banners = getBannerList(10, 6, [['exp', \think\Db::raw('FIND_IN_SET(\'' . $category['id'] . '\',`categoryid`)')]]);
|
|
if ($banners):
|
|
?>
|
|
<div class="homeban margin-top-90">
|
|
|
|
<div class="bd">
|
|
<ul class="banner_no img-responsives">
|
|
<?php foreach ($banners as $banner): ?>
|
|
<li id="<?php echo $banner['alt'];?>"><a href="<?php echo $banner['url']; ?>"><img src="<?php echo getImage($banner['picture']); ?>"></a></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
jQuery(".homeban").slide({mainCell: ".bd ul", autoPlay: true, delayTime: 3000});
|
|
</script>
|
|
<script type="text/javascript">
|
|
jQuery(".homeban").slide(
|
|
{mainCell: ".bd ul", autoPlay: true, delayTime: 100}
|
|
|
|
);
|
|
$(function(){
|
|
function aa() {
|
|
var color = $(".banner_no li").attr('id');
|
|
|
|
$(".header-Index #header").removeClass().addClass(color);
|
|
console.log(color);
|
|
}
|
|
|
|
window.setInterval(aa,300);
|
|
})
|
|
</script>
|
|
<?php endif; ?>
|
|
<!-- 轮播 e -->
|