Commit 0527912a authored by zhuwei's avatar zhuwei

优化

parent 55fd61e7
...@@ -62,23 +62,23 @@ class ImageDepotService ...@@ -62,23 +62,23 @@ class ImageDepotService
public function getImage($label='商场美食') public function getImage($label='商场美食')
{ {
//图片类型:0室外图 ,1室内图 ,2人群图 //图片类型:0室外图 ,1室内图 ,2人群图
$indoor_img_id_ = $this->getImageWidthRand(0,$label);//图片类型:0室外图 $indoor_img_id_ = $this->getImageWidthRand(0, $label);//图片类型:0室外图
if ($indoor_img_id_) {
$indoor_img_id = $indoor_img_id_ ? $indoor_img_id_ :1;
if($indoor_img_id_){
$return_arr[] = $indoor_img_id_; $return_arr[] = $indoor_img_id_;
} }
$indoor_img_id = $indoor_img_id_ ? $indoor_img_id_ : 1;
$outdoor_img_id_ = $this->getImageWidthRand(1,$label,$indoor_img_id);//图片类型:1室内图 $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_) {
if($outdoor_img_id_){
$return_arr[] = $outdoor_img_id_; $return_arr[] = $outdoor_img_id_;
} }
$outdoor_img_id = $outdoor_img_id_ ? $outdoor_img_id_ : 2;
$not_in_id = $indoor_img_id.','.$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_ = $this->getImageWidthRand(2, $label, $not_in_id);//图片类型:2人群图
$people_img_id = $people_img_id_ ? $people_img_id_ :3; if ($people_img_id_) {
if($people_img_id_){
$return_arr[] = $people_img_id_; $return_arr[] = $people_img_id_;
} }
......
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