feat: 🚀 批量图片排序

This commit is contained in:
2025-07-17 10:48:59 +08:00
parent e24a4adec6
commit cc894333bf
8 changed files with 607 additions and 223 deletions

View File

@@ -71,16 +71,25 @@ class RequestHttp {
*/
this.service.interceptors.response.use(
(response: AxiosResponse) => {
const { data } = response;
const { data, request } = response;
tryHideFullScreenLoading();
const imgId = request?.responseURL?.split("imgId=")[1];
//获取导出表格名称
getDispositionName(response);
// 获取响应头中的 Authorization 信息
const authorization = response.headers["authorization"];
if (imgId) {
return {
imgId,
data
};
}
if (authorization) {
// 可以在这里更新用户的 token 信息
const userStore = useUserStore();
userStore.setToken(authorization);
console.log("123232323");
return data;
}

View File

@@ -11,8 +11,8 @@ import http from "@/api";
* @name 文件上传模块
*/
// 图片上传
export const uploadImg = (params: any, name?: any) => {
return http.post<any>(`/images/${name}/upload`, params);
export const uploadImg = (params: any, name?: any, id?: any) => {
return http.post<any>(`/images/${name}/upload?imgId=${id}`, params);
};
// 视频上传