Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wenHuaBu_adminServer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
wenHuaBu_adminServer
Commits
0c71c93b
Commit
0c71c93b
authored
Apr 19, 2024
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
db4a75d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
officialWebsite.ts
src/biz/officialWebsite.ts
+14
-5
No files found.
src/biz/officialWebsite.ts
View file @
0c71c93b
...
@@ -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"
)
});
});
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment