...
|
...
|
@@ -1413,35 +1413,11 @@ class HelperSearch |
|
|
//组织静态资源数据格式
|
|
|
public static function getNodeContent($code)
|
|
|
{
|
|
|
$result = array();
|
|
|
$nodeContent = BrandData::getByNodeContent($code); //TODO异步
|
|
|
|
|
|
if (isset($nodeContent['code']) && $nodeContent['code'] === 200) {
|
|
|
$result = array();
|
|
|
//print_r($nodeContent['data']);
|
|
|
$arr = explode('<br />', $nodeContent['data']);
|
|
|
$arr = array_values($arr);
|
|
|
|
|
|
$hrefPatten = "/<a href=[\'\"]?([^\'\" ]+).*?>/";
|
|
|
$pattern = "/[img|IMG].*?src=['|\"](.*?(?:[.gif|.jpg]))['|\"].*?[\/]?>/";
|
|
|
foreach($arr as $key => $value){
|
|
|
|
|
|
preg_match($hrefPatten, $value, $href);
|
|
|
preg_match($pattern, $value, $img);
|
|
|
if (isset($href[1])) {
|
|
|
$result[$key]['href'] = str_replace('&', '&', $href[1]);
|
|
|
}
|
|
|
if (isset($img[1])) {
|
|
|
if (strrchr($img[1], '.swf') == '.swf') {
|
|
|
$result[$key]['isVedio'] = true;
|
|
|
$result[$key]['src'] = $img[1];
|
|
|
}else{
|
|
|
$result[$key]['src'] = $img[1];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return $result;
|
|
|
return $nodeContent['data'];
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|