From 8f993d064484eae67b867ffa321567a0fb0c02e2 Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Mon, 15 Jul 2024 21:46:40 +0800 Subject: [PATCH] =?UTF-8?q?feat=20:=20=E7=94=A8=E6=88=B7=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E5=B1=95=E7=A4=BA=E5=8F=8A=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/auth/auth.js | 15 +- src/api/login.js | 6 + src/layout/navbar/index.vue | 18 +- src/views/auth/index.vue | 327 +++++++++++++++++++----------------- 4 files changed, 196 insertions(+), 170 deletions(-) diff --git a/src/api/auth/auth.js b/src/api/auth/auth.js index adaea62..ca11cf9 100644 --- a/src/api/auth/auth.js +++ b/src/api/auth/auth.js @@ -1,9 +1,16 @@ import request from "@/utils/request.js"; -export const modifyUser=(data)=>{ +export const initPassword=(data)=>{ return request({ - url:'/admin/user', - method:'put', + url:'/admin/mosr/user/init/password', + method:'post', data }) -} \ No newline at end of file +} +export const editPassword=(data)=>{ + return request({ + url:'/admin/mosr/user/update/password', + method:'post', + data + }) +} diff --git a/src/api/login.js b/src/api/login.js index 087173f..99e83bc 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -28,3 +28,9 @@ export const getUserInfo = () => { method: 'get', }) } +export const getAuthInfo = () => { + return request({ + url: '/admin/mosr/user/detail/info', + method: 'get', + }) +} diff --git a/src/layout/navbar/index.vue b/src/layout/navbar/index.vue index f186f17..586e4d2 100644 --- a/src/layout/navbar/index.vue +++ b/src/layout/navbar/index.vue @@ -5,7 +5,7 @@
-
+
{{ userInfo.nickName }}
{{ userInfo.nickName }} @@ -40,12 +40,12 @@
- - - - - - +
  • + + + + 个人中心 +
  • @@ -118,8 +118,8 @@ const accountChange = (userId) => { visitedP.value = !visitedP.value authStore.userLogout() setToken(res.data) - console.log('router',route) - if(route.path!=='/'){ + console.log('router', route) + if (route.path !== '/') { } location.reload() diff --git a/src/views/auth/index.vue b/src/views/auth/index.vue index 7adfb49..7432c79 100644 --- a/src/views/auth/index.vue +++ b/src/views/auth/index.vue @@ -10,31 +10,49 @@
  • - -
    - +
    + 用户名: {{ userParams.userName }} +
    +
    + 用户名称: {{ userParams.nickName }} +
    +
    + 工号: {{ userParams.workCode }}
    - + - 用户呢称: {{ userParams.nickName }} + 电话号码: {{ userParams.mobile }}
    +
    + + + + 所属公司: {{ userParams.subCompanyName }}
    -
    - - 电话号码: {{ userParams.phoneNumber }}
    -
    - - 用户邮箱:{{ userParams.email }}
    -
    - - 所属部门: {{ userParams.city }}
    -
    - - 所属角色: {{ userParams.createBy }}
    -
    - - 创建日期:{{ userParams.loginDate }}
    +
    + + + + 所属部门: {{ userParams.departmentName }} +
    +
    + + + + 岗位: {{ userParams.jobActivityDesc }} +
    +
    + + + + 账号类型: {{ userParams.accountType === '0' ? '主账号' : '次账号' }} +
    +
    + + + + 所属角色: {{ belongToRole(userParams.roles) }}
    @@ -45,143 +63,135 @@ - - - - - - - - - - - - - - - - - - - - - 保存 - 关闭 - - - - - - - - - - - - - - - - 保存 - 关闭 - - - - + + + + + + + + + + + + 保存 + 关闭 + +