From 5d509d25579f62ed8c8dd35076bc648222aad92f Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Fri, 12 Nov 2021 15:36:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AF=86=E7=A0=81=E4=B8=8D=E7=9B=B8?= =?UTF-8?q?=E5=90=8C=EF=BC=8C=E7=A6=85=E9=81=93=E5=B9=B3=E5=8F=B0=E6=B1=89?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E6=88=91=E7=9A=84=E5=BE=85=E5=8A=9E=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/service/UserService.java | 4 ++++ .../components/track/issue/IssueEditDetail.vue | 18 ++++++++++-------- .../components/track/issue/IssueList.vue | 3 ++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/backend/src/main/java/io/metersphere/service/UserService.java b/backend/src/main/java/io/metersphere/service/UserService.java index d3247d0567..4960bbc171 100644 --- a/backend/src/main/java/io/metersphere/service/UserService.java +++ b/backend/src/main/java/io/metersphere/service/UserService.java @@ -524,6 +524,10 @@ public class UserService { private User updateCurrentUserPwd(EditPassWordRequest request) { String oldPassword = CodingUtil.md5(request.getPassword(), "utf-8"); String newPassword = request.getNewpassword(); + String newPasswordMd5 = CodingUtil.md5(newPassword); + if(StringUtils.equals(oldPassword,newPasswordMd5)){ + MSException.throwException(Translator.get("新修改的密码不能与旧密码一样 ")); + } UserExample userExample = new UserExample(); userExample.createCriteria().andIdEqualTo(SessionUtils.getUser().getId()).andPasswordEqualTo(oldPassword); List users = userMapper.selectByExample(userExample); diff --git a/frontend/src/business/components/track/issue/IssueEditDetail.vue b/frontend/src/business/components/track/issue/IssueEditDetail.vue index 71269c6d50..b93b34d765 100644 --- a/frontend/src/business/components/track/issue/IssueEditDetail.vue +++ b/frontend/src/business/components/track/issue/IssueEditDetail.vue @@ -163,15 +163,17 @@ export default { this.getThirdPartyInfo(); initAddFuc(data); }); - this.$get('/issues/follow/' + data.id, response => { - this.form.follows = response.data; - for (let i = 0; i < response.data.length; i++) { - if(response.data[i]===this.currentUser().id){ - this.showFollow = true; - break; + if(data&&data.id){ + this.$get('/issues/follow/' + data.id, response => { + this.form.follows = response.data; + for (let i = 0; i < response.data.length; i++) { + if(response.data[i]===this.currentUser().id){ + this.showFollow = true; + break; + } } - } - }) + }) + } }, currentUser: () => { return getCurrentUser(); diff --git a/frontend/src/business/components/track/issue/IssueList.vue b/frontend/src/business/components/track/issue/IssueList.vue index 8e86212a40..d2fc012711 100644 --- a/frontend/src/business/components/track/issue/IssueList.vue +++ b/frontend/src/business/components/track/issue/IssueList.vue @@ -78,7 +78,8 @@ :label="$t('test_track.issue.platform_status') " prop="platformStatus">