43 lines
1.4 KiB
PHTML
Executable File
43 lines
1.4 KiB
PHTML
Executable File
<!-- 轮播 s -->
|
|
<?php
|
|
$banners = getBannerList(48, 6, [['exp', \think\Db::raw('FIND_IN_SET(\'' . $category['id'] . '\',`categoryid`)')]]);
|
|
// echo \think\Db::table('BannerUs')->getLastSql();die;
|
|
if ($banners):
|
|
?>
|
|
<div class="homeban img-responsive margin-top-90">
|
|
<div class="hd">
|
|
<ul >
|
|
<?php /*foreach ($banners as $k => $banner): ?>
|
|
<li id="<?php echo $banner['alt'];?>"><?php echo $k + 1; ?></li>
|
|
<?php endforeach;*/?>
|
|
</ul>
|
|
</div>
|
|
<div class="bd">
|
|
<ul class="banner_no">
|
|
<?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 -->
|