mirror of
https://gitee.com/dromara/go-view.git
synced 2026-07-12 02:41:07 +08:00
Compare commits
2 Commits
f37264fdbb
...
dfe97bf5d5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfe97bf5d5 | ||
|
|
fe87d0e433 |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "go-view",
|
||||
"version": "2.2.1",
|
||||
"version": "2.2.2",
|
||||
"engines": {
|
||||
"node": ">=12.0"
|
||||
},
|
||||
|
||||
@ -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