Commit 0c71c93b by lixinming

no message

parent db4a75d8
...@@ -75,12 +75,21 @@ export async function homePage() { ...@@ -75,12 +75,21 @@ export async function homePage() {
} }
/**活动通知 */ /**活动通知 */
let huoDongTongZhiData = await find(TABLEENUM.活动通知, { push:STATE. } );//todo 二期优化点 在获取数据时取最新6条 // let huoDongTongZhiData = await find(TABLEENUM.活动通知, { push:STATE.是 } );//todo 二期优化点 在获取数据时取最新6条
huoDongTongZhiData.sort((a, b) => {return a.st - b.st}); // huoDongTongZhiData.sort((a, b) => {return a.st - b.st});
huoDongTongZhiData.forEach(info => { // huoDongTongZhiData.forEach(info => {
let {id, name, st} = info; // let {id, name, st} = info;
// result.huoDongTongZhi.push({
// id, name, time:moment(st).format("YYYY-MM-DD")
// });
// });
let huoDongTongZhiDataFindParam = {articleType:{"$in":[ARTICLEPOSITION.通知公告_hgh活动通知]}, display:STATE.};
let huoDongTongZhiDataList = await findToSortToPage(TABLEENUM.文章管理, huoDongTongZhiDataFindParam, ["articleTime", "id", "title"], {articleTime:-1}, 1);
huoDongTongZhiDataList.forEach(info => {
let { id, title, articleTime } = info;
result.huoDongTongZhi.push({ result.huoDongTongZhi.push({
id, name, time:moment(st).format("YYYY-MM-DD") id, title, articleTime:moment(articleTime).format("YYYY-MM-DD")
}); });
}); });
......
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