indexmobile.php 1.6 KB
<?php $this->_extends('layout/default_layout_mobile');?>
<?php $this->_block('main');?>
<?php if($this->view->brandTotal):?>
    <div class="search-wrap">
        <input type="text">
        <a href="javascript:;" class="search-btn"><span class="iconfont">&#xe611;</span><em>搜索</em></a>
    </div>
<?php endif;?>
<?php if(!empty($this->view->banners)):?>
<div class="slide-main brand-slide">
    <div class="slide-box">
        <div class="slide-wrap clearfix">
        <?php foreach($this->view->banners as $banner):?>
            <div class="box">
               <a href="<?php echo $banner['url'];?>" title="<?php echo $banner['text'];?>">
                    <img src="<?php echo Lib_Images::getImageUrl($banner['res'],'source','fragmentimg');?>" alt=""/>
               </a>
            </div>
         <?php endforeach;?>
        </div>
    </div>
    <div class="slide-navigator">
        <div class="dib clearfix">
            <?php echo '<a href="javascript:;" class="on"></a>'.str_repeat('<a href="javascript:;"></a>', count($this->view->banners) - 1);?>
        </div>
    </div>
</div>
<?php endif;?>
<div class="brand-main">
    <div class="brand-content" >
        <?php if(empty($this->view->brandTotal)): //不存在,显示coming soon?>
            <img src="<?php echo SITE_RES.'/images/yohood/comingsoon.jpg';?>" style="width:100%;"/>    
        <?php endif?>
    </div>
</div>
<?php $this->_endblock();?>
<?php $this->_block('js');?> 
    <script type="text/javascript">
        seajs.use(['zepto', 'mobile'],function($, mobile){
            mobile.brand();
        })
    </script>
<?php $this->_endblock();?>