zhangxin 2 年之前
父节点
当前提交
83bfafae05
共有 3 个文件被更改,包括 16 次插入17 次删除
  1. 10 0
      src/api/publisher/publisher.js
  2. 1 2
      src/views/collection/collectionList.vue
  3. 5 15
      src/views/publisher/addPublisher.vue

+ 10 - 0
src/api/publisher/publisher.js

@@ -23,4 +23,14 @@ export function searchPublisher(publisherName){
         url:'/post/publisher/list=' + publisherName,
         method: 'get'
     })
+}
+
+
+//add
+export function addPublisher(){
+    return request({
+        url:'/post/publisher/add ',
+        method: 'post' 
+
+    })
 }

+ 1 - 2
src/views/collection/collectionList.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="content">
     <!-- 藏品列表 -->
     <div class="notice-list">
       <i class="el-icon-tickets"> 藏品列表</i>
@@ -145,5 +145,4 @@ import {getCollection}  from '../../api/collection/collection.js'
 .bottom-page {
   float: right;
 }
-
 </style>

+ 5 - 15
src/views/publisher/addPublisher.vue

@@ -94,7 +94,8 @@
     </div>
 </template>
 <script>
-
+import {addPublisher} from '../../api/publisher/publisher.js';
+ 
   export default {
     name: "IssuerCreate",
     data() {
@@ -143,20 +144,9 @@
         this.$refs[formName].validate((valid) => {
           if (valid) {
             // 校验通过 调接口提交数据
-            createIssuer(this.ruleForm).then((res) => {
-              if (res.code === 200) {
-                // 如果返回状态码为200 提示添加成功 200为后端定义成功状态码
-                // 提示添加成功
-                this.$message({
-                  message: "添加成功",
-                  type: "success",
-                });
-                // 重置表单
-                this.resetForm(formName);
-                // 返回上一页 真实接口取消注释
-                // this.$router.back();
-              }
-            });
+            addPublisher().then((res)=>{
+                console.log(res);
+            })
           }
         });
       },