Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
admin-ci-test
Commits
66a036a7
提交
66a036a7
authored
6月 30, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能:论坛恢复显示
上级
b28bc339
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
60 行增加
和
10 行删除
+60
-10
forumManageType.ts
src/api/interface/forumManageType.ts
+4
-1
index.scss
...nage/dynamicList/components/dynamicDetailModal/index.scss
+17
-0
index.tsx
...anage/dynamicList/components/dynamicDetailModal/index.tsx
+31
-4
index.tsx
src/pages/forumManage/dynamicList/index.tsx
+5
-5
index.tsx
src/pages/resourceManage/industryNews/index.tsx
+3
-0
没有找到文件。
src/api/interface/forumManageType.ts
浏览文件 @
66a036a7
...
...
@@ -40,4 +40,7 @@ type detailResponseType = {
};
export
type
forumDetailType
=
InterFunction
<
{
dynamicId
:
number
},
detailResponseType
>
;
//论坛-点赞信息
export
type
likeUserInfoType
=
InterFunction
<
{
dynamicId
:
number
},
any
>
;
export
type
likeUserInfoType
=
InterFunction
<
{
dynamicId
:
number
},
{
nickName
:
string
;
userImg
:
string
;
userName
:
string
}[]
>
;
src/pages/forumManage/dynamicList/components/dynamicDetailModal/index.scss
浏览文件 @
66a036a7
...
...
@@ -3,6 +3,7 @@
&
-media
{
display
:
flex
;
align-items
:
center
;
flex-wrap
:
wrap
;
.media-item
{
margin-right
:
10px
;
margin-bottom
:
10px
;
...
...
@@ -73,4 +74,20 @@
color
:
rgba
(
0
,
0
,
0
,
0
.5
);
font-weight
:
bold
;
}
}
.dynamic-like-user
{
display
:
flex
;
width
:
200px
;
min-height
:
100px
;
.user-info
{
display
:
flex
;
margin
:
10px
;
img
{
width
:
20px
;
height
:
20px
;
border-radius
:
50%
;
margin-right
:
5px
;
}
}
}
src/pages/forumManage/dynamicList/components/dynamicDetailModal/index.tsx
浏览文件 @
66a036a7
import
{
FC
,
useEffect
,
useState
}
from
'react'
;
import
{
Button
,
Image
,
Modal
,
ModalProps
}
from
'antd'
;
import
{
Button
,
Image
,
Modal
,
ModalProps
,
Tooltip
}
from
'antd'
;
import
'./index.scss'
;
import
{
InterDataType
}
from
'~/api/interface'
;
import
{
forumDetailType
}
from
'~/api/interface/forumManageType'
;
import
{
forumDetailType
,
likeUserInfoType
}
from
'~/api/interface/forumManageType'
;
import
{
ForumManageAPI
}
from
'~/api'
;
//论坛详情返回类型
type
detailType
=
InterDataType
<
forumDetailType
>
;
interface
selfProps
{
forumDetail
?:
detailType
;
}
//点赞人返回类型
type
likeUserType
=
InterDataType
<
likeUserInfoType
>
;
const
DynamicDetailModal
:
FC
<
ModalProps
&
selfProps
>
=
({
open
,
onCancel
,
forumDetail
})
=>
{
//点赞人列表
const
[
likeUserList
,
setLikeUserList
]
=
useState
<
likeUserType
>
([]);
const
getLikeUserInfo
=
(
dynamicId
:
number
)
=>
{
ForumManageAPI
.
getLikeUserInfoList
({
dynamicId
}).
then
(({
result
})
=>
{});
ForumManageAPI
.
getLikeUserInfoList
({
dynamicId
}).
then
(({
result
})
=>
{
setLikeUserList
(
result
||
[]);
});
};
useEffect
(()
=>
{
if
(
forumDetail
&&
forumDetail
.
likesCount
)
{
getLikeUserInfo
(
forumDetail
.
id
);
}
else
{
setLikeUserList
([]);
}
},
[
forumDetail
]);
return
(
...
...
@@ -52,7 +61,25 @@ const DynamicDetailModal: FC<ModalProps & selfProps> = ({ open, onCancel, forumD
<
div
className=
'time'
>
发布于
{
forumDetail
?.
dynamicPublishTime
}
</
div
>
<
div
className=
'operate'
>
<
div
>
{
forumDetail
?.
commentCount
}
人回答
</
div
>
<
Button
type=
'link'
>
{
forumDetail
?.
likesCount
}
人爱心赞
</
Button
>
<
Tooltip
placement=
'bottom'
title=
{
likeUserList
.
length
?
(
<
div
className=
'dynamic-like-user'
>
{
likeUserList
.
map
((
v
,
index
:
number
)
=>
(
<
div
key=
{
index
}
className=
'user-info'
>
<
img
src=
{
v
.
userImg
}
alt=
'头像'
/>
<
span
>
{
v
.
userName
||
v
.
nickName
}
</
span
>
</
div
>
))
}
</
div
>
)
:
(
'暂无点赞'
)
}
>
<
Button
type=
'link'
>
{
forumDetail
?.
likesCount
}
人爱心赞
</
Button
>
</
Tooltip
>
</
div
>
</
div
>
</
div
>
...
...
src/pages/forumManage/dynamicList/index.tsx
浏览文件 @
66a036a7
...
...
@@ -64,8 +64,8 @@ const DynamicList = () => {
<
Button
type=
'link'
onClick=
{
()
=>
deleteForumClick
(
record
)
}
>
强制删除
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
hiddenForumClick
(
record
)
}
disabled=
{
!!
record
.
show
}
>
强制隐藏
<
Button
type=
'link'
onClick=
{
()
=>
hiddenForumClick
(
record
)
}
>
{
record
.
show
?
'恢复显示'
:
'强制隐藏'
}
</
Button
>
</>
),
...
...
@@ -127,12 +127,12 @@ const DynamicList = () => {
//强制隐藏
const
hiddenForumClick
=
(
record
:
forumType
[
0
])
=>
{
Modal
.
confirm
({
title
:
'强制隐藏'
,
content
:
'确认隐藏这条动态?'
,
title
:
`
${
record
.
show
?
'恢复显示'
:
'强制隐藏'
}
`
,
content
:
`确认
${
record
.
show
?
'显示'
:
'隐藏'
}
这条动态?`
,
onOk
:
()
=>
{
ForumManageAPI
.
hiddenForum
({
dynamicId
:
record
.
id
}).
then
(({
code
})
=>
{
if
(
code
===
'200'
)
{
message
.
success
(
'隐藏成功'
);
message
.
success
(
`
${
record
.
show
?
'显示'
:
'隐藏'
}
成功`
);
getDynamicList
(
query
);
}
});
...
...
src/pages/resourceManage/industryNews/index.tsx
浏览文件 @
66a036a7
...
...
@@ -34,11 +34,13 @@ const IndustryNews = () => {
title
:
'文章名称'
,
align
:
'center'
,
dataIndex
:
'newsTitle'
,
width
:
'20%'
,
},
{
title
:
'发布时间'
,
align
:
'center'
,
dataIndex
:
'createTime'
,
width
:
'15%'
,
},
{
title
:
'来源'
,
...
...
@@ -59,6 +61,7 @@ const IndustryNews = () => {
{
title
:
'操作'
,
align
:
'center'
,
width
:
'20%'
,
render
:
(
_text
:
string
,
record
)
=>
(
<>
<
Button
type=
'link'
onClick=
{
()
=>
addOrEditIndustryNewsClick
(
record
)
}
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论