diff --git a/src/api/file/file.js b/src/api/file/file.js new file mode 100644 index 0000000..7b5332b --- /dev/null +++ b/src/api/file/file.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +export function uploadFile(data) { + return request({ + url: '/common/upload', + method: 'post', + data: data + }) +} \ No newline at end of file diff --git a/src/api/system/user.js b/src/api/system/user.js index 9ffe9cf..ab9edfe 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -108,12 +108,15 @@ export function updateUserPwd(oldPassword, newPassword) { } // 用户头像上传 -export function uploadAvatar(data) { +export function uploadAvatar(url) { + const data = { + url + } return request({ - url: "/system/user/profile/avatar", - method: "post", - data: data, - }); + url: '/system/user/profile/uploadAvatar', + method: 'put', + params: data + }) } // 查询授权角色 diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index de45be4..5dc9b25 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -1,513 +1,350 @@