Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
a056d54d
提交
a056d54d
authored
7月 14, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
差异文件
功能:路由权限
上级
49f9520f
7e176707
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
99 行增加
和
21 行删除
+99
-21
develop.yml
.github/workflows/develop.yml
+1
-1
master.yml
.github/workflows/master.yml
+1
-1
Dockerfile
Dockerfile
+5
-0
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
increase_replicas.yaml
kustomization/overlays/prod/increase_replicas.yaml
+1
-1
forumManageType.ts
src/api/interface/forumManageType.ts
+16
-7
forumManageAPI.ts
src/api/modules/forumManageAPI.ts
+4
-0
index.tsx
src/pages/forumManage/dynamicList/index.tsx
+70
-10
没有找到文件。
.github/workflows/develop.yml
浏览文件 @
a056d54d
...
...
@@ -83,7 +83,7 @@ jobs:
{
"msgtype": "markdown",
"markdown": {
"content": "###
GitHub构建并推送镜像失败
\n
"content": "###
`GitHub构建并推送镜像失败`
\n
> - 提交人: ${{github.actor}} \n
> - 提交信息: ${{github.event.head_commit.message}} \n
> - 提交到仓库: ${{github.repository}} \n
...
...
.github/workflows/master.yml
浏览文件 @
a056d54d
...
...
@@ -84,7 +84,7 @@ jobs:
{
"msgtype": "markdown",
"markdown": {
"content": "###
GitHub构建并推送镜像失败
\n
"content": "###
`GitHub构建并推送镜像失败`
\n
> - 提交人: ${{github.actor}} \n
> - 提交信息: ${{github.event.head_commit.message}} \n
> - 提交到仓库: ${{github.repository}} \n
...
...
Dockerfile
浏览文件 @
a056d54d
...
...
@@ -13,8 +13,13 @@ COPY . .
# else echo "env PROFILES_ACTIVE not found. exec npm run build" && npm run build; \
# fi
RUN
\
<<<<<<
< HEAD
if [ "${PROFILES_ACTIVE}" = "development" ]; then echo "env PROFILES_ACTIVE=development. exec npm run buildDev"; \
else echo "env PROFILES_ACTIVE not found. exec npm run build"; \
=======
if [ "${PROFILES_ACTIVE}" = "development" ]; then echo "env PROFILES_ACTIVE=development. exec npm run buildDev" && npm run buildDev; \
else echo "env PROFILES_ACTIVE !=development. exec npm run build" && npm run build; \
>>>>>>> 7e17670714d6d48af870fd9addc10720db10c2ac
fi
RUN
npm run build
...
...
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
a056d54d
...
...
@@ -14,4 +14,4 @@ patches:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag
:
9213a72a2ce5c629e5ed2f8b6d3659010787a41a
newTag
:
c137159a51734042bc2ea2d72537dc4e1fc0b947
kustomization/overlays/prod/increase_replicas.yaml
浏览文件 @
a056d54d
...
...
@@ -3,7 +3,7 @@ kind: Deployment
metadata
:
name
:
admin-deployment
spec
:
replicas
:
2
replicas
:
1
strategy
:
type
:
RollingUpdate
rollingUpdate
:
...
...
src/api/interface/forumManageType.ts
浏览文件 @
a056d54d
import
{
InterFunction
,
Inter
Item
Function
}
from
'~/api/interface'
;
import
{
InterFunction
,
Inter
List
Function
}
from
'~/api/interface'
;
//论坛-列表
export
type
forumListType
=
Inter
Item
Function
<
export
type
forumListType
=
Inter
List
Function
<
{
keyword
?:
string
},
{
id
:
number
;
description
:
string
;
mediaVO
:
null
;
show
:
number
;
userBaseInfo
:
{
nickName
:
string
;
userImg
:
string
;
userName
:
null
;
phone
:
string
;
uid
:
string
;
userImg
:
string
;
userName
:
string
;
};
show
:
number
;
id
:
number
;
}[]
userAccountId
:
number
;
dynamicPublishTime
:
string
;
checkStatus
:
0
|
1
|
2
;
}
>
;
//论坛-删除
export
type
deleteForumType
=
InterFunction
<
{
dynamicId
:
number
},
any
>
;
...
...
@@ -44,3 +48,8 @@ export type likeUserInfoType = InterFunction<
{
dynamicId
:
number
},
{
nickName
:
string
;
userImg
:
string
;
userName
:
string
}[]
>
;
// 论坛-审核
export
type
checkDynamicType
=
InterFunction
<
{
dynamicId
:
number
;
status
:
number
},
NonNullable
<
unknown
>
>
;
src/api/modules/forumManageAPI.ts
浏览文件 @
a056d54d
import
{
checkDynamicType
,
deleteForumType
,
forumDetailType
,
forumListType
,
...
...
@@ -23,4 +24,7 @@ export class ForumManageAPI {
// 论坛-点赞人信息
static
getLikeUserInfoList
:
likeUserInfoType
=
(
params
)
=>
axios
.
get
(
'/release/backstage/forum/likeUserInfo'
,
{
params
});
// 动态审核
static
checkDynamic
:
checkDynamicType
=
(
params
)
=>
axios
.
get
(
'/release/backstage/forum/checkDynamic'
,
{
params
});
}
src/pages/forumManage/dynamicList/index.tsx
浏览文件 @
a056d54d
...
...
@@ -3,13 +3,20 @@ import { Button, message, Modal, Table, Tooltip } from 'antd';
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
DynamicDetailModal
from
'./components/dynamicDetailModal'
;
import
{
ForumManageAPI
}
from
'
../../..
/api'
;
import
{
InterDataType
,
Inter
ReqListType
,
PaginationProps
}
from
'../../..
/api/interface'
;
import
{
forumDetailType
,
forumListType
}
from
'
../../..
/api/interface/forumManageType'
;
import
{
ForumManageAPI
}
from
'
~
/api'
;
import
{
InterDataType
,
Inter
ListType
,
InterReqListType
,
PaginationProps
}
from
'~
/api/interface'
;
import
{
forumDetailType
,
forumListType
}
from
'
~
/api/interface/forumManageType'
;
import
'./index.scss'
;
// 动态审核状态
const
checkStatusList
=
[
{
label
:
'审核中'
,
value
:
0
},
{
label
:
'审核通过'
,
value
:
1
},
{
label
:
'审核不通过'
,
value
:
2
},
];
//论坛列表返回类型
type
forumType
=
Inter
DataType
<
forumListType
>
[
'list'
]
;
type
forumType
=
Inter
ListType
<
forumListType
>
;
//论坛列表参数类型
type
forumParameters
=
InterReqListType
<
forumListType
>
;
//论坛详情返回类型
...
...
@@ -44,6 +51,12 @@ const DynamicList = () => {
),
},
{
title
:
'审核状态'
,
align
:
'center'
,
dataIndex
:
'checkStatus'
,
render
:
(
text
:
number
)
=>
checkStatusList
.
find
((
i
)
=>
i
.
value
===
text
)?.
label
||
text
,
},
{
title
:
'用户UID'
,
align
:
'center'
,
render
:
(
_text
:
string
,
record
)
=>
<
div
>
{
record
.
userBaseInfo
?.
uid
||
''
}
</
div
>,
...
...
@@ -54,18 +67,41 @@ const DynamicList = () => {
render
:
(
_text
:
string
,
record
)
=>
<
div
>
{
record
.
userBaseInfo
?.
phone
||
''
}
</
div
>,
},
{
title
:
'发布时间'
,
align
:
'center'
,
dataIndex
:
'dynamicPublishTime'
,
},
{
title
:
'操作'
,
align
:
'center'
,
fixed
:
'right'
,
width
:
180
,
render
:
(
_text
:
string
,
record
)
=>
(
<>
<
Button
type=
'link'
onClick=
{
()
=>
handleCheckStatus
(
record
)
}
disabled=
{
record
.
checkStatus
!==
0
}
>
审核
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
lookDynamicDetail
(
record
)
}
>
查看
详情
详情
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
deleteForumClick
(
record
)
}
>
强制删除
<
Button
type=
'link'
onClick=
{
()
=>
deleteForumClick
(
record
)
}
danger
disabled=
{
record
.
checkStatus
===
0
}
>
删除
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
hiddenForumClick
(
record
)
}
>
{
record
.
show
?
'恢复显示'
:
'强制隐藏'
}
<
Button
type=
'link'
onClick=
{
()
=>
hiddenForumClick
(
record
)
}
disabled=
{
record
.
checkStatus
===
0
}
>
{
record
.
show
?
'显示'
:
'隐藏'
}
</
Button
>
</>
),
...
...
@@ -155,7 +191,30 @@ const DynamicList = () => {
}
});
};
// 是否确认审核
const
handleCheckStatus
=
(
record
:
forumType
[
0
])
=>
{
Modal
.
confirm
({
title
:
`确认审核`
,
content
:
`请确认是否审核通过?通过后动态将展示在论坛列表`
,
okText
:
'审核通过'
,
cancelText
:
'审核不通过'
,
onOk
:
async
()
=>
{
const
res
=
await
ForumManageAPI
.
checkDynamic
({
dynamicId
:
record
.
id
,
status
:
1
});
if
(
res
&&
res
.
code
===
'200'
)
{
message
.
success
(
'操作成功'
);
paginationChange
(
pagination
.
pageNo
,
pagination
.
pageSize
);
}
},
onCancel
:
async
()
=>
{
const
res
=
await
ForumManageAPI
.
checkDynamic
({
dynamicId
:
record
.
id
,
status
:
2
});
if
(
res
&&
res
.
code
===
'200'
)
{
message
.
success
(
'操作成功'
);
paginationChange
(
pagination
.
pageNo
,
pagination
.
pageSize
);
}
},
});
};
// 组件挂载
useEffect
(()
=>
{
getDynamicList
();
},
[]);
...
...
@@ -163,6 +222,7 @@ const DynamicList = () => {
<
div
className=
'dynamic-list'
>
<
SearchBox
search=
{
searchColumnsData
}
searchData=
{
searchSuccess
}
/>
<
Table
size=
{
'small'
}
bordered
columns=
{
tableColumns
}
dataSource=
{
tableData
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论