mirror of
https://gitee.com/dromara/go-view.git
synced 2026-05-12 00:00:01 +08:00
feat: 兼容新版本后端
This commit is contained in:
@@ -294,10 +294,17 @@ export const useSync = () => {
|
||||
const uploadRes = await uploadFile(uploadParams)
|
||||
// 保存预览图
|
||||
if(uploadRes && uploadRes.code === ResultEnum.SUCCESS) {
|
||||
await updateProjectApi({
|
||||
id: fetchRouteParamsLocation(),
|
||||
indexImage: `${systemStore.getFetchInfo.OSSUrl}${uploadRes.data.fileName}`
|
||||
})
|
||||
if (uploadRes.data.httpurl) {
|
||||
await updateProjectApi({
|
||||
id: fetchRouteParamsLocation(),
|
||||
indexImage: `${uploadRes.data.httpurl}`
|
||||
})
|
||||
} else {
|
||||
await updateProjectApi({
|
||||
id: fetchRouteParamsLocation(),
|
||||
indexImage: `${systemStore.getFetchInfo.OSSUrl}${uploadRes.data.fileName}`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user