Commit 98a88e3b authored by Hsinli's avatar Hsinli

add

parent aceeadda
Pipeline #19889 passed with stage
in 2 seconds
......@@ -21,7 +21,7 @@ class NewsService extends Service {
page,
limit,
offset,
attributes: ['id', 'title', 'images', 'source', 'source_time'],
attributes: ['id', 'title', 'images', 'source', 'source_time', 'updated_at'],
where: {
valid: 1,
status: 'pass',
......@@ -29,6 +29,11 @@ class NewsService extends Service {
order: [['top', 'desc'], ['source_time', 'desc']]
}
let list = await ctx.realestateModel.CdNews.findAndCountAll(filter);
for (let i in list.rows) {
if (list.rows[i].source_time === 'Invalid date') {
list.rows[i].source_time = list.rows[i].updated_at;
}
}
let ret = {
list: list.rows,
......
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