feat: 新增数据保存接口

This commit is contained in:
奔跑的面条
2022-05-24 15:05:51 +08:00
parent 70f8dbae53
commit 20a599594c
3 changed files with 13 additions and 11 deletions
+6 -4
View File
@@ -96,10 +96,12 @@ export const useSync = () => {
chartEditStore.setEditCanvas(EditCanvasTypeEnum.SAVE_STATUS, SyncEnum.START)
// 获取id
const { id } = routerParamsInfo.params
const res: any = await saveProjectApi({
projectId: id[0],
content: JSON.stringify(chartEditStore.getStorageInfo || {})
})
let params = new FormData()
params.append('projectId', id[0])
params.append('content', JSON.stringify(chartEditStore.getStorageInfo || {}))
const res: any = await saveProjectApi(params)
if (res.code === ResultEnum.SUCCESS) {
// 成功状态
setTimeout(() => {