From 68193de3bddc6db54c33dcc2aa2d280808bf4024 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Mon, 31 May 2021 15:41:10 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E5=88=87=E6=8D=A2=E9=A1=B9=E7=9B=AE):?= =?UTF-8?q?=20=E5=88=A0=E9=99=A4=E4=B8=8D=E7=94=A8=E7=9A=84=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/components/common/head/SearchList.vue | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/frontend/src/business/components/common/head/SearchList.vue b/frontend/src/business/components/common/head/SearchList.vue index 4a82973428..6ea21ae847 100644 --- a/frontend/src/business/components/common/head/SearchList.vue +++ b/frontend/src/business/components/common/head/SearchList.vue @@ -67,20 +67,6 @@ export default { this.result = this.$post("/project/list/related",{userId: getCurrentUserId()}, response => { this.items = response.data; this.searchArray = response.data; - let userLastProjectId = getCurrentUser().lastProjectId; - if (userLastProjectId) { - // id 是否存在 - if (this.searchArray.length > 0 && this.searchArray.map(p => p.id).indexOf(userLastProjectId) !== -1) { - let projectId = localStorage.getItem(PROJECT_ID); - if (!projectId || projectId != userLastProjectId) { - localStorage.setItem(PROJECT_ID, userLastProjectId); - this.$store.commit('setProjectId', userLastProjectId); - window.location.reload(); - } else { - this.$store.commit('setProjectId', projectId); - } - } - } let projectId = getCurrentProjectID(); if (projectId) { // 保存的 projectId 在当前项目列表是否存在; 切换工作空间后