fix: 未登录对话id逻辑玩优化
This commit is contained in:
@@ -2,7 +2,12 @@ import type { ChatMessageVo, GetChatListParams, SendDTO } from './types';
|
||||
import { get, post } from '@/utils/request';
|
||||
|
||||
// 发送消息
|
||||
export const send = (data: SendDTO) => post<null>(`/ai-chat/send/${data.sessionId}`, data);
|
||||
export function send(data: SendDTO) {
|
||||
const url = data.sessionId !== 'not_login'
|
||||
? `/ai-chat/send/?sessionId=${data.sessionId}`
|
||||
: '/ai-chat/send';
|
||||
return post(url, data);
|
||||
}
|
||||
|
||||
// 新增对应会话聊天记录
|
||||
export function addChat(data: ChatMessageVo) {
|
||||
|
||||
Reference in New Issue
Block a user