import { Upload } from "@/api/interface/index";

// import { useRouter } from "vue-router";
import http from "@/api";
// const $router = useRouter();
// const routeName: string = $router.currentRoute.value.name as string;
// const routerObj: any = {
//     articleEditIndex: "article"
// };
/**
 * @name 文件上传模块
 */
// 图片上传
export const uploadImg = (params: any, name?: any, id?: any) => {
    return http.post<any>(`/images/${name}/upload?imgId=${id}`, params);
};

// 视频上传
export const uploadVideo = (params: FormData, name?: any) => {
    return http.post<Upload.ResFileUrl>(`video/${name}/upload`, params);
};
