From 7385b6c2b3ba3b4a1a2e6482db9ff63be0c235c8 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期五, 22 十一月 2024 10:31:36 +0800 Subject: [PATCH] 经纬度 --- src/api/ai/chat.ts | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 103 insertions(+), 6 deletions(-) diff --git a/src/api/ai/chat.ts b/src/api/ai/chat.ts index ec45975..e74f3b5 100644 --- a/src/api/ai/chat.ts +++ b/src/api/ai/chat.ts @@ -1,3 +1,4 @@ +import request from '/@/utils/request'; import request, { streamReq } from '/@/utils/request'; const GET_SECTION_SAMPLE_API = '/scene/get_scene_group_sample'; const GET_SECTION_A_LIST_API = '/scene/get_scene_group_tree'; @@ -266,6 +267,9 @@ method: 'post', params: {}, data: params, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, }, callback ); @@ -387,15 +391,15 @@ 'Content-Type': 'application/x-www-form-urlencoded', }, }); -} +}; /** * 娣诲姞鐢ㄦ埛鑷畾涔変緥瀛� - * @param params - * @param req - * @returns + * @param params + * @param req + * @returns */ -export const addUserSample = (params,req:any=request) =>{ +export const addUserSample = (params, req: any = request) => { return req({ url: 'chat/add_user_sample', method: 'POST', @@ -404,4 +408,97 @@ 'Content-Type': 'application/x-www-form-urlencoded', }, }); -} \ No newline at end of file +}; + +/** + * +鏌ヨ鐢ㄦ埛鑷畾涔変緥瀛� + * @param params + * @param req + * @returns + */ +export const listUserSample = (params, req: any = request) => { + return req({ + url: 'chat/list_user_sample', + method: 'POST', + data: params, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }); +}; +/** + * +淇敼鐢ㄦ埛鑷畾涔変緥瀛� + * @param params + * @param req + * @returns + */ +export const updateUserSample = (params, req: any = request) => { + return req({ + url: 'chat/update_user_sample', + method: 'POST', + data: params, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }); +}; + +/** + * +鍒犻櫎鐢ㄦ埛鑷畾涔変緥瀛� + * @param params + * @param req + * @returns + */ +export const deleteUserSample = (params, req: any = request) => { + return req({ + url: 'chat/delete_user_sample', + method: 'POST', + data: params, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }); +}; + +/** + * @description 灏嗗綋鍓嶅璇濆巻鍙插垎浜� + * @param {FormData} params + **/ +export const shareChatHistoryByPost = (params) => + request({ + url: `/chat/share_chat_history`, + method: 'post', + params: params, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }); +/** + * @description 鏌ヨ寮傛缁撴灉 + * @param {FormData} params + **/ +export const shareAsyncQueryByPost = (params) => + request({ + url: `/chat/share_async_query`, + method: 'post', + params: params, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }); +/** + * @description 灏嗗綋鍓嶅璇濆巻鍙插垎浜� + * @param {FormData} params + **/ +export const getShareChatJsonByPost = (params) => + request({ + url: `/chat/get_share_chat_json`, + method: 'post', + params: params, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }); -- Gitblit v1.9.3