guhongwei před 4 roky
rodič
revize
f63b6c4387
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 2 3
      src/views/userCenter/productInfo/index.vue

+ 2 - 3
src/views/userCenter/productInfo/index.vue

@@ -103,8 +103,6 @@ export default {
     },
     // 保存草稿
     async draftBtn({ data }) {
-      data.userid = this.user.uid;
-      data.patent = this.addpatent;
       if (data.id) {
         let res = await this.productUpdate(data);
         if (this.$checkRes(res)) {
@@ -117,7 +115,8 @@ export default {
           this.$message.error('草稿保存失败');
         }
       } else {
-        console.log(data);
+        data.patent = this.addpatent;
+        data.userid = this.user.uid;
         let res = await this.productCreate(data);
         if (this.$checkRes(res)) {
           this.$message({