sunjh 6 年之前
父節點
當前提交
3df24ec58f
共有 1 個文件被更改,包括 21 次插入2 次删除
  1. 21 2
      src/components/project/ProjectCreate.vue

+ 21 - 2
src/components/project/ProjectCreate.vue

@@ -312,7 +312,26 @@ export default {
       // })
     },
     submitForm (formName) {
-      Http.post(Apis.PROJECT.CREATE_PROJECT, this.project).then((res) => {
+      console.log(this.project)
+      const newProject = {
+        userId: 3,
+        name: this.project.name,
+        type: this.project.type,
+        platform: this.project.platform,
+        desc: this.project.desc,
+        resource: this.project.resource,
+        location: this.project.location,
+        institution: this.project.institution,
+        contactName: this.project.contactName,
+        contactPhone: this.project.contactPhone,
+        doc: this.project.requireDocUrl,
+        file: this.project.fileUrl,
+        budget: this.project.budget,
+        datetime: this.project.datetime,
+        usage: this.project.usage,
+        price: this.project.price
+      }
+      Http.post(Apis.PROJECT.CREATE_PROJECT, newProject).then((res) => {
         //console.log(res.status)
         if (window.history.length <= 1) {
           this.$router.push({path: '/'})
@@ -352,6 +371,7 @@ export default {
       this.project.budget = ''
     },
     beforeApkUpload (file) {
+      console.log(file)
       const isAPK = file.type === 'application/vnd.android.package-archive'
       const isDMG = file.type === 'application/octet-stream'
 
@@ -361,7 +381,6 @@ export default {
       return isAPK || isDMG
     },
     beforeFileUpload (file) {
-      console.log(file)
       const isPDF = file.type === 'application/pdf'
       const isDOC = file.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
       const isEXCEL = file.type === 'application/vnd.ms-excel'