diff --git a/src/App.js b/src/App.js
index 17be118b0..d03337319 100644
--- a/src/App.js
+++ b/src/App.js
@@ -3,7 +3,7 @@ import './App.css';
import { ConfigProvider } from 'antd'
import zhCN from 'antd/lib/locale-provider/zh_CN';
import {
- BrowserRouter as Router,
+ // BrowserRouter as Router,
Route,
Switch
} from 'react-router-dom';
@@ -108,6 +108,12 @@ class App extends Component {
initAxiosInterceptors(this.props);
let pathname = window.location.pathname ? window.location.pathname.split('/')[1] : '';
pathname && this.getPathnameType(pathname);
+
+ this.unlisten = this.props.history.listen((location,action) => {
+ // 最新路由的 location 对象,可以通过比较 pathname 是否相同来判断路由的变化情况
+ let newPathname = location.pathname.split('/')[1];
+ newPathname&&this.getPathnameType(newPathname);
+ });
}
getPathnameType = (pathname) => {
@@ -124,6 +130,8 @@ class App extends Component {
}
}
+
+
HideAddcoursestypess = (i) => {
this.setState({
Addcoursestype: false,
@@ -146,7 +154,14 @@ class App extends Component {
window.addEventListener('error', (event) => {
const msg = `${event.type}: ${event.message}`;
});
+
+
}
+
+ componentWillUnmount() {
+ this.unlisten && this.unlisten(); // 执行解绑
+ }
+
//修改登录方法
Modifyloginvalue = () => {
this.setState({
@@ -225,121 +240,121 @@ class App extends Component {
-
+
{item.user_name}
diff --git a/src/forge/Component/Contributors.jsx b/src/forge/Component/Contributors.jsx
index 1e26354a5..dd7d40e39 100644
--- a/src/forge/Component/Contributors.jsx
+++ b/src/forge/Component/Contributors.jsx
@@ -52,8 +52,8 @@ function Contributors({contributors,owner,projectsId}){
{
item.id ?
-
+
{item.image_url?:""}
:
diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js
index 583b4db3d..4f930ce42 100644
--- a/src/forge/Main/Detail.js
+++ b/src/forge/Main/Detail.js
@@ -413,11 +413,10 @@ class Detail extends Component {
}
textFunc = (forked_from_project_id,fork_info)=>{
- let type = fork_info && fork_info.fork_project_user_type;
return forked_from_project_id && fork_info ?
提交{item.contributions}次
- {i.user && i.user.name}
+ {i.user && i.user.name}
{i.time_ago}
取消转移【{project && project.name}】仓库 正在将【{project && project.name}】仓库转移给【{owner && owner.name}】 正在将【{project && project.name}】仓库转移给【{owner && owner.name}】 【{project && project.name}】仓库成功转移给【{owner && owner.name}】 【{project && project.name}】仓库成功转移给【{owner && owner.name}】 拒绝转移【{project && project.name}】仓库
- {i.applied_user && i.applied_user.name}
+ {i.applied_user && i.applied_user.name}
{i.time_ago}
- {i.user && i.user.name}
+ {i.user && i.user.name}
{i.time_ago}
请求将仓库【{i.project && i.project.name}】
- 转移给【{i.owner && i.owner.name}】,是否接受?
+