93773f3887
Includes FastAPI backend, vendored step2urdf frontend, and A7 handtuned arm JSON for URDF generation.
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import { Audio, Upload } from "@/api/interface/index";
|
|
import { PORT1 } from "@/api/config/servicePort";
|
|
import http from "@/api";
|
|
|
|
/**
|
|
* @name 文件上传模块
|
|
*/
|
|
// 图片上传
|
|
export const uploadImg = (params: FormData) => {
|
|
return http.post<Upload.ResFileUrl>(PORT1 + `/file/upload/img`, params, { cancel: false });
|
|
};
|
|
|
|
// 视频上传
|
|
export const uploadVideo = (params: FormData) => {
|
|
return http.post<Upload.ResFileUrl>(PORT1 + `/file/upload/video`, params, { cancel: false });
|
|
};
|
|
export const uploadAudioApi = (params: FormData) => {
|
|
return http.post<Audio.resAudio>("/PostVoiceFile", params, { cancel: false });
|
|
};
|
|
|
|
export const postResultApi = (params: { text: string }) => {
|
|
return http.post<any>("/PostResultText", params, { cancel: false });
|
|
};
|
|
export const AudioResultApi = (params: { text: string; language: string }) => {
|
|
return http.postAudio<any>("/ResultVoice", params, { loading: false });
|
|
};
|
|
export const SendMessageApi = () => {
|
|
return http.get<any>("/SendMessage", {}, { loading: true });
|
|
};
|
|
export const getExcelFileAPi = () => {
|
|
return http.download("/DownExcel", {});
|
|
};
|