From 46b0be32f595cc800dac937ef109539d51ffd051 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 9 Aug 2024 14:26:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 4 +- src/layouts/header/index.vue | 22 +- src/pages/account/login/index.vue | 351 ++++++++++++++++-------------- src/store/modules/user.js | 220 ++++++++++--------- 4 files changed, 312 insertions(+), 285 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 2d5d2f3..a1c3eac 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -8,7 +8,6 @@ export default { logins: `users/users/user/login`, verification: `${host}users/users/user/captcha`,// 验证码图片 logoDetail: `occupationlab/occupationlab/sys/logo/detail`, //查看系统设置信息 - isClient: `${host}users/users/user/isClient`, sendPhoneVerificationCode: `users/users/user/sendPhoneVerificationCode`, sendPhoneOrEmailCode: `users/users/userAccount/sendPhoneOrEmailCode`, queryUserInfoByPhone: `nakadai/nakadai/partner-team/queryUserInfoByPhone`, @@ -24,6 +23,9 @@ export default { getUserInfo: `users/users/userInfo/getUserInfo`, getCurrentTime: `competition/competition/management/getCurrentTime`, heartbeatDetection: `nakadai/message/heartbeatDetection`, + forgotPreVerification: `users/users/user/forgotPreVerification`, + forgotPassword: `users/users/user/forgotPassword`, + logout: `users/users/user/logout`, // 阿里云文件/视频管理 getPlayAuth: `nakadai/nakadai/oss/getPlayAuth`, // 获取播放凭证 diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue index 2456795..b7f70f3 100644 --- a/src/layouts/header/index.vue +++ b/src/layouts/header/index.vue @@ -195,20 +195,14 @@ export default { this.$router.push(`/station/preview?courseId=${item.cid}&commentId=${item.commentId}¬ifyId=${item.notifyId}`) }, // 获取用户信息 - getUserInfo () { - this.$get(this.api.queryUserInfoDetails).then(res => { - this.isIndex || this.initSocket(res.result.userAccount) - const { userAvatars, userName, userId } = res.result.hrUserInfo || {} - userAvatars && this.setAvatar(userAvatars); - this.setUserId(userId) - this.setUserName(userName); - this.setAccount(res.result.userAccount.account); - if (!userName && !this.customerName) { - this.$get(this.api.isClient).then(res => { - res.customerName && this.SET_CUSTOMERNAME(res.customerName) - }).catch(res => { }) - } - }).catch(err => { }) + async getUserInfo () { + const res = await this.$get(this.api.queryUserInfoDetails) + this.isIndex || this.initSocket(res.result.userAccount) + const { userAvatars, userName, userId } = res.result.hrUserInfo || {} + userAvatars && this.setAvatar(userAvatars) + this.setUserId(userId) + this.setUserName(userName) + this.setAccount(res.result.userAccount.account) }, // 用户名下拉回调 menuChange (e) { diff --git a/src/pages/account/login/index.vue b/src/pages/account/login/index.vue index 7ac0532..ae48c33 100644 --- a/src/pages/account/login/index.vue +++ b/src/pages/account/login/index.vue @@ -4,60 +4,46 @@
该手机号已绑定以下用户信息