Authored by wangqing

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

... ... @@ -941,6 +941,7 @@ class HelperSearch
if ($data) {
$result['conditions'] = $data;
}
$result['clearUrl'] = self::current();
return $result;
}
... ... @@ -1369,8 +1370,6 @@ class HelperSearch
public static function filter()
{
$result = array();
//清除选中
$result['checkedConditions']['clearUrl'] = self::current();
//频道
$result['channel'] = array();
//性别
... ...
No preview for this file type
... ... @@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Wed Jan 13 13:50:02 2016
Created by FontForge 20120731 at Wed Jan 20 14:25:44 2016
By Ads
</metadata>
<defs>
... ... @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Wed Jan 13 13:50:02 2016
bbox="-0.75 -224 3943 896"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E644"
unicode-range="U+0078-E645"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
... ... @@ -278,5 +278,10 @@ q0 -14 -3.5 -27t-10 -23.5t-16 -20t-20.5 -15.5t-24 -10t-27 -4zM848 367q-42 0 -71.
d="M523 881q-101 0 -192.5 -39.5t-158 -105.5t-105.5 -158t-39 -193q0 -205 145 -350t350 -145q67 0 131.5 18t119 49.5t100 77.5t77.5 100.5t49.5 118.5t17.5 131q0 101 -39 193t-105.5 158t-158 105.5t-192.5 39.5zM739 224q8 -8 7 -19q0 -2 -0.5 -4.5t-1.5 -5t-2.5 -4.5
t-3.5 -3q-11 -10 -15 -14q-7 -7 -17 -7t-18 7l-34 34q-59 -42 -131 -42q-94 0 -160.5 66.5t-66.5 160.5q0 46 18 88t48.5 72.5t72.5 48.5t88 18t88 -18t72.5 -48.5t48.5 -72.5t18 -88q0 -75 -45 -135zM592 337q8 7 18 6.5t17 -7.5l27 -27q25 39 25 84q0 64 -45.5 109.5
t-110 45.5t-110 -45.5t-45.5 -109.5t45.5 -109.5t109.5 -45.5q44 0 80 21l-27 28q-8 7 -7.5 18t7.5 18z" />
<glyph glyph-name="uniE645" unicode="&#xe645;"
d="M512 798q-104 0 -198 -40.5t-162.5 -109t-109 -162.5t-40.5 -198t40.5 -198t109 -162.5t162.5 -109t198 -40.5t198 40.5t162.5 109t109 162.5t40.5 198t-40.5 198t-109 162.5t-162.5 109t-198 40.5zM512 -149q-89 0 -170 34.5t-139.5 93t-93 139.5t-34.5 170
q0 71 22 137.5t62.5 120.5t94.5 94.5t120.5 62.5t137.5 22t137.5 -22t120.5 -62.5t94.5 -94.5t62.5 -120.5t22 -137.5q0 -89 -34.5 -170t-93 -139.5t-139.5 -93t-170 -34.5zM659 288q15 0 25.5 10.5t10.5 25.5t-10.5 26t-25.5 11h-111v17l135 141q5 5 8 12t2.5 14t-3 13.5
t-8.5 11.5q-10 11 -25 10.5t-26 -11.5l-115 -121l-123 122q-11 11 -26 10.5t-25 -10.5q-7 -7 -10 -16.5t-0.5 -19t9.5 -16.5l135 -135v-22h-108q-8 0 -14.5 -3t-11.5 -8t-8 -11.5t-3 -14.5q0 -9 5 -17.5t13.5 -13.5t18.5 -5h108v-73h-108q-8 0 -14.5 -3t-11.5 -7.5t-8 -11.5
t-3 -14.5t3 -14t8 -11.5t11.5 -8t14.5 -3h108v-108q0 -15 10.5 -25.5t25.5 -10.5q10 0 18.5 4.5t13 13t4.5 18.5v108h111q10 0 18.5 5t13 13.5t4.5 18.5q0 7 -2.5 14t-7.5 11.5t-12 7.5t-14 3h-111v73h111z" />
</font>
</defs></svg>
... ...
No preview for this file type
No preview for this file type
... ... @@ -242,10 +242,12 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
// 颜色块切换勾选样式
$this.siblings('.chosed').removeClass('chosed');
// 特殊处理
// 特殊处理: 老的选中尺码在新选中的颜色对应尺码中不存在, 需要将颜色的第一行对应的颜色块加上勾选样式.
if (-1 === curGoodNum) {
$curColorBlock = $($colorRowList.eq(0).children().get(index));
$curColorBlock.addClass('chosed');
// 当前选择的颜色块,加上勾选样式
} else {
$this.toggleClass('chosed');
}
... ...
... ... @@ -73,3 +73,9 @@ $action.on('touchend', '.del', function() {
$confim.fadeIn();
return false;
});
$action.on('touchstart', 'a,span', function() {
$(this).css('background', '#eee');
}).on('touchend touchcancel', 'a,span', function() {
$(this).css('background', 'transparent');
});
... ...
... ... @@ -40,13 +40,16 @@ $('.employ span').each(function(index) {
});
});
$(window).scroll(function() {
if ($(window).scrollTop() + $(window).height() > $('body').height() - 1) {
function scrollHandler() {
if ($(window).scrollTop() + $(window).height() > $('body').height() - 100) {
page++;
couponAJAX(statu, page);
return;
}
}
$(window).scroll(function() {
window.requestAnimationFrame(scrollHandler);
});
couponAJAX(statu, page);
\ No newline at end of file
... ...
... ... @@ -16,12 +16,16 @@ function ajaxCurrencyDetail(page) {
});
}
$(window).scroll(function() {
if ($(window).scrollTop() + $(window).height() > $('body').height() - 1) {
function scrollHandler() {
if ($(window).scrollTop() + $(window).height() > $('body').height() - 100) {
page++;
ajaxCurrencyDetail(page);
return;
}
}
$(window).scroll(function() {
window.requestAnimationFrame(scrollHandler);
});
ajaxCurrencyDetail(page);
\ No newline at end of file
ajaxCurrencyDetail(page);
... ...
... ... @@ -51,7 +51,7 @@ var $listNav = $('#list-nav'),
end: false
},
discount: {
order: 0,
order: 1,
reload: true,
page: 0,
end: false
... ...
... ... @@ -144,6 +144,7 @@
padding: 20rem / $pxConvertRem 0;
font-size: 24rem / $pxConvertRem;
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
margin-bottom: 30rem / $pxConvertRem;
> li {
... ... @@ -180,7 +181,7 @@
}
.count {
color: #f00;
color: #7b7b7b;
float: right;
}
... ...
... ... @@ -129,7 +129,7 @@
display: inline;
font-size: 28rem / $pxConvertRem;
vertical-align: middle;
color: #444;
color: #666;
}
.clear-text {
... ...
... ... @@ -56,7 +56,7 @@
}
.edit {
padding-right: pxToRem(20px);
margin-right: pxToRem(20px);
}
}
}
... ...
... ... @@ -28,7 +28,7 @@
{{#if advanceBuy}}
<li class="advance-buy">
<a href="/cart/index/advanceBuy?cartType={{cartType}}">
<span class="iconfont">&#xe61b;</span>
<span class="iconfont">&#xe645;</span>
加价购
<span class="iconfont icon-right-arrow">&#xe614;</span>
<span class="count">{{advanceBuyCount}}</span>
... ...
... ... @@ -70,8 +70,8 @@
<a href="javascript:void(0);">
<span class="nav-txt">折扣</span>
<span class="icon">
<i class="iconfont up">&#xe615;</i>
<i class="iconfont down cur">&#xe616;</i>
<i class="iconfont up cur">&#xe615;</i>
<i class="iconfont down">&#xe616;</i>
</span>
</a>
</li>
... ...
{{> layout/header}}
<div class="new-sale-page product-page yoho-page">
{{# saleList}}
{{# saleBanner}}
<div class="sale-list-banner" style="height: {{bannerHeight}}px;">
<ul style="height: {{bannerHeight}}px;">
{{# list}}
<li class="banner-img" style="background:url({{img}}) no-repeat top center;"></li>
{{/ list}}
</ul>
</div>
{{/ saleBanner}}
{{> sale/sale-banner}}
<div class="center-content clearfix">
{{# saleTitle}}
<div class="header-title">
... ... @@ -31,4 +25,4 @@
</div>
{{/ saleList}}
</div>
{{> layout/footer}}
\ No newline at end of file
{{> layout/footer}}
... ...
... ... @@ -98,7 +98,7 @@
<li class="hide" key="2">
<form class="feed-back-form" action="#">
<div>您对新版还有哪些意见或建议?</div>
<textarea name="answer" id="feedback-answer"></textarea>
<textarea name="answer" id="feedback-answer" class="feedback-answer"></textarea>
<div>
<span class="feed-back-btn button">提交</span>
</div>
... ...
... ... @@ -208,22 +208,24 @@
<div class="senior-sub-wrap">
{{#each seniorChose}}
<div class="senior-sub hide" data-attr="{{attr}}">
{{#if showMulti}}
<span class="multi-select">多选 +</span>
{{/if}}
<ul class="clearfix check-container">
{{#each sub}}
<li class="attr {{#if checked}}checked{{/if}}">
<a href="{{href}}">
<span class="iconfont checkbox" data-id="{{id}}">&#xe613;</span>
<span>{{name}}</span>
</a>
</li>
{{/each}}
</ul>
<div class="btns">
<button class="multi-select-ok dis">确定</button>
<button class="multi-select-cancel">取消</button>
<div class="senior-content">
{{#if showMulti}}
<span class="multi-select">多选 +</span>
{{/if}}
<ul class="clearfix check-container">
{{#each sub}}
<li class="attr {{#if checked}}checked{{/if}}">
<a href="{{href}}">
<span class="iconfont checkbox" data-id="{{id}}">&#xe613;</span>
<span>{{name}}</span>
</a>
</li>
{{/each}}
</ul>
<div class="btns">
<button class="multi-select-ok dis">确定</button>
<button class="multi-select-cancel">取消</button>
</div>
</div>
</div>
{{/each}}
... ...
{{# saleBanner}}
<div class="sale-list-banner" style="height: {{bannerHeight}}px;">
<ul style="height: {{bannerHeight}}px;">
{{# list}}
<li class="banner-img" style="background:url({{img}}) no-repeat top center;"></li>
{{/ list}}
</ul>
</div>
{{/ saleBanner}}
... ...
... ... @@ -486,7 +486,7 @@ function actionGoodsCart() {
}, function() {
$(this).css('background-color', '#fff');
});
}, 'json');
}, 'jsonp');
}
function getText(obj) {
... ... @@ -535,13 +535,11 @@ function actionGoodsCart() {
var params = '';
if (typeof (domain) === undefined || domain === '') {
console.log('请设置请求的api地址');
return false;
}
params = $.extend(defaults, options);
params.page = params.page || 1;
if (params.method === '') {
console.log('请设置请求的URL');
return false;
}
try {
... ... @@ -1082,7 +1080,8 @@ function actionTipPic() {
function closeCover(){
function closeCover() {
var $cover = $('#cover');
$cover.remove();
... ... @@ -1093,58 +1092,97 @@ function closeCover(){
*/
function actionCover() {
var gender = cookieMap._Gender;
var newMask = '';
var windowheight = '';
var selfheight = '';
var containertop;
var length = '';
setCookie('_Channel','boys',{path : '/',domain : '.yohobuy.com',expires : 7});
if(typeof gender == 'undefined' || gender == '' || gender == null){
$.get('http://www.yohobuy.com/index/guide', function(data){
var newMask = document.createElement("div");
window.setCookie('_Channel', 'boys', {
path: '/',
domain: '.yohobuy.com',
expires: 7
});
if (typeof gender === 'undefined' || gender === '' || gender === null) {
$.get('http://www.yohobuy.com/index/guide', function(data) {
newMask = document.createElement('div');
newMask.id = 'cover';
newMask.innerHTML=data;
newMask.innerHTML = data;
document.body.appendChild(newMask);
var window_height = $(window).height();
var self_height = $('.guide-box').height();
var container_top = window_height / 2 - self_height / 2;
var length=$('.guide-box .clear').find("li").length;
windowheight = $(window).height();
selfheight = $('.guide-box').height();
containertop = windowheight / 2 - selfheight / 2;
length = $('.guide-box .clear').find('li').length;
$('.guide-box').css({
width: (200 * length) + 'px',
top: container_top + 'px'
top: containertop + 'px'
});
$('#cover').bind('click', function(event){
setCookie('_Gender','1,3',{path : '/',domain : '.yohobuy.com',expires : 90});
setCookie('_Channel','boys',{path : '/',domain : '.yohobuy.com',expires : 7});
closeCover();
$('#cover').bind('click', function(event) {
window.setCookie('_Gender', '1,3', {
path: '/',
domain: '.yohobuy.com',
expires: 90
});
window.setCookie('_Channel', 'boys', {
path: '/',
domain: '.yohobuy.com',
expires: 7
});
closeCover();
});
$('#cover .guide-box .close').bind('click', function(event){
getSource('弹窗','CLOSE','homepage_man');
setCookie('_Gender','1,3',{path : '/',domain : '.yohobuy.com',expires : 90});
setCookie('_Channel','boys',{path : '/',domain : '.yohobuy.com',expires : 7});
analy('guide_close');
closeCover();
$('#cover .guide-box .close').bind('click', function(event) {
getSource('弹窗', 'CLOSE', 'homepage_man');
window.setCookie('_Gender', '1,3', {
path: '/',
domain: '.yohobuy.com',
expires: 90
});
window.setCookie('_Channel', 'boys', {
path: '/',
domain: '.yohobuy.com',
expires: 7
});
closeCover();
});
$('.boys img , .boys .go').bind('click', function(event){
getSource('弹窗','BOYS','homepage_man');
setCookie('_Gender','1,3',{path : '/',domain : '.yohobuy.com',expires : 90});
setCookie('_Channel','boys',{path : '/',domain : '.yohobuy.com',expires : 7});
analy( 'guide_boys');
closeCover();
$('.boys img , .boys .go').bind('click', function(event) {
getSource('弹窗', 'BOYS', 'homepage_man');
window.setCookie('_Gender', '1,3', {
path: '/',
domain: '.yohobuy.com',
expires: 90
});
window.setCookie('_Channel', 'boys', {
path: '/',
domain: '.yohobuy.com',
expires: 7
});
closeCover();
});
$('.girls img, .girls .go').bind('click', function(event){
getSource('弹窗','GIRLS','homepage_woman');
setCookie('_Gender','2,3',{path : '/',domain : '.yohobuy.com',expires : 90});
setCookie('_Channel','girls',{path : '/',domain : '.yohobuy.com',expires : 7});
analy( 'guide_girls');
$('.girls img, .girls .go').bind('click', function(event) {
getSource('弹窗', 'GIRLS', 'homepage_woman');
window.setCookie('_Gender', '2,3', {
path: '/',
domain: '.yohobuy.com',
expires: 90
});
window.setCookie('_Channel', 'girls', {
path: '/',
domain: '.yohobuy.com',
expires: 7
});
});
$('.lifestyle img, .lifestyle .go').bind('click', function(event){
setCookie('_Channel','lifestyle',{path : '/',domain : '.yohobuy.com',expires : 7});
getSource('弹窗','LIEFSTYLE','homepage_lifestyle');
analy( 'guide_lifestyle');
$('.lifestyle img, .lifestyle .go').bind('click', function(event) {
window.setCookie('_Channel', 'lifestyle', {
path: '/',
domain: '.yohobuy.com',
expires: 7
});
getSource('弹窗', 'LIEFSTYLE', 'homepage_lifestyle');
});
//防止冒泡事件
$('#cover .guide-box').bind('click', function(event){
$('#cover .guide-box').bind('click', function(event) {
event.stopPropagation();
});
});
});
}
}
/**
... ... @@ -1774,8 +1812,7 @@ function init() {
actionCover(); //初次登录弹框
}
init();
init();
});
define("js/product/entry", ["jquery","handlebars","source-map","lazyload"], function(require, exports, module){
/**
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
... ... @@ -8,8 +8,6 @@ var $ = require('yoho.jquery');
var $returnTop = $('.return-top');
var apiDomain;
/**
* 订阅
* @return {[type]} [description]
... ... @@ -19,41 +17,36 @@ function actionSubscription() {
$subscriberBtn = $('#subscriber-btn'),
emailReg = /^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/;
var subscribeParam = {
method: 'open.subscriber.subscriber',
v: 1,
return_type: 'jsonp',
open_key: '12345'
};
var iconCode = {
mail: '&#xe61b;',
tick: '&#xe61a'
};
var email = $.trim($subscriberBox.val());
var params = {};
$subscriberBox.focus(function() {
$(this).val('').css('color', '');
$subscriberBtn.removeClass('done').html(iconCode.mail);
});
$subscriberBtn.click(function() {
var email = $.trim($subscriberBox.val());
if (email !== '' && emailReg.test(email)) {
$.extend(params, subscribeParam, {
email: email,
tmp: Math.random(),
uid: $.uid('_UID')
});
try {
$.getJSON('http://test.open.yohobuy.com' + '/?callback=?', params, function(data) {
if (data.data.result === 1) {
$subscriberBox.val('已订阅到:' + email);
$subscriberBtn.addClass('done').html(iconCode.tick);
} else {
$subscriberBox.css('color', 'red');
$.ajax({
url: 'http://www.yohobuy.com/common/emailsubscriber',
dataType: 'jsonp',
data: {
email: email,
tmp: Math.random(),
uid: window.getUid()
},
success: function(data) {
if (data.data.result === 1) {
$subscriberBox.val('已订阅到:' + email);
$subscriberBtn.addClass('done').html(iconCode.tick);
} else {
$subscriberBox.css('color', 'red');
}
}
});
} catch (e) {
... ... @@ -90,7 +83,6 @@ function actionhomeFootChange() {
var $this = $(this),
$li = $this.closest('li'),
index = $li.index(),
params = {},
_solution = [];
var _answer = $li.find('.feedback-answer').val(),
... ... @@ -101,28 +93,30 @@ function actionhomeFootChange() {
_solution.push($(this).val());
});
params = {
method: 'open.feedback.submit',
feedback: _feedback || 0,
question: _question || 0,
answer: _answer || '',
solution: _solution.join(',')
};
$.getData(apiDomain, params, function(data) {
var next = index + 1;
if (data.result === 1) {
if (index === count - 1) {
alert('感谢您的参与!');
return;
}
$.ajax({
url: 'http://www.yohobuy.com/common/suggestfeedback',
dataType: 'jsonp',
data: {
feedback_id: _feedback || 0,
question_id: _question || 0,
answer: _answer || '',
solution: _solution.join(',')
},
success: function(data) {
var next = index + 1;
if (~~data.data.result === 1) {
if (index === count - 1) {
alert('感谢您的参与!');
return;
}
$li.addClass('hide');
$li.addClass('hide');
$vote.eq(index + 1).removeClass('hide');
$feedBackPage.children('.cur').removeClass('cur');
$feedBackPage.eq(next).addClass('cur');
$vote.children(':eq(' + (index + 1) + ')').removeClass('hide');
$feedBackPage.children('.cur').removeClass('cur');
$feedBackPage.children(':eq(' + next + ')').addClass('cur');
}
}
});
});
... ...
... ... @@ -14,11 +14,10 @@ var $sc = $('#send-captcha'),
itime;
$sc.click(function() {
$.post('/passport/register/authcode', {
$.post('/passport/back/sendbackmobile', {
mobile: $('#mobile').val(),
area: $('#area').val(),
captcha: $('#captchaPic').val(),
project: 'repassword'
verifyCode: $('#captchaPic').val(),
}, function(jsonData) {
if (jsonData.code === 200) {
$errTip.hide();
... ...
... ... @@ -293,7 +293,6 @@
.senior {
padding-bottom: 6px;
padding-right: 0;
.attr-content {
position: relative;
... ... @@ -306,6 +305,8 @@
.senior-attr-wrap > .attr:hover,
.senior-attr-wrap > .attr.hover {
font-weight: bold;
> .iconfont {
visibility: hidden;
}
... ... @@ -318,13 +319,13 @@
.senior-sub {
box-sizing: border-box;
position: absolute;
padding: 15px 0 15px 91px;
padding: 0 15px 15px 91px;
left: -91px;
right: -1px;
right: -16px;
top: 39px;
background: #fff;
border: 1px solid #dfdfdf;
border-top-color: #eaeceb;
border-top: 0;
z-index: 2;
ul {
... ... @@ -342,6 +343,11 @@
}
}
.senior-content {
padding-top: 15px;
border-top: 1px solid #eaeceb;
}
.senior-up-icon {
position: relative;
width: 100%;
... ...
... ... @@ -217,7 +217,7 @@ class SearchModel
$result = SearchData::getSuggest($query);
if (isset($result['code']) && $result['code'] == 200 && isset($result['suggest']['items']) && !empty($result['suggest']['items'])) {
foreach ($result['suggest']['items'] as $v) {
$data .= '<li><a style="display: block;" href="http://search.yohobuy.com/?query='.$v['item'].'" class="clearfix clear search-item" title="'.$v['item'].'" act="http://search.yohobuy.com/?query='.$v['item'].'"><span class="searchvalue" >'.$v['item'].'</span><span class="valuenum">约'.$v['frequency'].'个商品</span></a></li>';
$data []= '<li><a style="display: block;" href="http://search.yohobuy.com/?query='.$v['item'].'" class="clearfix clear search-item" title="'.$v['item'].'" act="http://search.yohobuy.com/?query='.$v['item'].'"><span class="searchvalue" >'.$v['item'].'</span><span class="valuenum">约'.$v['frequency'].'个商品</span></a></li>';
}
}
return $data;
... ...
... ... @@ -75,6 +75,23 @@ class BackController extends WebAction {
}
/**
* 发送找回手机号短信
*
* @return json
*/
public function sendbackmobileAction()
{
$mobile = $this->post ('mobile', '');
$area = intval ($this->post( 'area', '86' ));
$verifyCode = $this->post ('verifyCode', '');
$data = array('code' => 400, 'message' =>'验证失败');
if(Helpers::verifyMobile($mobile) && PassportModel::verifyCode($verifyCode)) { // 验证手机号
$data = BackData::sendCodeToMobile($mobile, $area);
}
echo $this->echoJson($data);
}
/**
* 发送邮件页面
*/
public function sendemailAction() {
... ... @@ -193,6 +210,7 @@ class BackController extends WebAction {
$area = $this->post ( 'area' );
$verifyCode = $this->post ( 'verifyCode' );
$code = $this->post ( 'code' ); // code
$data = array('code'=> 400, 'message' => '验证码错误!','data' => SITE_MAIN.'/passport/back/index');
if ($this->getSession ( 'mobile' ) == $mobile && $this->getSession ( 'area' ) == $area) {
$result = BackData::validateMobileCode ( $mobile, $code, $area );
if ($result ['code'] == 200) {
... ... @@ -204,12 +222,12 @@ class BackController extends WebAction {
) );
$code = AuthCode::encode ( $str, PassportModel::BACK_FIND_SECRET_KEY );
$url = '/passport/back/backcode?code=' . base64_encode ( $code );
$this->redirect ( SITE_MAIN . $url );
return true;
$data ['code'] = 200;
$data['message'] = '验证成功';
$data['data'] = SITE_MAIN . $url;
}
}
//出错直接跳到找回密码页
$this->redirect ('/passport/back/index');
$this->echoJson($data);
}
/**
... ...
... ... @@ -413,7 +413,32 @@ class Sale1Controller extends WebAction
'saleList' => array(
'saleBanner' => array(
'bannerHeight' => 350,
'img' => 'http://img12.static.yhbimg.com/couponImg/2015/12/10/08/02d4c26f19ca2e44359d69d5cff86167fb.jpg'
'list' => array(
array(
'bannerHeight' => 350,
'img' => 'http://img12.static.yhbimg.com/couponImg/2015/12/10/08/02d4c26f19ca2e44359d69d5cff86167fb.jpg'
),
array(
'bannerHeight' => 350,
'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/06/05/02062366574a01418596caa38a773f6beb.jpg'
),
array(
'bannerHeight' => 350,
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2016/01/06/05/013341a0632177cc3425c3c6082845be57.jpg'
),
array(
'bannerHeight' => 350,
'img' => 'http://img12.static.yhbimg.com/couponImg/2015/12/10/08/02d4c26f19ca2e44359d69d5cff86167fb.jpg'
),
array(
'bannerHeight' => 350,
'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/06/05/02062366574a01418596caa38a773f6beb.jpg'
),
array(
'bannerHeight' => 350,
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2016/01/06/05/013341a0632177cc3425c3c6082845be57.jpg'
)
)
),
'saleTitle' => array(
'name' => '全部商品',
... ... @@ -911,6 +936,7 @@ class Sale1Controller extends WebAction
'pager' => '<a href="" class="cur"><span>1</span></a><a href=""><span>2</span></a><a href="" title="下一页">下一页<span class="iconfont">&gt;</span></a>'
)
);
$this->setWebNavHeader();
$this->_view->display('sale-list', $data);
}
}
... ...
... ... @@ -21,13 +21,21 @@ class SearchController extends WebAction
*/
public function suggestAction()
{
$suggest = '';
$callback = $this->get('callback');
$query = rawurldecode($this->get('query'));
$size = rawurldecode($this->get('size',10));
if (empty($query)) {
$this->helpJsonCallbackResult($callback, 412, '搜索词为空');
}
if ($size > 50) {
$size = 10;
}
if ($query) {
$param['query'] = $query;
$param['size'] = $size;
$suggest = SearchModel::getSuggest($param);
}
echo $suggest;
$this->helpJsonCallbackResult($callback, 200, 'suggest', $suggest);
}
/**
... ...