mirror of
https://gitee.com/dromara/go-view.git
synced 2026-07-14 19:41:06 +08:00
Compare commits
No commits in common. "dfe97bf5d5315bcd68c670fd966a5849dc0011ed" and "f37264fdbbc6f354d2184f708ccc57c7dd9b82af" have entirely different histories.
dfe97bf5d5
...
f37264fdbb
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "go-view",
|
||||
"version": "2.2.2",
|
||||
"version": "2.2.1",
|
||||
"engines": {
|
||||
"node": ">=12.0"
|
||||
},
|
||||
|
||||
@ -90,7 +90,7 @@ export const uploadFile = async (data: object) => {
|
||||
* 文件地址
|
||||
*/
|
||||
fileName: string,
|
||||
fileurl: string,
|
||||
httpurl: 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.fileurl) {
|
||||
if (uploadRes.data.httpurl) {
|
||||
chartEditStore.setEditCanvasConfig(
|
||||
EditCanvasConfigEnum.BACKGROUND_IMAGE,
|
||||
`${uploadRes.data.fileurl}?time=${new Date().getTime()}`
|
||||
`${uploadRes.data.httpurl}?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.fileurl) {
|
||||
if (uploadRes.data.httpurl) {
|
||||
await updateProjectApi({
|
||||
id: fetchRouteParamsLocation(),
|
||||
indexImage: `${uploadRes.data.fileurl}`
|
||||
indexImage: `${uploadRes.data.httpurl}`
|
||||
})
|
||||
} else {
|
||||
await updateProjectApi({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user