Commit 00815b71 authored by 吴贤德's avatar 吴贤德

中心接口:

修复增量列表测试接口统计错误问题 增加图片代理及缓存功能
parent 0e686ad5
...@@ -196,7 +196,7 @@ class CenterAction extends Action ...@@ -196,7 +196,7 @@ class CenterAction extends Action
$data['code'] = $json["id"]; $data['code'] = $json["id"];
$data['description'] = $json["description"]; $data['description'] = $json["description"];
$data['url_play'] = $json["playUrl"]; $data['url_play'] = $json["playUrl"];
$data['url_pic'] = $json["picUrl"]; $data['url_pic'] = $this->remakeImageUrlForCache($json["picUrl"]);
$data['year'] = substr($json["year"],0,4); $data['year'] = substr($json["year"],0,4);
$data['score'] = floatval($json["score"]); $data['score'] = floatval($json["score"]);
$data['region'] = $json["region"]; $data['region'] = $json["region"];
...@@ -212,9 +212,9 @@ class CenterAction extends Action ...@@ -212,9 +212,9 @@ class CenterAction extends Action
$data["nodeName"]=$this->null2str($json["nodeName"]); $data["nodeName"]=$this->null2str($json["nodeName"]);
//圆动和互动新增字段() //圆动和互动新增字段()
$data['newsImage_1'] = $this->null2str($json["newsImage_1"]); $data['newsImage_1'] = $this->remakeImageUrlForCache($json["newsImage_1"]);
$data['newsImage_2'] = $this->null2str($json["newsImage_2"]); $data['newsImage_2'] = $this->remakeImageUrlForCache($json["newsImage_2"]);
$data['newsImage_3'] = $this->null2str($json["newsImage_3"]); $data['newsImage_3'] = $this->remakeImageUrlForCache($json["newsImage_3"]);
$data['englishTitle'] = $this->null2str($json["englishTitle"]); $data['englishTitle'] = $this->null2str($json["englishTitle"]);
//end //end
...@@ -273,6 +273,15 @@ class CenterAction extends Action ...@@ -273,6 +273,15 @@ class CenterAction extends Action
} }
return $str; return $str;
} }
function remakeImageUrlForCache($url){
$imageDomain="image.hotel.wasu.tv";
if ($url!="" || !is_null($url)){
$url="http://$imageDomain".substr($url,7);
}else{
$url = "";
}
return $url;
}
/* /*
* 媒资自动转推函数 * 媒资自动转推函数
* 批量修改媒资状态 * 批量修改媒资状态
...@@ -344,7 +353,7 @@ class CenterAction extends Action ...@@ -344,7 +353,7 @@ class CenterAction extends Action
$end = date('Y-m-d H:i:s',strtotime($_GET["end"])); $end = date('Y-m-d H:i:s',strtotime($_GET["end"]));
$page=$_GET["page"]; $page=$_GET["page"];
$sqlTotal = "SELECT count(1) total FROM sh_hotel_media_map_$spid WHERE $whereHotelid AND hm.status_inject=1 AND updatetime BETWEEN '$start' AND '$end';"; $sqlTotal = "SELECT count(1) total FROM sh_hotel_media_map_$spid WHERE $whereHotelid AND status_inject=1 AND updatetime BETWEEN '$start' AND '$end';";
$totalArr = M("")->query($sqlTotal); $totalArr = M("")->query($sqlTotal);
$total = 0; $total = 0;
if (count($totalArr)>0){ if (count($totalArr)>0){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment