管理后台导航栏不正确+readme文件图片不显示问题

This commit is contained in:
谢思 2022-10-19 10:26:02 +08:00
parent 9e24f56395
commit 7567cb2040
2 changed files with 4 additions and 4 deletions

View File

@ -11,8 +11,8 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){
const [ content ,setContent ] = useState(undefined);
useEffect(()=>{
if(readme && readme.content){
setContent(readme.content);
if(readme && readme.replace_content){
setContent(readme.replace_content);
}else{
setContent(undefined);
}

View File

@ -585,7 +585,7 @@ class NewHeader extends Component {
} else if (url.indexOf('explore') > -1 && match.path.indexOf('explore') > -1) {
return true
// 开源项目,路由改版后,比较麻烦,因此使用多个进行判断
} else if (url.indexOf('explore') > -1 && match.url.indexOf(pathname) > -1 && match.url.indexOf('admins') === -1) {
} else if (url.indexOf('explore') > -1 && match.url.indexOf(pathname) > -1 && match.url.indexOf('/administration') === -1 && match.url.indexOf('/admin') === -1) {
return true
// 公告
} else if (url.indexOf('/notice') > -1 && match.path.indexOf('/notice') > -1) {
@ -594,7 +594,7 @@ class NewHeader extends Component {
} else if (url.indexOf('/task') > -1 && match.path.indexOf('/task') > -1) {
return true
// 管理
} else if (url.indexOf('/managements') > -1 && (match.path.indexOf('/managements') > -1 || match.path.indexOf('/administration') > -1)) {
} else if ((url.indexOf('/managements') > -1 && (match.path.indexOf('/managements') > -1 || match.path.indexOf('/administration') > -1 || match.path.indexOf('/admin') > -1))) {
return true
} else if (['http://117.50.100.12:8080','https://osredm.com','http://111.8.36.180:8000','http://localhost:3007'].includes(url) && match.path === '/') {
return true