---优化上传组件删除多次上传数据不展示问题
This commit is contained in:
@ -2,6 +2,8 @@ import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import { FilePageListParams, FilePageListSearchModel, FilePageListResultModel, ZipFilesModel, FileModel } from './model';
|
||||
import { Base64 } from 'js-base64';
|
||||
import { getAppEnvConfig } from '/@/utils/env';
|
||||
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
const globSetting = useGlobSetting();
|
||||
@ -33,6 +35,12 @@ export function parseDownloadUrl(url:string,th?:boolean,full?:boolean) {
|
||||
return resultUrl;
|
||||
}
|
||||
|
||||
export function parsePreviewUrl(fileName: string, fileUrl: string) {
|
||||
let fileFullUrl = fileUrl.includes('http://') || fileUrl.includes('https://') ? fileUrl : location.origin + getAppEnvConfig().VITE_GLOB_API_URL + fileUrl;
|
||||
fileFullUrl+="&fullfilename="+fileName;
|
||||
return getAppEnvConfig().VITE_GLOB_UPLOAD_PREVIEW + encodeURIComponent(Base64.encode(fileFullUrl));
|
||||
}
|
||||
|
||||
export async function getInfoByDownloadUrl(params: {id: string}, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<FileModel>(
|
||||
{
|
||||
@ -132,3 +140,6 @@ export async function getAppToken(params, mode: ErrorMessageMode = 'modal') {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user