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
f7ac77d6
Commit
f7ac77d6
authored
Oct 18, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地图找房
parent
a3b809e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
MapFindHouse.php
application/api_broker/controller/MapFindHouse.php
+17
-14
No files found.
application/api_broker/controller/MapFindHouse.php
View file @
f7ac77d6
...
@@ -69,12 +69,12 @@ class MapFindHouse extends Basic
...
@@ -69,12 +69,12 @@ class MapFindHouse extends Basic
public
function
getCityInfoByMap
()
public
function
getCityInfoByMap
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/*
$params = array(
/*
$params = array(
"spot" => "1223,1213123",
"spot" => "1223,1213123",
"grade" => 2
,//1 区,2商圈,3街道
"grade" => 1
,//1 区,2商圈,3街道
"source" => 1,//来源 1b端,2c端
"source" => 1,//来源 1b端,2c端
"city" => "上海市"//传城市就好了
"city" => "上海市"//传城市就好了
);*/
);*/
$checkResult
=
$this
->
validate
(
$params
,
"MapFindHouseValidate.getCityInfoByMap"
);
$checkResult
=
$this
->
validate
(
$params
,
"MapFindHouseValidate.getCityInfoByMap"
);
if
(
true
!==
$checkResult
)
{
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"101"
,
$checkResult
);
return
$this
->
response
(
"101"
,
$checkResult
);
...
@@ -83,23 +83,26 @@ class MapFindHouse extends Basic
...
@@ -83,23 +83,26 @@ class MapFindHouse extends Basic
$conditions
=
[];
$conditions
=
[];
$result
=
[];
$result
=
[];
$disc
=
$this
->
regionsModel
->
getDiscByCity
(
$params
[
"city"
]);
$disc_str
=
""
;
foreach
(
$disc
as
$item
)
{
$disc_str
.=
$item
[
"name"
]
.
","
;
}
$disc_str
=
rtrim
(
$disc_str
,
","
);
if
(
$params
[
"grade"
]
==
1
)
{
if
(
$params
[
"grade"
]
==
1
)
{
$disc
=
$this
->
regionsModel
->
getDiscByCity
(
$params
[
"city"
]);
$disc_str
=
""
;
foreach
(
$disc
as
$item
)
{
$disc_str
.=
$item
[
"name"
]
.
","
;
}
$disc_str
=
rtrim
(
$disc_str
,
","
);
$shop_arr
=
$this
->
gHousesModel
->
getHouseNumByDisc
(
$disc_str
);
$shop_arr
=
$this
->
gHousesModel
->
getHouseNumByDisc
(
$disc_str
);
$disc_arr
=
[];
foreach
(
$disc
as
$key
=>
$item
)
{
foreach
(
$disc
as
$key
=>
$item
)
{
foreach
(
$shop_arr
as
$i
=>
$j
)
{
foreach
(
$shop_arr
as
$i
=>
$j
)
{
if
(
$item
[
"name"
]
==
$j
[
"disc"
])
{
if
(
$item
[
"name"
]
==
$j
[
"disc"
])
{
$disc
[
$key
][
"num"
]
=
$j
[
"num"
];
$disc_arr
[
$key
]
=
$item
;
$disc_arr
[
$key
][
"num"
]
=
$j
[
"num"
];
}
}
}
}
}
}
$result
=
$disc
;
$result
=
$disc
_arr
;
}
elseif
(
$params
[
"grade"
]
==
2
)
{
}
elseif
(
$params
[
"grade"
]
==
2
)
{
$businessModel
=
new
GBusinessDistrict
();
$businessModel
=
new
GBusinessDistrict
();
$result
=
$businessModel
->
getListByMap
(
$params
[
"city"
]);
$result
=
$businessModel
->
getListByMap
(
$params
[
"city"
]);
...
...
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