This commit is contained in:
caishi 2021-03-08 10:26:39 +08:00
parent f4332db4ad
commit b7a92b17e7
2 changed files with 8 additions and 8 deletions

View File

@ -11,7 +11,6 @@ import CoderRootFileDetail from './CoderRootFileDetail';
import { truncateCommitId } from '../common/util';
import RenderHtml from '../../components/render-html';
import Nodata from '../Nodata';
import { getBranch } from '../GetData/getData';
import axios from "axios";
/**

View File

@ -117,19 +117,20 @@ const DevIndex = Loadable({
function checkPathname(projectsId,owner,pathname){
let name = "";
if(pathname && pathname !== `/projects/${owner}/${projectsId}`){
if(pathname.indexOf("/about")>-1){
let url = pathname.split(`/projects/${owner}/${projectsId}`)[1];
if(url.indexOf("/about")>-1){
name="about"
}else if(pathname.indexOf("/issues")>-1 ||pathname.indexOf("Milepost") > 0){
}else if(url.indexOf("/issues")>-1 ||url.indexOf("Milepost") > 0){
name = "issues";
}else if(pathname.indexOf("/pulls")>-1){
}else if(url.indexOf("/pulls")>-1){
name="pulls"
}else if(pathname.indexOf("/milestones")>-1){
}else if(url.indexOf("/milestones")>-1){
name="milestones"
}else if(pathname.indexOf("/activity")>-1){
}else if(url.indexOf("/activity")>-1){
name="activity"
}else if(pathname.indexOf("/setting")>-1){
}else if(url.indexOf("/setting")>-1){
name="setting"
}else if(pathname.indexOf(`/devops`)>-1){
}else if(url.indexOf(`/devops`)>-1){
name="devops"
}
}