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
3da16ef3
Commit
3da16ef3
authored
Nov 26, 2025
by
Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 反馈提交逻辑
parent
c398ed18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
src/components/UnLikeModal/index.tsx
+12
-2
No files found.
src/components/UnLikeModal/index.tsx
View file @
3da16ef3
...
@@ -34,7 +34,15 @@ return
...
@@ -34,7 +34,15 @@ return
setFeedbackConfig
(
_data
)
setFeedbackConfig
(
_data
)
}
}
const
hasSelectedReason
=
feedbackConfig
?.
questionList
?.[
0
]?.
answerList
?.
some
(
(
item
:
any
)
=>
item
.
answerValue
===
'1'
,
)
const
canSubmit
=
!!
(
hasSelectedReason
||
answerValue
.
trim
())
const
onSubmit
=
async
()
=>
{
const
onSubmit
=
async
()
=>
{
if
(
!
canSubmit
)
{
return
}
const
content
=
JSON
.
parse
(
JSON
.
stringify
(
feedbackConfig
))
const
content
=
JSON
.
parse
(
JSON
.
stringify
(
feedbackConfig
))
content
.
questionList
[
0
].
answerList
=
content
.
questionList
[
0
].
answerList
.
filter
(
content
.
questionList
[
0
].
answerList
=
content
.
questionList
[
0
].
answerList
.
filter
(
(
item
:
any
)
=>
item
.
answerValue
===
'1'
,
(
item
:
any
)
=>
item
.
answerValue
===
'1'
,
...
@@ -55,7 +63,9 @@ return
...
@@ -55,7 +63,9 @@ return
if
(
isOpen
)
{
if
(
isOpen
)
{
getConfig
()
getConfig
()
}
}
// getConfig()
else
{
setAnswerValue
(
''
)
}
},
[
isOpen
])
},
[
isOpen
])
return
(
return
(
(
(
...
@@ -95,7 +105,7 @@ return
...
@@ -95,7 +105,7 @@ return
<
Button
onPress=
{
onClose
}
>
<
Button
onPress=
{
onClose
}
>
取消
取消
</
Button
>
</
Button
>
<
Button
onPress=
{
onSubmit
}
color=
"primary"
>
<
Button
onPress=
{
onSubmit
}
color=
"primary"
isDisabled=
{
!
canSubmit
}
>
提交
提交
</
Button
>
</
Button
>
</
ModalFooter
>
</
ModalFooter
>
...
...
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