diff --git a/src/api/system/dict.js b/src/api/system/dict.js new file mode 100644 index 0000000..9e5615f --- /dev/null +++ b/src/api/system/dict.js @@ -0,0 +1,42 @@ +import request from '@/utils/request' +import { getToken } from '@/utils/auth' + +export function getDictsList(data) { + return request({ + url: 'api/dictionary/initDictionaryList', + method: 'post', + headers: { + Authorization: getToken() + }, + data + }) +} + +export function add(data) { + return request({ + url: 'api/dictionary/editDictionary', + method: 'post', + data + }) +} + +export function del(ids) { + const data = { + id: ids[0] + } + return request({ + url: 'api/dictionary/delDictionary', + method: 'post', + data + }) +} + +export function edit(data) { + return request({ + url: 'api/dictionary/editDictionary', + method: 'post', + data + }) +} + +export default { add, edit, del, getDictsList } diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index ca4cf72..303b863 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -2,6 +2,12 @@