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
c0af7e7c
Commit
c0af7e7c
authored
Sep 05, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
区和商区
parent
73426aaf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
Shop.php
application/api/controller/Shop.php
+7
-0
Regions.php
application/model/Regions.php
+7
-0
No files found.
application/api/controller/Shop.php
View file @
c0af7e7c
...
...
@@ -322,6 +322,13 @@ class Shop extends Basic
$result
[
"area"
][
$i
][
"disc"
][]
=
$item
;
}
}
foreach
(
$v
[
'business_district'
]
as
$item2
)
{
if
(
!
empty
(
$item2
))
{
$result
[
"area"
][
$i
][
"business_district"
][]
=
$item2
;
}
}
break
;
//目前只有上海和杭州其余的先不显示
}
...
...
application/model/Regions.php
View file @
c0af7e7c
...
...
@@ -94,9 +94,16 @@ class Regions extends Model
public
function
getRegionsCitySH
(
$code
)
{
$data
=
[];
$city_data
=
$this
->
field
(
'code,fullName'
)
->
where
(
'parentCode in ( '
.
$code
.
')'
)
->
select
();
$business
=
new
GBusinessDistrict
();
foreach
(
$city_data
as
$k
=>
$v
)
{
$data
[
$k
][
'name'
]
=
$v
[
'fullName'
];
$data
[
$k
][
'city'
]
=
$this
->
where
(
'parentCode'
,
$v
[
'code'
])
->
column
(
'fullName'
);
//区和商圈
foreach
(
$data
[
$k
][
'city'
]
as
$k2
=>
$v2
)
{
$data
[
$k
][
'business_district'
][
$k2
][
'district'
]
=
$v2
;
$data
[
$k
][
'business_district'
][
$k2
][
'business'
]
=
$business
->
field
(
'id,name'
)
->
where
(
'city'
,
$v
[
'fullName'
])
->
where
(
'disc'
,
$v2
)
->
select
();
}
}
return
$data
;
}
...
...
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