init
This commit is contained in:
45
app/index/view/include/banner.phtml
Executable file
45
app/index/view/include/banner.phtml
Executable file
@@ -0,0 +1,45 @@
|
||||
<!-- 轮播 s -->
|
||||
<?php
|
||||
$bigbanners = getBannerList(91, 6);
|
||||
if ($bigbanners):
|
||||
?>
|
||||
<div class="homebans homebans_p">
|
||||
<div class="hd">
|
||||
<ul class="banner_no">
|
||||
<?php foreach ($bigbanners as $k => $banner): ?>
|
||||
<li id="<?php echo $banner['alt'];?>"><?php echo $k + 1; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bd">
|
||||
<ul>
|
||||
<?php foreach ($bigbanners as $banner): ?>
|
||||
<li><a href="<?php echo $banner['url']; ?>" target="_blank"><img src="<?php echo getImage($banner['picture']); ?>" alt="<?php echo $banner['description']; ?>" /></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(".homebans").slide({mainCell: ".bd ul", autoPlay: true, delayTime: 500});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
jQuery(".homebans").slide(
|
||||
{mainCell: ".bd ul", autoPlay: true, delayTime: 100}
|
||||
|
||||
);
|
||||
$(function(){
|
||||
function aa() {
|
||||
var color = $(".banner_no li[class='on']").attr('id');
|
||||
$(".header-Index #header").removeClass().addClass(color);
|
||||
//console.log(color);
|
||||
}
|
||||
|
||||
window.setInterval(aa,300);
|
||||
})
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
<!-- 轮播 e -->
|
||||
Reference in New Issue
Block a user