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
f1b10b35
Commit
f1b10b35
authored
Mar 27, 2024
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
90944b9e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
29 deletions
+33
-29
officialWebsite.ts
src/biz/officialWebsite.ts
+11
-10
xueHuiLingDao.ts
src/biz/portal/xueHui/xueHuiLingDao.ts
+4
-1
enum.ts
src/config/enum.ts
+7
-8
model.ts
src/data/models/model.ts
+1
-1
router.ts
src/routers/portal/router.ts
+2
-2
router.ts
src/routers/public/router.ts
+8
-7
No files found.
src/biz/officialWebsite.ts
View file @
f1b10b35
...
@@ -43,8 +43,8 @@ export async function homePage() {
...
@@ -43,8 +43,8 @@ export async function homePage() {
let
zhuanTiData
=
await
find
(
TABLEENUM
.
专题系列
,
{});
let
zhuanTiData
=
await
find
(
TABLEENUM
.
专题系列
,
{});
zhuanTiData
.
sort
((
a
,
b
)
=>
{
return
a
.
rank
-
b
.
rank
});
zhuanTiData
.
sort
((
a
,
b
)
=>
{
return
a
.
rank
-
b
.
rank
});
zhuanTiData
.
forEach
(
info
=>
{
zhuanTiData
.
forEach
(
info
=>
{
let
{
rank
,
title
,
articleUrl
,
imgUrl
}
=
info
;
let
{
rank
,
title
,
articleUrl
,
imgUrl
,
articleTitle
}
=
info
;
result
.
zhuanTi
.
push
({
rank
,
title
,
articleUrl
,
imgUrl
});
result
.
zhuanTi
.
push
({
rank
,
title
,
articleUrl
,
imgUrl
,
id
:
articleTitle
});
});
});
/**学会动态 每个动态资讯取最新的可见的两个*/
/**学会动态 每个动态资讯取最新的可见的两个*/
let
wenZhangTypeList
=
[
ARTICLEPOSITION
.
动态资讯
_hgh
学会动态
,
ARTICLEPOSITION
.
动态资讯
_hgh
政策动向
,
ARTICLEPOSITION
.
动态资讯
_hgh
行业风采
];
let
wenZhangTypeList
=
[
ARTICLEPOSITION
.
动态资讯
_hgh
学会动态
,
ARTICLEPOSITION
.
动态资讯
_hgh
政策动向
,
ARTICLEPOSITION
.
动态资讯
_hgh
行业风采
];
...
@@ -348,10 +348,10 @@ export async function zhuTiJiaoYu() {
...
@@ -348,10 +348,10 @@ export async function zhuTiJiaoYu() {
let
itemId
=
info
.
id
;
let
itemId
=
info
.
id
;
dataInfo
[
info
.
name
]
=
[];
dataInfo
[
info
.
name
]
=
[];
let
findParam
=
{
articleType
:{
"$in"
:[
itemId
]},
display
:
STATE
.
是
};
let
findParam
=
{
articleType
:{
"$in"
:[
itemId
]},
display
:
STATE
.
是
};
let
dataBaseList
=
await
find
(
TABLEENUM
.
文章管理
,
findParam
,
[
"title"
,
"desc"
,
"articleTime"
,
"imgUrl"
]);
let
dataBaseList
=
await
find
(
TABLEENUM
.
文章管理
,
findParam
,
[
"
id"
,
"
title"
,
"desc"
,
"articleTime"
,
"imgUrl"
]);
dataBaseList
.
forEach
(
item
=>
{
dataBaseList
.
forEach
(
item
=>
{
let
{
title
,
desc
,
articleTime
,
imgUrl
}
=
item
;
let
{
id
,
title
,
desc
,
articleTime
,
imgUrl
}
=
item
;
dataInfo
[
info
.
name
].
push
({
title
,
desc
,
articleTime
,
imgUrl
});
dataInfo
[
info
.
name
].
push
({
id
,
title
,
desc
,
articleTime
,
imgUrl
});
});
});
}
}
...
@@ -369,7 +369,7 @@ export async function xueXiYuanDiShiPin({type}) {
...
@@ -369,7 +369,7 @@ export async function xueXiYuanDiShiPin({type}) {
let
spDBList
=
await
find
(
TABLEENUM
.
视频管理
,
{
videoType
:
type
,
display
:
STATE
.
是
});
let
spDBList
=
await
find
(
TABLEENUM
.
视频管理
,
{
videoType
:
type
,
display
:
STATE
.
是
});
spDBList
.
forEach
(
info
=>
{
spDBList
.
forEach
(
info
=>
{
let
addInfo
:
any
=
extractData
(
info
,
[
"title"
,
"videoUrl"
,
"videoTime"
]);
let
addInfo
:
any
=
extractData
(
info
,
[
"
id"
,
"
title"
,
"videoUrl"
,
"videoTime"
]);
addInfo
.
videoTime
=
moment
(
addInfo
.
videoTime
).
format
(
"YYYY-MM-DD"
);
addInfo
.
videoTime
=
moment
(
addInfo
.
videoTime
).
format
(
"YYYY-MM-DD"
);
dataList
.
push
(
addInfo
);
dataList
.
push
(
addInfo
);
});
});
...
@@ -387,6 +387,7 @@ export async function xueXiYuanDiWenZi({type}) {
...
@@ -387,6 +387,7 @@ export async function xueXiYuanDiWenZi({type}) {
let
wzDBList
=
await
find
(
TABLEENUM
.
文字资料
,
{
type
});
let
wzDBList
=
await
find
(
TABLEENUM
.
文字资料
,
{
type
});
wzDBList
.
forEach
(
info
=>
{
wzDBList
.
forEach
(
info
=>
{
let
addInfo
:
any
=
extractData
(
info
,
[
"title"
,
"rank"
,
"imgUrl"
,
"articleUrl"
,
"updateTime"
]);
let
addInfo
:
any
=
extractData
(
info
,
[
"title"
,
"rank"
,
"imgUrl"
,
"articleUrl"
,
"updateTime"
]);
addInfo
.
id
=
info
.
articleTitle
addInfo
.
updateTime
=
moment
(
addInfo
.
updateTime
).
format
(
"YYYY-MM-DD"
);
addInfo
.
updateTime
=
moment
(
addInfo
.
updateTime
).
format
(
"YYYY-MM-DD"
);
dataList
.
push
(
addInfo
);
dataList
.
push
(
addInfo
);
});
});
...
@@ -405,15 +406,15 @@ export async function dangJianZiYuan({first, secondary, three, pageNumber}) {
...
@@ -405,15 +406,15 @@ export async function dangJianZiYuan({first, secondary, three, pageNumber}) {
let
dataCount
=
0
;
let
dataCount
=
0
;
if
(
first
==
PARTYBUILDTYPEENUM
.
主题教育
)
{
if
(
first
==
PARTYBUILDTYPEENUM
.
主题教育
)
{
let
findParam
=
{
articleType
:{
"$in"
:[
secondary
]},
display
:
STATE
.
是
};
let
findParam
=
{
articleType
:{
"$in"
:[
secondary
]},
display
:
STATE
.
是
};
let
dataBaseList
=
await
findToPage
(
TABLEENUM
.
文章管理
,
findParam
,
[
"title"
,
"desc"
,
"articleTime"
,
"imgUrl"
],
pageNumber
);
let
dataBaseList
=
await
findToPage
(
TABLEENUM
.
文章管理
,
findParam
,
[
"
id"
,
"
title"
,
"desc"
,
"articleTime"
,
"imgUrl"
],
pageNumber
);
dataCount
=
await
findCount
(
TABLEENUM
.
文章管理
,
findParam
);
dataCount
=
await
findCount
(
TABLEENUM
.
文章管理
,
findParam
);
dataBaseList
.
forEach
(
item
=>
{
dataBaseList
.
forEach
(
item
=>
{
let
{
title
,
desc
,
articleTime
,
imgUrl
}
=
item
;
let
{
title
,
desc
,
articleTime
,
imgUrl
,
id
}
=
item
;
dataList
.
push
({
title
,
desc
,
articleTime
,
imgUrl
});
dataList
.
push
({
id
,
title
,
desc
,
articleTime
,
imgUrl
});
});
});
}
else
{
//学习园地
}
else
{
//学习园地
if
(
secondary
==
PARTYBUILDSUBTYPEENUM
.
文字资料
)
{
if
(
secondary
==
PARTYBUILDSUBTYPEENUM
.
文字资料
)
{
let
wzDBList
=
await
findToPage
(
TABLEENUM
.
文字资料
,
{
type
:
three
},
[
"title"
,
"rank"
,
"imgUrl"
,
"articleUrl"
,
"updateTime"
],
pageNumber
);
let
wzDBList
=
await
findToPage
(
TABLEENUM
.
文字资料
,
{
type
:
three
},
[
"title"
,
"rank"
,
"imgUrl"
,
"articleUrl"
,
"updateTime"
],
pageNumber
);
dataCount
=
await
findCount
(
TABLEENUM
.
文字资料
,
{
type
:
three
});
dataCount
=
await
findCount
(
TABLEENUM
.
文字资料
,
{
type
:
three
});
wzDBList
.
forEach
(
info
=>
{
wzDBList
.
forEach
(
info
=>
{
let
addInfo
:
any
=
extractData
(
info
,
[
"title"
,
"rank"
,
"imgUrl"
,
"articleUrl"
,
"updateTime"
]);
let
addInfo
:
any
=
extractData
(
info
,
[
"title"
,
"rank"
,
"imgUrl"
,
"articleUrl"
,
"updateTime"
]);
...
...
src/biz/portal/xueHui/xueHuiLingDao.ts
View file @
f1b10b35
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
* 排序,后一个排序会与修改前的排序互换
* 排序,后一个排序会与修改前的排序互换
*/
*/
import
{
XUEHUILINGDAOZHIWEI
}
from
"../../../config/enum"
;
import
{
ERRORENUM
}
from
"../../../config/errorEnum"
;
import
{
ERRORENUM
}
from
"../../../config/errorEnum"
;
import
{
addOneData
}
from
"../../../data/add"
;
import
{
addOneData
}
from
"../../../data/add"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
...
@@ -12,6 +13,7 @@ import { updateOneData } from "../../../data/update";
...
@@ -12,6 +13,7 @@ import { updateOneData } from "../../../data/update";
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
generateSystemId
,
successResult
}
from
"../../../tools/system"
;
import
{
BizError
}
from
"../../../util/bizError"
;
import
{
BizError
}
from
"../../../util/bizError"
;
import
{
extractData
}
from
"../../../util/piecemeal"
;
import
{
extractData
}
from
"../../../util/piecemeal"
;
import
{
changeEnumValue
}
from
"../../../util/verificationEnum"
;
/**
/**
...
@@ -72,7 +74,8 @@ export async function list({pageNumber}) {
...
@@ -72,7 +74,8 @@ export async function list({pageNumber}) {
let
dataCount
=
await
findCount
(
TABLEENUM
.
活动通知
,
{});
let
dataCount
=
await
findCount
(
TABLEENUM
.
活动通知
,
{});
let
dataList
=
[];
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
dbList
.
forEach
(
info
=>
{
let
item
=
extractData
(
info
,
[
"id"
,
"rank"
,
"name"
,
"position"
,
"desc"
]);
let
item
:
any
=
extractData
(
info
,
[
"id"
,
"rank"
,
"name"
,
"position"
,
"desc"
]);
item
.
position
=
changeEnumValue
(
XUEHUILINGDAOZHIWEI
,
info
.
position
);
dataList
.
push
(
item
);
dataList
.
push
(
item
);
});
});
...
...
src/config/enum.ts
View file @
f1b10b35
...
@@ -95,18 +95,17 @@ export enum PROFCATEGORY {
...
@@ -95,18 +95,17 @@ export enum PROFCATEGORY {
/**
/**
*
作品类型
*
学会领导职位
*/
*/
export
enum
TYPEOFWORKS
{
export
enum
XUEHUILINGDAOZHIWEI
{
作品类型
1
=
1
,
会长
=
1
,
作品类型
2
,
副会长
,
作品类型
3
,
秘书长
,
作品类型
4
,
监事长
作品类型
5
,
作品类型
6
}
}
/**
/**
* 内容管理banner位置
* 内容管理banner位置
*/
*/
...
...
src/data/models/model.ts
View file @
f1b10b35
...
@@ -109,7 +109,7 @@ const ModelArray = [
...
@@ -109,7 +109,7 @@ const ModelArray = [
id
:{
type
:
'String'
,
index
:
true
},
id
:{
type
:
'String'
,
index
:
true
},
rank
:{
type
:
'Number'
},
//排序
rank
:{
type
:
'Number'
},
//排序
name
:{
type
:
'String'
,
default
:
''
},
//名称
name
:{
type
:
'String'
,
default
:
''
},
//名称
position
:{
type
:
'
String
'
,
default
:
''
},
//职位
position
:{
type
:
'
Number
'
,
default
:
''
},
//职位
imgUrl
:{
type
:
'String'
,
default
:
''
},
//大图地址
imgUrl
:{
type
:
'String'
,
default
:
''
},
//大图地址
miniImgUrl
:{
type
:
'String'
,
default
:
''
},
//小图片地址
miniImgUrl
:{
type
:
'String'
,
default
:
''
},
//小图片地址
desc
:{
type
:
'String'
,
default
:
''
},
//描述
desc
:{
type
:
'String'
,
default
:
''
},
//描述
...
...
src/routers/portal/router.ts
View file @
f1b10b35
...
@@ -72,7 +72,7 @@ export const Config = {
...
@@ -72,7 +72,7 @@ export const Config = {
{
{
rank
:{
type
:
"Number"
,
desc
:
"排序"
},
rank
:{
type
:
"Number"
,
desc
:
"排序"
},
name
:{
typs
:
"String"
,
desc
:
"名称"
},
name
:{
typs
:
"String"
,
desc
:
"名称"
},
position
:{
type
:
"
String
"
,
desc
:
"职位"
},
position
:{
type
:
"
Number
"
,
desc
:
"职位"
},
imgUrl
:{
type
:
"String"
,
desc
:
"大图地址"
},
imgUrl
:{
type
:
"String"
,
desc
:
"大图地址"
},
miniImgUrl
:{
type
:
"String"
,
desc
:
"小图地址"
},
miniImgUrl
:{
type
:
"String"
,
desc
:
"小图地址"
},
desc
:{
type
:
"String"
,
desc
:
"说明"
},
desc
:{
type
:
"String"
,
desc
:
"说明"
},
...
@@ -90,7 +90,7 @@ export const Config = {
...
@@ -90,7 +90,7 @@ export const Config = {
{
{
rank
:{
type
:
"Number"
,
desc
:
"排序"
},
rank
:{
type
:
"Number"
,
desc
:
"排序"
},
name
:{
typs
:
"String"
,
desc
:
"名称"
},
name
:{
typs
:
"String"
,
desc
:
"名称"
},
position
:{
type
:
"
String
"
,
desc
:
"职位"
},
position
:{
type
:
"
Number
"
,
desc
:
"职位"
},
imgUrl
:{
type
:
"String"
,
desc
:
"大图地址"
},
imgUrl
:{
type
:
"String"
,
desc
:
"大图地址"
},
miniImgUrl
:{
type
:
"String"
,
desc
:
"小图地址"
},
miniImgUrl
:{
type
:
"String"
,
desc
:
"小图地址"
},
desc
:{
type
:
"String"
,
desc
:
"说明"
},
desc
:{
type
:
"String"
,
desc
:
"说明"
},
...
...
src/routers/public/router.ts
View file @
f1b10b35
...
@@ -54,13 +54,6 @@ export const Config = {
...
@@ -54,13 +54,6 @@ export const Config = {
bindBiz
:
publicBiz
.
setEnumInterface
bindBiz
:
publicBiz
.
setEnumInterface
},
},
{
{
apiName
:
"作品类型"
,
subUrl
:
'/typeofworks'
,
param
:[],
defaultParam
:
enumConfig
.
TYPEOFWORKS
,
bindBiz
:
publicBiz
.
setEnumInterface
},
{
apiName
:
"参会人员"
,
apiName
:
"参会人员"
,
subUrl
:
'/codparticipant'
,
subUrl
:
'/codparticipant'
,
param
:[],
param
:[],
...
@@ -218,6 +211,14 @@ export const Config = {
...
@@ -218,6 +211,14 @@ export const Config = {
param
:[],
param
:[],
defaultParam
:
enumConfig
.
BANXUELEIXING
,
defaultParam
:
enumConfig
.
BANXUELEIXING
,
bindBiz
:
publicBiz
.
setEnumInterface
bindBiz
:
publicBiz
.
setEnumInterface
},
{
apiName
:
"学会领导职务"
,
subUrl
:
'/xuehuilingdaolv'
,
param
:[],
defaultParam
:
enumConfig
.
XUEHUILINGDAOZHIWEI
,
bindBiz
:
publicBiz
.
setEnumInterface
}
}
],
],
}
}
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