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
2c39cf13
Commit
2c39cf13
authored
Jun 21, 2019
by
Hsinli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
35bf4aa6
Pipeline
#9310
passed with stage
in 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
new_house.js
app/service/house/v2/new_house.js
+7
-5
No files found.
app/service/house/v2/new_house.js
View file @
2c39cf13
...
@@ -124,9 +124,12 @@ class NewHouseService extends Service {
...
@@ -124,9 +124,12 @@ class NewHouseService extends Service {
const
saleType
=
{
0
:
'未开售'
,
1
:
'售罄'
,
2
:
'预售'
,
3
:
'在售'
};
const
saleType
=
{
0
:
'未开售'
,
1
:
'售罄'
,
2
:
'预售'
,
3
:
'在售'
};
const
decorationType
=
{
1
:
'毛坯'
,
2
:
'简装'
,
3
:
'精装'
}
const
decorationType
=
{
1
:
'毛坯'
,
2
:
'简装'
,
3
:
'精装'
}
const
archType
=
{
1
:
'板楼'
,
2
:
'塔楼'
};
const
archType
=
{
1
:
'板楼'
,
2
:
'塔楼'
};
const
houseType
=
{
1
:
'住宅'
,
2
:
'公寓'
,
3
:
'别墅'
,
4
:
'商业'
,
5
:
'写字'
,
6
:
'底商'
};
let
ret
=
{};
let
ret
=
{};
if
(
Object
.
keys
(
data
).
length
>
0
)
{
if
(
Object
.
keys
(
data
).
length
>
0
)
{
//property_type物业类型/住宅类型处理
let
property_type
=
[];
//将json格式字符串处理
//将json格式字符串处理
let
nearBy
=
''
;
let
nearBy
=
''
;
if
(
data
.
residential_nearby
.
length
>
0
)
{
if
(
data
.
residential_nearby
.
length
>
0
)
{
...
@@ -181,7 +184,7 @@ class NewHouseService extends Service {
...
@@ -181,7 +184,7 @@ class NewHouseService extends Service {
favourable_info
:
data
.
favourable_info
||
''
,
//优惠
favourable_info
:
data
.
favourable_info
||
''
,
//优惠
reference_avg_price
:
data
.
reference_avg_price
===
0
?
'--'
:
Number
(
data
.
reference_avg_price
),
//均价
reference_avg_price
:
data
.
reference_avg_price
===
0
?
'--'
:
Number
(
data
.
reference_avg_price
),
//均价
reference_total_price
:
data
.
reference_total_price
===
0
?
'--'
:
Number
(
data
.
reference_total_price
),
//总价
reference_total_price
:
data
.
reference_total_price
===
0
?
'--'
:
Number
(
data
.
reference_total_price
),
//总价
property_type
:
houseType
[
data
.
house_type
]
||
''
,
//物业类型
property_type
:
data
.
house_type
.
split
(
','
)
,
//物业类型
}
}
ret
.
info
=
{
ret
.
info
=
{
...
@@ -199,7 +202,7 @@ class NewHouseService extends Service {
...
@@ -199,7 +202,7 @@ class NewHouseService extends Service {
basic
:
{
basic
:
{
reference_avg_price
:
data
.
reference_avg_price
===
0
?
'--'
:
Number
(
data
.
reference_avg_price
),
//均价
reference_avg_price
:
data
.
reference_avg_price
===
0
?
'--'
:
Number
(
data
.
reference_avg_price
),
//均价
tags
:
data
.
tags
?
eval
(
data
.
tags
)
:
[],
//项目特色
tags
:
data
.
tags
?
eval
(
data
.
tags
)
:
[],
//项目特色
property_type
:
houseType
[
data
.
house_type
]
||
''
,
//物业类型
property_type
:
data
.
house_type
.
split
(
','
)
,
//物业类型
property_right_years
:
data
.
residential_property_right_years
,
//产权年限
property_right_years
:
data
.
residential_property_right_years
,
//产权年限
build_type
:
archType
[
data
.
residential_arch_type
]
||
''
,
//建筑类型 1 板楼 2塔楼'
build_type
:
archType
[
data
.
residential_arch_type
]
||
''
,
//建筑类型 1 板楼 2塔楼'
decoration
:
decorationType
[
data
.
decoration_type
]
||
''
,
//装修情况,1 毛坯,2简装,3精装
decoration
:
decorationType
[
data
.
decoration_type
]
||
''
,
//装修情况,1 毛坯,2简装,3精装
...
@@ -295,14 +298,13 @@ class NewHouseService extends Service {
...
@@ -295,14 +298,13 @@ class NewHouseService extends Service {
async
formatNewHouseType
(
data
)
{
async
formatNewHouseType
(
data
)
{
const
{
ctx
}
=
this
;
const
{
ctx
}
=
this
;
const
saleType
=
{
0
:
'未开售'
,
1
:
'售罄'
,
2
:
'预售'
,
3
:
'在售'
};
const
saleType
=
{
0
:
'未开售'
,
1
:
'售罄'
,
2
:
'预售'
,
3
:
'在售'
};
const
houseType
=
{
1
:
'住宅'
,
2
:
'公寓'
,
3
:
'别墅'
,
4
:
'商业'
,
5
:
'写字'
,
6
:
'底商'
};
let
ret
=
{};
let
ret
=
{};
if
(
Object
.
keys
(
data
).
length
>
0
)
{
if
(
Object
.
keys
(
data
).
length
>
0
)
{
ret
=
{
ret
=
{
id
:
data
.
id
,
id
:
data
.
id
,
new_house_id
:
data
.
new_house_id
,
new_house_id
:
data
.
new_house_id
,
type
:
data
.
type
,
//类型,如三居、四居
type
:
data
.
type
,
//类型,如三居、四居
house_type
:
houseType
[
data
.
house_type
]
||
''
,
house_type
:
data
.
house_type
.
split
(
','
)
,
image
:
data
.
image
,
image
:
data
.
image
,
apartment
:
data
.
apartment
,
//户型,如4室2厅3卫
apartment
:
data
.
apartment
,
//户型,如4室2厅3卫
sale_type
:
saleType
[
data
.
sale_type
]
||
''
,
sale_type
:
saleType
[
data
.
sale_type
]
||
''
,
...
...
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