Authored by ccbikai

为您优选组件

... ... @@ -4,4 +4,5 @@
* @date: 2015/11/10
*/
require('./index');
require('./order');
\ No newline at end of file
... ...
/**
* 个人中心首页
* @author: bikai<kai.bi@yoho.cn>
* @date: 2015/11/12
*/
var Swiper = require('yoho.iswiper');
var recommendSwiper;
recommendSwiper = new Swiper('.swiper-recommend', {
lazyLoading: true,
lazyLoadingInPrevNext: true,
slidesPerView: 'auto'
});
\ No newline at end of file
... ...
... ... @@ -13,15 +13,26 @@
}
.swiper-recommend {
padding: pxToRem(20px) pxToRem(30px);
}
padding: pxToRem(20px) 0;
width: 100%;
overflow: hidden;
.img-box {
display: table-cell;
width: pxToRem(156px);
height: pxToRem(206px);
vertical-align: middle;
text-align: center;
.swiper-slider {
margin: 0 pxToRem(10px);
&:first-child {
margin-left: pxToRem(30px);
}
&:last-child {
margin-right: pxToRem(30px);
}
img {
width: pxToRem(156px);
max-width: none;
}
}
}
.price {
... ...
... ... @@ -195,8 +195,13 @@
seajs.use('js/shopping-cart/gift-advance');
</script>
{{/if}}
{{!-- 个人中心 --}}
{{!-- 个人中心首页 --}}
{{#if myIndexPage}}
<script>
seajs.use('js/me/index');
</script>
{{/if}}
{{#if orderPage}}
<script>
seajs.use('js/me/order');
... ...
... ... @@ -3,15 +3,15 @@
<div class="title">为您优选新品</div>
<div class="swiper-recommend">
<div class="swiper-wrapper">
{{#recommendList}}
<div class="swiper-slider">
<div class="img-box">
<img src="http://temp.im/156x206">
</div>
<img class="img-box" src="http://temp.im/156x206">
<div class="price">
<span class="sale-price"199</span>
<span class="old-price"233</span>
</div>
</div>
{{/recommendList}}
</div>
</div>
</div>
... ...
... ... @@ -49,6 +49,7 @@ class HomeController extends AbstractAction
)
)
);
$data['myIndexPage'] = true;
$data['pageFooter'] = true;
// 设置网站标题
... ...