fix: 上传接口变更
This commit is contained in:
@@ -93,16 +93,16 @@ function fnUpload(up: UploadRequestOption) {
|
||||
hide();
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success(t('views.system.quickStart.sysUploadOk'), 3);
|
||||
state.filePath = res.data.fileName;
|
||||
state.filePath = res.data.filePath;
|
||||
// 兼容旧前端可改配置文件
|
||||
const baseUrl = import.meta.env.PROD
|
||||
? sessionGet('baseUrl') || import.meta.env.VITE_API_BASE_URL
|
||||
: import.meta.env.VITE_API_BASE_URL;
|
||||
if (state.type === 'icon') {
|
||||
state.icon = `${baseUrl}${res.data.fileName}`;
|
||||
state.icon = `${baseUrl}${res.data.filePath}`;
|
||||
}
|
||||
if (state.type === 'brand') {
|
||||
state.brand = `${baseUrl}${res.data.fileName}`;
|
||||
state.brand = `${baseUrl}${res.data.filePath}`;
|
||||
}
|
||||
} else {
|
||||
message.error(res.msg, 3);
|
||||
|
||||
Reference in New Issue
Block a user