...
|
...
|
@@ -46,9 +46,9 @@ class HomeModel |
|
|
const COOKIE_NAME_LIFESTYLE = 'lifestyle';
|
|
|
|
|
|
/* COOKIE标识访问的是男生频道底部Banner */
|
|
|
const COOKIE_NAME_BOYS_BOTTOM_BANNER = '8c48745a39373d621bf5fd80edf59b5e';
|
|
|
const CODE_NAME_BOYS_BOTTOM_BANNER = '8c48745a39373d621bf5fd80edf59b5e';
|
|
|
/* COOKIE标识访问的是女生频道频道底部Banner */
|
|
|
const COOKIE_NAME_GIRLS_BOTTOM_BANNER = 'c63939b2ad458e9cb51147940c1da2e5';
|
|
|
const CODE_NAME_GIRLS_BOTTOM_BANNER = 'c63939b2ad458e9cb51147940c1da2e5';
|
|
|
|
|
|
/**
|
|
|
* 选择频道
|
...
|
...
|
@@ -125,10 +125,10 @@ class HomeModel |
|
|
{
|
|
|
$result = false;
|
|
|
if($channel == 2) {
|
|
|
$resource = self::COOKIE_NAME_GIRLS_BOTTOM_BANNER;
|
|
|
$resource = self::CODE_NAME_GIRLS_BOTTOM_BANNER;
|
|
|
$cache = CacheConfig::KEY_ACTION_GRILS_BOTTOM_BANNER;
|
|
|
} else {
|
|
|
$resource = self::COOKIE_NAME_BOYS_BOTTOM_BANNER;
|
|
|
$resource = self::CODE_NAME_BOYS_BOTTOM_BANNER;
|
|
|
$cache = CacheConfig::KEY_ACTION_BOYS_BOTTOM_BANNER;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -143,13 +143,14 @@ class HomeModel |
|
|
// 调用接口获取数据
|
|
|
$banner = IndexData::getBannerStart($resource);
|
|
|
if (isset($banner['code']) && $banner['code'] == 200) {
|
|
|
// 构建数据
|
|
|
$data = array();
|
|
|
$result = array();
|
|
|
// 处理数据
|
|
|
foreach ($banner['data'] as $val) {
|
|
|
$data['list'][] = $val;
|
|
|
foreach ($val['data'] as $single) {
|
|
|
$result['url'] = ($channel === 2) ? Helpers::url('/boys') : Helpers::url('/girls');
|
|
|
$result['img'] = Helpers::getImageUrl($single['src'], 640, 200);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$result = FloorProcess::getContent($data, $channel);
|
|
|
}
|
|
|
|
|
|
if (USE_CACHE) {
|
...
|
...
|
|