Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sdream-ai-fe
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
侯明涛
sdream-ai-fe
Commits
3256bd57
Commit
3256bd57
authored
Nov 13, 2025
by
Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:恢复点踩后弹窗功能
parent
63732688
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
src/pages/Chat/components/ChatItem/ChatAnswerOperate.tsx
+5
-12
No files found.
src/pages/Chat/components/ChatItem/ChatAnswerOperate.tsx
View file @
3256bd57
...
...
@@ -2,13 +2,13 @@ import { Button, Tooltip } from '@heroui/react'
import
{
useRef
,
useState
}
from
'react'
import
{
useDebounceFn
}
from
'ahooks'
import
type
{
Answer
}
from
'@/types/chat'
import
CollectIcon
from
'@/assets/svg/shouc.svg?react'
import
CollectIconA
from
'@/assets/svg/shoucA.svg?react'
import
LikeIcon
from
'@/assets/svg/zan.svg?react'
import
LikeIconA
from
'@/assets/svg/zanA.svg?react'
import
UnLikeIcon
from
'@/assets/svg/cai.svg?react'
import
UnLikeIconA
from
'@/assets/svg/caiA.svg?react'
import
CopyIcon
from
'@/assets/svg/copy.svg?react'
import
CollectIcon
from
'@/assets/svg/shouc.svg?react'
import
CollectIconA
from
'@/assets/svg/shoucA.svg?react'
import
useToast
from
'@/hooks/useToast'
import
{
fetchCancelCollection
,
fetchSubmitCollection
,
fetchSubmitFeedback
}
from
'@/api/chat'
import
{
UnLikeModal
}
from
'@/components/UnLikeModal'
...
...
@@ -81,14 +81,7 @@ export const ChatAnswerOperate: React.FC<ChatAnswerOperateProps> = ({ answer })
const
handleUnLike
=
async
()
=>
{
if
(
!
isUnLike
)
{
setIsUnLike
(
true
)
setIsLike
(
false
)
await
fetchSubmitFeedback
({
recordId
:
answer
.
recordId
,
feedbackStatus
:
'02'
,
content
:
''
,
})
showToast
(
'感谢您的反馈'
,
'success'
)
setIsOpenUnLikeOpen
(
true
)
}
else
{
setIsUnLike
(
false
)
...
...
@@ -103,8 +96,8 @@ export const ChatAnswerOperate: React.FC<ChatAnswerOperateProps> = ({ answer })
const
handleClose
=
(
isSubmit
?:
boolean
)
=>
{
setIsOpenUnLikeOpen
(
false
)
if
(
isSubmit
)
{
//
setIsLike(false)
//
setIsUnLike(true)
setIsLike
(
false
)
setIsUnLike
(
true
)
showToast
(
'感谢您的反馈'
,
'success'
)
}
}
...
...
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