...
|
...
|
@@ -46,16 +46,16 @@ class NewsaleModel |
|
|
/* 根据频道调用接口 */
|
|
|
switch (intval($channel)) {
|
|
|
case 1: // 男生
|
|
|
$result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX, self::CODE_TOP_NEW_BOYS);
|
|
|
$result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX_BOYS, self::CODE_TOP_NEW_BOYS);
|
|
|
break;
|
|
|
case 2: // 女生
|
|
|
$result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX, self::CODE_TOP_NEW_GIRLS);
|
|
|
$result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX_GIRLS, self::CODE_TOP_NEW_GIRLS);
|
|
|
break;
|
|
|
case 3: // 潮童
|
|
|
$result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX, self::CODE_TOP_NEW_KIDS);
|
|
|
$result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX_KIDS, self::CODE_TOP_NEW_KIDS);
|
|
|
break;
|
|
|
case 4: // 创意生活
|
|
|
$result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX, self::CODE_TOP_NEW_LIFESTYLE);
|
|
|
$result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX_LIFESTYLE, self::CODE_TOP_NEW_LIFESTYLE);
|
|
|
break;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -74,16 +74,16 @@ class NewsaleModel |
|
|
/* 根据频道调用接口 */
|
|
|
switch (intval($channel)) {
|
|
|
case 1: // 男生
|
|
|
$result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT, self::CODE_TOP_SALE_BOYS);
|
|
|
$result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT_BOYS, self::CODE_TOP_SALE_BOYS);
|
|
|
break;
|
|
|
case 2: // 女生
|
|
|
$result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT, self::CODE_TOP_SALE_GIRLS);
|
|
|
$result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT_GIRLS, self::CODE_TOP_SALE_GIRLS);
|
|
|
break;
|
|
|
case 3: // 潮童
|
|
|
$result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT, self::CODE_TOP_SALE_KIDS);
|
|
|
$result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT_KIDS, self::CODE_TOP_SALE_KIDS);
|
|
|
break;
|
|
|
case 4: // 创意生活
|
|
|
$result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT, self::CODE_TOP_SALE_LIFESTYLE);
|
|
|
$result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT_LIFESTYLE, self::CODE_TOP_SALE_LIFESTYLE);
|
|
|
break;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -183,11 +183,11 @@ class NewsaleModel |
|
|
$newsale = NewsaleData::getNewsaleFocus($codeKey);
|
|
|
|
|
|
// 调用接口获取数据并封装
|
|
|
if (isset($newsale['code']) && !empty($newsale['data']['list'])) {
|
|
|
if(count($newsale['data']['list'][0]['data']) === 1) {
|
|
|
$result = Helpers::formatBanner($newsale['data']['list'][0]['data'][0], 640, 240);
|
|
|
if (isset($newsale['code']) && !empty($newsale['data'])) {
|
|
|
if(count($newsale['data'][0]['data']) === 1) {
|
|
|
$result = Helpers::formatBanner($newsale['data'][0]['data'][0], 640, 240);
|
|
|
} else {
|
|
|
foreach ($newsale['data']['list'][0]['data'] as $one) {
|
|
|
foreach ($newsale['data'][0]['data'] as $one) {
|
|
|
$result['list'][] = Helpers::formatBanner($one, 640, 240);
|
|
|
}
|
|
|
}
|
...
|
...
|
|