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
2b44d06c
Commit
2b44d06c
authored
Apr 12, 2019
by
李尚科
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
house fix
parent
73f65b8f
Pipeline
#5919
passed with stage
in 4 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
8 deletions
+29
-8
option.js
app/service/house/option.js
+24
-5
rental_house.js
app/service/house/rental_house.js
+2
-1
tool.js
app/service/house/tool.js
+3
-2
No files found.
app/service/house/option.js
View file @
2b44d06c
...
...
@@ -73,18 +73,37 @@ class OptionService extends Service {
const
prices
=
PRICE_RANGE
;
const
areas
=
await
this
.
getAreaOptions
(
city_code
);
return
{
result
:
{
brands
,
prices
,
house_types
,
areas
}
};
return
{
result
:
[
{
name
:
'品牌'
,
id
:
0
,
path
:
[],
nameShow
:
''
,
_children
:
brands
},
{
name
:
'区域'
,
id
:
0
,
path
:
[],
nameShow
:
''
,
_children
:
areas
},
{
name
:
'价格'
,
id
:
0
,
path
:
[],
nameShow
:
''
,
_children
:
prices
},
{
name
:
'户型'
,
id
:
0
,
path
:
[],
nameShow
:
''
,
_children
:
house_types
}]
};
}
//获取新房的筛选项
async
getNewHouseOptions
(
city_code
)
{
const
unit_price
=
NEW_HOUSE_UNIT_PRICE
;
const
total_price
=
NEW_HOUSE_TOTAL_PRICE
;
const
house_types
=
HOUSE_TYPE
;
const
house_area
=
NEW_HOUSE_AREA
;
const
areas
=
await
this
.
getAreaOptions
(
city_code
);
return
{
result
:
{
house_area
,
unit_price
,
total_price
,
house_types
,
areas
}
};
return
{
result
:
[
{
name
:
'区域'
,
id
:
0
,
path
:
[],
nameShow
:
''
,
_children
:
areas
},
{
name
:
'价格'
,
id
:
0
,
path
:
[],
nameShow
:
''
,
_children
:
[
{
name
:
'总价'
,
id
:
0
,
path
:
[],
nameShow
:
''
,
_children
:
total_price
},
{
name
:
'单价'
,
id
:
0
,
path
:
[],
nameShow
:
''
,
_children
:
unit_price
}]
},
{
name
:
'面积'
,
id
:
0
,
path
:
[],
nameShow
:
''
,
_children
:
house_area
},
{
name
:
'户型'
,
id
:
0
,
path
:
[],
nameShow
:
''
,
_children
:
house_types
},
]
};
}
//获取开发商列表
...
...
@@ -121,7 +140,7 @@ class OptionService extends Service {
const
ret
=
[]
for
(
let
j
in
districts
)
{
const
district
=
districts
[
j
];
const
_children
=
[];
const
_children
=
[
{
id
:
0
,
name
:
'不限'
}
];
const
bizcircles
=
await
ctx
.
blockModel
.
HouseBizcircle
.
all
({
where
:
{
district_id
:
district
.
id
}
});
if
(
!
bizcircles
||
bizcircles
.
length
===
0
)
{
continue
;
...
...
@@ -130,13 +149,13 @@ class OptionService extends Service {
const
bizcircle
=
bizcircles
[
i
];
_children
.
push
({
id
:
bizcircle
.
id
,
area_
name
:
bizcircle
.
name
,
name
:
bizcircle
.
name
,
// district_id: bizcircle.district_id,
});
}
ret
.
push
({
id
:
district
.
id
,
area_
name
:
district
.
name
,
name
:
district
.
name
,
// city_id: district.city_id,
_children
:
_children
,
})
...
...
app/service/house/rental_house.js
View file @
2b44d06c
...
...
@@ -293,7 +293,8 @@ class RentalHouseService extends Service {
2、房型说明:独门独户,拎包入住,满足各种需求,采光
3、社区配套:健身房、休憩区、小影院、娱乐室、商务区、无人商店、快递柜。
4、房间配套:空调、Wifi、洗衣机、热水器、冰箱、床、衣柜、电脑桌、沙发。`
,
room_configuration
:
JSON
.
parse
(
rental_house
.
roomConfiguration
),
//房间配置
// room_configuration: JSON.parse(rental_house.roomConfiguration),//房间配置
room_configuration
:
rental_house
.
roomConfiguration
,
//房间配置
notice
:
rental_house
.
notice
,
//入住须知
};
ret
.
push
(
temp_rental_house
);
...
...
app/service/house/tool.js
View file @
2b44d06c
...
...
@@ -9,12 +9,12 @@ class ToolService extends Service {
const
{
ctx
}
=
this
;
let
map_points
=
[];
if
(
level
==
1
)
{
if
(
level
==
1
)
{
map_points
=
await
ctx
.
blockModel
.
HouseNewHousePriceMap
.
all
({
where
:
{
pid
:
area_code
}
});
}
else
{
map_points
=
await
ctx
.
blockModel
.
HouseNewHousePriceMap2
.
all
({
where
:
{
pid
:
area_code
}
});
}
if
(
!
map_points
||
map_points
.
length
===
0
)
{
return
[];
}
...
...
@@ -87,6 +87,7 @@ class ToolService extends Service {
}
else
{
status
=
1
;
//j加把劲还是有希望买到房
notice
=
'恭喜您!依据以上计划,您即将完成XXX项目首付款准备。您现阶段首付预算可以购买以下项目房源:'
;
const
invest_plans
=
await
ctx
.
blockModel
.
HouseInvestPlan
({
where
:
{}
});
}
return
{
status
,
notice
,
plan
};
...
...
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