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
9a53dd23
Commit
9a53dd23
authored
Dec 11, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商铺列表-加商圈
parent
cee9293f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
Shop.php
application/api_broker/controller/Shop.php
+7
-3
GHouses.php
application/model/GHouses.php
+4
-1
No files found.
application/api_broker/controller/Shop.php
View file @
9a53dd23
...
...
@@ -117,7 +117,6 @@ class Shop extends Basic
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
//c端查对外的名字 b端查对内的名字
if
(
isset
(
$params
[
'title'
])
&&
$params
[
'site_area'
]
==
1
||
$params
[
'site_area'
]
==
2
)
{
$conditions
[
'external_title'
]
=
array
(
"like"
,
"%"
.
trim
(
$params
[
'title'
])
.
"%"
);
...
...
@@ -262,12 +261,17 @@ class Shop extends Basic
$conditions
[
'status'
]
=
!
empty
(
$params
[
'status'
])
?
$params
[
'status'
]
:
array
(
'in'
,
"1,2"
);
//只显示上架或下架的
}
$result
=
$this
->
gHousesModel
->
getHousesList
(
$pageNo
,
$pageSize
,
$order_
,
$field
,
$conditions
,
$spTagArr
);
$m_business_district
=
new
GBusinessDistrict
();
//获取图片信息
foreach
(
$result
as
$key
=>
$val
)
{
$result
[
$key
][
"api_path"
]
=
CK_IMG_URL
.
'images/'
;
$result
[
$key
][
"rent_price"
]
=
$val
[
"rent_price"
]
*
0.01
;
$result
[
$key
][
"title"
]
=
$val
[
"disc"
]
.
$result
[
$key
][
"title"
];
$business_district
=
''
;
//查商圈
if
(
$val
[
"business_district_id"
]){
$business_district
=
$m_business_district
->
getValue
([
'id'
=>
$val
[
"business_district_id"
]],
'name'
);
}
$result
[
$key
][
"title"
]
=
$val
[
"disc"
]
.
$business_district
.
$result
[
$key
][
"title"
];
$param
[
"house_id"
]
=
$val
[
"id"
];
$param
[
"img_type"
]
=
1
;
//默认主图
...
...
application/model/GHouses.php
View file @
9a53dd23
...
...
@@ -948,7 +948,7 @@ class GHouses extends BaseModel
*/
function
getHousesList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$params
,
$spTagsArr
)
{
return
Db
::
table
(
$this
->
table
)
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
where
(
$params
)
->
where
(
function
(
$query
)
use
(
$spTagsArr
)
{
...
...
@@ -958,6 +958,9 @@ class GHouses extends BaseModel
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
//echo Db::table($this->table)->getLastSql();
return
$result
;
}
/**
...
...
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