1、补充下载异常处理
2、字典枚举
This commit is contained in:
parent
f10819bee8
commit
ef2a36274d
@ -4,5 +4,6 @@ export enum SetupStoreId {
|
||||
Auth = 'auth-store',
|
||||
Route = 'route-store',
|
||||
Tab = 'tab-store',
|
||||
Notice = 'notice-store'
|
||||
Notice = 'notice-store',
|
||||
Dict = 'dict-store'
|
||||
}
|
||||
|
||||
@ -116,6 +116,10 @@ export function useDownload() {
|
||||
|
||||
const response = await fetch(fullUrl, requestOptions);
|
||||
|
||||
if (response.status !== 200) {
|
||||
throw new Error(errorCodeRecord.default);
|
||||
}
|
||||
|
||||
await handleResponse(response);
|
||||
|
||||
const finalFilename = filename || response.headers.get('Download-Filename') || `download-${timestamp}`;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user