Authored by Lynnic

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

... ... @@ -3,5 +3,12 @@
* @author: bikai<kai.bi@yoho.cn>
* @date: 2015/11/12
*/
var $ = require('jquery');
var $userAvatar = $('.user-avatar');
var myImage = new Image();
require('../product/recommend-for-you.js');
\ No newline at end of file
require('../product/recommend-for-you.js');
myImage.src = $userAvatar.attr('src');
myImage.onerror = function() {
$userAvatar.attr('src', 'http://static.dev.yohobuy.com/img/me/index/user-avatar.png');
};
... ...
/**
* 个人信息
* @author: bikai<kai.bi@yoho.cn>
* @date: 2015/11/19
*/
var $ = require('jquery');
var $userAvatar = $('.user-avatar');
var myImage = new Image();
myImage.src = $userAvatar.attr('src');
myImage.onerror = function() {
$userAvatar.attr('src', 'http://static.dev.yohobuy.com/img/me/index/user-avatar.png');
};
... ...
... ... @@ -83,8 +83,36 @@ overflow: hidden;
margin-right: 2px;
}
.swiper-pagination-bullet-active {
background-color: #000;
}
background-color: #000;
}
.swiper-button-prev,
.swiper-button-next {
position: absolute;
top: 50%;
width: pxToRem(48px);
height: pxToRem(48px);
margin-top: pxToRem(-44px);
cursor: pointer;
z-index:10;
-moz-background-size: pxToRem(48px) pxToRem(48px);
-webkit-background-size: pxToRem(48px) pxToRem(48px);
background-size: pxToRem(48px) pxToRem(48px);
background-position: center;
background-repeat: no-repeat;
}
.swiper-button-next.swiper-button-grey {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23f0f0f0'%2F%3E%3C%2Fsvg%3E");
right: pxToRem(30px);
left: auto;
}
.swiper-button-prev.swiper-button-grey {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23f0f0f0'%2F%3E%3C%2Fsvg%3E");
left: pxToRem(30px);
right: auto;
}
}
}
... ...
{{> layout/header}}
<div class="personal-details">
<ul>
<li><span>头像</span><span><i class="head-portrait"><img src="{{ head_ico }}"></i></span></li>
<li><span>头像</span><span><i class="head-portrait"><img class="user-avatar" src="{{ head_ico }}"></i></span></li>
<li><span>昵称</span><span>{{ username }}</span></li>
<li><span>性别</span><span>{{ gender }}</span></li>
<li><span>生日</span><span>{{ birthday }}</span></li>
... ...
... ... @@ -253,4 +253,9 @@
<script>
seajs.use('js/me/my-guang');
</script>
{{/if}}
{{#if personalDetailsPage}}
<script>
seajs.use('js/me/personal-details');
</script>
{{/if}}
\ No newline at end of file
... ...
... ... @@ -16,6 +16,6 @@
</div>
<!-- 如果需要导航按钮 -->
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
<div class="swiper-button-prev swiper-button-grey"></div>
<div class="swiper-button-next swiper-button-grey"></div>
</div>
\ No newline at end of file
... ...
... ... @@ -27,7 +27,8 @@ class HomeController extends AbstractAction
// {
// // 检查用户是否登录, 未登录则跳转到登录页
// $uid = $this->getUid(true);
// if (!$uid) {
// $action = $this->getRequest()->getActionName();
// if (!$uid && $action !== 'index') {
// $this->go(Helpers::url('/signin.html'));
// }
//
... ... @@ -43,18 +44,22 @@ class HomeController extends AbstractAction
$this->setTitle('个人中心');
$this->setNavHeader('个人中心');
// $uid = $this->getUid();
$uid = 8826435;
$data = \Index\UserModel::getUserProfileData($uid);
$data += \Index\UserModel::getInfoNumData($uid);
// 优选新品数据
$channel = Helpers::getChannelByCookie();
$data['recommendForYou'] = \Index\UserModel::getPreferenceData($channel);
// print_r($data);
$data['myIndexPage'] = true;
$data['pageFooter'] = true;
$data = array(
'myIndexPage' => true,
'pageFooter' => true
);
echo $this->getRequest()->getActionName();
$uid = $this->getUid();
if ($uid) {
$data['isLogin'] = true;
$uid = 8826435;
$data += \Index\UserModel::getUserProfileData($uid);
$data += \Index\UserModel::getInfoNumData($uid);
// 优选新品数据
$channel = Helpers::getChannelByCookie();
$data['recommendForYou'] = \Index\UserModel::getPreferenceData($channel);
}
$this->_view->display('index', $data);
}
... ... @@ -127,6 +132,7 @@ class HomeController extends AbstractAction
// $uid = $this->getUid();
$uid = 967016;
$data = \Index\UserModel::getUserProfileData($uid);
$data['personalDetailsPage'] = true;
$data['pageFooter'] = true;
$this->_view->display('personal-details', $data);
}
... ... @@ -520,7 +526,7 @@ class HomeController extends AbstractAction
{
echo " ";
}
elseif ($page = 1)
elseif ($page == 1)
{
$order['walkwayUrl'] = self::strollAction();
}
... ...