Authored by hf

modify guang detail page to support app

Showing 91 changed files with 923 additions and 357 deletions
WAP
\ No newline at end of file
PC
\ No newline at end of file
Mobile
\ No newline at end of file
... ...
... ... @@ -18,6 +18,9 @@ class CacheConfig
const KEY_ACTION_GIRLS_INDEX = 'key_action_girls_index'; // 女生首页
const KEY_ACTION_KIDS_INDEX = 'key_action_kids_index'; // 潮童首页
const KEY_ACTION_LIFESTYLE_INDEX = 'key_action_lifestyle_index'; // 创意生活首页
const KEY_ACTION_BOYS_BOTTOM_BANNER = 'key_action_boys_bottom_banner'; // 男生首页底部banner
const KEY_ACTION_GRILS_BOTTOM_BANNER = 'key_action_girls_bottom_banner';// 女生首页底部banner
const KEY_ACTION_GUANG_PLUSSTAR_INDEX = 'key_action_guang_plusstar_index'; // 国际优选
const KEY_ACTION_GUANG_PLUSSTAR_LIST = 'key_action_guang_plusstar_list'; // 明星原创
... ...
... ... @@ -82,6 +82,7 @@ class NewsaleData
*/
public static function selectNewSaleProducts($gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit = null, $limit = 60, $page = 1, $order = 's_t_desc')
{
$selectItems = array(
'gender' => $gender,
'brand' => $brand,
... ...
... ... @@ -9,9 +9,6 @@ use Plugin\Helpers;
*/
class FloorProcess
{
private static $guangUrl = 'http://guang.m.yohobuy.com';
/**
* 频道参数
*
... ... @@ -209,6 +206,7 @@ class FloorProcess
foreach ($data['list'] as &$one) {
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
isset(self::$channel[$type]) && $one['url'] .= '?gender='.self::$channel[$type];
}
$one['img'] = Helpers::getImageUrl($one['src'], 158, 174);
unset($one['src']);
... ...
... ... @@ -82,6 +82,9 @@ class ListProcess
$filters['classify'][] = $build;
}
// 按照指定字段进行排序筛选数据
self::sortArrByField($filters['classify'], 'sort_col');
return $filters;
}
... ... @@ -91,6 +94,7 @@ class ListProcess
$result = array(
'title' => '品牌',
'name' => '所有品牌',
'sort_col' => 1,
'dataType' => 'brand',
'subs' => array(
array(
... ... @@ -120,6 +124,7 @@ class ListProcess
$result = array(
'title' => '颜色',
'name' => '所有颜色',
'sort_col' => 3,
'dataType' => 'color',
'subs' => array(
array(
... ... @@ -146,6 +151,7 @@ class ListProcess
$result = array(
'title' => '折扣',
'name' => '所有商品',
'sort_col' => 6,
'dataType' => 'discount',
'subs' => array(
array(
... ... @@ -172,6 +178,7 @@ class ListProcess
$result = array(
'title' => '性别',
'name' => '所有性别',
'sort_col' => 0,
'dataType' => 'gender',
'subs' => array(
array(
... ... @@ -180,12 +187,12 @@ class ListProcess
'name' => '所有性别'
),
array(
'dataId' => 'boys',
'name' => '男'
'dataId' => '1,3',
'name' => 'BOYS'
),
array(
'dataId' => 'girls',
'name' => '女'
'dataId' => '2,3',
'name' => 'GIRLS'
),
)
);
... ... @@ -198,6 +205,7 @@ class ListProcess
$result = array(
'title' => '品类',
'name' => '所有品类',
'sort_col' => 2,
'dataType' => 'sort',
'subs' => array(
array(
... ... @@ -237,6 +245,7 @@ class ListProcess
$result = array(
'title' => '价格',
'name' => '所有价格',
'sort_col' => 5,
'dataType' => 'price',
'subs' => array(
array(
... ... @@ -263,6 +272,7 @@ class ListProcess
$result = array(
'title' => '尺码',
'name' => '所有尺码',
'sort_col' => 4,
'dataType' => 'size',
'subs' => array(
array(
... ...
... ... @@ -143,6 +143,32 @@ class Helpers
}
/**
* 根据排序类型和类型值获得正确的排序参数
* @param integer $order 类型值
* @param string $type 排序类型
* @return string 转换之后的排序参数
*/
public static function transOrder($order, $type)
{
$result = '';
switch ($type) {
case 'price':
$result = ($order == 0) ? 's_p_desc' : 's_p_asc';
break;
case 'discount':
$result = ($order == 0) ? 'p_d_desc' : 'p_d_asc';
break;
case 'newest':
default:
$result = ($order == 0) ? 's_t_desc' : 's_t_asc';
break;
}
return $result;
}
/**
* 格式化商品信息
*
* @param array $productData 需要格式化的商品数据
... ...
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 Fri Oct 23 16:38:57 2015
Created by FontForge 20120731 at Fri Oct 30 10:27:45 2015
By Ads
</metadata>
<defs>
... ... @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Fri Oct 23 16:38:57 2015
bbox="-0.75 -224 3943 812.871"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E628"
unicode-range="U+0078-E62D"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
... ... @@ -152,5 +152,19 @@ d="M866.5 663.5q-97.5 97.5 -228 132t-261.5 0t-228.5 -132t-132 -228.5t0 -261.5t13
<glyph glyph-name="uniE628" unicode="&#xe628;"
d="M505 776q77 0 148.5 -23.5t129 -67t101 -101.5t67.5 -129.5t24 -147.5q0 -64 -17 -125t-47.5 -112t-74 -94.5t-94.5 -74t-112 -47.5t-125 -17q-95 0 -182 37.5t-150 100.5t-100 150t-37 182t37 182t100 150t150 100t182 37zM505 -104q112 0 206.5 55t149.5 149.5
t55 206.5q0 37 -6.5 73.5t-19.5 69.5t-30.5 64t-40.5 57.5t-49.5 49.5t-57.5 40.5t-64 30t-69.5 19t-73.5 6.5q-111 0 -205.5 -55t-149.5 -149.5t-55 -206t55 -206t149.5 -149.5t205.5 -55zM528 138v-59h-58v59h58zM470 564h58v-349h-58v349z" />
<glyph glyph-name="uniE629" unicode="&#xe629;"
d="M442 274h-84v-76h-230v76h-81q-20 0 -33.5 -12.5t-13.5 -31.5v-395q0 -20 13.5 -33.5t33.5 -13.5h395q19 0 31.5 13.5t12.5 33.5v395q0 13 -5.5 23t-15.5 15.5t-23 5.5zM977 812h-81v-77h-230v77h-84q-10 0 -18 -3.5t-14 -10t-9 -15t-3 -18.5v-395q0 -13 5.5 -23
t15.5 -15.5t23 -5.5h395q20 0 33.5 12.5t13.5 31.5v395q0 20 -13.5 33.5t-33.5 13.5zM977 274h-81v-76h-230v76h-84q-13 0 -23 -5.5t-15.5 -15.5t-5.5 -23v-395q0 -13 5.5 -23.5t15.5 -17t23 -6.5h395q20 0 33.5 13.5t13.5 33.5v395q0 19 -13.5 31.5t-33.5 12.5z" />
<glyph glyph-name="uniE62A" unicode="&#xe62a;"
d="M497 806l-451 -386q-6 -6 -11 -13t-7 -15t-2 -17v-500q0 -32 22.5 -54.5t53.5 -22.5h256v333h308v-333h256q31 0 53.5 22.5t22.5 54.5v500q0 27 -20 45l-451 386q-15 13 -30 0z" />
<glyph glyph-name="uniE62B" unicode="&#xe62b;"
d="M761 539q0 -104 -73 -177t-177 -73q-51 0 -97 19.5t-79.5 53t-53.5 80t-20 97.5q0 104 73.5 177t177 73t176.5 -73t73 -177zM888 -164q11 22 9 48q-3 43 -15 83.5t-32 76t-46.5 66.5t-59.5 55t-69.5 42t-78.5 27t-85 9q-100 0 -186.5 -47.5t-139.5 -130t-60 -181.5
q-1 -26 10 -48q5 -12 16 -18.5t24 -6.5h673q12 0 23 6.5t17 18.5z" />
<glyph glyph-name="uniE62C" unicode="&#xe62c;" horiz-adv-x="1048"
d="M832 -127q0 -23 -11.5 -42.5t-31 -31t-43 -11.5t-43 11.5t-31 31t-11.5 42.5q0 36 25 61t60.5 25t60.5 -25t25 -61zM533 -126.5q0 -35.5 -25 -60.5t-60 -25t-60 25t-25 60.5t25 60.5t60 25t60 -25t25 -60.5zM277 620l-35 159q-3 14 -15 23.5t-27 9.5h-147
q-22 0 -37.5 -15.5t-15.5 -37.5t15.5 -38t37.5 -16h54l157 -627q3 -12 9.5 -22.5t16 -17.5t21 -11t23.5 -4h527q16 0 30.5 7t25 19.5t14.5 28.5l113 452q9 34 -13 62t-57 28h-697z" />
<glyph glyph-name="uniE62D" unicode="&#xe62d;"
d="M442 274h-84v-76h-230v76h-81q-20 0 -33.5 -12.5t-13.5 -31.5v-395q0 -20 13.5 -33.5t33.5 -13.5h395q19 0 31.5 13.5t12.5 33.5v395q0 13 -5.5 23t-15.5 15.5t-23 5.5zM977 812h-81v-77h-230v77h-84q-10 0 -18 -3.5t-14 -10t-9 -15t-3 -18.5v-395q0 -13 5.5 -23
t15.5 -15.5t23 -5.5h395q20 0 33.5 12.5t13.5 31.5v395q0 20 -13.5 33.5t-33.5 13.5zM977 274h-81v-76h-230v76h-84q-13 0 -23 -5.5t-15.5 -15.5t-5.5 -23v-395q0 -13 5.5 -23.5t15.5 -17t23 -6.5h395q20 0 33.5 13.5t13.5 33.5v395q0 19 -13.5 31.5t-33.5 12.5z" />
</font>
</defs></svg>
... ...
No preview for this file type
No preview for this file type
... ... @@ -4,9 +4,9 @@
* @date: 2015/10/23
*/
var $ = require('yoho.zepto'),
var $ = require('jquery'),
Swiper = require('yoho.iswiper'),
lazyLoad = require('yoho.zeptolazyload');
lazyLoad = require('yoho.lazyload');
var swiper,
$brandList = $('.brand-list');
... ...
... ... @@ -4,19 +4,24 @@
* @date: 2015/10/14
*/
var $ = require('yoho.zepto');
var $ = require('jquery'),
Hammer = require('hammer');
var $nav = $('.category-nav'),
$contents = $('.category-container > .content');
$categoryContainer = $('.category-container'),
$contents = $categoryContainer.children('.content');
var $curContent = $contents.not('.hide');
var navHammer, ccHammer;
$('#search-input').focus(function() {
$(this).blur();
});
$nav.delegate('li', 'tap', function() {
var $this = $(this),
navHammer = new Hammer($nav[0]);
navHammer.on('tap', function(e) {
var $this = $(e.target).closest('li'),
index = $this.index();
if ($this.hasClass('focus')) {
... ... @@ -30,19 +35,25 @@ $nav.delegate('li', 'tap', function() {
$curContent = $contents.eq(index).removeClass('hide');
});
$('.primary-level').delegate('li', 'tap', function() {
var $this = $(this),
index = $this.index();
ccHammer = new Hammer($categoryContainer[0]);
ccHammer.on('tap', function(e) {
var $this = $(e.target),
$subLevel,
$cur, index;
var $subLevel = $this.closest('.content').find('.sub-level');
$cur = $this.closest('.p-level-item');
if ($cur.length > 0) {
index = $cur.index();
$subLevel = $this.closest('.content').find('.sub-level');
if ($this.hasClass('focus')) {
return;
}
if ($this.hasClass('focus')) {
return;
}
$this.closest('.primary-level').children('.focus').removeClass('focus');
$this.addClass('focus');
$this.closest('.primary-level').children('.focus').removeClass('focus');
$this.addClass('focus');
$subLevel.not('.hide').addClass('hide');
$subLevel.eq(index).removeClass('hide');
$subLevel.not('.hide').addClass('hide');
$subLevel.eq(index).removeClass('hide');
}
});
\ No newline at end of file
... ...
... ... @@ -3,7 +3,7 @@
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/21
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
function cookie(name) {
var cookies = document.cookie,
... ...
... ... @@ -4,9 +4,9 @@
* @date: 2015/10/13
*/
var $ = require('yoho.zepto'),
var $ = require('jquery'),
ellipsis = require('mlellipsis'),
lazyLoad = require('yoho.zeptolazyload'),
lazyLoad = require('yoho.lazyload'),
IScroll = require('iscroll/iscroll-probe');
var $authorIntro = $('.author .intro');
... ... @@ -27,6 +27,8 @@ var winW = $(window).width();
var myScroll;
require('../plugin/wx-share')();
/**
* 计算搭配的箭头的位置
* @param $curPos 当前focus的搭配项
... ...
... ... @@ -4,7 +4,8 @@
* @date: 2015/10/10
*/
var $ = require('yoho.zepto'),
var $ = require('jquery'),
Hammer = require('hammer'),
Swiper = require('yoho.iswiper');
var info = require('./info'),
... ... @@ -25,7 +26,7 @@ var $infoList = $('#info-list'),
var state = {};
var mySwiper;
var mySwiper, navHammer;
if ($loadMoreInfo.length > 0) {
$loading = $loadMoreInfo.children('.loading');
... ... @@ -48,7 +49,7 @@ info.initInfosEvt($infoList);
focus = $(this).hasClass('focus');
state[type] = {
page: focus ? 1 : 0,
page: focus ? 2 : 1,
gender: gender,
type: type,
end: false
... ... @@ -56,8 +57,9 @@ info.initInfosEvt($infoList);
});
}());
$nav.delegate('.guang-nav-item', 'tap', function() {
var $this = $(this),
navHammer = new Hammer($nav[0]);
navHammer.on('tap', function(e) {
var $this = $(e.target).closest('.guang-nav-item'),
$content,
index;
... ... @@ -80,7 +82,7 @@ $nav.delegate('.guang-nav-item', 'tap', function() {
curType = $this.data('type');
//当未加载数据时去请求数据
if (state[curType].page === 0) {
if (state[curType].page === 1) {
loadMore($content, state[curType]);
}
... ... @@ -96,6 +98,6 @@ $nav.delegate('.guang-nav-item', 'tap', function() {
$(document).scroll(function() {
if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH) {
loadMore($infos.not('hide'), state[curType]);
loadMore($infos.not('.hide'), state[curType]);
}
});
\ No newline at end of file
... ...
... ... @@ -4,9 +4,10 @@
* @date: 2015/10/10
*/
var $ = require('yoho.zepto'),
var $ = require('jquery'),
Hammer = require('hammer'),
ellipsis = require('mlellipsis'),
lazyLoad = require('yoho.zeptolazyload');
lazyLoad = require('yoho.lazyload');
var tip = require('../plugin/tip');
var loading = require('../plugin/loading');
... ... @@ -46,36 +47,43 @@ function setLazyLoadAndMellipsis($infos) {
* @params $container 逛资讯列表容器
*/
function initInfosEvt($container) {
$container.delegate('.like-btn', 'tap', function(e) {
var $likeBtn = $(e.currentTarget),
$info = $likeBtn.closest('.guang-info'),
opt = 'ok';
if ($likeBtn.hasClass('like')) {
opt = 'cancel';
}
var cHammer = new Hammer($container[0]);
cHammer.on('tap', function(e) {
var $this = $(e.target),
opt = 'ok',
$likeBtn,
$info;
$likeBtn = $this.closest('.like-btn');
if ($likeBtn.length > 0) {
if ($likeBtn.hasClass('like')) {
opt = 'cancel';
}
$.ajax({
type: 'POST',
url: '/guang/opt/praiseArticle',
data: {
id: $info.data('id'),
opt: opt
},
success: function(data) {
var code = data.code;
if (code === 200) {
$likeBtn.next('.like-count').text(data.data);
//切换点赞状态
$likeBtn.toggleClass('like');
$info = $this.closest('.guang-info');
$.ajax({
type: 'POST',
url: '/guang/opt/praiseArticle',
data: {
id: $info.data('id'),
opt: opt
},
success: function(data) {
var code = data.code;
if (code === 200) {
$likeBtn.next('.like-count').text(data.data);
//切换点赞状态
$likeBtn.toggleClass('like');
}
},
error: function() {
tip.show('网络断开连接了~');
}
},
error: function() {
tip.show('网络断开连接了~');
}
});
});
}
});
setLazyLoadAndMellipsis($container.find('.guang-info'));
... ... @@ -85,6 +93,8 @@ function initInfosEvt($container) {
* 资讯LoadMore
*/
function loadMore($container, opt) {
var num;
if (searching) {
return;
}
... ... @@ -93,18 +103,21 @@ function loadMore($container, opt) {
return;
}
if (opt.page === 0) {
if (opt.page === 1) {
//显示loading
loading.showLoadingMask();
}
num = $container.find('.guang-info').length;
searching = true;
$.ajax({
type: 'GET',
url: ' /guang/index/page',
data: opt,
success: function(data) {
var $newItems;
if (data === ' ') {
opt.end = true;
searching = false;
... ... @@ -117,9 +130,15 @@ function loadMore($container, opt) {
}
$container.append(data);
setLazyLoadAndMellipsis($container.find('.guang-info'));
if (num > 0) {
$newItems = $container.find('.guang-info:gt(' + (num - 1) + ')');
} else {
$newItems = $container.find('.guang-info');
}
setLazyLoadAndMellipsis($newItems);
if (opt.page === 0) {
if (opt.page === 1) {
loading.hideLoadingMask();
}
... ...
... ... @@ -4,7 +4,7 @@
* @date: 2015/10/10
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
var info = require('./info'),
loadMore = info.loadMore;
... ...
... ... @@ -4,9 +4,10 @@
* @date: 2015/10/10
*/
var $ = require('yoho.zepto'),
var $ = require('jquery'),
Hammer = require('hammer'),
ellipsis = require('mlellipsis'),
lazyLoad = require('yoho.zeptolazyload');
lazyLoad = require('yoho.lazyload');
var $intro = $('#intro'),
$imt = $('#intro-more-txt'),
... ... @@ -20,6 +21,8 @@ var brandId = $('#brand-info').data('id');
var mIntro, aIntro;
var moreHammer, likeHammer;
ellipsis.init();
//Init LazyLoad
... ... @@ -37,8 +40,9 @@ setTimeout(function() {
info.initInfosEvt($infosContainer);
//文字介绍收起与展开
$('#more-intro').bind('tap', function() {
var $this = $(this);
moreHammer = new Hammer(document.getElementById('more-intro'));
moreHammer.on('tap', function(e) {
var $this = $(e.target).closest('#more-intro');
$this.toggleClass('spread');
... ... @@ -52,13 +56,18 @@ $('#more-intro').bind('tap', function() {
//隐藏
$intro.text(mIntro);
$imt.text('more');
$(window).scrollTop(0, 400); //滑动到顶部
}
e.preventDefault(); //防止收缩后误点到商品产生跳转
});
//品牌收藏
$('#brand-like').bind('tap', function(e) {
likeHammer = new Hammer(document.getElementById('brand-like'));
likeHammer.on('tap', function(e) {
var opt = 'ok',
$this = $(this);
$this = $(e.target);
e.preventDefault();
... ... @@ -78,6 +87,8 @@ $('#brand-like').bind('tap', function(e) {
$this.toggleClass('like');
} else if (data.code === 400) {
tip.show('未登录');
} else {
tip.show(data.message);
}
},
error: function() {
... ...
... ... @@ -4,14 +4,15 @@
* @date: 2015/10/10
*/
var $ = require('yoho.zepto'),
lazyLoad = require('yoho.zeptolazyload'),
var $ = require('jquery'),
Hammer = require('hammer'),
lazyLoad = require('yoho.lazyload'),
Swiper = require('yoho.iswiper');
var $navs = $('#nav-tab > li'),
$contents = $('#ps-content > .content');
var mySwiper;
var mySwiper, navHammer;
lazyLoad($('img.lazy'));
... ... @@ -20,8 +21,11 @@ mySwiper = new Swiper('.swiper-container', {
pagination: '.swiper-pagination'
});
$('#nav-tab').delegate('li', 'tap', function() {
if ($(this).hasClass('focus')) {
navHammer = new Hammer(document.getElementById('nav-tab'));
navHammer.on('tap', function(e) {
var $this = $(e.target).closest('li');
if ($this.hasClass('focus')) {
return;
}
... ...
... ... @@ -3,9 +3,9 @@
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
* @date: 2015/10/12
*/
var $ = require('yoho.zepto'),
var $ = require('jquery'),
Swiper = require('yoho.iswiper'),
lazyLoad = require('yoho.zeptolazyload'),
lazyLoad = require('yoho.lazyload'),
bannerSwiper,
recommendSwiper,
hotBrandsSwiper,
... ... @@ -31,7 +31,7 @@ lazyLoad($('img.lazy'));
$('.nav-btn').on('tap', function (event) {
if (!$(this).hasClass('menu-open')) {
$('.mobile-wrap').addClass('menu-open');
$('.overlay').addClass('show');
$('.overlay').show().css('opacity', 0.3);
$('.side-nav').addClass('on');
//设置boy高宽,页面不能上下滑动
... ... @@ -48,13 +48,16 @@ $('.nav-btn').on('tap', function (event) {
$('.mobile-wrap').on('tap', function () {
if ($(this).hasClass('menu-open')) {
$('.mobile-wrap').removeClass('menu-open');
$('.overlay').removeClass('show');
$('.overlay').css('opacity', 0);
$('.sub-nav').removeClass('show');
$('.side-nav').removeClass('on');
$('body').css({
height: 'auto',
overflow: 'auto'
});
setTimeout(function() {
$('.overlay').hide();
}, 300);
}
});
... ... @@ -139,12 +142,6 @@ $('.category-swiper').each(function (i, index) {
}
});
//关闭头部下载浮层
$('.header-download').on('tap', '.close-btn', function () {
$(this).parent().remove();
});
//logo动画
requestFrame = (function () {
var tempFunc = null,
... ... @@ -197,5 +194,4 @@ function tsAnimate() {
}
}
tsAnimate();
setTimeout(tsAnimate, 3000);
... ...
... ... @@ -4,16 +4,16 @@
* @date: 2015/10/12
*/
var $ = require('yoho.zepto'),
var $ = require('jquery'),
tip = require('../plugin/tip'),
lazyLoad = require('yoho.zeptolazyload');
lazyLoad = require('yoho.lazyload');
var winH = $(window).height(),
loadMoreH = $('#load-more').height(),
$goodList = $('#goods-list'),
loading = false,
page = 0,
gender = $('.mobile-wrap').hasClass('boys-wrap') ? '1,3' : '2,3',
gender = null,
kidsType = $('.mobile-wrap').hasClass('kids-wrap') ? true : false,
lifestyleType = $('.mobile-wrap').hasClass('lifestyle-wrap') ? true : false,
num,
... ... @@ -29,6 +29,7 @@ if (kidsType) {
} else if (lifestyleType) {
url = '/product/recom/maylikelife';
} else {
gender = $('.mobile-wrap').hasClass('boys-wrap') ? '1,3' : '2,3',
url = '/product/recom/maylike?gender=' + gender;
}
... ... @@ -75,6 +76,25 @@ $(window).scroll(function () {
success: function(data) {
if (data === ' ') {
loading = true;
if (gender) {
if (gender === '1,3') {
url = '/boys/bottomBanner';
} else {
url = '/girls/bottomBanner';
}
$.ajax({
type: 'GET',
url: url,
success: function(data) {
$('#load-more-img').show();
$('#load-more-img a').attr('url', data[0].banner[0].url);
$('#load-more-img a > img').attr('src', data[0].banner[0].img);
},
error: function() {
}
});
}
return;
}
$goodList.append(data);
... ...
/**
* 频道选择
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
* @date: 2015/10/12
*/
... ... @@ -5,5 +5,4 @@
*/
require('./search');
require('./channel');
require('./footer');
\ No newline at end of file
... ...
... ... @@ -4,7 +4,7 @@
* @date: 2015/10/26
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
var $searchBox = $('.search-box'),
$indexSearch = $('.index-search'),
... ...
... ... @@ -4,7 +4,8 @@
* @date: 2015/10/19
*/
var $ = require('yoho.zepto');
var $ = require('jquery'),
Hammer = require('hammer');
var $input = $('#search-input input');
... ... @@ -20,13 +21,16 @@ var writeSearch = require('./write-search');
var ranToken = writeSearch.getRanToken();
$clearHistory.bind('tap', function() {
var chHammer, cHammer;
chHammer = new Hammer($clearHistory[0]);
chHammer.on('tap', function() {
localStorage.removeItem('historys');
$history.html('');
});
$input.bind('input', function() {
$input.on('input', function() {
if ($input.val() === '') {
$clear.addClass('hide');
} else {
... ... @@ -34,7 +38,8 @@ $input.bind('input', function() {
}
});
$clear.bind('tap', function() {
cHammer = new Hammer($clear[0]);
cHammer.on('tap', function() {
$input.val('').trigger('input');
});
... ...
... ... @@ -3,7 +3,7 @@
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/8
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
var trim = $.trim;
... ... @@ -40,7 +40,7 @@ function bindEyesEvt(opt) {
}
$eye = $hasEye.children('.eye');
$eye.on('tap', function(e) {
$eye.on('touchstart', function(e) {
var $this = $(this),
$pwd = $this.siblings('.pwd');
... ... @@ -65,7 +65,7 @@ function bindClearEvt() {
$hasClear.append('<div class="clear-input"></div>');
$clear = $hasClear.children('.clear-input');
$clear.on('tap', function(e) {
$clear.on('touchstart', function(e) {
var $input = $clear.siblings('.input');
$input.val('').trigger('input').focus();
... ...
... ... @@ -4,14 +4,14 @@
* @date: 2015/10/8
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
var $resend = $('#resend');
var tip = require('../../plugin/tip'),
showErrTip = tip.show;
$resend.on('tap', function(e) {
$resend.on('touchstart', function(e) {
e.preventDefault();
$.ajax({
... ...
... ... @@ -3,7 +3,7 @@
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/8
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
var $email = $('#email'),
$btnSure = $('#btn-sure');
... ... @@ -24,7 +24,7 @@ $email.bind('input', function() {
}
});
$btnSure.on('tap', function() {
$btnSure.on('touchstart', function() {
var email = trim($email.val());
if ($btnSure.hasClass('disable')) {
... ...
... ... @@ -3,7 +3,7 @@
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/8
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
var $phoneNum = $('#phone-num'),
$countrySelect = $('#country-select'),
... ... @@ -32,7 +32,7 @@ $countrySelect.change(function() {
$areaCode.text($countrySelect.val());
});
$btnNext.on('tap', function() {
$btnNext.on('touchstart', function() {
var pn = trim($phoneNum.val()),
area = $countrySelect.val();
... ...
... ... @@ -3,7 +3,7 @@
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/8
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
var $pwd = $('#pwd'),
$btnOk = $('#btn-ok');
... ... @@ -26,7 +26,7 @@ $pwd.bind('input', function() {
}
});
$btnOk.on('tap', function() {
$btnOk.on('touchstart', function() {
var pwd = trim($pwd.val()),
mobileBack = true,
setting,
... ...
... ... @@ -3,7 +3,7 @@
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/8
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
module.exports = function(useInRegister) {
var $captcha = $('#captcha'),
... ... @@ -45,7 +45,7 @@ module.exports = function(useInRegister) {
});
//重新发送验证码
$captchaTip.on('tap', function() {
$captchaTip.on('touchstart', function() {
if ($captchaTip.hasClass('disable')) {
return;
}
... ... @@ -70,7 +70,7 @@ module.exports = function(useInRegister) {
});
});
$btnNext.on('tap', function() {
$btnNext.on('touchstart', function() {
if ($btnNext.hasClass('disable')) {
return;
}
... ...
... ... @@ -3,7 +3,7 @@
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/8
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
var $phoneNum = $('#phone-num'),
$countrySelect = $('#country-select'),
... ... @@ -64,7 +64,7 @@ $countrySelect.change(function() {
$areaCode.text($countrySelect.val());
});
$loginBtn.on('tap', function() {
$loginBtn.on('touchstart', function() {
var pn = trim($phoneNum.val()),
areaCode = $countrySelect.val(),
pwd = trim($pwd.val());
... ...
... ... @@ -3,7 +3,7 @@
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/9/30
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
var $account = $('#account'),
$pwd = $('#pwd'),
... ... @@ -68,7 +68,7 @@ $pwd.bind('input', function() {
// Login
$loginBtn.on('tap', function() {
$loginBtn.on('touchstart', function() {
var acc = trim($account.val()),
pwd = trim($pwd.val());
... ... @@ -107,15 +107,15 @@ $loginBtn.on('tap', function() {
});
$('#forget-pwd').on('tap', function() {
$('#forget-pwd').on('touchstart', function() {
showRetrivePanel();
});
$mask.on('tap', function() {
$mask.on('touchstart', function() {
hideRetrivePanel();
});
$('#cancel-retrive').on('tap', function(e) {
$('#cancel-retrive').on('touchstart', function(e) {
e.preventDefault();
hideRetrivePanel();
});
... ...
... ... @@ -3,7 +3,7 @@
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/8
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
var $pwd = $('#pwd'),
$btnSure = $('#btn-sure');
... ... @@ -26,7 +26,7 @@ $pwd.bind('input', function() {
}
});
$btnSure.on('tap', function() {
$btnSure.on('touchstart', function() {
var pwd = trim($pwd.val());
if ($btnSure.hasClass('disable')) {
... ...
... ... @@ -3,7 +3,7 @@
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/8
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
var $phoneNum = $('#phone-num'),
$countrySelect = $('#country-select'),
... ... @@ -32,7 +32,7 @@ $countrySelect.change(function() {
$areaCode.text($countrySelect.val());
});
$btnNext.on('tap', function() {
$btnNext.on('touchstart', function() {
var pn = trim($phoneNum.val()),
areaCode = $countrySelect.val();
... ...
... ... @@ -5,14 +5,12 @@
* @date: 2015/10/19
*/
var $ = require('yoho.zepto');
var $ = require('jquery'),
Hammer = require('hammer');
var $filter = $('.filter-mask');
var $filter;
var $classify = $filter.find('.classify'),
$subClassify = $filter.find('.sub-classify');
var cbFn;
var fCbFn, hCbFn; //筛选和关闭的回调
//隐藏筛选界面
function hideFilter() {
... ... @@ -24,20 +22,7 @@ function showFilter() {
$filter.removeClass('hide');
}
//注册sub-classify点击后的回调
function registerCbFn(cb) {
cbFn = cb;
}
//设置完高度后显示sub并设置选中
$classify.children(':first-child').addClass('active'); //T:不在HTML中使用{{#if @first}}active{{/if}}来初始化active为避免sub设置高度时的闪烁
//classify switch
$classify.delegate('.classify-item', 'tap', function(e) {
var $this = $(this);
e.stopPropagation();
function classifyTapEvt($this) {
if ($this.hasClass('active')) {
return;
}
... ... @@ -45,16 +30,10 @@ $classify.delegate('.classify-item', 'tap', function(e) {
$this.siblings('.active').removeClass('active');
$this.addClass('active');
});
//点击Mask隐藏筛选界面
$filter.tap(function() {
hideFilter();
});
}
$subClassify.delegate('li', 'tap', function(e) {
var $this = $(this),
id = $this.data('id');
function subClassifyTapEvt($this) {
var id = $this.data('id');
var $sub = $this.closest('.sub-classify');
... ... @@ -62,8 +41,6 @@ $subClassify.delegate('li', 'tap', function(e) {
var html, shower;
e.stopPropagation();
if ($this.hasClass('chosed')) {
return;
}
... ... @@ -86,19 +63,64 @@ $subClassify.delegate('li', 'tap', function(e) {
$shower.removeClass('default');
}
if (cbFn) {
cbFn({
if (fCbFn) {
fCbFn({
type: $sub.data('type'),
id: id
});
}
hideFilter();
});
}
//初始化筛选
function initFilter(cb) {
var filterHammer;
//注册回调
fCbFn = cb.fCbFn;
hCbFn = cb.hCbFn;
exports.showFilter = showFilter;
exports.hideFilter = hideFilter;
$filter = $('.filter-mask');
filterHammer = new Hammer($filter[0]);
filterHammer.on('tap', function(e) {
var $this = $(e.target),
$cur;
if ($this.closest('.filter-body').length > 0) {
$cur = $this.closest('.sub-item');
if ($cur.length > 0) {
//tap subclassify
$cur = $this.closest('li');
classifyTapEvt($cur);
} else {
//tap classify
$cur = $this.closest('.classify-item');
e.srcEvent.stopPropagation();
subClassifyTapEvt($cur);
}
} else {
hideFilter();
if (hCbFn) {
hCbFn();
}
}
});
}
//设置完高度后显示sub并设置选中
//T:不在HTML中使用{{#if @first}}active{{/if}}来初始化active为避免sub设置高度时的闪烁
// $filter.find('.classify > :first-child').addClass('active');
exports.initFilter = initFilter;
exports.showFilter = showFilter;
exports.registerCbFn = registerCbFn;
\ No newline at end of file
exports.hideFilter = hideFilter;
\ No newline at end of file
... ...
... ... @@ -4,7 +4,7 @@
* @date: 2015/10/29
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
var $page = $('.yoho-page');
... ...
... ... @@ -3,7 +3,7 @@
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/10
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
var $tip, tipItime;
... ...
/**
* 微信分享
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/30
*/
var $ = require('jquery');
module.exports = function() {
var _weChatInterface = 'http://www.yohoshow.com/api/wechat/getSignPackage';
$.getJSON(_weChatInterface + '?pageurl=' +
encodeURIComponent(location.href.split('#')[0]) + '&callback=?', function (json) {
var _appId, _timestamp, _nonceStr, _signature;
if (json !== undefined && json !== '') {
_appId = json.appId.toString();
_timestamp = json.timestamp;
_nonceStr = json.nonceStr.toString();
_signature = json.signature.toString();
wx.config({
debug: false,
appId: _appId,
timestamp: _timestamp,
nonceStr: _nonceStr,
signature: _signature,
jsApiList: [
'checkJsApi',
'onMenuShareTimeline',
'onMenuShareAppMessage',
'onMenuShareQQ',
'onMenuShareWeibo',
'hideMenuItems',
'showMenuItems',
'hideAllNonBaseMenuItem',
'showAllNonBaseMenuItem',
'translateVoice',
'startRecord',
'stopRecord',
'onRecordEnd',
'playVoice',
'pauseVoice',
'stopVoice',
'uploadVoice',
'downloadVoice',
'chooseImage',
'previewImage',
'uploadImage',
'downloadImage',
'getNetworkType',
'openLocation',
'getLocation',
'hideOptionMenu',
'showOptionMenu',
'closeWindow',
'scanQRCode',
'chooseWXPay',
'openProductSpecificView',
'addCard',
'chooseCard',
'openCard'
]
});
}
});
wx.ready(function () {
var shareTitle = $('#shareTitle').val();
var shareImg = $('#shareImg').val();
var shareDesc = $('#shareDesc').val();
var shareLink = $('#shareLink').val();
var shareData = {
title: shareTitle,
desc: shareDesc,
imgUrl: shareImg,
link: shareLink
};
wx.onMenuShareAppMessage(shareData);
wx.onMenuShareTimeline(shareData);
wx.onMenuShareQQ(shareData);
wx.onMenuShareWeibo(shareData);
});
};
\ No newline at end of file
... ...
... ... @@ -3,9 +3,9 @@
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
* @date: 2015/10/20
*/
var $ = require('yoho.zepto'),
var $ = require('jquery'),
Swiper = require('yoho.iswiper'),
lazyLoad = require('yoho.zeptolazyload'),
lazyLoad = require('yoho.lazyload'),
goodsSwiper;
lazyLoad($('img.lazy'));
... ...
... ... @@ -4,8 +4,9 @@
* @date: 2015/10/20
*/
var $ = require('yoho.zepto'),
lazyLoad = require('yoho.zeptolazyload');
var $ = require('jquery'),
Hammer = require('hammer'),
lazyLoad = require('yoho.lazyload');
//品牌页参数
var $brandHeader = $('#brand-header'),
... ... @@ -61,7 +62,11 @@ var $listNav = $('#list-nav'),
}
},
$pre = $listNav.find('.active'), //纪录进入筛选前的active项,初始为选中项
searching;
searching,
navHammer,
btnIntroHammer,
introHammer,
brandColHammer;
/**
* 筛选注册的回调,筛选子项点击后逻辑
... ... @@ -208,9 +213,27 @@ function search(opt) {
}
lazyLoad($('.lazy'));
$.ajax({
type: 'GET',
url: '/search/filter',
data: defaultOpt,
success: function(data) {
$goodsContainer.append(data);
//初始化filter&注册filter回调
filter.initFilter({
fCbFn: search,
hCbFn: function() {
//切换active状态到$pre上
$pre.addClass('active');
$pre.siblings('.filter').removeClass('active');
}
});
}
});
filter.registerCbFn(search);
lazyLoad($('.lazy'));
writeSearch.bindWirteLocal($('#search-form'));
... ... @@ -220,8 +243,9 @@ writeSearch.bindWirteLocal($('#search-form'));
//3.筛选无active时点击展开筛选面板
//4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态
//5.当前active为筛选并且点击其他项时,隐藏筛选面板
$listNav.delegate('li', 'tap', function() {
var $this = $(this),
navHammer = new Hammer($listNav[0]);
navHammer.on('tap', function(e) {
var $this = $(e.target).closest('li'),
nav,
navType,
$active;
... ... @@ -318,51 +342,65 @@ $(window).scroll(function() {
}
});
//品牌介绍
$brandHeader.children('.btn-intro').bind('tap', function() {
$introBox.removeClass('hide');
});
if ($brandHeader.length > 0) {
$('.close-intro, .brand-intro-box').tap(function() {
$introBox.addClass('hide');
});
//品牌介绍
btnIntroHammer = new Hammer($brandHeader.children('.btn-intro')[0]);
btnIntroHammer.on('tap', function() {
$introBox.removeClass('hide');
$('#brand-intro').tap(function(e) {
e.stopPropagation();
});
//防止混合scroll发生
$('body').addClass('overflow-hidden');
});
//品牌收藏
$brandHeader.children('.btn-col').bind('tap', function() {
var $this = $(this);
//关闭品牌介绍
introHammer = new Hammer(document.getElementById('intro-box'));
introHammer.on('tap', function(e) {
var $this = $(e.target);
var id = $brandHeader.data('id'),
opt;
e.srcEvent.preventDefault();
if ($this.hasClass('coled')) {
opt = 'cancel';
} else {
opt = 'ok';
}
//关闭品牌介绍box
if ($this.closest('#brand-intro').length === 0 || $this.hasClass('close-intro')) {
$introBox.addClass('hide');
$('body').removeClass('overflow-hidden');
}
});
$.ajax({
type: 'POST',
url: '/product/opt/favoriteBrand',
data: {
id: id,
opt: opt
},
success: function(data) {
if (data.code === 200) {
$this.toggleClass('coled');
} else if (data.code === 400) {
tip.show('未登录');
}
},
error: function() {
tip.show('网络断开连接了~');
//品牌收藏
brandColHammer = new Hammer($brandHeader.children('.btn-col')[0]);
brandColHammer.on('tap', function() {
var $this = $(this);
var id = $brandHeader.data('id'),
opt;
if ($this.hasClass('coled')) {
opt = 'cancel';
} else {
opt = 'ok';
}
$.ajax({
type: 'POST',
url: '/product/opt/favoriteBrand',
data: {
id: id,
opt: opt
},
success: function(data) {
if (data.code === 200) {
$this.toggleClass('coled');
} else {
tip.show(data.message);
}
},
error: function() {
tip.show('网络断开连接了~');
}
});
});
});
}
//初始请求最新第一页数据
search();
\ No newline at end of file
... ...
... ... @@ -4,9 +4,9 @@
* @date: 2015/10/20
*/
var $ = require('yoho.zepto'),
var $ = require('jquery'),
Swiper = require('yoho.iswiper'),
lazyLoad = require('yoho.zeptolazyload');
lazyLoad = require('yoho.lazyload');
var swiper;
... ... @@ -18,7 +18,8 @@ var $goodsContainer = $('#goods-container'),
$pgc = $($goodsContainer.children().get(1)),
$dgc = $($goodsContainer.children().get(2));
var winH = $(window).height();
var winH = $(window).height(),
noResult = '<p class="no-result">未找到相关搜索结果</p>';
//默认筛选条件
var defaultOpt = {
... ... @@ -173,8 +174,7 @@ function search(opt) {
url: '/product/newsale/selectNewSale',
data: setting,
success: function(data) {
var noResult = '<p class="no-result">未找到相关搜索结果</p>',
$container;
var $container;
switch (navType) {
case 'newest':
... ... @@ -217,8 +217,8 @@ function search(opt) {
lazyLoad($('.lazy'));
filter.registerCbFn(search);
// loading.initLoadingMask();
// loading.initLoadingMask();
//导航栏点击逻辑说明:
//1.点击非active项时切换active状态
//2.价格和折扣active状态时继续点击切换排序
... ...
... ... @@ -4,9 +4,9 @@
* @date: 2015/10/24
*/
var $ = require('yoho.zepto'),
var $ = require('jquery'),
Swiper = require('yoho.iswiper'),
lazyLoad = require('yoho.zeptolazyload');
lazyLoad = require('yoho.lazyload');
var swiper;
... ... @@ -18,7 +18,8 @@ var $goodsContainer = $('#goods-container'),
$pgc = $($goodsContainer.children().get(1)),
$dgc = $($goodsContainer.children().get(2));
var winH = $(window).height();
var winH = $(window).height(),
noResult = '<p class="no-result">未找到相关搜索结果</p>';
//默认筛选条件
var defaultOpt = {
... ... @@ -200,8 +201,7 @@ function search(opt) {
url: '/product/newsale/selectNewSale',
data: setting,
success: function(data) {
var noResult = '<p class="no-result">未找到相关搜索结果</p>',
$container;
var $container;
switch (navType) {
case 'today':
... ... @@ -244,7 +244,6 @@ function search(opt) {
lazyLoad($('.lazy'));
filter.registerCbFn(search);
// loading.initLoadingMask();
//导航栏点击逻辑说明:
//1.点击非active项时切换active状态
... ... @@ -273,7 +272,6 @@ $listNav.delegate('li', 'tap', function() {
$pre.removeClass('active');
$this.addClass('active');
filter.showFilter();
}
} else {
... ...
... ... @@ -4,7 +4,7 @@
* @date: 2015/10/20
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
var $cartContent = $('.cart-content');
... ...
... ... @@ -5,7 +5,7 @@
* @date: 2015/10/21
*/
var $ = require('yoho.zepto');
var $ = require('jquery');
var Handlebars = require('yoho.handlebars');
var $page = $('.yoho-page');
... ...
... ... @@ -4,8 +4,8 @@
* @date: 2015/10/23
*/
var $ = require('yoho.zepto'),
lazyLoad = require('yoho.zeptolazyload');
var $ = require('jquery'),
lazyLoad = require('yoho.lazyload');
var chosePanel = require('./chose-panel');
... ...
... ... @@ -4,9 +4,9 @@
* @date: 2015/10/20
*/
var $ = require('yoho.zepto'),
var $ = require('jquery'),
ellipsis = require('mlellipsis'),
lazyLoad = require('yoho.zeptolazyload');
lazyLoad = require('yoho.lazyload');
var chosePanel = require('./chose-panel');
... ...
... ... @@ -16,14 +16,14 @@
"spm": {
"main": "index.js",
"dependencies": {
"yoho.zepto": "1.1.61",
"yoho.jquery": "1.8.3",
"jquery": "2.1.4",
"mlellipsis": "0.0.6",
"yoho.iswiper": "3.0.1",
"iscroll": "5.1.2",
"import-style": "1.0.0",
"yoho.zeptolazyload": "0.0.2",
"yoho.handlebars": "3.0.3"
"yoho.lazyload": "1.1.0",
"yoho.handlebars": "3.0.3",
"hammer": "2.0.4"
},
"devDependencies": {
"expect.js": "0.3.1"
... ...
... ... @@ -2,7 +2,7 @@
position: absolute;
left: 0;
right: 0;
top: 0;
top: 2px;
}
.filter-mask {
... ... @@ -40,6 +40,7 @@
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: #333;
}
.default {
... ...
.good-info {
float: left;
width: 44%;
width: 46.4%;
height: 486rem / $pxConvertRem;
margin: 28rem / $pxConvertRem 3% 0;
margin: 28rem / $pxConvertRem 0 0 2.4%;
.tag-container {
... ...
... ... @@ -24,6 +24,10 @@ $clothes: sprite-map("guang/clothes/*.png");
}
.guang-detail-page {
#wrapper {
background: #f0f0f0;
}
#wrapper.ios {
position: absolute;
top: 0;
... ...
... ... @@ -73,6 +73,7 @@
.info-list-container {
overflow-x: hidden;
background: #f0f0f0;
}
.info-list.hide {
... ...
... ... @@ -31,7 +31,7 @@
}
.plus-star-row {
margin-bottom: 10rem / $pxConvertRem;
margin-bottom: 30rem / $pxConvertRem;
&:last-child {
margin-bottom: 0;
... ... @@ -160,7 +160,6 @@
&.spread .icon {
@include rotate(-180deg);
@include scale(0.83);
}
}
... ...
... ... @@ -17,6 +17,7 @@
height: 192rem / $pxConvertRem;
border-bottom: 1px solid #e0e0e0;
border-right: 1px solid #e0e0e0;
border-top: 1px solid #e0e0e0;
}
.classify-logo {
... ...
... ... @@ -29,8 +29,8 @@
}
} */
.home-header {
height: 88rem / $pxConvertRem;
line-height: 88rem / $pxConvertRem;
height: 90rem / $pxConvertRem;
line-height: 90rem / $pxConvertRem;
@include background-image(linear-gradient(#323232, #414141));
position: relative;
.iconfont {
... ...
... ... @@ -14,16 +14,18 @@
border-right: 1px solid #e0e0e0;
border-top: 1px solid #e0e0e0;
overflow: hidden;
background: #fff;
.brand-logo {
width: 100%;
display: table-cell;
width: 3.95rem;
height: 128rem / $pxConvertRem;
line-height: 128rem / $pxConvertRem;
text-align: center;
font-size: 0;
vertical-align: middle;
img {
vertical-align: middle;
max-width: 100%;
max-height: 100%;
}
... ... @@ -52,7 +54,8 @@
width: 317rem / $pxConvertRem;
height: 174rem / $pxConvertRem;
border-top: 1px solid #e0e0e0;
background: #fff;
a {
display: block;
width: 100%;
... ... @@ -68,7 +71,7 @@
background: #fff;
width: 100%;
height: 140rem / $pxConvertRem;
margin-bottom: 28rem / $pxConvertRem;
// margin-bottom: 28rem / $pxConvertRem;
border-top: 1px solid #e0e0e0;
overflow: hidden;
... ...
... ... @@ -10,12 +10,11 @@
position: relative;
z-index: 2;
background: #f0f0f0;
@include transition(transform .3s);
@include transition(transform .3s ease-out);
}
.mobile-wrap.menu-open {
@include transform(translateX(540rem / $pxConvertRem));
@include transition(transform .3s);
}
... ... @@ -27,10 +26,12 @@
right: 0;
bottom: 0;
background: #000;
opacity: 0.3;
opacity: 0;
z-index: 99;
@include transition(opacity 1s);
}
.overlay.show {
display: block;
opacity: 0.3;
}
... ...
... ... @@ -53,4 +53,15 @@
}
}
}
}
.load-more-img {
padding-left: 0;
height: 200rem / $pxConvertRem;
overflow: hidden;
img {
display: block;
width: 100%;
height: 100%;
}
}
\ No newline at end of file
... ...
.side-nav {
display: none;
// display: none;
background: #fff;
position: fixed;
top: 0;
... ... @@ -8,6 +8,8 @@
left: 0;
z-index: 1;
overflow: hidden;
@include transform(translateX(-540rem / $pxConvertRem));
@include transition(all .3s ease-out);
ul {
background: #f0f0f0;
... ... @@ -30,11 +32,11 @@
.nav-icon, .nav-img {
position: absolute;
width: 60rem / $pxConvertRem;
height: 60rem / $pxConvertRem;
width: 48rem / $pxConvertRem;
height: 48rem / $pxConvertRem;
top: 50%;
margin-top: -30rem / $pxConvertRem;
left: 24rem / $pxConvertRem;
margin-top: -24rem / $pxConvertRem;
left: 30rem / $pxConvertRem;
}
.enter-subnav {
... ... @@ -103,20 +105,22 @@
}
.side-nav.on {
display: block;
// display: block;
@include transform(translateX(0rem / $pxConvertRem));
}
.sub-nav {
// display: none;
position: fixed;
top: 0;
right: 100rem / $pxConvertRem;
left: 0;
bottom: 0;
width: 100%;
background: #fff !important;
z-index: 2;
@include transform(translateX(100%));
// z-index: 2;
@include transform(translateX(540rem / $pxConvertRem));
@include transition(transform 0.3s);
li {
... ...
... ... @@ -55,6 +55,10 @@ a {
display: none;
}
.overflow-hidden {
overflow: hidden;
}
@font-face {
font-family: "iconfont";
src: font-url('iconfont.eot'); /* IE9*/
... ...
... ... @@ -15,7 +15,7 @@
text-align: center;
color: #b0b0b0;
&.current {
color: #5e4b3c;
color: #414141;
}
}
.tab-icon {
... ... @@ -27,4 +27,36 @@
font-size: 20rem / $pxConvertRem;
line-height: 1;
}
}
.boys-wrap {
.footer-tab {
.tab-item.current {
color: #414141;
}
}
}
.girls-wrap {
.footer-tab {
.tab-item.current {
color: #FF88AE;
}
}
}
.kids-wrap {
.footer-tab {
.tab-item.current {
color: #7ad9f9;
}
}
}
.lifestyle-wrap {
.footer-tab {
.tab-item.current {
color: #4f4138;
}
}
}
\ No newline at end of file
... ...
... ... @@ -4,8 +4,8 @@
color: #fff;
width: 100%;
overflow: hidden;
height: 88rem / $pxConvertRem;
line-height: 88rem / $pxConvertRem;
height: 90rem / $pxConvertRem;
line-height: 90rem / $pxConvertRem;
&.boys {
@include background-image(linear-gradient(#323232, #414141));
... ...
.discount-page {
background-color: #f0f0f0;
background-color: #fff;
.swiper-container {
width: 100%;
... ... @@ -23,7 +23,7 @@
.banner-top-single{
width: 100%;
height: 240rem / $pxConvertRem;
height: 200rem / $pxConvertRem;
img {
display: block;
height: 100%;
... ... @@ -32,6 +32,7 @@
}
.list-nav {
border:1px solid #e6e6e6;
> li {
float: left;
width: 25%;
... ... @@ -50,9 +51,14 @@
}
.active > a {
border-bottom: 2px solid #000;
color: #000;
.spanTest{
width: auto;
height: 100%;
border-bottom: 2px solid #000;
display: inline-block;
box-sizing:border-box;
}
.iconfont {
color: #999;
... ...
... ... @@ -103,7 +103,7 @@
}
.brand-intro-box {
position: absolute;
position: fixed;
top: 0;
left: 0;
right: 0;
... ...
.newarrival-page {
background-color: #f0f0f0;
background-color: #fff;
.swiper-container {
width: 100%;
height: 240rem / $pxConvertRem;
height: 310rem / $pxConvertRem;
img {
height: 100%;
... ... @@ -23,7 +23,7 @@
.banner-top-single{
width: 100%;
height: 240rem / $pxConvertRem;
height: 200rem / $pxConvertRem;
img {
display: block;
height: 100%;
... ... @@ -32,6 +32,7 @@
}
.list-nav {
border:1px solid #e6e6e6;
> li {
float: left;
width: 25%;
... ... @@ -39,12 +40,13 @@
line-height: 33px;
text-align: center;
font-size: 14px;
color: #999;
}
a {
display: block;
display: inline-block;
box-sizing: border-box;
width: 100%;
width: auto;
height: 100%;
color: #999;
}
... ... @@ -52,15 +54,14 @@
.active > a {
border-bottom: 2px solid #000;
color: #000;
.iconfont {
color: #999;
box-sizing:border-box;
}
.active > .iconfont {
color: #000;
&.cur {
color: #000;
}
}
}
.filter .iconfont {
font-size: 12px;
... ...
... ... @@ -19,7 +19,7 @@
<div class="content {{#unless focus}}hide{{/if}}">
<ul class="primary-level">
{{# ca}}
<li class={{#if @first}}focus{{/if}}>{{name}}</li>
<li class="p-level-item{{#if @first}} focus{{/if}}">{{name}}</li>
{{/ ca}}
</ul>
<div class="sub-level-container">
... ...
... ... @@ -152,6 +152,12 @@
{{/if}}
</div>
</div>
{{!-- wx-share --}}
<input id="shareLink" type="hidden" value={{shareLink}}>
<input id="shareImg" type="hidden" value={{shareImg}}>
<input id="shareTitle" type="hidden" value={{shareTitle}}>
<input id="shareDesc" type="hidden" value={{shareDesc}}>
{{/ guang}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -13,7 +13,7 @@
{{/ twoColumnGoods}}
<div class="overlay"></div>
{{> layout/footer_tab}}
</div>
{{> home/side_nav}}
{{> layout/footer_tab}}
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -8,7 +8,7 @@
{{> home/content}}
<div class="overlay"></div>
{{> layout/footer_tab}}
</div>
{{> home/side_nav}}
{{> layout/footer_tab}}
{{> layout/footer}}
... ...
... ... @@ -19,7 +19,7 @@
{{/ bannerBottom}}
<div class="overlay"></div>
{{> layout/footer_tab}}
</div>
{{> home/side_nav}}
{{> layout/footer_tab}}
{{> layout/footer}}
... ...
... ... @@ -17,7 +17,7 @@
{{> home/banner_bottom}}
{{/ bannerBottom}}
<div class="overlay"></div>
{{> layout/footer_tab}}
</div>
{{> home/side_nav}}
{{> layout/footer_tab}}
{{> layout/footer}}
\ No newline at end of file
... ...
{{> filter}}
\ No newline at end of file
... ...
{{> filter}}
\ No newline at end of file
... ...
... ... @@ -22,8 +22,8 @@
<li class="filter">
<a href="javascript:void(0);">
筛选
<span class="iconfont">&#xe613;</span>
</a>
<span class="iconfont">&#xe613;</span>
</li>
</ul>
... ...
... ... @@ -7,13 +7,13 @@
<ul id="list-nav" class="list-nav clearfix">
<li class="new active">
<a href="javascript:void(0);">
最新
<span class="spanTest">最新</span>
<span class="iconfont cur">&#xe616;</span>
</a>
</li>
<li class="price">
<a href="javascript:void(0);">
价格
<span class="spanTest">价格</span>
<span class="icon">
<i class="iconfont up">&#xe615;</i>
<i class="iconfont down cur">&#xe616;</i>
... ... @@ -22,7 +22,7 @@
</li>
<li class="discount">
<a href="javascript:void(0);">
折扣
<span class="spanTest">折扣</span>
<span class="icon">
<i class="iconfont up">&#xe615;</i>
<i class="iconfont down cur">&#xe616;</i>
... ... @@ -31,7 +31,7 @@
</li>
<li class="filter">
<a href="javascript:void(0);">
筛选
<span class="spanTest">筛选</span>
<span class="iconfont">&#xe613;</span>
</a>
</li>
... ...
... ... @@ -3,14 +3,14 @@
<div class="filter-body">
<ul class="classify">
{{#each classify}}
<li class="classify-item">
<li class="classify-item{{#if @first}} active{{/if}}">
<p class="shower{{#if default}} default{{/if}}">
<span class="title">{{title}}:</span>
{{name}}
</p>
<ul class="sub-classify" data-type={{dataType}}>
{{# subs}}
<li {{#if chosed}}class=chosed{{/if}} data-id={{dataId}}>
<li class="sub-item{{#if chosed}} chosed{{/if}}" data-id={{dataId}}>
{{name}}
<i class="iconfont chosed-icon">&#xe617;</i>
</li>
... ...
... ... @@ -6,7 +6,7 @@
{{# list}}
<li class="swiper-slide">
<a href="{{url}}">
<img class="lazy" src="{{img}}" alt="{{title}}">
<img class="lazy" data-original="{{img}}" alt="{{title}}">
</a>
</li>
{{/ list}}
... ...
... ... @@ -5,11 +5,10 @@
</p>
<div id="goods-list" class="goods-list clearfix"></div>
<div id="load-more-info" class="load-more-info">
<div class="loading status hide">
正在加载...
</div>
<span class="no-more status hide">没有更多啦</span>
</div>
</div>
\ No newline at end of file
</div>
<div class="load-more-img hide" id="load-more-img">
<a href="">
<img src="">
</a>
</div>
... ...
{{# showFooterTab}}
<div class="footer-tab">
<div class="tab-item {{#if grilsHomePage}}current{{/if}}{{#if boysHomePage}}current{{/if}}{{#if kidsHomePage}}current{{/if}}{{#if lifestyleHomePage}}current{{/if}}">
<p class="iconfont tab-icon">&#xe611;</p>
<p class="iconfont tab-icon">&#xe62a;</p>
<p class="tab-name">首页</p>
</div>
<div class="tab-item {{#if categoryPage}}current{{/if}}">
<p class="iconfont tab-icon">&#xe611;</p>
<p class="iconfont tab-icon">&#xe62d;</p>
<p class="tab-name">分类</p>
</div>
<div class="tab-item {{#if guangHome}}current{{/if}}">
... ... @@ -13,11 +13,11 @@
<p class="tab-name">逛</p>
</div>
<div class="tab-item {{#if shoppingCartPage}}current{{/if}}">
<p class="iconfont tab-icon">&#xe611;</p>
<p class="iconfont tab-icon">&#xe62c;</p>
<p class="tab-name">购物车</p>
</div>
<div class="tab-item {{#if minePage}}current{{/if}}">
<p class="iconfont tab-icon">&#xe611;</p>
<p class="iconfont tab-icon">&#xe62b;</p>
<p class="tab-name">我的</p>
</div>
</div>
... ...
... ... @@ -24,6 +24,7 @@
</script>
{{/if}}
{{#if guangDetail}}
<script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" defer></script>
<script>
seajs.use('js/guang/detail');
</script>
... ...
<?php
use Action\AbstractAction;
use Plugin\Helpers;
/**
* 男生首页
... ... @@ -34,4 +35,31 @@ class BoysController extends AbstractAction
}
/**
* 异步获取男首底部banner数据
* @return string 底部Banner数据
*/
public function bottomBannerAction()
{
do
{
if(!$this->isAjax())
{
break;
}
$channel = Helpers::getChannelByCookie();
$bottomBanner = Index\HomeModel::getBottomBanner($channel);
if($bottomBanner)
{
$this->echoJson($bottomBanner);
}
}
while(false);
echo ' ';
}
}
... ...
<?php
use Action\AbstractAction;
use Plugin\Helpers;
/**
* 女生首页
... ... @@ -33,4 +34,31 @@ class GirlsController extends AbstractAction
));
}
/**
* 异步获取女首底部banner数据
* @return string 底部Banner数据
*/
public function bottomBannerAction()
{
do
{
if(!$this->isAjax())
{
break;
}
$channel = Helpers::getChannelByCookie();
$bottomBanner = Index\HomeModel::getBottomBanner($channel);
if($bottomBanner)
{
$this->echoJson($bottomBanner);
}
}
while(false);
echo ' ';
}
}
... ...
... ... @@ -203,20 +203,9 @@ class SearchController extends AbstractAction
// 转换排序方式
$page = $this->get('page', 1);
$order = $this->get('order', 0);
$orderVal = $this->get('order', 0);
$type = $this->get('type', '');
switch ($type) {
case 'price':
$order = ($order == 0) ? 's_p_desc' : 's_p_asc';
break;
case 'discount':
$order = ($order == 0) ? 'p_d_desc' : 'p_d_asc';
break;
case 'newest':
default:
$order = ($order == 0) ? 's_t_desc' : 's_t_asc';
break;
}
$order = Helpers::transOrder($orderVal, $type);
$data = array();
// 查询品类或品牌数据
... ... @@ -258,6 +247,56 @@ class SearchController extends AbstractAction
}
/**
* Ajax异步获取筛选数据
* @return array 筛选数据
*/
public function filterAction()
{
if ($this->isAjax()) {
// 过滤请求参数
$condition = filter_input_array(INPUT_GET, array(
'query' => FILTER_DEFAULT,
'brand' => FILTER_VALIDATE_INT,
'sort' => FILTER_DEFAULT,
'msort' => FILTER_VALIDATE_INT,
'misort' => FILTER_VALIDATE_INT,
'color' => FILTER_VALIDATE_INT,
'size' => FILTER_VALIDATE_INT,
'price' => FILTER_VALIDATE_INT,
'discount' => FILTER_DEFAULT,
'gender' => FILTER_DEFAULT,
'p_d' => FILTER_DEFAULT,), false);
if (isset($condition['sort'])) {
$condition['sort'] = rawurldecode($condition['sort']);
}
if (isset($condition['discount'])) {
$condition['p_d'] = rawurldecode($condition['discount']);
unset($condition['discount']);
}
if (isset($condition['gender'])) {
$condition['gender'] = rawurldecode($condition['gender']);
}
$data = array();
$listData = SearchData::searchByCondition($condition);
// 处理返回的数据
if (isset($listData['data']) && isset($listData['data']['filter'])) {
$data['filter'] = ListProcess::getFilterData($listData['data']['filter']);
}
$listData = array();
if (empty($data)) {
echo ' ';
} else {
$this->_view->display('filter', $data);
}
} else {
echo ' ';
}
}
/**
* 模糊搜索指定字符
*
* @return array 模糊搜索的结果
... ...
... ... @@ -46,7 +46,7 @@ class ClassModel
$oneClass = array();
$item = array();
foreach ($data['data'] as $k => $v) {
$oneClass = array('name' => $k, 'ca' => array());
$oneClass = array('name' => ucfirst($k), 'ca' => array());
foreach ($v as $val) {
$item = array();
... ...
... ... @@ -45,6 +45,11 @@ class HomeModel
/* COOKIE标识访问的是创意生活频道 */
const COOKIE_NAME_LIFESTYLE = 'lifestyle';
/* COOKIE标识访问的是男生频道底部Banner */
const COOKIE_NAME_BOYS_BOTTOM_BANNER = '8c48745a39373d621bf5fd80edf59b5e';
/* COOKIE标识访问的是女生频道频道底部Banner */
const COOKIE_NAME_GIRLS_BOTTOM_BANNER = 'c63939b2ad458e9cb51147940c1da2e5';
/**
* 选择频道
*
... ... @@ -112,6 +117,56 @@ class HomeModel
}
/**
* 获取男生,女生底部banner
*
* @return string | false
*/
public static function getBottomBanner($channel)
{
$result = false;
if($channel == 2) {
$resource = self::COOKIE_NAME_GIRLS_BOTTOM_BANNER;
$cache = CacheConfig::KEY_ACTION_GRILS_BOTTOM_BANNER;
} else {
$resource = self::COOKIE_NAME_BOYS_BOTTOM_BANNER;
$cache = CacheConfig::KEY_ACTION_BOYS_BOTTOM_BANNER;
}
if (USE_CACHE) {
// 先尝试获取一级缓存(master), 有数据则直接返回.
$result = Cache::get($cache, 'master');
if (!empty($result)) {
return $result;
}
}
// 调用接口获取数据
$banner = IndexData::getBannerStart($resource);
if (isset($banner['code']) && $banner['code'] == 200) {
// 构建数据
$data = array();
foreach ($banner['data'] as $val) {
$data['list'][] = $val;
}
$result = FloorProcess::getContent($data, $channel);
}
if (USE_CACHE) {
// 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.
if (empty($result)) {
$result = Cache::get($cache, 'slave');
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else {
Cache::set($cache, $result);
}
}
return $result;
}
/**
* 获取男生首页的楼层数据
*
* @return array | false
... ...
... ... @@ -48,7 +48,7 @@ class SideModel
$result[$key]['textEn'] = $value['sort_name_en'];
$result[$key]['styleClass'] = strtolower($value['sort_name_en']);
$result[$key]['url'] = Helpers::getFilterUrl($value['sort_url']);
$result[$key]['img'] = Helpers::getImageUrl($value['sort_ico'], 60, 60);
$result[$key]['img'] = Helpers::getImageUrl($value['sort_ico'], 60, 60, 1);
}
}
... ...
... ... @@ -5,6 +5,7 @@ namespace Product;
use Configs\CacheConfig;
use LibModels\Wap\Product\NewsaleData;
use Plugin\DataProcess\NewSaleProcess;
use Plugin\DataProcess\ListProcess;
use Plugin\Helpers;
use Plugin\Cache;
... ... @@ -219,4 +220,22 @@ class NewsaleModel
return $result;
}
/**
* 获取筛选数据
* @param array $data 接口返回的数据
* @return array 处理之后的数据
*/
public static function filterData($data)
{
$result = array();
/* 格式化筛选数据 */
if (isset($data['code']) && $data['code'] == 200 && isset($data['data']['filter'])) {
$result['filter'] = ListProcess::getFilterData($data['data']['filter']);
}
return $result;
}
}
... ...
... ... @@ -3,6 +3,7 @@
use Action\AbstractAction;
use LibModels\Wap\Passport\BackData;
use LibModels\Wap\Passport\RegData;
use Plugin\Helpers;
/**
* 频道选择
... ... @@ -31,9 +32,21 @@ class BackController extends AbstractAction
*/
public function sendemailAction()
{
if($this->isAjax())
$result = array('code' => 400, 'message' => '邮箱格式不正确,请重新输入', 'data' => '');
do
{
/* 判断是不是AJAX请求 */
if (!$this->isAjax())
{
break;
}
$email = $this->post('email', '');
// 判断邮箱是否有效
if(!Helpers::verifyEmail($email))
{
break;
}
// 发送邮箱验证码
$result = BackData::sendCodeToEmail($email);
... ... @@ -42,8 +55,10 @@ class BackController extends AbstractAction
$result['data'] = '/passport/back/success?email='.$email;
}
$this->echoJson($result);
}
while (false);
$this->echoJson($result);
}
/**
... ... @@ -51,15 +66,28 @@ class BackController extends AbstractAction
*/
public function resendemailAction()
{
if($this->isAjax())
$result = array('code' => 400, 'message' => '重发邮件失败');
do
{
if(!$this->isAjax())
{
break;
}
$email = $this->get('email', '');
// 发送邮箱验证码
$result = BackData::sendCodeToEmail($email);
$return = BackData::sendCodeToEmail($email);
if(!empty($return))
{
$result = $return;
}
$this->echoJson($result);
}
while(false);
$this->echoJson($result);
}
public function successAction()
... ... @@ -72,7 +100,7 @@ class BackController extends AbstractAction
$domain_name = 'http://' . (($domain == 'gmail.com') ? 'mail.google.com' : 'mail.' . $domain);
$data = array(
'backUrl' => 'emailback.html',
'backUrl' => '/emailback.html',
'headerText' => '找回密码',
'isPassportPage' => true,
'backEmailSuccess' => true,
... ... @@ -133,20 +161,34 @@ class BackController extends AbstractAction
*/
public function sendcodeAction()
{
if($this->isAjax())
$result = array('code' => 400, 'message' => '手机号码格式不正确,请重新输入', 'data' => '');
do
{
/* 判断是不是AJAX请求 */
if (!$this->isAjax())
{
break;
}
$phoneNum = $this->post('phoneNum', '');
$areaCode = $this->post('areaCode', 86);
if(!Helpers::verifyMobile($phoneNum))
{
break;
}
// 发送手机验证码
$result = BackData::sendCodeToMobile($phoneNum, $areaCode);
if($result['code'] === 200)
$return = BackData::sendCodeToMobile($phoneNum, $areaCode);
if($return && $return['code'] === 200)
{
$result = $return;
$result['data'] = '/passport/back/mobilecode?phoneNum='.$phoneNum.'&areaCode='.$areaCode;
}
$this->echoJson($result);
}
while (false);
$this->echoJson($result);
}
/**
... ...
... ... @@ -78,7 +78,7 @@ class NewsaleController extends AbstractAction
public function selectNewSaleAction()
{
if ($this->isAjax()) {
$gender = $this->get('gender', 'boys');
$gender = $this->get('gender', null);
$brand = $this->get('brand', null);
$sort = $this->get('sort', null);
$color = $this->get('color', null);
... ... @@ -89,30 +89,10 @@ class NewsaleController extends AbstractAction
$limit = $this->get('limit', 60);
$page = $this->get('page', 1);
// 转换性别
if ($gender === 'boys') {
$gender = '1,3';
} elseif ($gender === 'girls') {
$gender = '2,3';
} else {
$gender = '1,2,3';
}
// 转换排序方式
$order = $this->get('order', null);
$orderVal = $this->get('order', null);
$type = $this->get('type', '');
switch ($type) {
case 'price':
$order = ($order == 0) ? 's_p_desc' : 's_p_asc';
break;
case 'discount':
$order = ($order == 0) ? 'p_d_desc' : 'p_d_asc';
break;
case 'newest':
default:
$order = ($order == 0) ? 's_t_desc' : 's_t_asc';
break;
}
$order = Helpers::transOrder($orderVal, $type);
// 转换频道
$channel = Helpers::getChannelByCookie();
... ... @@ -132,4 +112,45 @@ class NewsaleController extends AbstractAction
}
}
/**
* Ajax方式查询筛选数据
*
* @return array 筛选数据
*/
public function filterAction()
{
if ($this->isAjax()) {
$gender = $this->get('gender', null);
$brand = $this->get('brand', null);
$sort = $this->get('sort', null);
$color = $this->get('color', null);
$size = $this->get('size', null);
$price = $this->get('price', null);
$p_d = $this->get('discount', null);
$dayLimit = $this->get('dayLimit', null);
$limit = $this->get('limit', 60);
$page = $this->get('page', 1);
// 转换排序方式
$orderVal = $this->get('order', null);
$type = $this->get('type', '');
$order = Helpers::transOrder($orderVal, $type);
$channel = Helpers::getChannelByCookie();
$data = NewsaleData::selectNewSaleProducts(
$gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit, $limit, $page, $order
);
$result = \Product\NewsaleModel::filterData($data);
if (empty($result)) {
echo ' ';
} else {
$this->_view->display('filter', $result);
}
} else {
echo ' ';
}
}
}
... ...