Commit cb61c802 authored by zhuwei's avatar zhuwei

bug

parent b8c6c914
......@@ -171,7 +171,7 @@ class ImageDepot extends Basic
public function ceshi(){
$ImageDepotService = new ImageDepotService();
$res = $ImageDepotService->getImage();
$res = $ImageDepotService->getImage('商场美食1');
dump($res);
}
......
......@@ -65,16 +65,25 @@ class ImageDepotService
{
//图片类型:0室外图 ,1室内图 ,2人群图
$indoor_img_id_ = $this->getImageWidthRand(0,$label);//图片类型:0室外图
$indoor_img_id = $indoor_img_id_ ? $indoor_img_id_ :1;
if($indoor_img_id_){
$return_arr[] = $indoor_img_id_;
}
$outdoor_img_id_ = $this->getImageWidthRand(1,$label,$indoor_img_id);//图片类型:1室内图
$outdoor_img_id = $outdoor_img_id_ ? $outdoor_img_id_ :2;
if($outdoor_img_id_){
$return_arr[] = $outdoor_img_id_;
}
$not_in_id = $indoor_img_id.','.$outdoor_img_id;
$people_img_id_ = $this->getImageWidthRand(2,$label,$not_in_id);//图片类型:2人群图
$people_img_id = $people_img_id_ ? $people_img_id_ :3;
$return_arr =[$indoor_img_id,$outdoor_img_id,$people_img_id];
if($people_img_id_){
$return_arr[] = $people_img_id_;
}
return implode(',',$return_arr);
}
}
\ No newline at end of file
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