Commit 63a74b03 authored by 李尚科's avatar 李尚科

house tool fix

parent 76db09d1
Pipeline #6225 passed with stage
in 8 seconds
......@@ -149,13 +149,13 @@ class ToolController extends Controller {
let ret = [];
if (type === 'trend') {
ret = await ctx.blockModel.HousePriceTrend.one({ where: { id: area_code } });
ret = ret.trend_json;
ret = ret ? ret.trend_json : [];
} else if (type === 'increase') {
ret = await ctx.blockModel.HousePriceIncrease.one({ where: { id: area_code } });
ret = ret.increase_json;
ret = ret ? ret.increase_json : [];
} else if (type === 'question') {
ret = await ctx.blockModel.HouseQuestion.one({ where: { id: area_code } });
ret = ret.question_json;
ret = ret ? ret.question_json : [];
}
ctx.success(ret);
......
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