forked from Gitlink/forgeplus-react
管理后台导航栏不正确+readme文件图片不显示问题
This commit is contained in:
parent
9e24f56395
commit
7567cb2040
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue