Authored by whb

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

... ... @@ -5,5 +5,6 @@
{{/topBanner}}
{{> sale/activity-entry}}
{{> sale/brand-sale}}
</div>
{{> layout/footer}}
... ...
<div class="activity-entry clearfix">
{{#activityEnter}}
<a class="entry-item pull-left {{#if @first}}first{{/if}} {{#if @last}}last{{/if}}" href="link">
<a class="entry-item pull-left {{#if @first}}first{{/if}} {{#if @last}}last{{/if}}" href="{{link}}">
<img class="icon pull-left" src="{{icon}}">
<div class="entry-text">
<span class="title">{{title}}</span>
... ...
<div class="brand-sale">
<div class="floor-title">
折扣专场 SALE
</div>
<div class="sale-group-big clearfix">
{{#brandSale}}
{{#big}}
<a class="item pull-left {{#if @first}}first{{/if}} {{#if @last}}last{{/if}}" href="{{link}}">
<div class="pic">
<img class="" src="{{img}}">
<div class="time">{{time}}</div>
</div>
<div class="detail">
<img class="brand pull-left" src="{{brand}}">
<div class="text">
<div class="discount">
<span class="num">{{discount}}</span> Off
</div>
<div class="title">
{{title}}
</div>
</div>
</div>
</a>
{{/big}}
{{/brandSale}}
</div>
<div class="sale-group">
</div>
</div>
... ...
... ... @@ -142,7 +142,7 @@ function actionGoodsCart() {
return false;
}
key = encodeURI(key);
$.get(searchDomain + '?callback=?&query=' + key, function(htmlData) {
$.get(searchDomain + '?query=' + key, function(htmlData) {
$('.search-list').html(htmlData.data);
queryNum = $('.search-list').children('li').length;
listIndex = -1;
... ... @@ -156,7 +156,7 @@ function actionGoodsCart() {
}, function() {
$(this).css('background-color', '#fff');
});
}, 'jsonp');
}, 'json');
}
function getText(obj) {
... ... @@ -525,7 +525,7 @@ function createNewArray(obj) {
var $that = $(this);
var $alink = $that.find('a');
var _href = $alink.attr('href');
var hottag = $alink.attr('hot') === 'true' ? true : false;
var hottag = $alink.attr('hot') === 'hot' ? true : false;
var objt = {};
if ($that.hasClass('category-title')) {
... ... @@ -721,7 +721,6 @@ function actionNav() {
}
/**
* 查询跳转后保留关键字
* @return {[type]} [description]
... ... @@ -1172,7 +1171,7 @@ function actionExeTemplate() {
* @return {[type]} [description]
*/
function actionSearch() {
var searchDomain = 'http://search.yohobuy.com/api/suggest';
var searchDomain = 'http://search.yohobuy.com/product/search/suggest';
$('#query_key').search(searchDomain);
}
... ...
... ... @@ -14,17 +14,19 @@ var $cr = $('#country-code-hide'),
emailReg = /^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/,
acAccount = [
['qq.com', '163.com', '126.com', 'sina.com', 'gmail.com',
'sohu.com', 'hotmail.com', '139.com', '189.com'], //数字顺序
'sohu.com', 'hotmail.com', '139.com', '189.com'
], //数字顺序
['gmail.com', 'qq.com', '163.com', '126.com', 'sina.com',
'sohu.com', 'hotmail.com', '139.com', '189.com'] //组合顺序
'sohu.com', 'hotmail.com', '139.com', '189.com'
] //组合顺序
],
$ccList = $('#country-code-list'),
$cc = $('#country-code'),
$btn = $('#find-btn'),
$accErr = $('#account-err'),
$caErr = $('#captcha-err'),
time, //timeout-id
caCount = 4, //验证码位数
time, //timeout-id
caCount = 4, //验证码位数
hasPh = false,
hasCa = false;
... ... @@ -42,8 +44,9 @@ require('yoho.placeholder');
function imgcode() {
var time = new Date(),
$captchaImg = $('#captcha-img'),
captchaImgSrc = $captchaImg.attr('src').split('?')[0];
$captchaImg = $('#captcha-img'),
captchaImgSrc = $captchaImg.attr('src').split('?')[0];
$('#captcha-img').attr('src', captchaImgSrc + '?t=' + time.getTime());
//getSource('yoho_family_web', '换一张', 'homepage_man');
... ... @@ -101,8 +104,8 @@ function vaCa() {
type: 'POST',
url: '/passport/back/authcode',
data: {
verifyCode: v,
phoneNum: $('#phone-num').val(),
verifyCode: v,
phoneNum: $('#phone-num').val(),
area: $('#country-code-hide').val()
}
... ...
... ... @@ -44,4 +44,75 @@
line-height: 48px;
}
}
.floor-title {
margin: 80px auto 40px;
width: 300px;
font-size: 16px;
line-height: 30px;
text-align: center;
border: 1px solid #000;
}
.brand-sale {
.sale-group-big {
.item {
width: 377px;
margin-right: 10px;
&.first,
&.last {
width: 376px;
}
&.last {
margin-right: 0;
}
}
.pic {
position: relative;
height: 400px;
}
.time {
@include box-sizing(border-box);
position: absolute;
left: 0;
bottom: 0;
width: 100%;
padding: 0 10px;
font-size: 16px;
line-height: 30px;
text-align: right;
color: #fff;
background: #4e4e4e;
}
.detail {
background: #f5f5f5;
}
.brand {
margin: 24px 10px;
}
.text {
padding: 24px 10px 24px 0;
font-size: 14px;
color: #fd5659;
}
.discount {
font-size: 28px;
font-weight: bold;
.num {
font-size: 40px;
}
}
}
}
}
... ...
... ... @@ -50,6 +50,35 @@ class Sale1Controller extends WebAction
'desc' => 'Off Price',
'link' => 'http://www.yohobuy.com'
)
),
'brandSale' => array(
'big' => array(
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/376/h/400',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'brand' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/22/09/0168ae2421d5283414ff5b873fa4a1c16a.jpg?imageView/1/w/185/h/62',
'title' => '2015春夏海量大促!',
'discount' => '70%',
),
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/376/h/400',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'brand' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/22/09/0168ae2421d5283414ff5b873fa4a1c16a.jpg?imageView/1/w/185/h/62',
'title' => '2015春夏海量大促!',
'discount' => '70%',
),
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/376/h/400',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'brand' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/22/09/0168ae2421d5283414ff5b873fa4a1c16a.jpg?imageView/1/w/185/h/62',
'title' => '2015春夏海量大促!',
'discount' => '70%',
)
),
'normal' => array()
)
);
$this->setWebNavHeader();
... ...