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
662442b9
Commit
662442b9
authored
Mar 31, 2024
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
2be982b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
officialWebsite.ts
src/biz/officialWebsite.ts
+18
-9
No files found.
src/biz/officialWebsite.ts
View file @
662442b9
...
...
@@ -18,10 +18,14 @@ export async function banner() {
/**banner */
let
localBanners
=
[
BANNERPOSITION
.
首页
_hghbanner01
,
BANNERPOSITION
.
首页
_hghbanner02
,
BANNERPOSITION
.
首页
_hghbanner03
];
let
bannerData
=
await
find
(
TABLEENUM
.
banner
管理
,
{
location
:{
"$in"
:
localBanners
},
display
:
STATE
.
是
}
);
bannerData
.
forEach
(
info
=>
{
let
{
imgUrl
,
articleTitle
,
desc
,
articleUrl
}
=
info
;
result
.
bannerList
.
push
({
imgUrl
,
title
:
articleTitle
,
desc
,
articleUrl
});
});
for
(
let
i
=
0
;
i
<
bannerData
.
length
;
i
++
)
{
let
{
imgUrl
,
articleTitle
,
desc
,
articleUrl
}
=
bannerData
[
i
];
let
articleInfo
=
await
findOnce
(
TABLEENUM
.
文章管理
,
{
id
:
articleTitle
},
[
"id"
,
"title"
]);
let
articleTitleStr
=
articleInfo
&&
articleInfo
.
id
?
articleInfo
.
title
:
''
;
result
.
bannerList
.
push
({
imgUrl
,
title
:
articleTitleStr
,
desc
,
articleUrl
});
}
return
result
;
}
...
...
@@ -98,10 +102,14 @@ export async function xueHuiGaiKuangBanner() {
/**banner */
let
localBanners
=
[
BANNERPOSITION
.
学会概况
_hghbanner01
,
BANNERPOSITION
.
学会概况
_hghbanner02
,
BANNERPOSITION
.
学会概况
_hghbanner03
];
let
bannerData
=
await
find
(
TABLEENUM
.
banner
管理
,
{
location
:{
"$in"
:
localBanners
},
display
:
STATE
.
是
}
);
bannerData
.
forEach
(
info
=>
{
let
{
imgUrl
,
articleTitle
,
desc
,
articleUrl
}
=
info
;
result
.
bannerList
.
push
({
imgUrl
,
title
:
articleTitle
,
desc
,
articleUrl
});
});
for
(
let
i
=
0
;
i
<
bannerData
.
length
;
i
++
)
{
let
{
imgUrl
,
articleTitle
,
desc
,
articleUrl
}
=
bannerData
[
i
];
let
articleInfo
=
await
findOnce
(
TABLEENUM
.
文章管理
,
{
id
:
articleTitle
},
[
"id"
,
"title"
]);
let
articleTitleStr
=
articleInfo
&&
articleInfo
.
id
?
articleInfo
.
title
:
''
;
result
.
bannerList
.
push
({
imgUrl
,
title
:
articleTitleStr
,
desc
,
articleUrl
});
}
return
result
;
}
...
...
@@ -369,7 +377,8 @@ export async function zhuTiJiaoYu() {
let
dataBaseList
=
await
find
(
TABLEENUM
.
文章管理
,
findParam
,
[
"id"
,
"title"
,
"desc"
,
"articleTime"
,
"imgUrl"
]);
dataBaseList
.
forEach
(
item
=>
{
let
{
id
,
title
,
desc
,
articleTime
,
imgUrl
}
=
item
;
dataInfo
[
info
.
name
].
push
({
id
,
title
,
desc
,
articleTime
,
imgUrl
});
let
timeStr
=
moment
(
articleTime
).
format
(
"YYYY-MM-DD"
)
dataInfo
[
info
.
name
].
push
({
id
,
title
,
desc
,
articleTime
:
timeStr
,
imgUrl
});
});
}
...
...
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