Commit bf7a0b0c authored by Hsinli's avatar Hsinli

addd

parent 8eeeb60e
Pipeline #9048 passed with stage
in 15 seconds
......@@ -413,15 +413,7 @@ class NewHouseService extends Service {
let list = [];
if (newHouseList.count > 0) {
for (let i in newHouseList.rows) {
let tmp = {
id: newHouseList.rows[i].id,
name: newHouseList.rows[i].name,
address: newHouseList.rows[i].address,
tags: newHouseList.rows[i].tags ? eval(newHouseList.rows[i].tags) : [],
image: newHouseList.rows[i].image,
price: Number(newHouseList.rows[i].reference_avg_price) === 0 ? '--' : Number(newHouseList.rows[i].reference_avg_price),
corner: newHouseList.rows[i].cornerMarker,
};
let tmp = await this.formatNewHouseBasic(newHouseList.rows[i]);
list.push(tmp);
}
}
......@@ -432,6 +424,21 @@ class NewHouseService extends Service {
return ret;
}
async formatNewHouseBasic(newHouseInfo) {
const { ctx } = this;
let ret = {
id: newHouseInfo.id,
name: newHouseInfo.name,
address: newHouseInfo.address,
tags: newHouseInfo.tags ? eval(newHouseInfo.tags) : [],
image: newHouseInfo.image,
price: Number(newHouseInfo.reference_avg_price) === 0 ? '--' : Number(newHouseInfo.reference_avg_price),
corner: newHouseInfo.corner || '',
}
return ret;
}
//获取推荐楼盘 目前推荐逻辑条件少 后面扩展
async getRecommendNewHouses(condition) {
......
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