modify guang page generate url use url()
Showing
49 changed files
with
233 additions
and
184 deletions
@@ -357,7 +357,6 @@ class AbstractAction extends Controller_Abstract | @@ -357,7 +357,6 @@ class AbstractAction extends Controller_Abstract | ||
357 | } | 357 | } |
358 | // 未登录 | 358 | // 未登录 |
359 | else { | 359 | else { |
360 | - $footer = array(); | ||
361 | $footer['loginUrl'] = '/signin.html'; // 登录链接 | 360 | $footer['loginUrl'] = '/signin.html'; // 登录链接 |
362 | $footer['signupUrl'] = '/reg.html'; // 注册链接 | 361 | $footer['signupUrl'] = '/reg.html'; // 注册链接 |
363 | } | 362 | } |
@@ -377,18 +376,6 @@ class AbstractAction extends Controller_Abstract | @@ -377,18 +376,6 @@ class AbstractAction extends Controller_Abstract | ||
377 | } | 376 | } |
378 | 377 | ||
379 | /** | 378 | /** |
380 | - * 返回顶部软件下载有关数据 | ||
381 | - * @return array 下载有关数据 | ||
382 | - */ | ||
383 | - protected function getHeaderDownload() | ||
384 | - { | ||
385 | - return array( | ||
386 | - 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480', | ||
387 | - 'url' => 'http://www.baidu.com' | ||
388 | - ); | ||
389 | - } | ||
390 | - | ||
391 | - /** | ||
392 | * 设置首页以及频道页顶部信息 | 379 | * 设置首页以及频道页顶部信息 |
393 | * | 380 | * |
394 | * @return void | 381 | * @return void |
@@ -400,18 +387,4 @@ class AbstractAction extends Controller_Abstract | @@ -400,18 +387,4 @@ class AbstractAction extends Controller_Abstract | ||
400 | $this->_view->assign('homeHeader', $header); | 387 | $this->_view->assign('homeHeader', $header); |
401 | } | 388 | } |
402 | 389 | ||
403 | - /** | ||
404 | - * 返回顶部软件下载有关数据 | ||
405 | - * @return array 下载有关数据 | ||
406 | - */ | ||
407 | - protected function setHeaderDownload() | ||
408 | - { | ||
409 | - $download = array( | ||
410 | - 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480', | ||
411 | - 'url' => 'http://www.baidu.com' | ||
412 | - ); | ||
413 | - | ||
414 | - $this->_view->assign('headerDownload', $download); | ||
415 | - } | ||
416 | - | ||
417 | } | 390 | } |
@@ -8,13 +8,14 @@ var $ = require('yoho.zepto'), | @@ -8,13 +8,14 @@ var $ = require('yoho.zepto'), | ||
8 | Swiper = require('yoho.iswiper'), | 8 | Swiper = require('yoho.iswiper'), |
9 | lazyLoad = require('yoho.zeptolazyload'); | 9 | lazyLoad = require('yoho.zeptolazyload'); |
10 | 10 | ||
11 | -var swiper; | 11 | +var swiper, |
12 | + $brandList = $('.brand-list'); | ||
12 | 13 | ||
13 | swiper = new Swiper('.swiper-container', { | 14 | swiper = new Swiper('.swiper-container', { |
14 | lazyLoading: true, | 15 | lazyLoading: true, |
15 | loop: true, | 16 | loop: true, |
16 | autoplay: 3000, | 17 | autoplay: 3000, |
17 | - pagination: '.swiper-pagination' | 18 | + pagination: '.swiper-pagination .pagination-inner' |
18 | }); | 19 | }); |
19 | 20 | ||
20 | lazyLoad($('img.lazy')); | 21 | lazyLoad($('img.lazy')); |
@@ -22,4 +23,27 @@ $('.yoho-header').css({ | @@ -22,4 +23,27 @@ $('.yoho-header').css({ | ||
22 | 'z-index': 2, | 23 | 'z-index': 2, |
23 | position: 'fixed' | 24 | position: 'fixed' |
24 | }); | 25 | }); |
25 | -$('.banner-top').css('padding-top', '90px'); | ||
26 | +$('.banner-top').css('padding-top', '90px'); | ||
27 | + | ||
28 | +if ($brandList.length > 0) { | ||
29 | + $(window).scroll(function() { | ||
30 | + var scrTop = $(window).scrollTop(), | ||
31 | + searchH = $('.newbrand-search').height(), | ||
32 | + headerH = $('.yoho-header').height(), | ||
33 | + brandSwipe = parseInt(searchH) + parseInt(headerH); | ||
34 | + | ||
35 | + $('.brand-list').each(function() { | ||
36 | + var offTop = $(this).offset().top - brandSwipe; | ||
37 | + | ||
38 | + if (scrTop >= offTop) { | ||
39 | + $brandList.find('.title-bar').css('position', 'static'); | ||
40 | + $(this).find('.title-bar').css({ | ||
41 | + position: 'fixed', | ||
42 | + top: brandSwipe | ||
43 | + }); | ||
44 | + } else { | ||
45 | + $(this).find('.title-bar').css('position', 'static'); | ||
46 | + } | ||
47 | + }); | ||
48 | + }); | ||
49 | +} |
@@ -15,7 +15,7 @@ $('#search-input').focus(function() { | @@ -15,7 +15,7 @@ $('#search-input').focus(function() { | ||
15 | $(this).blur(); | 15 | $(this).blur(); |
16 | }); | 16 | }); |
17 | 17 | ||
18 | -$nav.delegate('li', 'touchstart', function() { | 18 | +$nav.delegate('li', 'tap', function() { |
19 | var $this = $(this), | 19 | var $this = $(this), |
20 | index = $this.index(); | 20 | index = $this.index(); |
21 | 21 | ||
@@ -30,7 +30,7 @@ $nav.delegate('li', 'touchstart', function() { | @@ -30,7 +30,7 @@ $nav.delegate('li', 'touchstart', function() { | ||
30 | $curContent = $contents.eq(index).removeClass('hide'); | 30 | $curContent = $contents.eq(index).removeClass('hide'); |
31 | }); | 31 | }); |
32 | 32 | ||
33 | -$('.primary-level').delegate('li', 'touchstart', function() { | 33 | +$('.primary-level').delegate('li', 'tap', function() { |
34 | var $this = $(this), | 34 | var $this = $(this), |
35 | index = $this.index(); | 35 | index = $this.index(); |
36 | 36 |
@@ -56,7 +56,7 @@ info.initInfosEvt($infoList); | @@ -56,7 +56,7 @@ info.initInfosEvt($infoList); | ||
56 | }); | 56 | }); |
57 | }()); | 57 | }()); |
58 | 58 | ||
59 | -$nav.delegate('.guang-nav-item', 'touchstart', function() { | 59 | +$nav.delegate('.guang-nav-item', 'tap', function() { |
60 | var $this = $(this), | 60 | var $this = $(this), |
61 | $content, | 61 | $content, |
62 | index; | 62 | index; |
@@ -45,7 +45,7 @@ function setLazyLoadAndMellipsis($infos) { | @@ -45,7 +45,7 @@ function setLazyLoadAndMellipsis($infos) { | ||
45 | * @params $container 逛资讯列表容器 | 45 | * @params $container 逛资讯列表容器 |
46 | */ | 46 | */ |
47 | function initInfosEvt($container) { | 47 | function initInfosEvt($container) { |
48 | - $container.delegate('.like-btn', 'touchstart', function(e) { | 48 | + $container.delegate('.like-btn', 'tap', function(e) { |
49 | var $likeBtn = $(e.currentTarget), | 49 | var $likeBtn = $(e.currentTarget), |
50 | $info = $likeBtn.closest('.guang-info'), | 50 | $info = $likeBtn.closest('.guang-info'), |
51 | opt = 'ok'; | 51 | opt = 'ok'; |
@@ -37,7 +37,7 @@ setTimeout(function() { | @@ -37,7 +37,7 @@ setTimeout(function() { | ||
37 | info.initInfosEvt($infosContainer); | 37 | info.initInfosEvt($infosContainer); |
38 | 38 | ||
39 | //文字介绍收起与展开 | 39 | //文字介绍收起与展开 |
40 | -$('#more-intro').bind('touchstart', function() { | 40 | +$('#more-intro').bind('tap', function() { |
41 | var $this = $(this); | 41 | var $this = $(this); |
42 | 42 | ||
43 | $this.toggleClass('spread'); | 43 | $this.toggleClass('spread'); |
@@ -56,7 +56,7 @@ $('#more-intro').bind('touchstart', function() { | @@ -56,7 +56,7 @@ $('#more-intro').bind('touchstart', function() { | ||
56 | }); | 56 | }); |
57 | 57 | ||
58 | //品牌收藏 | 58 | //品牌收藏 |
59 | -$('#brand-like').bind('touchstart', function(e) { | 59 | +$('#brand-like').bind('tap', function(e) { |
60 | var opt = 'ok', | 60 | var opt = 'ok', |
61 | $this = $(this); | 61 | $this = $(this); |
62 | 62 |
@@ -20,7 +20,7 @@ mySwiper = new Swiper('.swiper-container', { | @@ -20,7 +20,7 @@ mySwiper = new Swiper('.swiper-container', { | ||
20 | pagination: '.swiper-pagination' | 20 | pagination: '.swiper-pagination' |
21 | }); | 21 | }); |
22 | 22 | ||
23 | -$('#nav-tab').delegate('li', 'touchstart', function() { | 23 | +$('#nav-tab').delegate('li', 'tap', function() { |
24 | if ($(this).hasClass('focus')) { | 24 | if ($(this).hasClass('focus')) { |
25 | return; | 25 | return; |
26 | } | 26 | } |
@@ -6,13 +6,13 @@ | @@ -6,13 +6,13 @@ | ||
6 | 6 | ||
7 | var $ = require('yoho.zepto'); | 7 | var $ = require('yoho.zepto'); |
8 | 8 | ||
9 | -var $input = $('#search-input > input'); | 9 | +var $input = $('#search-input input'); |
10 | 10 | ||
11 | -var $clear = $('#search-input > .clear-input'); | 11 | +var $clear = $('#search-input .clear-input'); |
12 | 12 | ||
13 | var $history = $('.history'); | 13 | var $history = $('.history'); |
14 | 14 | ||
15 | -$('#clear-history').bind('touchstart', function() { | 15 | +$('#clear-history').bind('tap', function() { |
16 | $.ajax({ | 16 | $.ajax({ |
17 | type: 'POST', | 17 | type: 'POST', |
18 | url: '/search/clearHistory', | 18 | url: '/search/clearHistory', |
@@ -32,6 +32,6 @@ $input.bind('input', function() { | @@ -32,6 +32,6 @@ $input.bind('input', function() { | ||
32 | } | 32 | } |
33 | }); | 33 | }); |
34 | 34 | ||
35 | -$clear.bind('touchstart', function() { | 35 | +$clear.bind('tap', function() { |
36 | $input.val('').trigger('input'); | 36 | $input.val('').trigger('input'); |
37 | }); | 37 | }); |
@@ -33,7 +33,7 @@ function bindEyesEvt() { | @@ -33,7 +33,7 @@ function bindEyesEvt() { | ||
33 | $hasEye.append('<div class="eye close"></div>'); | 33 | $hasEye.append('<div class="eye close"></div>'); |
34 | $eye = $hasEye.children('.eye'); | 34 | $eye = $hasEye.children('.eye'); |
35 | 35 | ||
36 | - $eye.on('touchstart', function(e) { | 36 | + $eye.on('tap', function(e) { |
37 | var $this = $(this), | 37 | var $this = $(this), |
38 | $pwd = $this.siblings('.pwd'); | 38 | $pwd = $this.siblings('.pwd'); |
39 | 39 | ||
@@ -58,7 +58,7 @@ function bindClearEvt() { | @@ -58,7 +58,7 @@ function bindClearEvt() { | ||
58 | $hasClear.append('<div class="clear-input"></div>'); | 58 | $hasClear.append('<div class="clear-input"></div>'); |
59 | $clear = $hasClear.children('.clear-input'); | 59 | $clear = $hasClear.children('.clear-input'); |
60 | 60 | ||
61 | - $clear.on('touchstart', function(e) { | 61 | + $clear.on('tap', function(e) { |
62 | var $input = $clear.siblings('.input'); | 62 | var $input = $clear.siblings('.input'); |
63 | 63 | ||
64 | $input.val('').trigger('input').focus(); | 64 | $input.val('').trigger('input').focus(); |
@@ -11,7 +11,7 @@ var $resend = $('#resend'); | @@ -11,7 +11,7 @@ var $resend = $('#resend'); | ||
11 | var tip = require('../../plugin/tip'), | 11 | var tip = require('../../plugin/tip'), |
12 | showErrTip = tip.show; | 12 | showErrTip = tip.show; |
13 | 13 | ||
14 | -$resend.on('touchstart', function(e) { | 14 | +$resend.on('tap', function(e) { |
15 | e.preventDefault(); | 15 | e.preventDefault(); |
16 | 16 | ||
17 | $.ajax({ | 17 | $.ajax({ |
@@ -24,7 +24,7 @@ $email.bind('input', function() { | @@ -24,7 +24,7 @@ $email.bind('input', function() { | ||
24 | } | 24 | } |
25 | }); | 25 | }); |
26 | 26 | ||
27 | -$btnSure.on('touchstart', function() { | 27 | +$btnSure.on('tap', function() { |
28 | var email = trim($email.val()); | 28 | var email = trim($email.val()); |
29 | 29 | ||
30 | if ($btnSure.hasClass('disable')) { | 30 | if ($btnSure.hasClass('disable')) { |
@@ -32,7 +32,7 @@ $countrySelect.change(function() { | @@ -32,7 +32,7 @@ $countrySelect.change(function() { | ||
32 | $areaCode.text($countrySelect.val()); | 32 | $areaCode.text($countrySelect.val()); |
33 | }); | 33 | }); |
34 | 34 | ||
35 | -$btnNext.on('touchstart', function() { | 35 | +$btnNext.on('tap', function() { |
36 | var pn = trim($phoneNum.val()), | 36 | var pn = trim($phoneNum.val()), |
37 | area = $countrySelect.val(); | 37 | area = $countrySelect.val(); |
38 | 38 |
@@ -45,7 +45,7 @@ module.exports = function(useInRegister) { | @@ -45,7 +45,7 @@ module.exports = function(useInRegister) { | ||
45 | }); | 45 | }); |
46 | 46 | ||
47 | //重新发送验证码 | 47 | //重新发送验证码 |
48 | - $captchaTip.on('touchstart', function() { | 48 | + $captchaTip.on('tap', function() { |
49 | if ($captchaTip.hasClass('disable')) { | 49 | if ($captchaTip.hasClass('disable')) { |
50 | return; | 50 | return; |
51 | } | 51 | } |
@@ -70,7 +70,7 @@ module.exports = function(useInRegister) { | @@ -70,7 +70,7 @@ module.exports = function(useInRegister) { | ||
70 | }); | 70 | }); |
71 | }); | 71 | }); |
72 | 72 | ||
73 | - $btnNext.on('touchstart', function() { | 73 | + $btnNext.on('tap', function() { |
74 | if ($btnNext.hasClass('disable')) { | 74 | if ($btnNext.hasClass('disable')) { |
75 | return; | 75 | return; |
76 | } | 76 | } |
@@ -64,7 +64,7 @@ $countrySelect.change(function() { | @@ -64,7 +64,7 @@ $countrySelect.change(function() { | ||
64 | $areaCode.text($countrySelect.val()); | 64 | $areaCode.text($countrySelect.val()); |
65 | }); | 65 | }); |
66 | 66 | ||
67 | -$loginBtn.on('touchstart', function() { | 67 | +$loginBtn.on('tap', function() { |
68 | var pn = trim($phoneNum.val()), | 68 | var pn = trim($phoneNum.val()), |
69 | areaCode = $countrySelect.val(), | 69 | areaCode = $countrySelect.val(), |
70 | pwd = trim($pwd.val()); | 70 | pwd = trim($pwd.val()); |
@@ -68,7 +68,7 @@ $pwd.bind('input', function() { | @@ -68,7 +68,7 @@ $pwd.bind('input', function() { | ||
68 | 68 | ||
69 | 69 | ||
70 | // Login | 70 | // Login |
71 | -$loginBtn.on('touchstart', function() { | 71 | +$loginBtn.on('tap', function() { |
72 | var acc = trim($account.val()), | 72 | var acc = trim($account.val()), |
73 | pwd = trim($pwd.val()); | 73 | pwd = trim($pwd.val()); |
74 | 74 | ||
@@ -107,15 +107,15 @@ $loginBtn.on('touchstart', function() { | @@ -107,15 +107,15 @@ $loginBtn.on('touchstart', function() { | ||
107 | }); | 107 | }); |
108 | 108 | ||
109 | 109 | ||
110 | -$('#forget-pwd').on('touchstart', function() { | 110 | +$('#forget-pwd').on('tap', function() { |
111 | showRetrivePanel(); | 111 | showRetrivePanel(); |
112 | }); | 112 | }); |
113 | 113 | ||
114 | -$mask.on('touchstart', function() { | 114 | +$mask.on('tap', function() { |
115 | hideRetrivePanel(); | 115 | hideRetrivePanel(); |
116 | }); | 116 | }); |
117 | 117 | ||
118 | -$('#cancel-retrive').on('touchstart', function(e) { | 118 | +$('#cancel-retrive').on('tap', function(e) { |
119 | e.preventDefault(); | 119 | e.preventDefault(); |
120 | hideRetrivePanel(); | 120 | hideRetrivePanel(); |
121 | }); | 121 | }); |
@@ -24,7 +24,7 @@ $pwd.bind('input', function() { | @@ -24,7 +24,7 @@ $pwd.bind('input', function() { | ||
24 | } | 24 | } |
25 | }); | 25 | }); |
26 | 26 | ||
27 | -$btnSure.on('touchstart', function() { | 27 | +$btnSure.on('tap', function() { |
28 | var pwd = trim($pwd.val()); | 28 | var pwd = trim($pwd.val()); |
29 | 29 | ||
30 | if ($btnSure.hasClass('disable')) { | 30 | if ($btnSure.hasClass('disable')) { |
@@ -32,7 +32,7 @@ $countrySelect.change(function() { | @@ -32,7 +32,7 @@ $countrySelect.change(function() { | ||
32 | $areaCode.text($countrySelect.val()); | 32 | $areaCode.text($countrySelect.val()); |
33 | }); | 33 | }); |
34 | 34 | ||
35 | -$btnNext.on('touchstart', function() { | 35 | +$btnNext.on('tap', function() { |
36 | var pn = trim($phoneNum.val()), | 36 | var pn = trim($phoneNum.val()), |
37 | areaCode = $countrySelect.val(); | 37 | areaCode = $countrySelect.val(); |
38 | 38 |
@@ -33,7 +33,7 @@ function registerCbFn(cb) { | @@ -33,7 +33,7 @@ function registerCbFn(cb) { | ||
33 | $classify.children(':first-child').addClass('active'); //T:不在HTML中使用{{#if @first}}active{{/if}}来初始化active为避免sub设置高度时的闪烁 | 33 | $classify.children(':first-child').addClass('active'); //T:不在HTML中使用{{#if @first}}active{{/if}}来初始化active为避免sub设置高度时的闪烁 |
34 | 34 | ||
35 | //classify switch | 35 | //classify switch |
36 | -$classify.delegate('.classify-item', 'touchstart', function() { | 36 | +$classify.delegate('.classify-item', 'tap', function() { |
37 | var $this = $(this); | 37 | var $this = $(this); |
38 | 38 | ||
39 | if ($this.hasClass('active')) { | 39 | if ($this.hasClass('active')) { |
@@ -46,11 +46,11 @@ $classify.delegate('.classify-item', 'touchstart', function() { | @@ -46,11 +46,11 @@ $classify.delegate('.classify-item', 'touchstart', function() { | ||
46 | }); | 46 | }); |
47 | 47 | ||
48 | //点击Mask隐藏筛选界面 | 48 | //点击Mask隐藏筛选界面 |
49 | -$filter.filter('.filter-mask').click(function() { | 49 | +$filter.filter('.filter-mask').tap(function() { |
50 | hideFilter(); | 50 | hideFilter(); |
51 | }); | 51 | }); |
52 | 52 | ||
53 | -$subClassify.delegate('li', 'click', function(e) { | 53 | +$subClassify.delegate('li', 'tap', function(e) { |
54 | var $this = $(this), | 54 | var $this = $(this), |
55 | id = $this.data('id'); | 55 | id = $this.data('id'); |
56 | 56 |
@@ -17,7 +17,7 @@ var $tip, tipItime; | @@ -17,7 +17,7 @@ var $tip, tipItime; | ||
17 | $('.yoho-page').append(tipHtml); | 17 | $('.yoho-page').append(tipHtml); |
18 | 18 | ||
19 | $tip = $('#yoho-tip'); | 19 | $tip = $('#yoho-tip'); |
20 | - $tip.on('touchstart', function() { | 20 | + $tip.on('tap', function() { |
21 | $tip.hide(); | 21 | $tip.hide(); |
22 | 22 | ||
23 | //清除Timeout | 23 | //清除Timeout |
@@ -210,7 +210,7 @@ filter.registerCbFn(search); | @@ -210,7 +210,7 @@ filter.registerCbFn(search); | ||
210 | //3.筛选无active时点击展开筛选面板 | 210 | //3.筛选无active时点击展开筛选面板 |
211 | //4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态 | 211 | //4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态 |
212 | //5.当前active为筛选并且点击其他项时,隐藏筛选面板 | 212 | //5.当前active为筛选并且点击其他项时,隐藏筛选面板 |
213 | -$listNav.delegate('li', 'touchstart', function() { | 213 | +$listNav.delegate('li', 'tap', function() { |
214 | var $this = $(this), | 214 | var $this = $(this), |
215 | nav, | 215 | nav, |
216 | navType, | 216 | navType, |
@@ -309,19 +309,19 @@ $(window).scroll(function() { | @@ -309,19 +309,19 @@ $(window).scroll(function() { | ||
309 | }); | 309 | }); |
310 | 310 | ||
311 | //品牌介绍 | 311 | //品牌介绍 |
312 | -$brandHeader.children('.btn-intro').bind('touchstart', function() { | 312 | +$brandHeader.children('.btn-intro').bind('tap', function() { |
313 | $introBox.removeClass('hide'); | 313 | $introBox.removeClass('hide'); |
314 | }); | 314 | }); |
315 | 315 | ||
316 | -$('.close-intro, .brand-intro-box').click(function() { | 316 | +$('.close-intro, .brand-intro-box').tap(function() { |
317 | $introBox.addClass('hide'); | 317 | $introBox.addClass('hide'); |
318 | }); | 318 | }); |
319 | 319 | ||
320 | -$('#brand-intro').click(function(e) { | 320 | +$('#brand-intro').tap(function(e) { |
321 | e.stopPropagation(); | 321 | e.stopPropagation(); |
322 | }); | 322 | }); |
323 | 323 | ||
324 | //品牌收藏 | 324 | //品牌收藏 |
325 | -$brandHeader.children('.btn-col').bind('touchstart', function() { | 325 | +$brandHeader.children('.btn-col').bind('tap', function() { |
326 | $(this).toggleClass('coled'); | 326 | $(this).toggleClass('coled'); |
327 | }); | 327 | }); |
@@ -13,9 +13,9 @@ var swiper; | @@ -13,9 +13,9 @@ var swiper; | ||
13 | var filter = require('../../plugin/filter'); | 13 | var filter = require('../../plugin/filter'); |
14 | 14 | ||
15 | var $goodsContainer = $('#goods-container'), | 15 | var $goodsContainer = $('#goods-container'), |
16 | - $ngc = $goodsContainer.children('.new-goods'), | ||
17 | - $pgc = $goodsContainer.children('.price-goods'), | ||
18 | - $dgc = $goodsContainer.children('.discount-goods'); | 16 | + $ngc = $($goodsContainer.children().get(0)), |
17 | + $pgc = $($goodsContainer.children().get(1)), | ||
18 | + $dgc = $($goodsContainer.children().get(2)); | ||
19 | 19 | ||
20 | var winH = $(window).height(); | 20 | var winH = $(window).height(); |
21 | 21 | ||
@@ -56,10 +56,12 @@ var $listNav = $('#list-nav'), | @@ -56,10 +56,12 @@ var $listNav = $('#list-nav'), | ||
56 | $pre, //纪录进入筛选前的active项 | 56 | $pre, //纪录进入筛选前的active项 |
57 | searching; | 57 | searching; |
58 | 58 | ||
59 | -swiper = new Swiper('.swiper-container', { | ||
60 | - lazyLoading: true, | ||
61 | - pagination: '.swiper-pagination' | ||
62 | -}); | 59 | +if ($('.swiper-container .swiper-slide').length > 1) { |
60 | + swiper = new Swiper('.swiper-container', { | ||
61 | + lazyLoading: true, | ||
62 | + pagination: '.swiper-pagination' | ||
63 | + }); | ||
64 | +} | ||
63 | 65 | ||
64 | /** | 66 | /** |
65 | * 筛选注册的回调,筛选子项点击后逻辑 | 67 | * 筛选注册的回调,筛选子项点击后逻辑 |
@@ -132,7 +134,7 @@ function search(opt) { | @@ -132,7 +134,7 @@ function search(opt) { | ||
132 | } | 134 | } |
133 | 135 | ||
134 | //导航类别 | 136 | //导航类别 |
135 | - if ($pre === undefined || $pre.hasClass('new')) { | 137 | + if ($pre.hasClass('new')) { |
136 | navType = 'newest'; | 138 | navType = 'newest'; |
137 | } else if ($pre.hasClass('price')) { | 139 | } else if ($pre.hasClass('price')) { |
138 | navType = 'price'; | 140 | navType = 'price'; |
@@ -308,6 +310,8 @@ $(window).scroll(function() { | @@ -308,6 +310,8 @@ $(window).scroll(function() { | ||
308 | //当scroll到1/4$goodsContainer高度后继续请求下一页数据 | 310 | //当scroll到1/4$goodsContainer高度后继续请求下一页数据 |
309 | if ($(window).scrollTop() + winH > | 311 | if ($(window).scrollTop() + winH > |
310 | $(document).height() - 0.25 * $goodsContainer.height()) { | 312 | $(document).height() - 0.25 * $goodsContainer.height()) { |
311 | - search(); | 313 | + if ($pre !== undefined) { |
314 | + search(); | ||
315 | + } | ||
312 | } | 316 | } |
313 | -}); | 317 | +}); |
@@ -59,10 +59,12 @@ var $listNav = $('#list-nav'), | @@ -59,10 +59,12 @@ var $listNav = $('#list-nav'), | ||
59 | $pgc.addClass('hide'); | 59 | $pgc.addClass('hide'); |
60 | $dgc.addClass('hide'); | 60 | $dgc.addClass('hide'); |
61 | 61 | ||
62 | -swiper = new Swiper('.swiper-container', { | ||
63 | - lazyLoading: true, | ||
64 | - pagination: '.swiper-pagination' | ||
65 | -}); | 62 | +if ($('.swiper-container .swiper-slide').length > 1) { |
63 | + swiper = new Swiper('.swiper-container', { | ||
64 | + lazyLoading: true, | ||
65 | + pagination: '.swiper-pagination' | ||
66 | + }); | ||
67 | +} | ||
66 | 68 | ||
67 | /** | 69 | /** |
68 | * 筛选注册的回调,筛选子项点击后逻辑 | 70 | * 筛选注册的回调,筛选子项点击后逻辑 |
@@ -151,7 +153,7 @@ function search(opt) { | @@ -151,7 +153,7 @@ function search(opt) { | ||
151 | } | 153 | } |
152 | 154 | ||
153 | //导航类别 | 155 | //导航类别 |
154 | - if ($pre === undefined || $pre.hasClass('today')) { | 156 | + if ($pre.hasClass('today')) { |
155 | navType = 'today'; | 157 | navType = 'today'; |
156 | dayLimit = 1; | 158 | dayLimit = 1; |
157 | } else if ($pre.hasClass('week')) { | 159 | } else if ($pre.hasClass('week')) { |
@@ -270,7 +272,8 @@ $listNav.delegate('li', 'touchstart', function() { | @@ -270,7 +272,8 @@ $listNav.delegate('li', 'touchstart', function() { | ||
270 | 272 | ||
271 | nav = navInfo[navType]; | 273 | nav = navInfo[navType]; |
272 | 274 | ||
273 | - if ($this.hasClass('hide')) { | 275 | + if (!($this.hasClass('active'))) { |
276 | + | ||
274 | $active = $this.siblings('.active'); | 277 | $active = $this.siblings('.active'); |
275 | 278 | ||
276 | $pre = $this; //$pre为除筛选导航的其他导航项,若当前active的为筛选,则把$pre置为当前点击项 | 279 | $pre = $this; //$pre为除筛选导航的其他导航项,若当前active的为筛选,则把$pre置为当前点击项 |
@@ -314,6 +317,8 @@ $(window).scroll(function() { | @@ -314,6 +317,8 @@ $(window).scroll(function() { | ||
314 | //当scroll到1/4$goodsContainer高度后继续请求下一页数据 | 317 | //当scroll到1/4$goodsContainer高度后继续请求下一页数据 |
315 | if ($(window).scrollTop() + winH > | 318 | if ($(window).scrollTop() + winH > |
316 | $(document).height() - 0.25 * $goodsContainer.height()) { | 319 | $(document).height() - 0.25 * $goodsContainer.height()) { |
317 | - search(); | 320 | + if ($pre !== undefined) { |
321 | + search(); | ||
322 | + } | ||
318 | } | 323 | } |
319 | }); | 324 | }); |
@@ -10,7 +10,7 @@ var $cartContent = $('.cart-content'); | @@ -10,7 +10,7 @@ var $cartContent = $('.cart-content'); | ||
10 | 10 | ||
11 | require('./good'); | 11 | require('./good'); |
12 | 12 | ||
13 | -$('.cart-nav').delegate('li', 'touchstart', function() { | 13 | +$('.cart-nav').delegate('li', 'tap', function() { |
14 | var $this = $(this); | 14 | var $this = $(this); |
15 | 15 | ||
16 | if ($this.hasClass('active')) { | 16 | if ($this.hasClass('active')) { |
@@ -37,7 +37,7 @@ function remove() { | @@ -37,7 +37,7 @@ function remove() { | ||
37 | $('.chose-panel').remove(); | 37 | $('.chose-panel').remove(); |
38 | } | 38 | } |
39 | 39 | ||
40 | -$('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) { | 40 | +$('.yoho-page').delegate('.chose-panel', 'tap', function(e) { |
41 | var $cur = $(e.target); | 41 | var $cur = $(e.target); |
42 | 42 | ||
43 | if ($cur.closest('.main').length > 0) { | 43 | if ($cur.closest('.main').length > 0) { |
@@ -46,10 +46,10 @@ $('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) { | @@ -46,10 +46,10 @@ $('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) { | ||
46 | 46 | ||
47 | //点击蒙版消失 | 47 | //点击蒙版消失 |
48 | remove(); | 48 | remove(); |
49 | -}).delegate('#chose-btn-sure', 'touchstart', function() { | 49 | +}).delegate('#chose-btn-sure', 'tap', function() { |
50 | 50 | ||
51 | //确定 | 51 | //确定 |
52 | -}).delegate('.block', 'touchstart', function() { | 52 | +}).delegate('.block', 'tap', function() { |
53 | 53 | ||
54 | //尺寸颜色点选 | 54 | //尺寸颜色点选 |
55 | var $this = $(this); | 55 | var $this = $(this); |
@@ -60,7 +60,7 @@ $('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) { | @@ -60,7 +60,7 @@ $('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) { | ||
60 | 60 | ||
61 | $this.siblings('.chosed').removeClass('chosed'); | 61 | $this.siblings('.chosed').removeClass('chosed'); |
62 | $this.addClass('chosed'); | 62 | $this.addClass('chosed'); |
63 | -}).delegate('.btn-minus', 'touchstart', function() { | 63 | +}).delegate('.btn-minus', 'tap', function() { |
64 | var num = +$num.val(); | 64 | var num = +$num.val(); |
65 | 65 | ||
66 | if (num === 1) { | 66 | if (num === 1) { |
@@ -68,7 +68,7 @@ $('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) { | @@ -68,7 +68,7 @@ $('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) { | ||
68 | } | 68 | } |
69 | 69 | ||
70 | $num.val(num - 1); | 70 | $num.val(num - 1); |
71 | -}).delegate('.btn-plus', 'touchstart', function() { | 71 | +}).delegate('.btn-plus', 'tap', function() { |
72 | var num = +$num.val(); | 72 | var num = +$num.val(); |
73 | 73 | ||
74 | //TODO:库存数验证 | 74 | //TODO:库存数验证 |
@@ -11,7 +11,7 @@ var chosePanel = require('./chose-panel'); | @@ -11,7 +11,7 @@ var chosePanel = require('./chose-panel'); | ||
11 | 11 | ||
12 | lazyLoad($('.lazy')); | 12 | lazyLoad($('.lazy')); |
13 | 13 | ||
14 | -$('.gift-advance-page').delegate('.chose', 'touchstart', function() { | 14 | +$('.gift-advance-page').delegate('.chose', 'tap', function() { |
15 | var id = $(this).closest('.gift-advance-good').data('id'); | 15 | var id = $(this).closest('.gift-advance-good').data('id'); |
16 | 16 | ||
17 | $.ajax({ | 17 | $.ajax({ |
@@ -17,12 +17,12 @@ function docTouchEvt(e) { | @@ -17,12 +17,12 @@ function docTouchEvt(e) { | ||
17 | $('.opt-panel:not(.hide)').addClass('hide'); | 17 | $('.opt-panel:not(.hide)').addClass('hide'); |
18 | 18 | ||
19 | // | 19 | // |
20 | - $(document).unbind('touchstart', docTouchEvt); | 20 | + $(document).unbind('tap', docTouchEvt); |
21 | } | 21 | } |
22 | } | 22 | } |
23 | 23 | ||
24 | // function unbindDocTouchEvt(e) { | 24 | // function unbindDocTouchEvt(e) { |
25 | -// $(document).unbind('touchstart', docTouchEvt); | 25 | +// $(document).unbind('tap', docTouchEvt); |
26 | // } | 26 | // } |
27 | 27 | ||
28 | ellipsis.init(); | 28 | ellipsis.init(); |
@@ -32,7 +32,7 @@ lazyLoad($('.lazy')); | @@ -32,7 +32,7 @@ lazyLoad($('.lazy')); | ||
32 | $('.name')[0].mlellipsis(2); | 32 | $('.name')[0].mlellipsis(2); |
33 | 33 | ||
34 | //TIP:事件委托在.cart-goods,商品列表的容器统一需要有.cart-goods | 34 | //TIP:事件委托在.cart-goods,商品列表的容器统一需要有.cart-goods |
35 | -$('.cart-goods').delegate('.checkbox', 'touchstart', function() { | 35 | +$('.cart-goods').delegate('.checkbox', 'tap', function() { |
36 | var $this = $(this); | 36 | var $this = $(this); |
37 | 37 | ||
38 | if ($this.hasClass('icon-cb-checked')) { | 38 | if ($this.hasClass('icon-cb-checked')) { |
@@ -40,7 +40,7 @@ $('.cart-goods').delegate('.checkbox', 'touchstart', function() { | @@ -40,7 +40,7 @@ $('.cart-goods').delegate('.checkbox', 'touchstart', function() { | ||
40 | } else { | 40 | } else { |
41 | $this.removeClass('icon-checkbox').addClass('icon-cb-checked'); | 41 | $this.removeClass('icon-checkbox').addClass('icon-cb-checked'); |
42 | } | 42 | } |
43 | -}).delegate('.icon-edit', 'touchstart', function() { | 43 | +}).delegate('.icon-edit', 'tap', function() { |
44 | var id = $(this).closest('.shopping-cart-good').data('id'); | 44 | var id = $(this).closest('.shopping-cart-good').data('id'); |
45 | 45 | ||
46 | $.ajax({ | 46 | $.ajax({ |
@@ -55,13 +55,13 @@ $('.cart-goods').delegate('.checkbox', 'touchstart', function() { | @@ -55,13 +55,13 @@ $('.cart-goods').delegate('.checkbox', 'touchstart', function() { | ||
55 | } | 55 | } |
56 | } | 56 | } |
57 | }); | 57 | }); |
58 | -}).delegate('.icon-del', 'touchstart', function(e) { | 58 | +}).delegate('.icon-del', 'tap', function(e) { |
59 | e.stopPropagation(); | 59 | e.stopPropagation(); |
60 | 60 | ||
61 | $(this).closest('.shopping-cart-good').children('.opt-panel').removeClass('hide'); | 61 | $(this).closest('.shopping-cart-good').children('.opt-panel').removeClass('hide'); |
62 | 62 | ||
63 | - $(document).bind('touchstart', docTouchEvt); | ||
64 | -}).delegate('.opt-panel', 'touchstart', function() { | 63 | + $(document).bind('tap', docTouchEvt); |
64 | +}).delegate('.opt-panel', 'tap', function() { | ||
65 | var $this = $(this), | 65 | var $this = $(this), |
66 | id = $this.closest('.shopping-cart-good').data('id'); | 66 | id = $this.closest('.shopping-cart-good').data('id'); |
67 | 67 |
@@ -16,13 +16,13 @@ | @@ -16,13 +16,13 @@ | ||
16 | "spm": { | 16 | "spm": { |
17 | "main": "index.js", | 17 | "main": "index.js", |
18 | "dependencies": { | 18 | "dependencies": { |
19 | - "yoho.zepto": "1.1.60", | 19 | + "yoho.zepto": "1.1.61", |
20 | "yoho.jquery": "1.8.3", | 20 | "yoho.jquery": "1.8.3", |
21 | "mlellipsis": "0.0.6", | 21 | "mlellipsis": "0.0.6", |
22 | "yoho.iswiper": "3.0.1", | 22 | "yoho.iswiper": "3.0.1", |
23 | "iscroll": "5.1.2", | 23 | "iscroll": "5.1.2", |
24 | "import-style": "1.0.0", | 24 | "import-style": "1.0.0", |
25 | - "yoho.zeptolazyload": "0.0.1", | 25 | + "yoho.zeptolazyload": "0.0.2", |
26 | "yoho.handlebars": "3.0.3" | 26 | "yoho.handlebars": "3.0.3" |
27 | }, | 27 | }, |
28 | "devDependencies": { | 28 | "devDependencies": { |
@@ -2,31 +2,32 @@ | @@ -2,31 +2,32 @@ | ||
2 | 2 | ||
3 | .newbrand-search { | 3 | .newbrand-search { |
4 | width: 93.75%; | 4 | width: 93.75%; |
5 | - height: 30px; | ||
6 | - padding: 7px 3.125%; | 5 | + height: 60rem / $pxConvertRem; |
6 | + padding: 14rem / $pxConvertRem 3.125%; | ||
7 | background-color: #f8f8f8; | 7 | background-color: #f8f8f8; |
8 | left: 0; | 8 | left: 0; |
9 | - top: 44px; | 9 | + top: 88rem / $pxConvertRem; |
10 | position: fixed; | 10 | position: fixed; |
11 | z-index: 2; | 11 | z-index: 2; |
12 | .search-box { | 12 | .search-box { |
13 | position: relative; | 13 | position: relative; |
14 | - height: 30px; | 14 | + height: 60rem / $pxConvertRem; |
15 | background-color: #FFF; | 15 | background-color: #FFF; |
16 | - border-radius: 15px; | ||
17 | - padding: 0 16px 0 26px; | 16 | + border-radius: 30rem / $pxConvertRem; |
17 | + padding: 0 32rem / $pxConvertRem 0 52rem / $pxConvertRem; | ||
18 | 18 | ||
19 | .search-input { | 19 | .search-input { |
20 | width: 100%; | 20 | width: 100%; |
21 | - height: 30px; | 21 | + height: 60rem / $pxConvertRem; |
22 | border: 0; | 22 | border: 0; |
23 | } | 23 | } |
24 | 24 | ||
25 | .search-icon { | 25 | .search-icon { |
26 | position: absolute; | 26 | position: absolute; |
27 | - font-size: 12px; | ||
28 | - top: 16px; | ||
29 | - left: 24px; | 27 | + font-size: 24rem / $pxConvertRem; |
28 | + top: 20rem / $pxConvertRem; | ||
29 | + left: 24rem / $pxConvertRem; | ||
30 | + color: #bdbdbd; | ||
30 | } | 31 | } |
31 | 32 | ||
32 | } | 33 | } |
@@ -60,52 +61,67 @@ | @@ -60,52 +61,67 @@ | ||
60 | background: #eeeeee; | 61 | background: #eeeeee; |
61 | 62 | ||
62 | color: #999999; | 63 | color: #999999; |
63 | - font-weight: bold; | 64 | + // font-weight: bold; |
64 | position: relative; | 65 | position: relative; |
65 | - | ||
66 | h2 { | 66 | h2 { |
67 | - width: 100%; | ||
68 | - height: 25px; | ||
69 | - line-height: 25px; | ||
70 | - font-size: 17px; | 67 | + // width: 100%; |
68 | + padding: 0 20rem / $pxConvertRem; | ||
69 | + height: 50rem / $pxConvertRem; | ||
70 | + line-height: 50rem / $pxConvertRem; | ||
71 | + font-size: 34rem / $pxConvertRem; | ||
71 | border-top: 1px solid #e6e6e6; | 72 | border-top: 1px solid #e6e6e6; |
72 | background-color: #f4f4f4; | 73 | background-color: #f4f4f4; |
73 | } | 74 | } |
74 | } | 75 | } |
75 | 76 | ||
76 | - p { | ||
77 | - cursor: pointer; | ||
78 | - height: 25px; | ||
79 | - padding-right: 10px; | ||
80 | - a { | ||
81 | - display: block; | ||
82 | - font-size: 17px; | ||
83 | - border-bottom: 1px solid #f3f3f3; | ||
84 | - border-top: 1px solid #f9f9f9; | ||
85 | - i { | ||
86 | - position: relative; | ||
87 | - top: 1px; | ||
88 | - color: #ff0000; | ||
89 | - padding-left: 16px; | ||
90 | - } | 77 | + p { |
78 | + cursor: pointer; | ||
79 | + // height: 50rem / $pxConvertRem; | ||
80 | + padding: 0 20rem / $pxConvertRem; | ||
81 | + a { | ||
82 | + display: block; | ||
83 | + padding-top: 10rem / $pxConvertRem; | ||
84 | + height: 76rem / $pxConvertRem; | ||
85 | + line-height: 76rem / $pxConvertRem; | ||
86 | + font-size: 34rem / $pxConvertRem; | ||
87 | + border-bottom: 1px solid #f3f3f3; | ||
88 | + border-top: 1px solid #f9f9f9; | ||
89 | + i { | ||
90 | + display: inline-block; | ||
91 | + margin-left: 24rem / $pxConvertRem; | ||
92 | + width: 40rem / $pxConvertRem; | ||
93 | + height: 40rem / $pxConvertRem; | ||
94 | + text-align: center; | ||
95 | + vertical-align: middle; | ||
96 | + font-size: 28rem / $pxConvertRem; | ||
97 | + line-height: 40rem / $pxConvertRem; | ||
98 | + color: #fff; | ||
99 | + border-radius: 50%; | ||
100 | + } | ||
101 | + .icon-hot { | ||
102 | + background: #ff0000; | ||
103 | + } | ||
104 | + .icon-new { | ||
105 | + background: #86c048; | ||
91 | } | 106 | } |
92 | } | 107 | } |
108 | + } | ||
93 | } | 109 | } |
94 | 110 | ||
95 | .right-bar { | 111 | .right-bar { |
96 | 112 | ||
97 | - width: 30px; | ||
98 | - top: 120px !important; | 113 | + width: 60rem / $pxConvertRem; |
114 | + top: 240rem / $pxConvertRem !important; | ||
99 | overflow: hidden; | 115 | overflow: hidden; |
100 | position: fixed; | 116 | position: fixed; |
101 | - right: 1px; | ||
102 | - border-radius: 6px; | 117 | + right: 2rem / $pxConvertRem; |
118 | + border-radius: 12rem / $pxConvertRem; | ||
103 | background: rgba(0,0,0,.8); | 119 | background: rgba(0,0,0,.8); |
104 | z-index: 2; | 120 | z-index: 2; |
105 | b { | 121 | b { |
106 | - height: 16px; | 122 | + height: 32rem / $pxConvertRem; |
107 | 123 | ||
108 | - line-height: 14px; | 124 | + line-height: 28rem / $pxConvertRem; |
109 | text-align: center; | 125 | text-align: center; |
110 | display: block; | 126 | display: block; |
111 | color: #999999; | 127 | color: #999999; |
@@ -114,6 +130,6 @@ | @@ -114,6 +130,6 @@ | ||
114 | } | 130 | } |
115 | 131 | ||
116 | .con { | 132 | .con { |
117 | - padding-top: 5px; | 133 | + padding-top: 10rem / $pxConvertRem; |
118 | } | 134 | } |
119 | } | 135 | } |
@@ -6,6 +6,7 @@ | @@ -6,6 +6,7 @@ | ||
6 | right: 0; | 6 | right: 0; |
7 | bottom: 20rem / $pxConvertRem; | 7 | bottom: 20rem / $pxConvertRem; |
8 | text-align: center; | 8 | text-align: center; |
9 | + z-index: 1; | ||
9 | .pagination-inner { | 10 | .pagination-inner { |
10 | display: inline-block; | 11 | display: inline-block; |
11 | span { | 12 | span { |
@@ -16,9 +17,10 @@ | @@ -16,9 +17,10 @@ | ||
16 | opacity: 0.5; | 17 | opacity: 0.5; |
17 | margin: 0 (9rem / $pxConvertRem); | 18 | margin: 0 (9rem / $pxConvertRem); |
18 | border-radius: 50%; | 19 | border-radius: 50%; |
19 | - } | ||
20 | - span.swiper-active-switch { | ||
21 | - opacity: 1; | 20 | + &.swiper-pagination-bullet-active { |
21 | + background: #fff; | ||
22 | + opacity: 1; | ||
23 | + } | ||
22 | } | 24 | } |
23 | } | 25 | } |
24 | } | 26 | } |
@@ -17,14 +17,15 @@ | @@ -17,14 +17,15 @@ | ||
17 | overflow: hidden; | 17 | overflow: hidden; |
18 | 18 | ||
19 | .brand-logo { | 19 | .brand-logo { |
20 | - width: 100%; | 20 | + display: table-cell; |
21 | + width: 3.95rem; | ||
21 | height: 128rem / $pxConvertRem; | 22 | height: 128rem / $pxConvertRem; |
22 | line-height: 128rem / $pxConvertRem; | 23 | line-height: 128rem / $pxConvertRem; |
23 | text-align: center; | 24 | text-align: center; |
24 | font-size: 0; | 25 | font-size: 0; |
26 | + vertical-align: middle; | ||
25 | 27 | ||
26 | img { | 28 | img { |
27 | - vertical-align: middle; | ||
28 | max-width: 100%; | 29 | max-width: 100%; |
29 | max-height: 100%; | 30 | max-height: 100%; |
30 | } | 31 | } |
@@ -68,13 +69,13 @@ | @@ -68,13 +69,13 @@ | ||
68 | .brands-swiper { | 69 | .brands-swiper { |
69 | background: #fff; | 70 | background: #fff; |
70 | width: 100%; | 71 | width: 100%; |
71 | - height: 140rem / $pxConvertRem; | 72 | + height: 180rem / $pxConvertRem; |
72 | margin-bottom: 28rem / $pxConvertRem; | 73 | margin-bottom: 28rem / $pxConvertRem; |
73 | overflow: hidden; | 74 | overflow: hidden; |
74 | 75 | ||
75 | .brands-list { | 76 | .brands-list { |
76 | position: relative; | 77 | position: relative; |
77 | - height: 140rem / $pxConvertRem; | 78 | + height: 180rem / $pxConvertRem; |
78 | 79 | ||
79 | li { | 80 | li { |
80 | float: left; | 81 | float: left; |
@@ -85,11 +86,12 @@ | @@ -85,11 +86,12 @@ | ||
85 | 86 | ||
86 | a { | 87 | a { |
87 | position: relative; | 88 | position: relative; |
88 | - display: block; | 89 | + display: table-cell; |
89 | width: 100%; | 90 | width: 100%; |
90 | - height: 100%; | 91 | + height: 140rem / $pxConvertRem; |
91 | line-height: 140rem / $pxConvertRem; | 92 | line-height: 140rem / $pxConvertRem; |
92 | font-size: 0; | 93 | font-size: 0; |
94 | + vertical-align: middle; | ||
93 | } | 95 | } |
94 | 96 | ||
95 | img { | 97 | img { |
@@ -102,7 +104,8 @@ | @@ -102,7 +104,8 @@ | ||
102 | position: absolute; | 104 | position: absolute; |
103 | left: 8rem / $pxConvertRem; | 105 | left: 8rem / $pxConvertRem; |
104 | right: 8rem / $pxConvertRem; | 106 | right: 8rem / $pxConvertRem; |
105 | - bottom: 8rem / $pxConvertRem; | 107 | + bottom: -32rem / $pxConvertRem; |
108 | + width: 100%; | ||
106 | height: 28rem / $pxConvertRem; | 109 | height: 28rem / $pxConvertRem; |
107 | line-height: 28rem / $pxConvertRem; | 110 | line-height: 28rem / $pxConvertRem; |
108 | text-align: center; | 111 | text-align: center; |
@@ -4,15 +4,15 @@ | @@ -4,15 +4,15 @@ | ||
4 | color: #fff; | 4 | color: #fff; |
5 | width: 100%; | 5 | width: 100%; |
6 | overflow: hidden; | 6 | overflow: hidden; |
7 | - height: 44px; | ||
8 | - line-height: 44px; | 7 | + height: 88rem / $pxConvertRem; |
8 | + line-height: 88rem / $pxConvertRem; | ||
9 | 9 | ||
10 | .nav-back { | 10 | .nav-back { |
11 | position: absolute; | 11 | position: absolute; |
12 | - left: 17px; | ||
13 | - top: 14px; | ||
14 | - width: 9px; | ||
15 | - height: 16px; | 12 | + left: 34rem / $pxConvertRem; |
13 | + top: 28rem / $pxConvertRem; | ||
14 | + width: 18rem / $pxConvertRem; | ||
15 | + height: 32rem / $pxConvertRem; | ||
16 | background: image-url('layout/back.png') no-repeat; | 16 | background: image-url('layout/back.png') no-repeat; |
17 | background-size: 100% 100%; | 17 | background-size: 100% 100%; |
18 | outline: none; | 18 | outline: none; |
@@ -20,8 +20,8 @@ | @@ -20,8 +20,8 @@ | ||
20 | 20 | ||
21 | .nav-home { | 21 | .nav-home { |
22 | position: absolute; | 22 | position: absolute; |
23 | - top: 14px; | ||
24 | - right: 17px; | 23 | + top: 28rem / $pxConvertRem; |
24 | + right: 34rem / $pxConvertRem; | ||
25 | width: 20px; | 25 | width: 20px; |
26 | height: 20px; | 26 | height: 20px; |
27 | background: image-url('layout/home.png') no-repeat; | 27 | background: image-url('layout/home.png') no-repeat; |
@@ -31,10 +31,10 @@ | @@ -31,10 +31,10 @@ | ||
31 | 31 | ||
32 | .nav-title { | 32 | .nav-title { |
33 | position: absolute; | 33 | position: absolute; |
34 | - margin-left: 26px; | ||
35 | - margin-right: 32px; | 34 | + margin-left: 52rem / $pxConvertRem; |
35 | + margin-right: 64rem / $pxConvertRem; | ||
36 | height: 100%; | 36 | height: 100%; |
37 | - font-size: 18px; | 37 | + font-size: 36rem / $pxConvertRem; |
38 | color: #fff; | 38 | color: #fff; |
39 | font-weight: bold; | 39 | font-weight: bold; |
40 | top: 0; | 40 | top: 0; |
@@ -39,13 +39,11 @@ | @@ -39,13 +39,11 @@ | ||
39 | {{# list}} | 39 | {{# list}} |
40 | <p> | 40 | <p> |
41 | <a href="{{url}}">{{name}} | 41 | <a href="{{url}}">{{name}} |
42 | - <i class="icon-hot"> | ||
43 | - </i> | ||
44 | {{# isHot}} | 42 | {{# isHot}} |
45 | - <i class="icon-hot"></i> | 43 | + <i class="icon-hot">H</i> |
46 | {{/ isHot}} | 44 | {{/ isHot}} |
47 | {{# isNew}} | 45 | {{# isNew}} |
48 | - <i class="icon-new"></i> | 46 | + <i class="icon-new">N</i> |
49 | {{/ isNew}} | 47 | {{/ isNew}} |
50 | </a> | 48 | </a> |
51 | </p> | 49 | </p> |
@@ -84,13 +84,13 @@ | @@ -84,13 +84,13 @@ | ||
84 | </li> | 84 | </li> |
85 | </ul> | 85 | </ul> |
86 | <div id="goods-container" class="goods-container"> | 86 | <div id="goods-container" class="goods-container"> |
87 | - <div class="new-goods container"> | 87 | + <div class="new-goods container clearfix"> |
88 | {{# new}} | 88 | {{# new}} |
89 | {{> good}} | 89 | {{> good}} |
90 | {{/ new}} | 90 | {{/ new}} |
91 | </div> | 91 | </div> |
92 | - <div class="price-goods container hide"></div> | ||
93 | - <div class="discount-goods container hide"></div> | 92 | + <div class="price-goods container clearfix hide"></div> |
93 | + <div class="discount-goods container clearfix hide"></div> | ||
94 | 94 | ||
95 | {{> filter}} | 95 | {{> filter}} |
96 | </div> | 96 | </div> |
@@ -40,12 +40,18 @@ | @@ -40,12 +40,18 @@ | ||
40 | <div id="goods-container" class="goods-container"> | 40 | <div id="goods-container" class="goods-container"> |
41 | {{# goodsContainer}} | 41 | {{# goodsContainer}} |
42 | <div class="new-goods container"> | 42 | <div class="new-goods container"> |
43 | + {{#if goods}} | ||
43 | {{# goods}} | 44 | {{# goods}} |
44 | {{> good}} | 45 | {{> good}} |
45 | {{/ goods}} | 46 | {{/ goods}} |
47 | + {{^}} | ||
48 | + <p class="no-result">未找到相关搜索结果</p> | ||
49 | + {{/if}} | ||
46 | </div> | 50 | </div> |
51 | + <div class="price-goods container hide"></div> | ||
52 | + <div class="discount-goods container hide"></div> | ||
47 | {{/ goodsContainer}} | 53 | {{/ goodsContainer}} |
48 | - | 54 | + |
49 | {{> filter}} | 55 | {{> filter}} |
50 | </div> | 56 | </div> |
51 | 57 | ||
@@ -90,7 +96,7 @@ | @@ -90,7 +96,7 @@ | ||
90 | {{/if}} | 96 | {{/if}} |
91 | 97 | ||
92 | {{#if discount}} | 98 | {{#if discount}} |
93 | - <input id="page" type="hidden" value={{page}}> | 99 | + <input id="discount" type="hidden" value={{discount}}> |
94 | {{/if}} | 100 | {{/if}} |
95 | 101 | ||
96 | </div> | 102 | </div> |
@@ -108,14 +108,14 @@ | @@ -108,14 +108,14 @@ | ||
108 | {{/if}} | 108 | {{/if}} |
109 | 109 | ||
110 | {{!-- 新品到着 --}} | 110 | {{!-- 新品到着 --}} |
111 | -{{#if newArrival}} | 111 | +{{#if newArrivalPage}} |
112 | <script> | 112 | <script> |
113 | seajs.use('js/product/newsale/newarrival'); | 113 | seajs.use('js/product/newsale/newarrival'); |
114 | </script> | 114 | </script> |
115 | {{/if}} | 115 | {{/if}} |
116 | 116 | ||
117 | {{!-- 折扣专区 --}} | 117 | {{!-- 折扣专区 --}} |
118 | -{{#if discount}} | 118 | +{{#if discountPage}} |
119 | <script> | 119 | <script> |
120 | seajs.use('js/product/newsale/discount'); | 120 | seajs.use('js/product/newsale/discount'); |
121 | </script> | 121 | </script> |
@@ -26,6 +26,7 @@ class BoysController extends AbstractAction | @@ -26,6 +26,7 @@ class BoysController extends AbstractAction | ||
26 | // 渲染模板并输出 | 26 | // 渲染模板并输出 |
27 | $this->_view->display('index', array( | 27 | $this->_view->display('index', array( |
28 | 'boysHomePage' => true, | 28 | 'boysHomePage' => true, |
29 | + 'showDownloadApp'=>true, | ||
29 | 'maybeLike' => true, | 30 | 'maybeLike' => true, |
30 | 'content' => Index\HomeModel::getBoysFloor() | 31 | 'content' => Index\HomeModel::getBoysFloor() |
31 | )); | 32 | )); |
@@ -26,6 +26,7 @@ class GirlsController extends AbstractAction | @@ -26,6 +26,7 @@ class GirlsController extends AbstractAction | ||
26 | // 渲染模板并输出 | 26 | // 渲染模板并输出 |
27 | $this->_view->display('index', array( | 27 | $this->_view->display('index', array( |
28 | 'grilsHomePage' => true, | 28 | 'grilsHomePage' => true, |
29 | + 'showDownloadApp'=>true, | ||
29 | 'maybeLike' => true, | 30 | 'maybeLike' => true, |
30 | 'content' => Index\HomeModel::getGirlsFloor() | 31 | 'content' => Index\HomeModel::getGirlsFloor() |
31 | )); | 32 | )); |
@@ -18,7 +18,9 @@ class IndexController extends AbstractAction | @@ -18,7 +18,9 @@ class IndexController extends AbstractAction | ||
18 | 18 | ||
19 | // 渲染模板 | 19 | // 渲染模板 |
20 | $this->_view->display('index', array( | 20 | $this->_view->display('index', array( |
21 | - 'background' => Index\HomeModel::getBgImage() | 21 | + 'background' => Index\HomeModel::getBgImage(), |
22 | + 'channelPage' => true, | ||
23 | + 'showDownloadApp'=>true | ||
22 | )); | 24 | )); |
23 | } | 25 | } |
24 | 26 |
@@ -26,6 +26,7 @@ class KidsController extends AbstractAction | @@ -26,6 +26,7 @@ class KidsController extends AbstractAction | ||
26 | // 渲染模板并输出 | 26 | // 渲染模板并输出 |
27 | $this->_view->display('index', array( | 27 | $this->_view->display('index', array( |
28 | 'kidsHomePage' => true, | 28 | 'kidsHomePage' => true, |
29 | + 'showDownloadApp'=>true, | ||
29 | 'maybeLike' => true, | 30 | 'maybeLike' => true, |
30 | 'content' => Index\HomeModel::getKidsFloor() | 31 | 'content' => Index\HomeModel::getKidsFloor() |
31 | )); | 32 | )); |
@@ -26,6 +26,7 @@ class LifestyleController extends AbstractAction | @@ -26,6 +26,7 @@ class LifestyleController extends AbstractAction | ||
26 | // 渲染模板并输出 | 26 | // 渲染模板并输出 |
27 | $this->_view->display('index', array( | 27 | $this->_view->display('index', array( |
28 | 'lifestyleHomePage' => true, | 28 | 'lifestyleHomePage' => true, |
29 | + 'showDownloadApp'=>true, | ||
29 | 'maybeLike' => true, | 30 | 'maybeLike' => true, |
30 | 'content' => Index\HomeModel::getLifestyleFloor() | 31 | 'content' => Index\HomeModel::getLifestyleFloor() |
31 | )); | 32 | )); |
@@ -41,7 +41,7 @@ class InfoController extends AbstractAction | @@ -41,7 +41,7 @@ class InfoController extends AbstractAction | ||
41 | $data['guang']['author']['avatar'] = $detail['getAuthor']['avatar']; | 41 | $data['guang']['author']['avatar'] = $detail['getAuthor']['avatar']; |
42 | $data['guang']['author']['name'] = $detail['getAuthor']['name']; | 42 | $data['guang']['author']['name'] = $detail['getAuthor']['name']; |
43 | $data['guang']['author']['intro'] = $detail['getAuthor']['author_desc']; | 43 | $data['guang']['author']['intro'] = $detail['getAuthor']['author_desc']; |
44 | - $data['guang']['author']['url'] = '/author/index?id=' . $detail['getArticle']['author_id']; | 44 | + $data['guang']['author']['url'] = Helpers::url('/author/index', array('id' => $detail['getArticle']['author_id']), 'guang'); |
45 | } | 45 | } |
46 | 46 | ||
47 | $data['detail'] = array(); | 47 | $data['detail'] = array(); |
@@ -55,17 +55,27 @@ class InfoController extends AbstractAction | @@ -55,17 +55,27 @@ class InfoController extends AbstractAction | ||
55 | $good = array(); | 55 | $good = array(); |
56 | $skns = array(); | 56 | $skns = array(); |
57 | $product = array(); | 57 | $product = array(); |
58 | + | ||
58 | foreach ($detail['getArticleContent'] as $value) { | 59 | foreach ($detail['getArticleContent'] as $value) { |
59 | $build = array(); | 60 | $build = array(); |
60 | // 文字 | 61 | // 文字 |
61 | if (isset($value['text'])) { | 62 | if (isset($value['text'])) { |
62 | $build['text'] = $value['text']['data']['text']; | 63 | $build['text'] = $value['text']['data']['text']; |
63 | - $data['detail']['content'][] = $build; | ||
64 | } | 64 | } |
65 | // 单张图 | 65 | // 单张图 |
66 | elseif (isset($value['singleImage'])) { | 66 | elseif (isset($value['singleImage'])) { |
67 | $build['bigImage'] = Helpers::getImageUrl($value['singleImage']['data'][0]['src'], 640, 640); | 67 | $build['bigImage'] = Helpers::getImageUrl($value['singleImage']['data'][0]['src'], 640, 640); |
68 | - $data['detail']['content'][] = $build; | 68 | + } |
69 | + elseif (isset($value['smallPic'])) { | ||
70 | + $imgs = $value['smallPic']['data']; | ||
71 | + $build['smallImage'] = array( | ||
72 | + array( | ||
73 | + 'src' => Helpers::getImageUrl($imgs[0]['src'], 315, 420) | ||
74 | + ), | ||
75 | + array( | ||
76 | + 'src' => Helpers::getImageUrl($imgs[1]['src'], 315, 420) | ||
77 | + ) | ||
78 | + ); | ||
69 | } | 79 | } |
70 | // 相关推荐 | 80 | // 相关推荐 |
71 | elseif (isset($value['goods']['data'])) { | 81 | elseif (isset($value['goods']['data'])) { |
@@ -133,7 +143,7 @@ class InfoController extends AbstractAction | @@ -133,7 +143,7 @@ class InfoController extends AbstractAction | ||
133 | // 相关标签 | 143 | // 相关标签 |
134 | if (!empty($detail['getArticle']['tags'])) { | 144 | if (!empty($detail['getArticle']['tags'])) { |
135 | foreach ($detail['getArticle']['tags'] as $value) { | 145 | foreach ($detail['getArticle']['tags'] as $value) { |
136 | - $value['url'] = '/tags/index?query=' . $value['name']; | 146 | + $value['url'] = Helpers::url('/tags/index', array('query=' => $value['name']), 'guang'); |
137 | $data['relatedTag'][] = $value; | 147 | $data['relatedTag'][] = $value; |
138 | } | 148 | } |
139 | } | 149 | } |
@@ -141,11 +151,12 @@ class InfoController extends AbstractAction | @@ -141,11 +151,12 @@ class InfoController extends AbstractAction | ||
141 | // 相关文章 | 151 | // 相关文章 |
142 | if (!empty($detail['getOtherArticle'])) { | 152 | if (!empty($detail['getOtherArticle'])) { |
143 | foreach ($detail['getOtherArticle'] as $value) { | 153 | foreach ($detail['getOtherArticle'] as $value) { |
144 | - $value['url'] = '/info/index?id=' . $value['id']; | 154 | + $value['url'] = Helpers::url('/info/index', array('id' => $value['id']), 'guang'); |
155 | + $value['thumb'] = Helpers::getImageUrl($value['thumb'], 279, 175); | ||
145 | $data['relatedInfo'][] = $value; | 156 | $data['relatedInfo'][] = $value; |
146 | } | 157 | } |
147 | } | 158 | } |
148 | - | 159 | + |
149 | $this->_view->display('index', $data); | 160 | $this->_view->display('index', $data); |
150 | 161 | ||
151 | $detail = array(); | 162 | $detail = array(); |
@@ -79,7 +79,7 @@ class PlusstarController extends AbstractAction | @@ -79,7 +79,7 @@ class PlusstarController extends AbstractAction | ||
79 | $data['ps']['likeUrl'] = false; //"http://guang.m.yohobuy.com/plustar/brandinfo?id=285&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:\/\/guang.m.yohobuy.com\/plustar\/brandinfo","param":{"id":285}},"requesturl":{"url":"\/guang\/api\/v1\/favorite\/togglebrand","param":{"brand_id":"701"}},"priority":"Y"}}"; | 79 | $data['ps']['likeUrl'] = false; //"http://guang.m.yohobuy.com/plustar/brandinfo?id=285&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:\/\/guang.m.yohobuy.com\/plustar\/brandinfo","param":{"id":285}},"requesturl":{"url":"\/guang\/api\/v1\/favorite\/togglebrand","param":{"brand_id":"701"}},"priority":"Y"}}"; |
80 | $data['ps']['intro'] = empty($brandInfo['getBrandInfo']['data']['brand_intro']) ? '' : strtr(strip_tags($brandInfo['getBrandInfo']['data']['brand_intro']), array(' ' => ' ')); | 80 | $data['ps']['intro'] = empty($brandInfo['getBrandInfo']['data']['brand_intro']) ? '' : strtr(strip_tags($brandInfo['getBrandInfo']['data']['brand_intro']), array(' ' => ' ')); |
81 | $data['ps']['newArrival'] = array(); | 81 | $data['ps']['newArrival'] = array(); |
82 | - $data['ps']['newArrival']['moreUrl'] = ''; // @todo 品牌列表页面 | 82 | + $data['ps']['newArrival']['moreUrl'] = '/product/list/brand?brand='.$id; // @todo 品牌列表页面 |
83 | $data['ps']['newArrival']['naList'] = $brandInfo['getNewProduct']; | 83 | $data['ps']['newArrival']['naList'] = $brandInfo['getNewProduct']; |
84 | $data['ps']['infos'] = array(); | 84 | $data['ps']['infos'] = array(); |
85 | 85 |
@@ -24,7 +24,7 @@ class NewsaleController extends AbstractAction | @@ -24,7 +24,7 @@ class NewsaleController extends AbstractAction | ||
24 | $this->channelTrans($channel); | 24 | $this->channelTrans($channel); |
25 | 25 | ||
26 | $data = array(); | 26 | $data = array(); |
27 | - $data['newArrival'] = true; | 27 | + $data['newArrivalPage'] = true; |
28 | $data['headerBanner'] = \Product\NewsaleModel::getNewFocus($channel); | 28 | $data['headerBanner'] = \Product\NewsaleModel::getNewFocus($channel); |
29 | $goodsList = \Product\NewsaleModel::getNewProducts($channel, 60); | 29 | $goodsList = \Product\NewsaleModel::getNewProducts($channel, 60); |
30 | if (!empty($goodsList)) { | 30 | if (!empty($goodsList)) { |
@@ -58,6 +58,7 @@ class NewsaleController extends AbstractAction | @@ -58,6 +58,7 @@ class NewsaleController extends AbstractAction | ||
58 | $this->channelTrans($channel); | 58 | $this->channelTrans($channel); |
59 | 59 | ||
60 | $data = array(); | 60 | $data = array(); |
61 | + $data['discountPage'] = true; | ||
61 | $data['headerBanner'] = \Product\NewsaleModel::getNewFocus($channel); | 62 | $data['headerBanner'] = \Product\NewsaleModel::getNewFocus($channel); |
62 | $goodsList = \Product\NewsaleModel::getSaleProducts($channel, 60); | 63 | $goodsList = \Product\NewsaleModel::getSaleProducts($channel, 60); |
63 | if (!empty($goodsList)) { | 64 | if (!empty($goodsList)) { |
@@ -72,7 +73,7 @@ class NewsaleController extends AbstractAction | @@ -72,7 +73,7 @@ class NewsaleController extends AbstractAction | ||
72 | 'size' => 0, | 73 | 'size' => 0, |
73 | 'discount' => '0.1,0.9' | 74 | 'discount' => '0.1,0.9' |
74 | ); | 75 | ); |
75 | - | 76 | +//var_dump($data);exit; |
76 | $this->_view->display('sale', $data); | 77 | $this->_view->display('sale', $data); |
77 | } | 78 | } |
78 | 79 | ||
@@ -131,7 +132,7 @@ class NewsaleController extends AbstractAction | @@ -131,7 +132,7 @@ class NewsaleController extends AbstractAction | ||
131 | 132 | ||
132 | $data = NewsaleData::selectNewSaleProducts( | 133 | $data = NewsaleData::selectNewSaleProducts( |
133 | $gender, $brand, $sort, $color, | 134 | $gender, $brand, $sort, $color, |
134 | - $size, $price, $p_d, $channel, $dayLimit, $limit, $page | 135 | + $size, $price, $p_d, $channel, $dayLimit, $limit, $page, $order |
135 | ); | 136 | ); |
136 | $result = \Product\NewsaleModel::selectData($data); | 137 | $result = \Product\NewsaleModel::selectData($data); |
137 | 138 |
-
Please register or login to post a comment