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 @@
欢迎使用请登录
-
- - - - - +
+ + + -
- - - - - - - - - - - -
- + -