refactor(切换项目): 删除不用的代码

This commit is contained in:
Captain.B 2021-05-31 15:41:10 +08:00 committed by 刘瑞斌
parent f27ff1e47d
commit 68193de3bd
1 changed files with 0 additions and 14 deletions

View File

@ -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 ;