Commit 2eba0300 by HoMeTown

feat: 添加两个新的工具

parent 32095d5d
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
...@@ -5,6 +5,8 @@ import AnswerProDetailIcon from '@/assets/svg/answerProDetail.svg?react' ...@@ -5,6 +5,8 @@ import AnswerProDetailIcon from '@/assets/svg/answerProDetail.svg?react'
import CardNavImg from '@/assets/card-nav.png' import CardNavImg from '@/assets/card-nav.png'
import CardCalculation from '@/assets/card-calculation.png' import CardCalculation from '@/assets/card-calculation.png'
import CardDetailImg from '@/assets/card-detail.png' import CardDetailImg from '@/assets/card-detail.png'
import CardPlansImg from '@/assets/card-book1111.png'
import CardProductCompareImg from '@/assets/card-product2222.png'
import { fetchGetDocumentLink } from '@/api/common' import { fetchGetDocumentLink } from '@/api/common'
interface ChatAnswerAttachmentProps { interface ChatAnswerAttachmentProps {
...@@ -98,11 +100,13 @@ export const ChatAnswerAttachment: React.FC<ChatAnswerAttachmentProps> = ({ from ...@@ -98,11 +100,13 @@ export const ChatAnswerAttachment: React.FC<ChatAnswerAttachmentProps> = ({ from
} }
{ {
attachment.type.includes('card-') && ( attachment.type?.includes('card-') && (
<div onClick={() => handleClickCard(attachment.url)}> <div onClick={() => handleClickCard(attachment.url)}>
{attachment.type === 'card-nav' && <img className="w-full max-w-[400px] cursor-pointer" src={CardNavImg} alt="" />} {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-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="" />} {attachment.type === 'card-calculation' && <img className="w-full max-w-[400px] cursor-pointer" src={CardCalculation} alt="" />}
{attachment.type === 'card-product-compare' && <img className="w-full max-w-[400px] cursor-pointer" src={CardProductCompareImg} alt="" />}
{attachment.type === 'card-plans' && <img className="w-full max-w-[400px] cursor-pointer" src={CardPlansImg} alt="" />}
</div> </div>
) )
} }
......
...@@ -56,7 +56,8 @@ service.interceptors.response.use( ...@@ -56,7 +56,8 @@ service.interceptors.response.use(
else if (code === '00000005') { else if (code === '00000005') {
// 处理登录失效 // 处理登录失效
window.localStorage.removeItem('__TOKEN__') window.localStorage.removeItem('__TOKEN__')
window.location.reload() window.location.href = '/sdream-ai'
// window.location.reload()
} }
else { else {
// showToast(message) // showToast(message)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment