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
d15c3c45
Commit
d15c3c45
authored
Jan 23, 2025
by
HoMeTown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复bug
parent
e71e99cf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
10 deletions
+11
-10
src/assets/card-calculation.png
+0
-0
src/pages/Chat/components/ChatItem/ChatAnswerAttchment.tsx
+4
-4
src/pages/Chat/components/ChatItem/ChatAnswerParser.tsx
+4
-4
src/pages/Chat/components/ChatWelcome/index.tsx
+1
-1
src/pages/Home/components/WelcomeWord/WelcomeWord.tsx
+1
-1
src/types/chat.ts
+1
-0
No files found.
src/assets/card-calculation.png
View file @
d15c3c45
This diff was suppressed by a .gitattributes entry.
src/pages/Chat/components/ChatItem/ChatAnswerAttchment.tsx
View file @
d15c3c45
import
{
Button
,
Link
}
from
'@nextui-org/react'
import
{
motion
}
from
'framer-motion'
import
type
{
Answer
}
from
'@/types/chat'
import
type
{
Answer
,
Attachment
}
from
'@/types/chat'
import
AnswerProDetailIcon
from
'@/assets/svg/answerProDetail.svg?react'
import
CardNavImg
from
'@/assets/card-nav.png'
import
CardCalculation
from
'@/assets/card-calculation.png'
...
...
@@ -22,8 +22,8 @@ export const ChatAnswerAttachment: React.FC<ChatAnswerAttachmentProps> = ({ from
}
}
const
handleClickCard
=
(
url
:
string
)
=>
{
window
.
open
(
url
)
const
handleClickCard
=
(
attachment
:
Attachment
)
=>
{
window
.
open
(
attachment
.
content
.
url
)
}
const
handleClickDocLink
=
async
(
docId
:
string
)
=>
{
...
...
@@ -103,7 +103,7 @@ export const ChatAnswerAttachment: React.FC<ChatAnswerAttachmentProps> = ({ from
{
attachment
.
type
?.
includes
(
'card-'
)
&&
(
<
div
onClick=
{
()
=>
handleClickCard
(
attachment
.
url
)
}
>
<
div
onClick=
{
()
=>
handleClickCard
(
attachment
)
}
>
{
attachment
.
type
===
'card-nav'
&&
<
img
className=
"w-full max-w-[400px] cursor-pointer"
src=
{
CardNavImg
}
alt=
""
/>
}
{
attachment
.
type
===
'card-detail'
&&
<
img
className=
"w-full max-w-[400px] cursor-pointer"
src=
{
CardDetailImg
}
alt=
""
/>
}
{
attachment
.
type
===
'card-calculation'
&&
<
img
className=
"w-full max-w-[400px] cursor-pointer"
src=
{
CardCalculation
}
alt=
""
/>
}
...
...
src/pages/Chat/components/ChatItem/ChatAnswerParser.tsx
View file @
d15c3c45
...
...
@@ -17,13 +17,13 @@ interface ChatAnswerParserProps {
onSubmitQuestion
:
(
question
:
string
,
productCode
?:
string
)
=>
void
}
function
CheckIcon
({
size
,
height
,
width
,
...
props
})
{
function
CheckIcon
({
...
props
})
{
return
(
<
svg
fill=
"none"
height=
{
size
||
height
||
24
}
height=
{
18
}
viewBox=
"0 0 24 24"
width=
{
size
||
width
||
24
}
width=
{
18
}
xmlns=
"http://www.w3.org/2000/svg"
{
...
props
}
>
...
...
@@ -157,7 +157,7 @@ export const ChatAnswerParser: React.FC<ChatAnswerParserProps> = ({ isLastAnswer
</
Chip
>
)
}
{
answer
.
step
?.
step
===
'finished'
&&
(
<
Chip
color=
"primary"
variant=
"flat"
startContent=
{
<
CheckIcon
size=
{
18
}
/>
}
>
<
Chip
color=
"primary"
variant=
"flat"
startContent=
{
<
CheckIcon
/>
}
>
{
answer
.
step
?.
message
}
</
Chip
>
)
}
...
...
src/pages/Chat/components/ChatWelcome/index.tsx
View file @
d15c3c45
...
...
@@ -13,7 +13,7 @@ export const ChatWelcome: React.FC = () => {
>
<
div
className=
"content"
>
<
p
className=
"text-[16px] sm:text-[18px] font-medium text-[#333]"
>
您好,我是晓得
</
p
>
<
p
className=
"text-[15px] mt-[8px] sm:text-13px text-[#27353C] font-300"
>
做
为您的智能保险伙伴,您有各类专业相关的问题都可以抛给我哟~让我们互相帮助共同成长吧~
</
p
>
<
p
className=
"text-[15px] mt-[8px] sm:text-13px text-[#27353C] font-300"
>
作
为您的智能保险伙伴,您有各类专业相关的问题都可以抛给我哟~让我们互相帮助共同成长吧~
</
p
>
</
div
>
</
motion
.
div
>
</
div
>
...
...
src/pages/Home/components/WelcomeWord/WelcomeWord.tsx
View file @
d15c3c45
...
...
@@ -76,7 +76,7 @@ const WelcomeWordBase: React.FC<WithAuthProps> = ({ checkAuth }) => {
<
BotAnimateBox
/>
<
div
className=
"px-[18px] relative z-[1] box-border sm:px-[24px] pt-[68px]"
>
<
SayHi
/>
<
p
className=
"mt-[16px] text-[#27353C] text-[15px] sm:mt-[24px] mb-[16px]"
>
做
为您的智能保险伙伴,您有各类专业相关的问题都可以抛给我哟~让我们互相帮助共同成长吧~
</
p
>
<
p
className=
"mt-[16px] text-[#27353C] text-[15px] sm:mt-[24px] mb-[16px]"
>
作
为您的智能保险伙伴,您有各类专业相关的问题都可以抛给我哟~让我们互相帮助共同成长吧~
</
p
>
<
Button
className=
"bg-white w-full text-[#20ABD9] font-medium rounded-[20px] sm:w-auto"
onClick=
{
handleGo
}
>
立即前往 ➔
</
Button
>
</
div
>
</
div
>
...
...
src/types/chat.ts
View file @
d15c3c45
...
...
@@ -12,6 +12,7 @@ interface AttachmentContent {
docList
:
AttachmentContentDoc
[]
description
:
string
productList
:
AttachmentContentProduct
[]
url
:
string
}
export
interface
Attachment
{
...
...
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