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
f164bad3
Commit
f164bad3
authored
Apr 25, 2024
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
d0f8cfc9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
officialWebsite.ts
src/biz/officialWebsite.ts
+15
-5
errorEnum.ts
src/config/errorEnum.ts
+2
-1
No files found.
src/biz/officialWebsite.ts
View file @
f164bad3
...
...
@@ -83,13 +83,20 @@ export async function homePage() {
// id, name, time:moment(st).format("YYYY-MM-DD")
// });
// });
let
huoDongTongZhiDataFindParam
=
{
articleType
:{
"$in"
:
[
ARTICLEPOSITION
.
通知公告
_hgh
活动通知
,
ARTICLEPOSITION
.
通知公告
_hgh
会议通知
,
ARTICLEPOSITION
.
通知公告
_hgh
项目公告
]
},
display
:
STATE
.
是
};
let
huoDongTongZhiSelectList
=
[
ARTICLEPOSITION
.
通知公告
_hgh
活动通知
,
ARTICLEPOSITION
.
通知公告
_hgh
会议通知
,
ARTICLEPOSITION
.
通知公告
_hgh
项目公告
];
let
huoDongTongZhiDataFindParam
=
{
articleType
:{
"$in"
:
huoDongTongZhiSelectList
},
display
:
STATE
.
是
};
let
huoDongTongZhiDataList
=
await
findToSortToPage
(
TABLEENUM
.
文章管理
,
huoDongTongZhiDataFindParam
,
[
"articleTime"
,
"id"
,
"title"
,
"articleType"
],
{
articleTime
:
-
1
},
1
);
huoDongTongZhiDataList
.
forEach
(
info
=>
{
let
{
id
,
title
,
articleTime
,
articleType
}
=
info
;
let
value
=
9
;
for
(
let
i
=
0
;
i
<
articleType
.
length
;
i
++
)
{
if
(
huoDongTongZhiSelectList
.
indexOf
(
articleType
[
i
])
>
-
1
)
{
value
=
articleType
[
i
];
break
;
}
}
result
.
huoDongTongZhi
.
push
({
id
,
title
,
articleTime
:
moment
(
articleTime
).
format
(
"YYYY-MM-DD"
),
value
:
articleType
[
0
]
id
,
title
,
articleTime
:
moment
(
articleTime
).
format
(
"YYYY-MM-DD"
),
value
});
});
...
...
@@ -604,9 +611,12 @@ export async function tongZhiGongGaoInfo({id, type}) {
let
findParam
=
{
id
,
articleType
:{
"$in"
:[
type
]},
display
:
STATE
.
是
};
let
dataBaseInfo
=
await
findOnce
(
TABLEENUM
.
文章管理
,
findParam
,
[
"id"
,
"title"
,
"desc"
,
"imgUrl"
,
"articleTime"
]);
dataBaseInfo
.
articleTime
=
moment
(
dataBaseInfo
.
articleTime
).
format
(
"YYYY-MM-DD"
);
if
(
!
dataBaseInfo
||
!
dataBaseInfo
.
id
)
throw
new
BizError
(
ERRORENUM
.
源文章已被删除
);
let
dataInfo
:
any
=
extractData
(
dataBaseInfo
,
[
"id"
,
"title"
,
"desc"
,
"imgUrl"
,
"articleTime"
]);
dataInfo
.
articleTime
=
moment
(
dataBaseInfo
.
articleTime
).
format
(
"YYYY-MM-DD"
);
return
{
dataInfo
:
dataBaseInfo
};
return
{
dataInfo
};
}
...
...
src/config/errorEnum.ts
View file @
f164bad3
...
...
@@ -52,7 +52,8 @@ export enum ERRORENUM {
该手机号已被注册
,
不存在该手机号的账号
,
该动态未开放
,
找不到该机构
找不到该机构
,
源文章已被删除
}
export
enum
ERRORCODEENUM
{
...
...
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