Merge pull request '下载bug修复,合并代码问题修复' (#743) from Eeeros/forgeplus-react:gitlink_ssr_head into gitlink_ssr_head
1
This commit is contained in:
commit
66eb165ec4
|
|
@ -297,25 +297,14 @@ class Detail extends Component {
|
|||
if (this.props.defaultDetail) {
|
||||
projectdata = this.props.defaultDetail
|
||||
} else {
|
||||
this.setState({
|
||||
firstSync: false,
|
||||
secondSync: false,
|
||||
mirror_status:data.mirror_status ? data.mirror_status : 0
|
||||
})
|
||||
this.getBanner(this.props.projectMenu)
|
||||
let projectdata
|
||||
if (this.props.defaultDetail) {
|
||||
projectdata = this.props.defaultDetail
|
||||
} else {
|
||||
const res = await getProjectDetailFunc(owner, projectsId, !window.location.host);
|
||||
if (res.status === 200) {
|
||||
projectdata = res.data
|
||||
}
|
||||
}
|
||||
if (projectdata) {
|
||||
this.getDetail(projectdata)
|
||||
const res = await getProjectDetailFunc(owner, projectsId, !window.location.host);
|
||||
if (res.status === 200) {
|
||||
projectdata = res.data
|
||||
}
|
||||
}
|
||||
if (projectdata) {
|
||||
this.getDetail(projectdata)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -979,9 +968,9 @@ Detail.preFetch = ({ store, match, query }) => {
|
|||
const promises = [
|
||||
dispatch(setProjectDetail(match.params)),
|
||||
dispatch(setProject(match.params)),
|
||||
dispatch(setProjectEntries({...match.params, branch: match.params.branchName ? match.params.branchName : ''})),
|
||||
dispatch(setProjectEntries({...match.params, branch: match.params.branchName ? match.params.branchName : null})),
|
||||
dispatch(setProjectMenuList(match.params)),
|
||||
dispatch(setProjectReadMe({...match.params, branch: match.params.branchName ? match.params.branchName : ''}))
|
||||
dispatch(setProjectReadMe({...match.params, branch: match.params.branchName ? match.params.branchName : null}))
|
||||
];
|
||||
const data = await Promise.all(promises);
|
||||
resolve({
|
||||
|
|
|
|||
Loading…
Reference in New Issue