|
|
<?php
|
|
|
namespace WebPlugin\DataProcess\Channel;
|
|
|
use WebPlugin\Images;
|
|
|
use WebPlugin\Helpers;
|
|
|
class PlusstarIndex extends AbstractChannel
|
|
|
{
|
|
|
|
...
|
...
|
@@ -27,7 +28,7 @@ class PlusstarIndex extends AbstractChannel |
|
|
if($key == 5 && $resource['template_name'] == 'floor') {//单品列表
|
|
|
foreach($resource['data'] as $pos => $val) {
|
|
|
$val['src'] = Images::getImageUrl($val['src'], 280, 374, 1);
|
|
|
$singleGoods['list'][] = array('href' => $val['url'],'name'=> $val['title'],'img' => $val['src']);
|
|
|
$singleGoods['list'][] = array('href' => Helpers::getUrlSafe($val['url']),'name'=> $val['title'],'img' => $val['src']);
|
|
|
}
|
|
|
$result[$key] = array('singlegoods' => $singleGoods);
|
|
|
}
|
...
|
...
|
@@ -39,7 +40,7 @@ class PlusstarIndex extends AbstractChannel |
|
|
if($key == 7 && $resource['template_name'] == 'floor') { //视频名称
|
|
|
foreach($resource['data'] as $pos => $val) {
|
|
|
$val['src'] = Images::getImageUrl($val['src'], 378, 241, 1);
|
|
|
$video['list'][] = array('href' => $val['url'],'name'=> $val['title'],'img' => $val['src']);
|
|
|
$video['list'][] = array('href' => Helpers::getUrlSafe($val['url']),'name'=> $val['title'],'img' => $val['src']);
|
|
|
}
|
|
|
$result[$key] = array('video' => $video);
|
|
|
}
|
...
|
...
|
@@ -54,7 +55,7 @@ class PlusstarIndex extends AbstractChannel |
|
|
foreach($resource['data'] as $val) {
|
|
|
if(is_numeric($val['name'])) {
|
|
|
$id = $val['name'];
|
|
|
$news['pics']['list'][$id] = array('id' => $id,'href' => $val['url'], 'img'=>'','tips'=>'');
|
|
|
$news['pics']['list'][$id] = array('id' => $id,'href' => Helpers::getUrlSafe($val['url']), 'img'=>'','tips'=>'');
|
|
|
}
|
|
|
}
|
|
|
$result[$key] = array('news' => $news);
|
...
|
...
|
@@ -65,7 +66,7 @@ class PlusstarIndex extends AbstractChannel |
|
|
foreach($resource['data'] as $pos => $val) {
|
|
|
if(is_numeric($val['name'])) {
|
|
|
$id = $val['name'];
|
|
|
$ads['list'][$id] = array('id' => $id,'href' => $val['url'],'img'=>'',);
|
|
|
$ads['list'][$id] = array('id' => $id,'href' => Helpers::getUrlSafe($val['url']),'img'=>'',);
|
|
|
}
|
|
|
}
|
|
|
$result[$key] = array('ads' => $ads);
|
...
|
...
|
|