sunjh 6 years ago
parent
commit
cdb96c2b59

+ 10 - 2
src/components/authen/Authentication.vue

@@ -112,7 +112,15 @@ export default {
     },
     submitInfo () {
       this.isModifyMode = false
-      Http.post(Apis.USER.AGENCY_AUTHENTICATION,this.authentication).then((res) =>{
+      const newAuthentication = {
+        name: this.authentication.name,
+        bankAccount: this.authentication.bankAccount,
+        address: this.authentication.address,
+        ability: this.authentication.ability,
+        resource: this.authentication.resource,
+        photo: this.authentication.photo[0],
+      }
+      Http.post(Apis.USER.AGENCY_AUTHENTICATION, newAuthentication).then((res) => {
         console.log(res)
       })
     },
@@ -154,7 +162,7 @@ export default {
     margin-bottom: 10px;
   }
 
-  .el-input{
+  .el-input {
     width: 400px;
   }
 </style>

+ 10 - 2
src/components/cheat/AgencyAdd.vue

@@ -112,7 +112,15 @@ export default {
     },
     submitInfo () {
       this.isModifyMode = false
-      Http.post(Apis.USER.ADD_AGENCY, this.agency).then((res) => {
+      const newAgency = {
+        name: this.agency.name,
+        bankAccount: this.agency.bankAccount,
+        address: this.agency.address,
+        ability: this.agency.ability,
+        resource: this.agency.resource,
+        photo: this.agency.photo[0],
+      }
+      Http.post(Apis.USER.ADD_AGENCY, newAgency).then((res) => {
         console.log(res)
       })
     },
@@ -154,7 +162,7 @@ export default {
     margin-bottom: 10px;
   }
 
-  .el-input{
+  .el-input {
     width: 400px;
   }
 </style>

+ 18 - 5
src/components/cheat/ProjectAdd.vue

@@ -138,8 +138,8 @@ export default {
     return {
       userId: 0,
       isModifyMode: true,
-      serviceType:ServiceType,
-      platform:Platform,
+      serviceType: ServiceType,
+      platform: Platform,
       project: {
         name: '',
         description: '',
@@ -149,7 +149,7 @@ export default {
         type: [],
         requireDoc: [],
         file: [],
-        price: [],
+        price: '',
         datetime: ''
       },
       rules: {
@@ -208,7 +208,19 @@ export default {
     },
     submitInfo () {
       this.isModifyMode = false
-      Http.post(Apis.PROJECT.ADD_PROJECT, this.project).then((res) => {
+      const newProject = {
+        name: this.project.name,
+        description: this.project.description,
+        contactName: this.project.contactName,
+        contactPhone: this.project.contactPhone,
+        platform: this.project.platform,
+        type: this.price.type,
+        requireDoc: this.project.requireDoc[0],
+        file: this.project.file[0],
+        price: this.project.price,
+        datetime: this.project.datetime
+      }
+      Http.post(Apis.PROJECT.ADD_PROJECT, newProject).then((res) => {
         console.log(res)
       })
     },
@@ -249,7 +261,8 @@ export default {
   .el-row {
     margin-bottom: 10px;
   }
-  .el-input{
+
+  .el-input {
     width: 400px;
   }
 </style>