init
This commit is contained in:
48
app/index/view/include/newbanner.phtml
Executable file
48
app/index/view/include/newbanner.phtml
Executable file
@@ -0,0 +1,48 @@
|
||||
<!-- 轮播 s -->
|
||||
<?php
|
||||
|
||||
$banners = array(
|
||||
'0' => array(
|
||||
'alt'=> 'New HUB',
|
||||
'url'=>'https://cc.f2b211.com/us/product/detail/3724.html',
|
||||
//'picture'=>'/uploads/1920x750-hub1-en.jpg',
|
||||
'picture'=>'/uploads/07.jpg',
|
||||
),
|
||||
'1' => array(
|
||||
'alt'=> 'Portable EV Charger',
|
||||
'url'=>'',
|
||||
'picture'=>'/uploads/05.jpg',
|
||||
),
|
||||
);
|
||||
|
||||
// tiaoshi($banners);die;
|
||||
if ($banners):
|
||||
?>
|
||||
<div class="homeban">
|
||||
<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 if($banner['url']){ echo $banner['url'];}else{echo 'javascript:viod();';} ?>"><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}
|
||||
|
||||
);
|
||||
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
<!-- 轮播 e -->
|
||||
Reference in New Issue
Block a user