Authored by yangyang

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

framework @ 75bbc3b0
Subproject commit 119c247f5cf929aa1e059e40609bb16dd6b58f05
Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2
... ...
... ... @@ -18,9 +18,9 @@ class Yohobuy
{
/* 正式环境 */
// const API_URL = 'http://api2.open.yohobuy.com/';
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_URL = 'http://api2.open.yohobuy.com/';
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// /* 测试环境 */
const API_URL = 'http://test2.open.yohobuy.com/';
... ...
... ... @@ -182,7 +182,7 @@ class UserData
* @param int $suggest_type 意见类型
* @return array 意见反馈接口返回的数据
*/
public static function suggestData($uid, $content, $suggest_type, $limit = 30)
public static function savesuggestData($uid, $content, $suggest_type, $limit = 30)
{
$param = Yohobuy::param();
$param['uid'] = $uid;
... ...
... ... @@ -43,7 +43,7 @@ $fixTitleBar.css({
top: brandSwipe
}).hide();
minBrandListTop = brandSwipe + $('.hot-brand').outerHeight() + $('.banner-top').outerHeight();
$('.brand-list').last().append($fixTitleBar);
$brandList.last().append($fixTitleBar);
$(window).scroll(function() {
var scrTop = $(window).scrollTop();
... ... @@ -64,6 +64,19 @@ $(window).scroll(function() {
});
});
function changeBackground() {
var $brandList = $('.brand-list').find('p');
$brandList.on('touchstart', function() {
$brandList.css('background', '#fff');
$(this).css('background', '#eee');
}).on('touchend touchcancel', function() {
$(this).css('background', '#fff');
});
}
changeBackground();
function searchResult() {
var keyword = ($keyword.val() + '').toLowerCase();
var result = {},
... ... @@ -113,6 +126,7 @@ function searchResult() {
// 插入 dom,绑定事件
$('.search-result').html(html);
changeBackground();
}
if ($('.brand-search-page').length) {
... ...
... ... @@ -94,6 +94,20 @@ $subNav.each(function () {
}
});
$sideNav.children('ul').children('li').on('touchstart', function() {
$sideNav.children('ul').children('li').css('background', '#fff');
$(this).css('background', '#eee');
}).on('touchend touchcancel', function() {
$(this).css('background', '#fff');
});
// $sideNav.children('ul').children('li').each(function() {
// var liHammer = new Hammer($(this)[0]);
// liHammer.on('', function() {
// });
// });
//头部banner轮播
if ($('.banner-swiper').find('li').size() > 1) {
bannerSwiper = new Swiper('.banner-swiper', {
... ...
... ... @@ -8,7 +8,8 @@ var $ = require('jquery');
var $searchBox = $('.search-box'),
$box = $('.box'),
$indexSearch = $('.index-search'),
$indexLogo = $('.index-logo');
$indexLogo = $('.index-logo'),
$channelLink = $('.index-channel a');
var $search = $searchBox.children('input[type="text"]'),
$cancelSearch = $box.children('.no-search'),
... ... @@ -42,6 +43,25 @@ $searchBox.children('.search-icon').on('touchstart', function() {
$indexSearch.submit();
});
$('.index-channel img').on('load', function() {
window.rePosFooter();
$channelLink.on('touchstart', function() {
$channelLink.css({
background: '#000',
color: '#fff',
borderColor: '#fff'
});
$(this).css({
background: 'rgba(255, 255, 255, 0.5)',
color: '#000',
borderColor: '#000'
});
}).on('touchend touchcancel', function() {
$(this).css({
background: '#000',
color: '#fff',
borderColor: '#fff'
});
});
$('.index-channel img').on('load error', function() {
window.rePosFooter && window.rePosFooter();
});
... ...
... ... @@ -103,4 +103,4 @@ a {
@include border-radius(10px);
}
@import "layout/header", "layout/footer", "layout/footer_tab", "good", "filter", "loading", "passport/index", "guang/index", "home/index", "category/index", "product/index", "index/index", "shopping-cart/index";
@import "layout/header", "layout/footer", "layout/footer_tab", "good", "filter", "loading", "passport/index", "guang/index", "home/index", "category/index", "product/index", "index/index", "shopping-cart/index", "mine/index";
... ...
... ... @@ -10,13 +10,11 @@
line-height: 96rem / $pxConvertRem;
.index-logo {
display: table-cell;
float: left;
font-size: 50rem / $pxConvertRem;
width: 216rem / $pxConvertRem;
height: 96rem / $pxConvertRem;
color: #343434;
vertical-align: middle;
background: url(../img/yohologo.png) left center no-repeat;
background-size: 104px 25px;
opacity: 1;
transition: all 400ms;
... ...
.mine-page {
.user-info {
padding: 0 30rem / $pxConvertRem;
color: #fff;
background: #ccc;
font-size: 34rem / $pxConvertRem;
line-height: 164rem / $pxConvertRem;
height: 164rem / $pxConvertRem;
.user-avatar {
display: inline;
}
}
}
\ No newline at end of file
... ...
@import "home";
\ No newline at end of file
... ...
{{> layout/header}}
<div class="mine-page yoho-page">
<div class="mine-header">
<div class="user-info">
<img class="user-avatar" src="{{head_ico}}">
<span class="username">{{profile_name}}</span>
{{#user_info}}
<span class="user-level user-level-{{cur_level}}"></span>
{{/user_info}}
</div>
<div class="iconfont more-icon">2</div>
</div>
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -3,7 +3,6 @@
<div class="index-container">
<div class="index-header clearfix">
<div class="index-logo">
<img src="http://static.dev.yohobuy.com/img/yohologo.png">
</div>
<div class="box">
<a href="javascript:void(0);" class="no-search">取消</a>
... ...
... ... @@ -20,11 +20,19 @@ class HomeController extends AbstractAction
*/
public function indexAction()
{
$uid = $uid = $this->getUid();;
// $uid = $uid = $this->getUid();
$uid = 967016;
$data = \Index\UserModel::getUserProfileData($uid);
print_r($data);
// print_r($data);
$data['homeHeader'] = array('searchUrl' => Helpers::url('/search', null, 'search'));
$data['pageFooter'] = true;
// 设置网站标题
$this->setTitle('男生首页');
$this->_view->display('index', $data);
}
/**
... ...
... ... @@ -204,7 +204,7 @@ class UserModel
$result = array();
// 调用接口保存意见反馈数据
return UserData::suggestData($uid, $content, $suggest_type);
return UserData::savesuggestData($uid, $content, $suggest_type);
}
}
... ...