Commit 7bc84c11 authored by Hsinli's avatar Hsinli

Merge branch 'master' of t-git.51gjj.com:fangbin/51business

parents 539e2b59 2b44d06c
Pipeline #5920 passed with stage
in 2 seconds
......@@ -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,
})
......
......@@ -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);
......
......@@ -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 };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment