|
@@ -3,6 +3,7 @@ |
|
@@ -3,6 +3,7 @@ |
3
|
namespace Category;
|
3
|
namespace Category;
|
4
|
|
4
|
|
5
|
use LibModels\Wap\Category\BrandData;
|
5
|
use LibModels\Wap\Category\BrandData;
|
|
|
6
|
+use Plugin\DataProcess\FloorProcess;
|
6
|
use Plugin\Helpers;
|
7
|
use Plugin\Helpers;
|
7
|
|
8
|
|
8
|
/**
|
9
|
/**
|
|
@@ -60,55 +61,8 @@ class BrandModel |
|
@@ -60,55 +61,8 @@ class BrandModel |
60
|
// 搜索链接地址
|
61
|
// 搜索链接地址
|
61
|
$result['searchUrl'] = Helpers::url('/brands/search', null);
|
62
|
$result['searchUrl'] = Helpers::url('/brands/search', null);
|
62
|
|
63
|
|
63
|
- /* 顶部的轮翻广告或热门品牌列表(当没有轮翻广告的情况下会是这个样子的! 此处是根据接口改造成的逻辑) */
|
|
|
64
|
- if (!empty($brand['brandTop'][0]['data']['list'])) {
|
|
|
65
|
- $build = array();
|
|
|
66
|
- foreach ($brand['brandTop'][0]['data']['list'] as $value) {
|
|
|
67
|
- if (isset($value['url'])) {
|
|
|
68
|
- $build['url'] = Helpers::getFilterUrl($value['url']);
|
|
|
69
|
- }
|
|
|
70
|
- $build['img'] = Helpers::getImageUrl($value['src'], 144, 144);
|
|
|
71
|
- $build['name'] = $value['name'];
|
|
|
72
|
- $result['hotBrand']['list'][] = $build;
|
|
|
73
|
- }
|
|
|
74
|
- }
|
|
|
75
|
- // 顶部的轮翻广告列表
|
|
|
76
|
- elseif (!empty($brand['brandTop'][0]['data'])) {
|
|
|
77
|
- $build = array();
|
|
|
78
|
- foreach ($brand['brandTop'][0]['data'] as $value) {
|
|
|
79
|
- if (isset($value['url'])) {
|
|
|
80
|
- $build['url'] = Helpers::getFilterUrl($value['url']);
|
|
|
81
|
- }
|
|
|
82
|
- $build['img'] = Helpers::getImageUrl($value['src'], 640, 310);
|
|
|
83
|
- $build['title'] = $value['title'];
|
|
|
84
|
- $result['bannerTop']['list'][] = $build;
|
|
|
85
|
- }
|
|
|
86
|
- }
|
|
|
87
|
- // 顶部的轮翻广告列表
|
|
|
88
|
- elseif (!empty($brand['brandTop']['list'][0]['data'])) {
|
|
|
89
|
- $build = array();
|
|
|
90
|
- foreach ($brand['brandTop']['list'][0]['data'] as $value) {
|
|
|
91
|
- if (isset($value['url'])) {
|
|
|
92
|
- $build['url'] = Helpers::getFilterUrl($value['url']);
|
|
|
93
|
- }
|
|
|
94
|
- $build['img'] = Helpers::getImageUrl($value['src'], 640, 310);
|
|
|
95
|
- $build['title'] = $value['title'];
|
|
|
96
|
- $result['bannerTop']['list'][] = $build;
|
|
|
97
|
- }
|
|
|
98
|
- }
|
|
|
99
|
-
|
|
|
100
|
- /* 顶部的热门品牌列表 (备注: 当没有轮翻广告的时候,此处内部的foreach不会被执行) */
|
|
|
101
|
- if (!empty($brand['brandTop'][1]['data']['list'])) {
|
|
|
102
|
- $build = array();
|
|
|
103
|
- foreach ($brand['brandTop'][1]['data']['list'] as $value) {
|
|
|
104
|
- if (isset($value['url'])) {
|
|
|
105
|
- $build['url'] = Helpers::getFilterUrl($value['url']);
|
|
|
106
|
- }
|
|
|
107
|
- $build['img'] = Helpers::getImageUrl($value['src'], 144, 144);
|
|
|
108
|
- $build['name'] = $value['name'];
|
|
|
109
|
- $result['hotBrand']['list'][] = $build;
|
|
|
110
|
- }
|
|
|
111
|
- }
|
64
|
+ // 资源位处理
|
|
|
65
|
+ $result['topData'] = FloorProcess::getContent($brand['brandTop'], $channel);
|
112
|
|
66
|
|
113
|
/* 按字母'A-Z'分组的品牌列表 */
|
67
|
/* 按字母'A-Z'分组的品牌列表 */
|
114
|
if (!empty($brand['brandList']['brands'])) {
|
68
|
if (!empty($brand['brandList']['brands'])) {
|