qinhouyu 1 year ago
parent
commit
9f94c3b197
2 changed files with 6 additions and 6 deletions
  1. 4 4
      src/api/information/information.js
  2. 2 2
      src/views/information/index.vue

+ 4 - 4
src/api/information/information.js

@@ -10,9 +10,9 @@ export function listServer(query) {
 }
 
 // 查询资讯详细
-export function getServer(id) {
+export function getServer(id,type) {
   return request({
-    url: '/jnb/information/' + id,
+    url: '/jnb/information/' + id + '/' + type,
     method: 'get'
   })
 }
@@ -36,9 +36,9 @@ export function updateServer(data) {
 }
 
 // 删除资讯
-export function delServer(ids) {
+export function delServer(ids,type) {
   return request({
-    url: '/jnb/information/' + ids,
+    url: '/jnb/information/' + ids + '/' + type,
     method: 'delete'
   })
 }

+ 2 - 2
src/views/information/index.vue

@@ -334,7 +334,7 @@ export default {
     async handleUpdate(row) {
       await this.reset();
       const id = row.id || this.ids
-      getServer(id).then(response => {
+      getServer(id,row.type).then(response => {
         this.form = response.data;
         this.open = true;
         let str = ''
@@ -372,7 +372,7 @@ export default {
     handleDelete(row) {
       const ids = row.id || this.ids;
       this.$modal.confirm('是否确认删除数据项?').then(function () {
-        return delServer(ids);
+        return delServer(ids,row.type);
       }).then(() => {
         this.getList();
         this.$modal.msgSuccess("删除成功");