z_yu
3 years ago
4 changed files with 97 additions and 76 deletions
-
45src/api/category/category.js
-
8src/views/archivesManage/archivesList/index.vue
-
98src/views/category/form.vue
-
20src/views/category/index.vue
@ -0,0 +1,45 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export function getCategoryTree() { |
|||
return request({ |
|||
url: 'api/archives-type/menu', |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
export function getCategoryType() { |
|||
return request({ |
|||
url: 'api/archives-type/dropdown-list', |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
export function add(data) { |
|||
data = Object.assign({ isTypeMetic: data.isType === '6' }, data) |
|||
return request({ |
|||
url: 'api/archives-type/create', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
export function del(ids) { |
|||
const data = { |
|||
id: ids[0] |
|||
} |
|||
return request({ |
|||
url: 'api/dictrionary/delete', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
export function edit(data) { |
|||
return request({ |
|||
url: 'api/dictrionary/edit', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
export default { add, edit, del, getCategoryTree } |
Write
Preview
Loading…
Cancel
Save
Reference in new issue