Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
5
51business
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
方斌
51business
Commits
7c4d474b
Commit
7c4d474b
authored
Jun 11, 2019
by
李尚科
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
house v2 fix
parent
54c32465
Pipeline
#8728
passed with stage
in 3 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
rental_house.js
app/controller/house/v2/rental_house.js
+1
-1
house.js
app/router/house.js
+4
-2
rental_house.js
app/service/house/v2/rental_house.js
+10
-1
No files found.
app/controller/house/v2/rental_house.js
View file @
7c4d474b
...
...
@@ -21,7 +21,7 @@ class RentalHouseController extends Controller {
if
(
banners_result
.
status
===
200
)
{
banners
=
banners_result
.
data
.
results
;
}
const
developers
=
await
ctx
.
service
.
house
.
option
.
getDevelopers
(
city_code
);
//品牌信息
const
developers
=
await
ctx
.
service
.
house
.
v2
.
option
.
getDevelopers
(
city_code
);
//品牌信息
ctx
.
success
({
banners
,
developers
});
}
...
...
app/router/house.js
View file @
7c4d474b
...
...
@@ -49,10 +49,11 @@ module.exports = app => {
//房产v2
//租房列表
router
.
get
(
'/v2/rental_house/home'
,
'house.v2.rentalHouse.home'
);
//租房首页信息
router
.
get
(
'/v2/rental_house/list'
,
'house.v2.rentalHouse.getRentalHouses'
);
//租房列表
router
.
post
(
'/v2/rental_house/list'
,
'house.v2.rentalHouse.getRentalHouses'
);
//租房列表
router
.
get
(
'/v2/rental_house/info/:rental_house_id'
,
'house.v2.rentalHouse.getRentalHouse'
);
//住房详情
router
.
get
(
'
add'
,
'
/v2/options/:city_code'
,
'house.v2.options.getOptions'
);
//筛选项信息
router
.
get
(
'/v2/options/:city_code'
,
'house.v2.options.getOptions'
);
//筛选项信息
//足迹
router
.
get
(
'/v2/foot_print/list'
,
'house.v2.footPrint.getFootPrintList'
);
//用户浏览记录列表
...
...
@@ -80,6 +81,6 @@ module.exports = app => {
router
.
get
(
'/v2/mine'
,
'house.v2.mine.getMineInfo'
);
//获取用户的头像昵称和关注等信息
//
router
.
get
(
'
add'
,
'
/tool/gjj/loan/measure/:area'
,
'house.v2.tool.gjjLoanMeasureInfo'
);
//貸款測算
router
.
get
(
'/tool/gjj/loan/measure/:area'
,
'house.v2.tool.gjjLoanMeasureInfo'
);
//貸款測算
};
\ No newline at end of file
app/service/house/v2/rental_house.js
View file @
7c4d474b
...
...
@@ -35,8 +35,17 @@ class RentalHouseService extends Service {
if
(
price
&&
price
.
max
)
{
where
.
price
=
{
$between
:
[
price
.
min
,
price
.
max
]
};
}
if
(
area_code
)
{
if
(
area_code
&&
Object
.
keys
(
area_code
).
length
!==
0
)
{
if
(
area_code
.
city_code
&&
area_code
.
city_code
!==
''
)
{
where
.
option_city_code
=
area_code
.
city_code
;
}
if
(
area_code
.
district_code
&&
area_code
.
district_code
!==
''
)
{
where
.
option_district_code
=
area_code
.
district_code
;
}
if
(
area_code
.
bizcircle_code
&&
area_code
.
bizcircle_code
!==
''
)
{
where
.
option_bizcircle_code
=
area_code
.
bizcircle_code
;
}
}
if
(
house_type
)
{
const
house_types
=
await
ctx
.
realestateModel
.
RentalHouseType
.
all
({
where
:
{
type
:
house_type
,
status
:
'online'
,
valid
:
1
}
});
...
...
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