Authored by 周少峰

Merge branch 'release/4.8' of http://git.yoho.cn/fe/yohobuypc into release/4.8

@@ -476,7 +476,7 @@ class HelperSearch @@ -476,7 +476,7 @@ class HelperSearch
476 476
477 sort($filter['ageLevel']); 477 sort($filter['ageLevel']);
478 foreach ($filter['ageLevel'] as $key => $val) { 478 foreach ($filter['ageLevel'] as $key => $val) {
479 - if ($val['id'] == $params['ageLevel']) { 479 + if (intval($val['id']) === $ageLevel) {
480 self::$selected['ageLevel'] = array( 480 self::$selected['ageLevel'] = array(
481 'name' => $val['name'], 481 'name' => $val['name'],
482 'href' => self::buildUrl($params) 482 'href' => self::buildUrl($params)
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
@@ -235,7 +235,11 @@ $shopCart.on('click', '.icon-minus, .icon-add', function() { @@ -235,7 +235,11 @@ $shopCart.on('click', '.icon-minus, .icon-add', function() {
235 // 最近浏览翻页 235 // 最近浏览翻页
236 $histroy.on('click', '.pagenext, .pageprev', function() { 236 $histroy.on('click', '.pagenext, .pageprev', function() {
237 if ($(this).hasClass('pagenext')) { 237 if ($(this).hasClass('pagenext')) {
238 - pageNum++; 238 + if (pageNum !== 5) {
  239 + pageNum++;
  240 + } else {
  241 + pageNum = 1;
  242 + }
239 } else { 243 } else {
240 --pageNum > 0 || (pageNum = 1); 244 --pageNum > 0 || (pageNum = 1);
241 } 245 }
@@ -868,6 +868,7 @@ $invoiceCheck.click(function(){ @@ -868,6 +868,7 @@ $invoiceCheck.click(function(){
868 if ($invoiceCheck.hasClass('active')) { 868 if ($invoiceCheck.hasClass('active')) {
869 $invoiceCheck.removeAttr('checked'); 869 $invoiceCheck.removeAttr('checked');
870 $invoiceCheck.removeClass('active'); 870 $invoiceCheck.removeClass('active');
  871 + $('.section-play .invoice-content').addClass('hide');
871 } 872 }
872 873
873 if ($invoiceCheck.attr('checked')) { 874 if ($invoiceCheck.attr('checked')) {
@@ -975,12 +976,14 @@ $eReceiptBtn.click(function(){ @@ -975,12 +976,14 @@ $eReceiptBtn.click(function(){
975 $eReceiptBtn.addClass('receipt-type-selected'); 976 $eReceiptBtn.addClass('receipt-type-selected');
976 $paperReceiptBtn.removeClass('receipt-type-selected'); 977 $paperReceiptBtn.removeClass('receipt-type-selected');
977 $('.e-receipt-desc').removeClass('hide'); 978 $('.e-receipt-desc').removeClass('hide');
  979 + $('.invoice-phone').removeClass('hide');
978 }); 980 });
979 981
980 $paperReceiptBtn.click(function(){ 982 $paperReceiptBtn.click(function(){
981 $paperReceiptBtn.addClass('receipt-type-selected'); 983 $paperReceiptBtn.addClass('receipt-type-selected');
982 $eReceiptBtn.removeClass('receipt-type-selected'); 984 $eReceiptBtn.removeClass('receipt-type-selected');
983 $('.e-receipt-desc').addClass('hide'); 985 $('.e-receipt-desc').addClass('hide');
  986 + $('.invoice-phone').addClass('hide');
984 }); 987 });
985 988
986 $('.invoice-title').change(function(){ 989 $('.invoice-title').change(function(){
@@ -483,10 +483,6 @@ class CartModel @@ -483,10 +483,6 @@ class CartModel
483 $end = 23; 483 $end = 23;
484 break; 484 break;
485 case 5: 485 case 5:
486 - $begin = 18;  
487 - $end = 23;  
488 - break;  
489 - case 6:  
490 $begin = 24; 486 $begin = 24;
491 $end = 30; 487 $end = 30;
492 break; 488 break;
@@ -518,6 +514,17 @@ class CartModel @@ -518,6 +514,17 @@ class CartModel
518 $result['data']['hasPrev'] = false; 514 $result['data']['hasPrev'] = false;
519 $result['data']['hasNext'] = false; 515 $result['data']['hasNext'] = false;
520 } 516 }
  517 +
  518 + // 到达第六页,没有下一页
  519 + if ($page == 5) {
  520 + $result['data']['hasNext'] = false;
  521 + }
  522 +
  523 + // 第-页,没有上一页
  524 + if ($page == 1) {
  525 + $result['data']['hasPrev'] = false;
  526 + }
  527 +
521 } while (false); 528 } while (false);
522 529
523 return $result; 530 return $result;
@@ -188,6 +188,10 @@ class IndexController extends WebAction @@ -188,6 +188,10 @@ class IndexController extends WebAction
188 $udid = $uid . $this->getUdid(); 188 $udid = $uid . $this->getUdid();
189 $page = $this->get('page', 1); 189 $page = $this->get('page', 1);
190 190
  191 + if ($page === '6') {
  192 + $page = 1;
  193 + }
  194 +
191 $result = CartModel::getRecommendProduct($channel, $uid, $udid, $page); 195 $result = CartModel::getRecommendProduct($channel, $uid, $udid, $page);
192 } 196 }
193 197