Authored by Rock Zhang

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop

framework @ 75bbc3b0
Subproject commit 4216b36673d37eecf297c5cc8b7634a32c09dc51
Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2
... ...
... ... @@ -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;
.swiper-slider {
margin: 0 pxToRem(10px);
&:first-child {
margin-left: pxToRem(30px);
}
&:last-child {
margin-right: pxToRem(30px);
}
.img-box {
display: table-cell;
img {
width: pxToRem(156px);
height: pxToRem(206px);
vertical-align: middle;
text-align: center;
max-width: none;
}
}
}
.price {
... ...
... ... @@ -76,14 +76,14 @@
<div class="list-item">
<span class="iconfont icon">&#xe620;</span>
在线客服
<span class="iconfont num">3 &#xe604;</span>
<span class="iconfont num">&#xe604;</span>
</div>
</div>
<div class="group-list">
<div class="list-item">
<span class="iconfont icon">&#xe620;</span>
帮助
<span class="iconfont num">3 &#xe604;</span>
<span class="iconfont num">&#xe604;</span>
</div>
</div>
... ...
... ... @@ -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="{{img}}">
<div class="price">
<span class="sale-price"199</span>
<span class="old-price"233</span>
<span class="sale-price"{{salePrice}}</span>
<span class="old-price"{{oldPrice}}</span>
</div>
</div>
{{/recommendList}}
</div>
</div>
</div>
... ...
... ... @@ -20,9 +20,11 @@ class HomeController extends AbstractAction
*/
public function indexAction()
{
// 设置网站标题
$this->setTitle('个人中心');
// $uid = $this->getUid();
$uid = 967016;
$data = \Index\UserModel::getUserProfileData($uid);
// print_r($data);
... ... @@ -34,27 +36,55 @@ class HomeController extends AbstractAction
$data['recommendForYou'] = array(
'recommendList' => array(
array(
'img' => ''
'img' => '',
'salePrice' => '567.44',
'oldPrice' => '876.44'
),
array(
'img' => '',
'salePrice' => '567.44',
'oldPrice' => ''
),
array(
'img' => '',
'salePrice' => '567.44',
'oldPrice' => '876.44'
),
array(
'img' => ''
'img' => '',
'salePrice' => '567.44',
'oldPrice' => '876.44'
),
array(
'img' => ''
'img' => '',
'salePrice' => '567.44',
'oldPrice' => '876.44'
),
array(
'img' => ''
'img' => '',
'salePrice' => '567.44',
'oldPrice' => '876.44'
),
array(
'img' => ''
'img' => '',
'salePrice' => '567.44',
'oldPrice' => '876.44'
),
array(
'img' => '',
'salePrice' => '567.44',
'oldPrice' => '876.44'
),
array(
'img' => '',
'salePrice' => '567.44',
'oldPrice' => '876.44'
)
)
);
$data['myIndexPage'] = true;
$data['pageFooter'] = true;
// 设置网站标题
$this->setTitle('个人中心');
$this->_view->display('index', $data);
}
... ...