|
@@ -25,7 +25,6 @@ class StarClassModel |
|
@@ -25,7 +25,6 @@ class StarClassModel |
25
|
public static function getStarClass($uid)
|
25
|
public static function getStarClass($uid)
|
26
|
{
|
26
|
{
|
27
|
$result = array();
|
27
|
$result = array();
|
28
|
- $result['title'] = '星潮教室';
|
|
|
29
|
$result['headTab'] = self::getHeadTab('index');
|
28
|
$result['headTab'] = self::getHeadTab('index');
|
30
|
|
29
|
|
31
|
//组装资源位获取星潮教室首页数据URL
|
30
|
//组装资源位获取星潮教室首页数据URL
|
|
@@ -33,14 +32,11 @@ class StarClassModel |
|
@@ -33,14 +32,11 @@ class StarClassModel |
33
|
$res['starClassIndex'] = StarClassData::getResourceDataUrl($contentCode);
|
32
|
$res['starClassIndex'] = StarClassData::getResourceDataUrl($contentCode);
|
34
|
|
33
|
|
35
|
//组装获得每日签到数据接口URL
|
34
|
//组装获得每日签到数据接口URL
|
36
|
-// echo $uid;
|
|
|
37
|
$res['rankInfo'] = StarClassData::rankInfoDataUrl($uid);
|
35
|
$res['rankInfo'] = StarClassData::rankInfoDataUrl($uid);
|
38
|
-//print_r($res['rankInfo']);exit;
|
36
|
+
|
39
|
//批量调接口
|
37
|
//批量调接口
|
40
|
$data = Yohobuy::getMulti($res);
|
38
|
$data = Yohobuy::getMulti($res);
|
41
|
|
39
|
|
42
|
-// print_r($data['starClassIndex']);
|
|
|
43
|
-// print_r($data);exit;
|
|
|
44
|
|
40
|
|
45
|
//调用成功封装数据
|
41
|
//调用成功封装数据
|
46
|
if (isset($data['starClassIndex']) && !empty($data['starClassIndex'])) {
|
42
|
if (isset($data['starClassIndex']) && !empty($data['starClassIndex'])) {
|
|
@@ -90,12 +86,12 @@ class StarClassModel |
|
@@ -90,12 +86,12 @@ class StarClassModel |
90
|
public static function getspecial()
|
86
|
public static function getspecial()
|
91
|
{
|
87
|
{
|
92
|
$result = array();
|
88
|
$result = array();
|
93
|
- $result['title'] = '星潮教室';
|
|
|
94
|
$result['headTab'] = self::getHeadTab('special');
|
89
|
$result['headTab'] = self::getHeadTab('special');
|
95
|
|
90
|
|
96
|
//组装资源位获取星潮教室首页数据URL
|
91
|
//组装资源位获取星潮教室首页数据URL
|
97
|
$contentCode = '89cc20483ee2cbc8a716dcfe2b6c7603';
|
92
|
$contentCode = '89cc20483ee2cbc8a716dcfe2b6c7603';
|
98
|
$data = StarClassData::getResourceData($contentCode);
|
93
|
$data = StarClassData::getResourceData($contentCode);
|
|
|
94
|
+
|
99
|
if (isset($data['code']) && $data['code'] == 200) {
|
95
|
if (isset($data['code']) && $data['code'] == 200) {
|
100
|
$build = array();
|
96
|
$build = array();
|
101
|
foreach ($data['data'] as $value) {
|
97
|
foreach ($data['data'] as $value) {
|
|
@@ -114,7 +110,7 @@ class StarClassModel |
|
@@ -114,7 +110,7 @@ class StarClassModel |
114
|
}
|
110
|
}
|
115
|
$build = array();
|
111
|
$build = array();
|
116
|
}
|
112
|
}
|
117
|
-
|
113
|
+//print_r($result);
|
118
|
return $result;
|
114
|
return $result;
|
119
|
}
|
115
|
}
|
120
|
|
116
|
|
|
@@ -125,7 +121,6 @@ class StarClassModel |
|
@@ -125,7 +121,6 @@ class StarClassModel |
125
|
public static function getCollocation()
|
121
|
public static function getCollocation()
|
126
|
{
|
122
|
{
|
127
|
$result = array();
|
123
|
$result = array();
|
128
|
- $result['title'] = '星潮教室';
|
|
|
129
|
$result['headTab'] = self::getHeadTab('collocation');
|
124
|
$result['headTab'] = self::getHeadTab('collocation');
|
130
|
|
125
|
|
131
|
return $result;
|
126
|
return $result;
|
|
@@ -137,7 +132,7 @@ class StarClassModel |
|
@@ -137,7 +132,7 @@ class StarClassModel |
137
|
public static function ajaxCollocation($page)
|
132
|
public static function ajaxCollocation($page)
|
138
|
{
|
133
|
{
|
139
|
$data = StarClassData::collocationData($page);
|
134
|
$data = StarClassData::collocationData($page);
|
140
|
-//print_r($data);
|
135
|
+
|
141
|
$result = array();
|
136
|
$result = array();
|
142
|
$collocationList = array();
|
137
|
$collocationList = array();
|
143
|
if (isset($data['code']) && $data['code'] == 200 && !empty($data['data'])) {
|
138
|
if (isset($data['code']) && $data['code'] == 200 && !empty($data['data'])) {
|
|
@@ -149,9 +144,9 @@ class StarClassModel |
|
@@ -149,9 +144,9 @@ class StarClassModel |
149
|
$collocationList[$key]['time'] = $value['publish_time'];
|
144
|
$collocationList[$key]['time'] = $value['publish_time'];
|
150
|
$collocationList[$key]['seeNum'] = $value['views_num'];
|
145
|
$collocationList[$key]['seeNum'] = $value['views_num'];
|
151
|
$collocationList[$key]['zanNum'] = $value['praise_num'];
|
146
|
$collocationList[$key]['zanNum'] = $value['praise_num'];
|
152
|
- $collocationList[$key]['isLiked '] = $value['isPraise'];
|
|
|
153
|
- $collocationList[$key]['articleId '] = $value['id'];
|
|
|
154
|
- $collocationList[$key]['isCollected'] = $value['isFavor'];
|
147
|
+ $collocationList[$key]['articleId'] = $value['id'];
|
|
|
148
|
+ $collocationList[$key]['isLiked'] = $value['isPraise'] == 'Y' ? true : false;
|
|
|
149
|
+ $collocationList[$key]['isCollected'] = $value['isFavor'] == 'Y' ? true : false;
|
155
|
}
|
150
|
}
|
156
|
$result['collocationList'] = $collocationList;
|
151
|
$result['collocationList'] = $collocationList;
|
157
|
}
|
152
|
}
|
|
@@ -163,7 +158,7 @@ class StarClassModel |
|
@@ -163,7 +158,7 @@ class StarClassModel |
163
|
public static function sign($uid)
|
158
|
public static function sign($uid)
|
164
|
{
|
159
|
{
|
165
|
$data = StarClassData::sign($uid);
|
160
|
$data = StarClassData::sign($uid);
|
166
|
-//print_r($data);exit;
|
161
|
+
|
167
|
$result = array();
|
162
|
$result = array();
|
168
|
if (isset($data['code']) && $data['code'] == 200) {
|
163
|
if (isset($data['code']) && $data['code'] == 200) {
|
169
|
foreach ($data['data']['logs'] as $key => $value) {
|
164
|
foreach ($data['data']['logs'] as $key => $value) {
|
|
@@ -186,6 +181,7 @@ class StarClassModel |
|
@@ -186,6 +181,7 @@ class StarClassModel |
186
|
}
|
181
|
}
|
187
|
|
182
|
|
188
|
|
183
|
|
|
|
184
|
+
|
189
|
/**
|
185
|
/**
|
190
|
* 获取headTab
|
186
|
* 获取headTab
|
191
|
*/
|
187
|
*/
|
|
@@ -267,7 +263,7 @@ class StarClassModel |
|
@@ -267,7 +263,7 @@ class StarClassModel |
267
|
$result = array();
|
263
|
$result = array();
|
268
|
|
264
|
|
269
|
$result['title']['title'] = $data['title'];
|
265
|
$result['title']['title'] = $data['title'];
|
270
|
- $result['title']['moreUrl'] = $data['more_url'];
|
266
|
+ $result['title']['more_url'] = $data['more_url'];
|
271
|
$result['title']['moreName'] = $data['more_name'];
|
267
|
$result['title']['moreName'] = $data['more_name'];
|
272
|
$result['subjectBanner']['url'] = $data['image']['url'];
|
268
|
$result['subjectBanner']['url'] = $data['image']['url'];
|
273
|
$result['subjectBanner']['img'] = Helpers::getOriginalImg($data['image']['src']);
|
269
|
$result['subjectBanner']['img'] = Helpers::getOriginalImg($data['image']['src']);
|
|
@@ -283,6 +279,8 @@ class StarClassModel |
|
@@ -283,6 +279,8 @@ class StarClassModel |
283
|
|
279
|
|
284
|
$result['videoImg'] = Helpers::getOriginalImg($data[0]['src']);
|
280
|
$result['videoImg'] = Helpers::getOriginalImg($data[0]['src']);
|
285
|
$result['videoUrl'] = $data[0]['url'];
|
281
|
$result['videoUrl'] = $data[0]['url'];
|
|
|
282
|
+ $result['alt'] = $data[0]['alt'];
|
|
|
283
|
+ $result['title'] = $data[0]['title'];
|
286
|
$result['video'] = true;
|
284
|
$result['video'] = true;
|
287
|
return $result;
|
285
|
return $result;
|
288
|
}
|
286
|
}
|
|
@@ -294,7 +292,7 @@ class StarClassModel |
|
@@ -294,7 +292,7 @@ class StarClassModel |
294
|
|
292
|
|
295
|
//title
|
293
|
//title
|
296
|
$result['title']['title'] = $data['title']['name'];
|
294
|
$result['title']['title'] = $data['title']['name'];
|
297
|
- $result['title']['moreUrl'] = $data['title']['more_url'];
|
295
|
+ $result['title']['more_url'] = $data['title']['more_url'];
|
298
|
$result['title']['moreName'] = $data['title']['more_name'];
|
296
|
$result['title']['moreName'] = $data['title']['more_name'];
|
299
|
|
297
|
|
300
|
//两张大图
|
298
|
//两张大图
|
|
@@ -313,9 +311,6 @@ class StarClassModel |
|
@@ -313,9 +311,6 @@ class StarClassModel |
313
|
|
311
|
|
314
|
return $result;
|
312
|
return $result;
|
315
|
}
|
313
|
}
|
316
|
-
|
|
|
317
|
-
|
|
|
318
|
-
|
|
|
319
|
-
|
314
|
+
|
320
|
|
315
|
|
321
|
} |
316
|
} |