From d8b5fd576174aef18a455380f39e62a8e172cc37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E8=90=BD=28YangLei=29?= Date: Wed, 30 Jun 2021 16:51:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system.js | 36 ++++- src/components/index.js | 4 +- src/components/table/index.vue | 14 +- .../transition/PageToggleTransition.vue | 139 +++++++++--------- src/components/upload/index.vue | 41 ++++++ src/components/white_card/index.vue | 7 + src/main.js | 2 + .../header/LayoutTopHeaderAvatar.vue | 12 +- .../frame/components/tab/LayoutTabsHeader.vue | 38 ++++- .../frame/view/template/BlankTemplateView.vue | 11 +- .../frame/view/template/TabsTemplateView.vue | 67 +++++---- src/pages/user/components/ToDo.vue | 3 + src/pages/user/components/info.vue | 73 +++++++++ src/pages/user/components/message.vue | 3 + src/pages/user/components/modify_password.vue | 67 +++++++++ src/pages/user/components/todo.vue | 0 src/pages/user/index.vue | 39 ++++- src/plugins/index.js | 4 +- src/router/config.js | 2 +- src/store/index.js | 18 +++ src/style/index.css | 3 + 21 files changed, 455 insertions(+), 128 deletions(-) create mode 100644 src/components/upload/index.vue create mode 100644 src/components/white_card/index.vue create mode 100644 src/pages/user/components/ToDo.vue create mode 100644 src/pages/user/components/info.vue create mode 100644 src/pages/user/components/message.vue create mode 100644 src/pages/user/components/modify_password.vue create mode 100644 src/pages/user/components/todo.vue create mode 100644 src/store/index.js create mode 100644 src/style/index.css diff --git a/src/api/system.js b/src/api/system.js index c2122b6..1dc1031 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 f49b5a1..56558a0 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 dc7e5a6..c07d24f 100644 --- a/src/components/table/index.vue +++ b/src/components/table/index.vue @@ -1,6 +1,6 @@