Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
6e28c877
Commit
6e28c877
authored
Sep 07, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
60d08ab9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
ImageDepotService.php
application/index/service/ImageDepotService.php
+11
-5
No files found.
application/index/service/ImageDepotService.php
View file @
6e28c877
...
...
@@ -55,22 +55,28 @@ class ImageDepotService
*/
public
function
getImage
(
$label
=
'商场美食'
)
{
$return_arr
=
[];
$not_in_id
=
[];
//图片类型:0室外图 ,1室内图 ,2人群图
$indoor_img_id_
=
$this
->
getImageWidthRand
(
0
,
$label
);
//图片类型:0室外图
if
(
$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室内图
if
(
$outdoor_img_id_
)
{
$return_arr
[]
=
$outdoor_img_id_
;
}
$outdoor_img_id
=
$outdoor_img_id_
?
$outdoor_img_id_
:
2
;
/*组装字符串,用于排除已筛选出的ID start*/
if
(
$indoor_img_id_
){
$not_in_id
[]
=
$indoor_img_id_
;
}
if
(
$outdoor_img_id_
){
$not_in_id
[]
=
$outdoor_img_id_
;
}
/*组装字符串,用于排除已筛选出的ID end*/
$not_in_id
=
$indoor_img_id
.
','
.
$outdoor_img_id
;
$people_img_id_
=
$this
->
getImageWidthRand
(
2
,
$label
,
$not_in_id
);
//图片类型:2人群图
if
(
$people_img_id_
)
{
$return_arr
[]
=
$people_img_id_
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment