diff --git a/src/api/system.js b/src/api/system.js index c2122b6ec47d240315058bb10f5a24baf444ffbf..1dc10311320877aa82d1d7f02181247b86c02025 100644 --- a/src/api/system.js +++ b/src/api/system.js @@ -1,5 +1,39 @@ -import { putReq } from '@/utils'; +import { getReq, postReq, putReq } from '@/utils'; +/** + * 退出登录 + */ export function logoutApi() { return putReq('/api/v1/logout'); } + +/** + * 修改密码 + */ +export function modifyPasswordApi(data) { + return putReq('/api/v1/users/password', data); +} + +/** + * 修改用户信息 + */ +export function updateUserInfoApi(data) { + return putReq('/api/v1/users/profile', data); +} + +/** + * 获取当前用户信息 + */ +export function getUserInfoApi() { + return getReq('/api/v1/detail'); +} + +/** + * 上传文件 + */ +export function uploadFileApi(modelName, file) { + const formData = new FormData(); + formData.append('modelName', modelName); + formData.append('file', file); + return postReq('/api/v1/upload', formData); +} diff --git a/src/components/index.js b/src/components/index.js index f49b5a1f4916b9918cdf74d759e8f1a8dfe62924..56558a00b33c54bed3150562401126801376e23d 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -1,3 +1,5 @@ import Table from './table/index.vue'; +import WhiteCard from './white_card/index.vue'; +import Upload from './upload/index.vue'; -export { Table }; +export { Table, WhiteCard, Upload }; diff --git a/src/components/table/index.vue b/src/components/table/index.vue index dc7e5a6f8f4a0f9f4212d71bbc711ac6144ae512..c07d24f1d996b1e218ae8290079b6a996adeb682 100644 --- a/src/components/table/index.vue +++ b/src/components/table/index.vue @@ -1,6 +1,6 @@