qinzhipeng_v 5 年之前
父节点
当前提交
32c159f240
共有 1 个文件被更改,包括 12 次插入12 次删除
  1. 12 12
      src/views/Platform/useCasePage.vue

+ 12 - 12
src/views/Platform/useCasePage.vue

@@ -617,19 +617,19 @@ export default {
       var formData_s = new FormData()
       formData_s.append('file', f)
       axios.post('http://star.xiaojukeji.com/upload/img.node', formData_s, { withCredentials: false, headers: { 'Content-Type': 'multipart/form-data' }}).then(res => {
-        // if (res) {
-        this.grid_xmind.push({ 'name': f.name, 'url': 'http:' + res.data.url })
-        var xmind_code = {
-          id: this.startId,
-          xmindUrl: JSON.stringify(this.grid_xmind),
-          modifier: this.userInformation
-        }
-        updateXmindUrl(xmind_code).then(res => {
-          if (res.code === 200) {
-            this.$message({ type: 'success', message: '导入成功' })
+        if (res) {
+          this.grid_xmind.push({ 'name': f.name, 'url': 'http:' })
+          var xmind_code = {
+            id: this.startId,
+            xmindUrl: JSON.stringify(this.grid_xmind),
+            modifier: this.userInformation
           }
-        })
-        // }
+          updateXmindUrl(xmind_code).then(res => {
+            if (res.code === 200) {
+              this.$message({ type: 'success', message: '导入成功' })
+            }
+          })
+        }
       })
     },