...
|
...
|
@@ -103,7 +103,7 @@ class IndexModel |
|
|
*
|
|
|
* @param string $gender "1,3"表示男, "2,3"表示女
|
|
|
* @param int channel APP客户端标识 1表示男,2:表示女,3:潮童,4:创意生活
|
|
|
* @param int type 分类ID 0:最新,1:话题,2:搭配,3:潮人,4:潮品,5:小贴士
|
|
|
* @param int type 分类ID 0:最新,1:话题,2:搭配,3:潮人,4:潮品,5:小贴士,59:专题
|
|
|
* @param int $uid 用户ID
|
|
|
* @param string $udid 客户端唯一标识
|
|
|
* @param int $page 分页第几页, 默认第1页
|
...
|
...
|
@@ -143,17 +143,23 @@ class IndexModel |
|
|
$key = CacheConfig::KEY_ACTION_GUANG_LIST_DATA . sprintf('%s_%s_%s', $gender, $type, $page);
|
|
|
|
|
|
// 顶部的分类列表
|
|
|
$curIndex=0;//当前tab顺序
|
|
|
if (!empty($category['data'])) {
|
|
|
$indexTmp = 0;
|
|
|
foreach ($category['data'] as $value) {
|
|
|
$build = array();
|
|
|
$build['typeId'] = $value['id'];
|
|
|
$build['type'] = $value['name'];
|
|
|
$build['focus'] = ($value['id'] == $type);
|
|
|
$data['navs'][] = $build;
|
|
|
$data['guang']['infos'][] = array(
|
|
|
$data['guang']['infos'][$indexTmp] = array(
|
|
|
'show' => $build['focus'],
|
|
|
'info' => array(),
|
|
|
);
|
|
|
if($build['focus']){
|
|
|
$curIndex = $indexTmp;
|
|
|
}
|
|
|
$indexTmp++;
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -182,11 +188,11 @@ class IndexModel |
|
|
|
|
|
// 内容列表
|
|
|
if (!empty($article['data']['list']['artList'])) {
|
|
|
$type = intval($type);
|
|
|
foreach ($article['data']['list']['artList'] as $value) {
|
|
|
$data['guang']['infos'][$type]['info'][] = Helpers::formatArticle($value, true, false, true);
|
|
|
$data['guang']['infos'][$curIndex]['info'][] = Helpers::formatArticle($value, true, false, true);
|
|
|
}
|
|
|
|
|
|
|
|
|
if (USE_CACHE) {
|
|
|
$result = Cache::get($key, 'master');
|
|
|
if (empty($result)) {
|
...
|
...
|
@@ -205,7 +211,6 @@ class IndexModel |
|
|
|
|
|
$category = array();
|
|
|
$article = array();
|
|
|
|
|
|
return $data;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -356,7 +361,6 @@ class IndexModel |
|
|
}
|
|
|
$result['infos'] = $build;
|
|
|
} while (false);
|
|
|
|
|
|
return $result;
|
|
|
}
|
|
|
|
...
|
...
|
|