Authored by whb

h5的show

... ... @@ -6,8 +6,7 @@
define('mobile', function(require, exports) {
var $ = require('zepto'),
swipe = require("plugins/swipe");
swipe = require("plugins/swipe");
exports.index = function() {
//大banner滑动
swipe.init({
... ... @@ -67,4 +66,16 @@ define('mobile', function(require, exports) {
$('.main-layout').removeClass('current').eq(nowIndex).addClass('current');
})
};
exports.show = function(){
$(".layout-item").bind("tap",function(event)
{
var imageWidth = 360, imageHeight = 360;
$(this).find(".image-box .pic-tip").each(function() {
var style_top = parseInt($(this).attr("x")) / 10000 * imageHeight;
var style_left = parseInt($(this).attr("y")) / 10000 * imageWidth;
$(this).css({top:style_top, left:style_left});
});
});
};
});
\ No newline at end of file
... ...
<?php if(!$this->view->isAjax):?>
<?php $this->_extends('layout/default_layout');?>
<?php $this->_block('main');?>
<!-- content start -->
<div class="content-wrap clearfix">
<div class="brand-detail">
<div class="brand-detail-top clearfix">
<div class="brand-detail-image">
<?php
$pics = json_decode($this->view->info['pics'],true);
$video = '';
foreach($pics as $val): ?>
<?php if($val['type']=='pic'):?>
<img src="<?php echo Lib_Images::getImageUrl($val['url'], '0300x0300','fragmentimg','thumbnail');?>" alt="<?php echo $this->view->info['description'];?>"/>
<?php else:?>
<?php $video = $val['url']?>
<?php endif;?>
<?php endforeach;?>
</div>
<div class="brand-info">
<div class="brand-info-logo clearfix">
<a href="" class="brand-logo"><img src="<?php echo Lib_Images::getImageUrl($this->view->info['logo'], '0147x0097','fragmentimg');?>" alt="<?php echo $this->view->info['name'];?>"/></a>
<h2><?php echo $this->view->info['name'];?></h2>
<div class="brand-detail-share">
<div style="padding-top: 42px;">
<wb:share-button addition="simple" type="button" default_text="<?php echo Lib_Utils_StringHelper::substr_cn($this->view->info['description'], 250);?>" pic="<?php echo Lib_Images::getImageUrl($this->view->info['logo'], '0145x0095','fragmentimg');?>"></wb:share-button>
<img alt="" src="<?php echo SITE_IMG.'/yohood/wechat.png';?>" id="wechat" style="cursor: pointer;">
<div class="bd_weixin_popup" style="display: none;">
<div class="bd_weixin_popup_head">
<span>分享到微信朋友圈</span>
</div>
<div id="bdshare_weixin_qrcode_dialog_qr" class="bd_weixin_popup_main">
<img width="185" height="185" src="http://qr.liantu.com/api.php?text=<?php echo SITE_MAIN;?>/brand/detail/id/9">
</div>
<div class="bd_weixin_popup_foot">打开微信,点击底部的“发现”,<br>使用“扫一扫”即可将网页分享至朋友圈。</div>
</div>
</div>
</div>
</div>
<h3>ABOUT <?php echo $this->view->info['name'];?></h3>
<div class="brand-intro">
<?php echo $this->view->info['description'];?>
</div>
</div>
</div>
<div id="goods_list">
<?php endif;?>
<?php if(count($this->view->goods)): ?>
<div class="brand-goods-list" style="<?php echo count($this->view->news) == 0 ? 'border-bottom: 0px;':'';?>">
<ul class="clearfix">
<?php foreach($this->view->goods as $val):?>
<li>
<a target="_blank" href="<?php echo $val['url']?>" title="<?php echo $val['name']?>">
<img src="<?php echo $val['thumb']?>" width="150" alt="">
<p><?php echo $val['name']?></p>
</a>
</li>
<?php endforeach;?>
</ul>
<div id="pageContent" class="pagination">
<?php $this->_component('Common_Pagination',array(
'pagination' => $this->view->pagination,'next_label' => '下一页','prev_label' => '上一页','current_class' => 'current',
'page_class'=>'pagination-inner', 'id'=>'img_page'
));?>
</div>
</div>
<?php endif;?>
<?php if(!$this->view->isAjax):?>
</div>
</div>
<?php if(isset($this->view->news) && count($this->view->news) > 0): ?>
<div class="pageSize">
<ul class="clearfix activity-index-list detail-pageSize" style="padding-top: 10px;">
<?php foreach($this->view->news as $val):?>
<li>
<div class="activity-img-item">
<a target="" href="<?php echo url('news/detail',array('id' => $val['id']))?>" title="<?php echo $val['title']?>">
<img alt="" src="<?php echo $val['thumb']?>" style="width: 120px;height: 75px;" alt="<?php echo $this->view->info['description'];?>">
</a>
</div>
<h3><a target="" href="<?php echo url('news/detail',array('id' => $val['id']))?>"><?php echo $val['title']?></a></h3>
<p><?php echo $val['desc'];?></p>
<span><em><?php echo date('H:i',$val['create_time'])?></em> <?php echo date('Y/m/d',$val['create_time'])?></span>
</li>
<?php endforeach;?>
</ul>
</div>
<?php endif;?>
</div>
<?php $this->_endblock();?>
<?php $this->_block('js');?>
<?php $this->_js('index.js', array(
SITE_JS . '/lib/seajs.js',
));?>
<script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
seajs.use("jquery",function($)
{
$("#wechat").bind("mousemove", function()
{
$(".bd_weixin_popup").css({left:$(this).offset().left, display:"block"});
});
$("#wechat").bind("mouseout", function()
{
$(".bd_weixin_popup").css("display","none");
});
});
</script>
<?php $this->_endblock();?>
<?php endif;?>
\ No newline at end of file
<?php $this->_extends('layout/default_layout_mobile');?>
<?php $this->_block('main');?>
<div class="contact-us-section">
<h2>客户服务</h2>
<p>Email:wen@yoho.cn</p>
</div>
<div class="contact-us-section">
<p>-</p>
<h2>广告服务</h2>
<p>北京:010-85253558-814</p>
<p>上海:021-51001909-8005</p>
<p>广州:020-83831060/83777600-811</p>
<p>Email:niki.li@yoho.cn</p>
</div>
<div class="contact-us-section">
<p>-</p>
<h2>市场合作</h2>
<p>上海:021-51001909-8013</p>
<p>Email:marketing@yoho.cn</p>
</div>
<div class="contact-us-section">
<p>-</p>
<h2>网站合作:</h2>
<p>Email:community@yoho.cn</p>
</div>
<div class="contact-us-section">
<p>-</p>
<h2>有货品牌合作</h2>
<p>上海:021-51001909-8007</p>
<p>广州:020-83831060/83777600</p>
<p>Email:yhpp@yoho.cn</p>
</div>
<div class="contact-us-section">
<p>-</p>
<h2>有货市场推广</h2>
<p>Email:haizheng.zhao@yoho.cn</p>
</div>
<?php $this->_endblock();?>
\ No newline at end of file
... ...
... ... @@ -81,7 +81,7 @@
</a>
</li>
<li>
<a href="javascript:;">
<a href="/default/contactus?callback=<?php echo $this->view->callback;?>">
<div class="channel-pic contact iconfont">&#xe60e;</div>
<h2 class="channel-name">CONTACT</h2>
<p class="channel-name-cn">联系我们</p>
... ...
<?php $this->_extends('layout/default_layout_mobile');?>
<?php $this->_block('main');?>
<div class="mobile-position">
<a class="mobile-back" href="<?php echo $this->view->callback;?>"></a>
<h2>SHOW</h2>
</div>
<div class="mobile-container">
<h1 class="show-title">#YO’HOOD SHOW#</h1>
<div class="show-list clearfix">
<?php
$pos = 0;
foreach($this->view->fragments as $fragment):?>
<span class="single_<?php echo $pos++;?>">
<img src="<?php echo preg_replace('/_\.(\w+)/i','', $fragment['image']);?>?imageMogr2/thumbnail/105x105/strip/quality/80" alt="" class="look_big_image"
source="<?php echo str_replace('_','_-0320x0320-primary', $fragment['image']);?>"/>
<?php
if(isset($fragment['labelList']))
{
foreach($fragment['labelList'] as $label)
{
?>
<span x="<?php echo $label['x']?>" y="<?php echo $label['y']?>" label="<?php echo $label['brandName'].$label['categoryName'];?>"></span>
<?php }}?>
</span>
<?php endforeach;?>
</div>
<div class="detail-pagination">
<?php $this->_component('Common_Pagination',array(
'pagination' => $this->view->pagination,'next_label' => '下一页','prev_label' => '上一页',
'is_mobile' => true,'prev_class'=>'prev','next_class'=>'next',
'page_class'=>'pagination-inner', 'id'=>'img_page'
));?>
</div>
<div class="model" style="display:none;">
<div id="mask" class="mask" current_class="">
<img src="" width="320" height="320" />
</div>
<div>
<a href="javascript:void(0);" class="iconfont image-prev"></a>
<a href="javascript:void(0);" class="iconfont image-next"></a>
<a href="javascript:void(0);" class="iconfont ui-dialog-close"></a>
</div>
</div>
</div>
<h2 class="main-title show-title">#YO'HOOD SHOW#</h2>
<div class="show-wrap clearfix">
<div class="main-layout clearfix">
<?php foreach($this->view->fragments as $fragment):?>
<div class="layout-item tiled">
<div class="image-box">
<a href="javascript:;">
<img data-original="<?php echo str_replace('_','_-0320x0320-primary', $fragment['image']);?>"
src="<?php echo preg_replace('/_\.(\w+)/i','', $fragment['image']);?>?imageMogr2/thumbnail/320x320/strip/quality/80" alt="">
</a>
<?php foreach($fragment['labelList'] as $label):?>
<a class="pic-tip" href="javascript:;" x="<?php echo $label['x']?>" y="<?php echo $label['y']?>"><?php echo $label['brandName'].$label['categoryName'];?></a>
<?php endforeach;?>
</div>
<div class="content">
<p><?php echo Lib_Utils_StringHelper::substr_cn(Lib_Utils_StringHelper::stripTags($fragment['content']), 70);?></p>
<p class="time"><?php echo date('Y.m.d', $fragment['publishTime'])?></p>
</div>
</div>
<?php endforeach;?>
</div>
<div id="pageContent" style="text-align: center;" class="pagination">
<?php $this->_component('Common_Pagination',array(
'pagination' => $this->view->pagination,'next_label' => 'NEXT&nbsp;<span class="iconfont">&#xe610;</span>',
'prev_label' => '<span class="iconfont">&#xe60f;</span>&nbsp;PREV',
'is_mobile' => true,'prev_class'=>'iconfont','prev_class'=>'iconfont',
'page_class'=>'pagination-inner clearfix', 'id'=>'img_page'
));?>
</div>
</div>
<?php $this->_endblock();?>
<?php $this->_block('js');?>
<?php $this->_js('index.js', array(
SITE_JS . '/lib/seajs.js',
));?>
<script type="text/javascript">
seajs.use('channel',function(channel)
{
channel.show();
});
</script>
<?php $this->_endblock();?>
\ No newline at end of file
<?php $this->_block('js');?>
<script type="text/javascript">
seajs.use('mobile',function(mobile){
mobile.show();
})
</script>
<?php $this->_endblock();?>
\ No newline at end of file
... ...