feat: 🚀 批量图片排序
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
// 视频上传
|
||||
|
||||
Reference in New Issue
Block a user