Commit 7c4d474b authored by 李尚科's avatar 李尚科

house v2 fix

parent 54c32465
Pipeline #8728 passed with stage
in 3 seconds
......@@ -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 });
}
......
......@@ -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
......@@ -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 } });
......
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