作者 lyh

gx

... ... @@ -594,49 +594,13 @@ class BTemplateLogic extends BaseLogic
if ($pageInfo === false) {
return $this->success($type);
}
switch ($source){
case BTemplate::SOURCE_PRODUCT:
if ($is_list != BTemplate::IS_LIST) {
if ($pageInfo['product_details'] != 0) {
$type = BTemplate::TYPE_TWO;
}
} else {
if ($pageInfo['product_list'] != 0) {
$type = BTemplate::TYPE_THREE;
}
}
break;
case BTemplate::SOURCE_BLOG:
if ($is_list != BTemplate::IS_LIST) {
if ($pageInfo['blog_details'] != 0) {
$type = BTemplate::TYPE_FOUR;
}
} else {
if ($pageInfo['blog_details'] != 0) {
$type = BTemplate::TYPE_FIVE;
}
}
break;
case BTemplate::SOURCE_BLOG:
if ($is_list != BTemplate::IS_LIST) {
if ($pageInfo['news_details'] != 0) {
$type = BTemplate::TYPE_SIX;
}
} else {
if ($pageInfo['news_list'] != 0) {
$type = BTemplate::TYPE_SEVEN;
}
}
break;
case BTemplate::SOURCE_KEYWORD:
if ($pageInfo['polymerization'] != 0) {
$type = BTemplate::TYPE_EIGHT;
}
break;
default:
$type = BTemplate::SOURCE_HOME;//首页公共头部底部
break;
}
if ($source == BTemplate::SOURCE_PRODUCT) {if ($is_list == 0) {if ($pageInfo['product_details'] != 0) {$type = BTemplate::TYPE_TWO;}}
else {if ($pageInfo['product_list'] != 0) {$type = BTemplate::TYPE_THREE;}}}
if ($source == BTemplate::SOURCE_BLOG) {if ($is_list == 0) {if ($pageInfo['blog_details'] != 0) {$type = BTemplate::TYPE_FOUR;}}
else {if ($pageInfo['blog_list'] != 0) {$type = BTemplate::TYPE_FIVE;}}}
if ($source == BTemplate::SOURCE_NEWS) {if ($is_list == 0) {if ($pageInfo['news_details'] != 0) {$type = BTemplate::TYPE_SIX;}}
else {if ($pageInfo['news_list'] != 0) {$type = BTemplate::TYPE_SEVEN;}}}
if ($source == BTemplate::SOURCE_KEYWORD) {if ($pageInfo['polymerization'] != 0) {$type = BTemplate::TYPE_EIGHT;}}
return $this->success($type);
}
}
... ...