Authored by hf

code review by hf: do format channel code add exception handle

... ... @@ -387,6 +387,34 @@ class HomeModel
}
}
// 当接口和缓存都挂了时候,返回静态的数据
if (empty($result)) {
$result = array(
'channelList' => array(
array(
'href' => '/boys',
'title' => '男生',
'entitle' => 'BOYS',
),
array(
'href' => '/girls',
'title' => '女生',
'entitle' => 'GIRLS',
),
array(
'href' => '/kids',
'title' => '潮童',
'entitle' => 'KIDS',
),
array(
'href' => '/lifestyle',
'title' => '创意生活',
'entitle' => 'LIFESTYLE',
),
)
);
}
return $result;
}
... ...