Commit 1f46d615 authored by Hsinli's avatar Hsinli

addd

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