作者 lyh

gx

@@ -594,49 +594,13 @@ class BTemplateLogic extends BaseLogic @@ -594,49 +594,13 @@ class BTemplateLogic extends BaseLogic
594 if ($pageInfo === false) { 594 if ($pageInfo === false) {
595 return $this->success($type); 595 return $this->success($type);
596 } 596 }
597 - switch ($source){  
598 - case BTemplate::SOURCE_PRODUCT:  
599 - if ($is_list != BTemplate::IS_LIST) {  
600 - if ($pageInfo['product_details'] != 0) {  
601 - $type = BTemplate::TYPE_TWO;  
602 - }  
603 - } else {  
604 - if ($pageInfo['product_list'] != 0) {  
605 - $type = BTemplate::TYPE_THREE;  
606 - }  
607 - }  
608 - break;  
609 - case BTemplate::SOURCE_BLOG:  
610 - if ($is_list != BTemplate::IS_LIST) {  
611 - if ($pageInfo['blog_details'] != 0) {  
612 - $type = BTemplate::TYPE_FOUR;  
613 - }  
614 - } else {  
615 - if ($pageInfo['blog_details'] != 0) {  
616 - $type = BTemplate::TYPE_FIVE;  
617 - }  
618 - }  
619 - break;  
620 - case BTemplate::SOURCE_BLOG:  
621 - if ($is_list != BTemplate::IS_LIST) {  
622 - if ($pageInfo['news_details'] != 0) {  
623 - $type = BTemplate::TYPE_SIX;  
624 - }  
625 - } else {  
626 - if ($pageInfo['news_list'] != 0) {  
627 - $type = BTemplate::TYPE_SEVEN;  
628 - }  
629 - }  
630 - break;  
631 - case BTemplate::SOURCE_KEYWORD:  
632 - if ($pageInfo['polymerization'] != 0) {  
633 - $type = BTemplate::TYPE_EIGHT;  
634 - }  
635 - break;  
636 - default:  
637 - $type = BTemplate::SOURCE_HOME;//首页公共头部底部  
638 - break;  
639 - } 597 + if ($source == BTemplate::SOURCE_PRODUCT) {if ($is_list == 0) {if ($pageInfo['product_details'] != 0) {$type = BTemplate::TYPE_TWO;}}
  598 + else {if ($pageInfo['product_list'] != 0) {$type = BTemplate::TYPE_THREE;}}}
  599 + if ($source == BTemplate::SOURCE_BLOG) {if ($is_list == 0) {if ($pageInfo['blog_details'] != 0) {$type = BTemplate::TYPE_FOUR;}}
  600 + else {if ($pageInfo['blog_list'] != 0) {$type = BTemplate::TYPE_FIVE;}}}
  601 + if ($source == BTemplate::SOURCE_NEWS) {if ($is_list == 0) {if ($pageInfo['news_details'] != 0) {$type = BTemplate::TYPE_SIX;}}
  602 + else {if ($pageInfo['news_list'] != 0) {$type = BTemplate::TYPE_SEVEN;}}}
  603 + if ($source == BTemplate::SOURCE_KEYWORD) {if ($pageInfo['polymerization'] != 0) {$type = BTemplate::TYPE_EIGHT;}}
640 return $this->success($type); 604 return $this->success($type);
641 } 605 }
642 } 606 }