mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-06 03:58:04 +08:00
fix: 修改上传的 httpurl 为 fileurl
This commit is contained in:
parent
460aa47ee5
commit
40673dddb3
@ -90,7 +90,7 @@ export const uploadFile = async (data: object) => {
|
||||
* 文件地址
|
||||
*/
|
||||
fileName: string,
|
||||
httpurl: string,
|
||||
fileurl: string,
|
||||
}>(`${ModuleTypeEnum.PROJECT}/upload`, data, ContentTypeEnum.FORM_DATA)
|
||||
return res
|
||||
} catch {
|
||||
|
@ -281,10 +281,10 @@ const customRequest = (options: UploadCustomRequestOptions) => {
|
||||
const uploadRes = await uploadFile(uploadParams)
|
||||
|
||||
if (uploadRes && uploadRes.code === ResultEnum.SUCCESS) {
|
||||
if (uploadRes.data.httpurl) {
|
||||
if (uploadRes.data.fileurl) {
|
||||
chartEditStore.setEditCanvasConfig(
|
||||
EditCanvasConfigEnum.BACKGROUND_IMAGE,
|
||||
`${uploadRes.data.httpurl}?time=${new Date().getTime()}`
|
||||
`${uploadRes.data.fileurl}?time=${new Date().getTime()}`
|
||||
)
|
||||
} else {
|
||||
chartEditStore.setEditCanvasConfig(
|
||||
|
@ -294,10 +294,10 @@ export const useSync = () => {
|
||||
const uploadRes = await uploadFile(uploadParams)
|
||||
// 保存预览图
|
||||
if(uploadRes && uploadRes.code === ResultEnum.SUCCESS) {
|
||||
if (uploadRes.data.httpurl) {
|
||||
if (uploadRes.data.fileurl) {
|
||||
await updateProjectApi({
|
||||
id: fetchRouteParamsLocation(),
|
||||
indexImage: `${uploadRes.data.httpurl}`
|
||||
indexImage: `${uploadRes.data.fileurl}`
|
||||
})
|
||||
} else {
|
||||
await updateProjectApi({
|
||||
|
Loading…
x
Reference in New Issue
Block a user