Commit 48557374 authored by Hsinli's avatar Hsinli

addd

parent 3bc89d55
Pipeline #12846 passed with stage
in 22 seconds
...@@ -132,6 +132,17 @@ module.exports = app => { ...@@ -132,6 +132,17 @@ module.exports = app => {
type: TEXT, type: TEXT,
allowNull: true allowNull: true
}, },
pre_sale_permit: {
type: STRING,
allowNull: true
},
pre_sale_permit_date: {
type: STRING,
allowNull: true
},
building_numbers: {
type: STRING,
},
selling_qualification: { selling_qualification: {
type: TEXT, type: TEXT,
allowNull: true allowNull: true
......
...@@ -235,7 +235,13 @@ class NewHouseService extends Service { ...@@ -235,7 +235,13 @@ class NewHouseService extends Service {
power_supply_type: data.residential_power_suppler_type,//供电方式 power_supply_type: data.residential_power_suppler_type,//供电方式
near_by: nearBy,//周边规划 near_by: nearBy,//周边规划
}, },
permit: JSON.parse(data.selling_qualification) // permit: JSON.parse(data.selling_qualification)
permit: {
pre_sale_permit: data.pre_sale_permit,//预售证
pre_sale_permit_date: data.pre_sale_permit_date,//发证时间
building_numbers: data.building_numbers,//绑定楼栋
}
} }
} }
return ret; return ret;
...@@ -338,30 +344,30 @@ class NewHouseService extends Service { ...@@ -338,30 +344,30 @@ class NewHouseService extends Service {
status: 'online', status: 'online',
valid: 1 valid: 1
}, },
order: [['sale_type', 'desc']], // order: [['sale_type', 'desc']],
} }
//根据筛选项增加不同的指定类型 //根据筛选项增加不同的指定类型
// if (condition.hasOwnProperty('type') && condition.type !== '') { if (condition.hasOwnProperty('type') && condition.type !== '') {
// if (type === 'home') { if (type === 'home') {
// //为您推荐只展示50条在售楼盘的数据,根据排序序号取数,数字小的排在前面,数字一样的情况下根据时间逆序排列,时间也一样的情况下随机排列; //为您推荐只展示50条在售楼盘的数据,根据排序序号取数,数字小的排在前面,数字一样的情况下根据时间逆序排列,时间也一样的情况下随机排列;
// filter.limit = Number(condition.page_size) || 50; filter.limit = Number(condition.page_size) || 50;
// // filter.order.push(['order_id', 'desc'], ['created_at', 'desc']);拿掉排序,跟默认排序重复了 2019-6-28 14:06:00 lisk // filter.order.push(['order_id', 'desc'], ['created_at', 'desc']);拿掉排序,跟默认排序重复了 2019-6-28 14:06:00 lisk
// } else if (type === 'all') { } else if (type === 'all') {
// filter.order.push(['sale_type', 'desc']); filter.order.push(['sale_type', 'desc']);
// } else if (type === 'sale') { } else if (type === 'sale') {
// //点击在售楼盘进入列表页面且只展示当前销售状态为在售的楼盘 //点击在售楼盘进入列表页面且只展示当前销售状态为在售的楼盘
// filter.where.sale_type = 3; filter.where.sale_type = 3;
// } else if (type === 'open') { } else if (type === 'open') {
// //只展示最近三个月内开盘的楼盘,往前追溯三个月,列表单次加载30条楼盘数据,滑到底部再次加载30条 //只展示最近三个月内开盘的楼盘,往前追溯三个月,列表单次加载30条楼盘数据,滑到底部再次加载30条
// let endDate = moment().subtract(180, 'days').format('YYYY-MM-DD HH:mm:ss'); let endDate = moment().subtract(180, 'days').format('YYYY-MM-DD HH:mm:ss');
// filter.where.open_date = { $gt: endDate }; filter.where.open_date = { $gt: endDate };
// filter.order.push(['sale_type', 'desc']); filter.order.push(['sale_type', 'desc']);
// } else if (type === 'favourable') { } else if (type === 'favourable') {
// //点击优惠好盘只展示有优惠的楼盘,列表单次加载30条楼盘数据,滑到底部再次加载30条 //点击优惠好盘只展示有优惠的楼盘,列表单次加载30条楼盘数据,滑到底部再次加载30条
// filter.where.favourable_info = { $not: null }; filter.where.favourable_info = { $not: null };
// filter.order.push(['sale_type', 'desc']); filter.order.push(['sale_type', 'desc']);
// } }
// } }
//是否有值来增加筛选项 //是否有值来增加筛选项
if (condition.unit_price && condition.unit_price.hasOwnProperty('min') && condition.unit_price.hasOwnProperty('max')) {//单价 if (condition.unit_price && condition.unit_price.hasOwnProperty('min') && condition.unit_price.hasOwnProperty('max')) {//单价
......
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