Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
db2fa71d
提交
db2fa71d
authored
6月 28, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能:论坛详情
上级
918b5503
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
18 行增加
和
3 行删除
+18
-3
forumManageType.ts
src/api/interface/forumManageType.ts
+2
-0
forumManageAPI.ts
src/api/modules/forumManageAPI.ts
+4
-0
index.scss
...nage/dynamicList/components/dynamicDetailModal/index.scss
+1
-1
index.tsx
...anage/dynamicList/components/dynamicDetailModal/index.tsx
+11
-2
没有找到文件。
src/api/interface/forumManageType.ts
浏览文件 @
db2fa71d
...
...
@@ -39,3 +39,5 @@ type detailResponseType = {
commentAndReplyVO
:
detailResponseType
[];
};
export
type
forumDetailType
=
InterFunction
<
{
dynamicId
:
number
},
detailResponseType
>
;
//论坛-点赞信息
export
type
likeUserInfoType
=
InterFunction
<
{
dynamicId
:
number
},
any
>
;
src/api/modules/forumManageAPI.ts
浏览文件 @
db2fa71d
...
...
@@ -3,6 +3,7 @@ import {
forumDetailType
,
forumListType
,
hiddenForumType
,
likeUserInfoType
,
}
from
'~/api/interface/forumManageType'
;
import
axios
from
'~/api/request'
;
...
...
@@ -19,4 +20,7 @@ export class ForumManageAPI {
// 论坛-详情
static
getForumDetail
:
forumDetailType
=
(
params
)
=>
axios
.
get
(
'/release/dynamic/dynamicDetails'
,
{
params
});
// 论坛-点赞人信息
static
getLikeUserInfoList
:
likeUserInfoType
=
(
params
)
=>
axios
.
get
(
'/release/backstage/forum/likeUserInfo'
,
{
params
});
}
src/pages/forumManage/dynamicList/components/dynamicDetailModal/index.scss
浏览文件 @
db2fa71d
...
...
@@ -18,7 +18,7 @@
margin-top
:
10px
;
}
.info-footer
{
margin-top
:
4
0px
;
margin-top
:
2
0px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
...
...
src/pages/forumManage/dynamicList/components/dynamicDetailModal/index.tsx
浏览文件 @
db2fa71d
...
...
@@ -3,12 +3,21 @@ import { Button, Image, Modal, ModalProps } from 'antd';
import
'./index.scss'
;
import
{
InterDataType
}
from
'~/api/interface'
;
import
{
forumDetailType
}
from
'~/api/interface/forumManageType'
;
import
{
ForumManageAPI
}
from
'~/api'
;
//论坛详情返回类型
type
detailType
=
InterDataType
<
forumDetailType
>
;
interface
selfProps
{
forumDetail
?:
detailType
;
}
const
DynamicDetailModal
:
FC
<
ModalProps
&
selfProps
>
=
({
open
,
onCancel
,
forumDetail
})
=>
{
const
getLikeUserInfo
=
(
dynamicId
:
number
)
=>
{
ForumManageAPI
.
getLikeUserInfoList
({
dynamicId
}).
then
(({
result
})
=>
{});
};
useEffect
(()
=>
{
if
(
forumDetail
&&
forumDetail
.
likesCount
)
{
getLikeUserInfo
(
forumDetail
.
id
);
}
},
[
forumDetail
]);
return
(
<
Modal
open=
{
open
}
onCancel=
{
onCancel
}
title=
'查看详情'
width=
{
800
}
footer=
{
null
}
>
<
div
className=
'dynamic-detail'
>
...
...
@@ -50,8 +59,8 @@ const DynamicDetailModal: FC<ModalProps & selfProps> = ({ open, onCancel, forumD
{
forumDetail
?.
commentAndReplyVO
.
length
?
(
<
div
className=
'dynamic-detail-comment'
>
<
div
className=
'comment-title'
>
{
forumDetail
?.
commentCount
}
条评论
</
div
>
{
forumDetail
.
commentAndReplyVO
.
map
((
v
)
=>
(
<
div
className=
'comment-item'
>
{
forumDetail
.
commentAndReplyVO
.
map
((
v
,
index
:
number
)
=>
(
<
div
className=
'comment-item'
key=
{
index
}
>
<
div
className=
'comment-item-header'
>
<
div
className=
'user-avatar'
>
<
img
src=
{
v
.
userBaseInfo
.
userImg
}
alt=
'头像'
/>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论