Compare commits

...

2 Commits

Author SHA1 Message Date
奔跑的面条
dfe97bf5d5 build: 升级版本到 2.2.2 2023-05-08 20:43:14 +08:00
奔跑的面条
fe87d0e433 fix: 修改上传的 httpurl 为 fileurl 2023-05-08 20:15:20 +08:00
4 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "go-view",
"version": "2.2.1",
"version": "2.2.2",
"engines": {
"node": ">=12.0"
},

View File

@ -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 {

View File

@ -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(

View File

@ -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({