...
|
...
|
@@ -178,10 +178,9 @@ class HomeModel |
|
|
*
|
|
|
* @return array | false
|
|
|
*/
|
|
|
public static function getBoysFloor()
|
|
|
public static function getBoysFloor($uid = 0)
|
|
|
{
|
|
|
$result = array();
|
|
|
|
|
|
if (USE_CACHE) {
|
|
|
// 先尝试获取一级缓存(master), 有数据则直接返回.
|
|
|
$result = Cache::get(CacheConfig::KEY_ACTION_BOYS_INDEX, 'master');
|
...
|
...
|
@@ -189,9 +188,8 @@ class HomeModel |
|
|
return $result;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 调用接口获取楼层数据, 并封装成模板渲染需要的数据格式
|
|
|
$channelData = IndexData::getResourceData('1,3', self::CODE_FLOOR_BOYS);
|
|
|
$channelData = IndexData::getResourceData('1,3', self::CODE_FLOOR_BOYS, 20, 1, $uid);
|
|
|
if (isset($channelData['code']) && $channelData['code'] == 200) {
|
|
|
$result = FloorProcess::getContent($channelData['data']);
|
|
|
}
|
...
|
...
|
@@ -215,7 +213,7 @@ class HomeModel |
|
|
*
|
|
|
* @return array | false
|
|
|
*/
|
|
|
public static function getGirlsFloor()
|
|
|
public static function getGirlsFloor($uid = 0)
|
|
|
{
|
|
|
$result = array();
|
|
|
|
...
|
...
|
@@ -228,7 +226,7 @@ class HomeModel |
|
|
}
|
|
|
|
|
|
// 调用接口获取楼层数据, 并封装成模板渲染需要的数据格式
|
|
|
$channelData = IndexData::getResourceData('2,3', self::CODE_FLOOR_GIRLS);
|
|
|
$channelData = IndexData::getResourceData('2,3', self::CODE_FLOOR_GIRLS, 20, 1, $uid);
|
|
|
if (isset($channelData['code']) && $channelData['code'] == 200) {
|
|
|
$result = FloorProcess::getContent($channelData['data'], 2);
|
|
|
}
|
...
|
...
|
@@ -249,10 +247,11 @@ class HomeModel |
|
|
|
|
|
/**
|
|
|
* 获取潮童首页的楼层数据
|
|
|
*
|
|
|
* @param int $uid
|
|
|
* @modify sefon 2016-4-19 13:21:28
|
|
|
* @return array | false
|
|
|
*/
|
|
|
public static function getKidsFloor()
|
|
|
public static function getKidsFloor($uid = 0)
|
|
|
{
|
|
|
$result = false;
|
|
|
|
...
|
...
|
@@ -267,7 +266,7 @@ class HomeModel |
|
|
// 调用接口获取楼层数据, 并封装成模板渲染需要的数据格式
|
|
|
$channelData = IndexData::getResourceData('', self::CODE_FLOOR_KIDS);
|
|
|
if (isset($channelData['code']) && $channelData['code'] == 200) {
|
|
|
$result = FloorProcess::getContent($channelData['data'], 3);
|
|
|
$result = FloorProcess::getContent($channelData['data'], 3, 20, 1, $uid);
|
|
|
}
|
|
|
|
|
|
if (USE_CACHE) {
|
...
|
...
|
@@ -286,10 +285,11 @@ class HomeModel |
|
|
|
|
|
/**
|
|
|
* 获取创意生活首页的楼层数据
|
|
|
*
|
|
|
* @param int $uid
|
|
|
* @modify sefon 2016-4-19 13:22:34
|
|
|
* @return array | false
|
|
|
*/
|
|
|
public static function getLifestyleFloor()
|
|
|
public static function getLifestyleFloor($uid = 0)
|
|
|
{
|
|
|
$result = false;
|
|
|
|
...
|
...
|
@@ -302,7 +302,7 @@ class HomeModel |
|
|
}
|
|
|
|
|
|
// 调用接口获取楼层数据, 并封装成模板渲染需要的数据格式
|
|
|
$channelData = IndexData::getResourceData('', self::CODE_FLOOR_LIFESTYLE);
|
|
|
$channelData = IndexData::getResourceData('', self::CODE_FLOOR_LIFESTYLE, 20, 1, $uid);
|
|
|
if (isset($channelData['code']) && $channelData['code'] == 200) {
|
|
|
$result = FloorProcess::getContent($channelData['data'], 4);
|
|
|
}
|
...
|
...
|
|