...
|
...
|
@@ -25,7 +25,6 @@ class StarClassModel |
|
|
public static function getStarClass($uid)
|
|
|
{
|
|
|
$result = array();
|
|
|
$result['title'] = '星潮教室';
|
|
|
$result['headTab'] = self::getHeadTab('index');
|
|
|
|
|
|
//组装资源位获取星潮教室首页数据URL
|
...
|
...
|
@@ -33,14 +32,11 @@ class StarClassModel |
|
|
$res['starClassIndex'] = StarClassData::getResourceDataUrl($contentCode);
|
|
|
|
|
|
//组装获得每日签到数据接口URL
|
|
|
// echo $uid;
|
|
|
$res['rankInfo'] = StarClassData::rankInfoDataUrl($uid);
|
|
|
//print_r($res['rankInfo']);exit;
|
|
|
|
|
|
//批量调接口
|
|
|
$data = Yohobuy::getMulti($res);
|
|
|
|
|
|
// print_r($data['starClassIndex']);
|
|
|
// print_r($data);exit;
|
|
|
|
|
|
//调用成功封装数据
|
|
|
if (isset($data['starClassIndex']) && !empty($data['starClassIndex'])) {
|
...
|
...
|
@@ -90,12 +86,12 @@ class StarClassModel |
|
|
public static function getspecial()
|
|
|
{
|
|
|
$result = array();
|
|
|
$result['title'] = '星潮教室';
|
|
|
$result['headTab'] = self::getHeadTab('special');
|
|
|
|
|
|
//组装资源位获取星潮教室首页数据URL
|
|
|
$contentCode = '89cc20483ee2cbc8a716dcfe2b6c7603';
|
|
|
$data = StarClassData::getResourceData($contentCode);
|
|
|
|
|
|
if (isset($data['code']) && $data['code'] == 200) {
|
|
|
$build = array();
|
|
|
foreach ($data['data'] as $value) {
|
...
|
...
|
@@ -114,7 +110,7 @@ class StarClassModel |
|
|
}
|
|
|
$build = array();
|
|
|
}
|
|
|
|
|
|
//print_r($result);
|
|
|
return $result;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -125,7 +121,6 @@ class StarClassModel |
|
|
public static function getCollocation()
|
|
|
{
|
|
|
$result = array();
|
|
|
$result['title'] = '星潮教室';
|
|
|
$result['headTab'] = self::getHeadTab('collocation');
|
|
|
|
|
|
return $result;
|
...
|
...
|
@@ -137,7 +132,7 @@ class StarClassModel |
|
|
public static function ajaxCollocation($page)
|
|
|
{
|
|
|
$data = StarClassData::collocationData($page);
|
|
|
//print_r($data);
|
|
|
|
|
|
$result = array();
|
|
|
$collocationList = array();
|
|
|
if (isset($data['code']) && $data['code'] == 200 && !empty($data['data'])) {
|
...
|
...
|
@@ -149,9 +144,9 @@ class StarClassModel |
|
|
$collocationList[$key]['time'] = $value['publish_time'];
|
|
|
$collocationList[$key]['seeNum'] = $value['views_num'];
|
|
|
$collocationList[$key]['zanNum'] = $value['praise_num'];
|
|
|
$collocationList[$key]['isLiked '] = $value['isPraise'];
|
|
|
$collocationList[$key]['articleId '] = $value['id'];
|
|
|
$collocationList[$key]['isCollected'] = $value['isFavor'];
|
|
|
$collocationList[$key]['articleId'] = $value['id'];
|
|
|
$collocationList[$key]['isLiked'] = $value['isPraise'] == 'Y' ? true : false;
|
|
|
$collocationList[$key]['isCollected'] = $value['isFavor'] == 'Y' ? true : false;
|
|
|
}
|
|
|
$result['collocationList'] = $collocationList;
|
|
|
}
|
...
|
...
|
@@ -163,7 +158,7 @@ class StarClassModel |
|
|
public static function sign($uid)
|
|
|
{
|
|
|
$data = StarClassData::sign($uid);
|
|
|
//print_r($data);exit;
|
|
|
|
|
|
$result = array();
|
|
|
if (isset($data['code']) && $data['code'] == 200) {
|
|
|
foreach ($data['data']['logs'] as $key => $value) {
|
...
|
...
|
@@ -186,6 +181,7 @@ class StarClassModel |
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取headTab
|
|
|
*/
|
...
|
...
|
@@ -267,7 +263,7 @@ class StarClassModel |
|
|
$result = array();
|
|
|
|
|
|
$result['title']['title'] = $data['title'];
|
|
|
$result['title']['moreUrl'] = $data['more_url'];
|
|
|
$result['title']['more_url'] = $data['more_url'];
|
|
|
$result['title']['moreName'] = $data['more_name'];
|
|
|
$result['subjectBanner']['url'] = $data['image']['url'];
|
|
|
$result['subjectBanner']['img'] = Helpers::getOriginalImg($data['image']['src']);
|
...
|
...
|
@@ -283,6 +279,8 @@ class StarClassModel |
|
|
|
|
|
$result['videoImg'] = Helpers::getOriginalImg($data[0]['src']);
|
|
|
$result['videoUrl'] = $data[0]['url'];
|
|
|
$result['alt'] = $data[0]['alt'];
|
|
|
$result['title'] = $data[0]['title'];
|
|
|
$result['video'] = true;
|
|
|
return $result;
|
|
|
}
|
...
|
...
|
@@ -294,7 +292,7 @@ class StarClassModel |
|
|
|
|
|
//title
|
|
|
$result['title']['title'] = $data['title']['name'];
|
|
|
$result['title']['moreUrl'] = $data['title']['more_url'];
|
|
|
$result['title']['more_url'] = $data['title']['more_url'];
|
|
|
$result['title']['moreName'] = $data['title']['more_name'];
|
|
|
|
|
|
//两张大图
|
...
|
...
|
@@ -313,9 +311,6 @@ class StarClassModel |
|
|
|
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|