Merge branch 'newVersion_forge' into dev_devOps
This commit is contained in:
commit
a14b125d34
|
@ -36,9 +36,7 @@ function clearAllCookie() {
|
|||
}
|
||||
clearAllCookie();
|
||||
function setpostcookie() {
|
||||
|
||||
const str = window.location.pathname;
|
||||
let newdomain = ".educoder.net"
|
||||
if (str.indexOf("/wxcode") !== -1) {
|
||||
console.log("123")
|
||||
cookie.remove('_educoder_session', { path: '/' });
|
||||
|
@ -50,7 +48,6 @@ function setpostcookie() {
|
|||
cookie.save('_educoder_session', _educoder_sessions[1], { domain: '.educoder.net', path: '/' });
|
||||
let autologin_trusties = _search.split('&')[1].split('=');
|
||||
cookie.save('autologin_trustie', autologin_trusties[1], { domain: '.educoder.net', path: '/' });
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,6 @@ class Index extends Component {
|
|||
)}
|
||||
></Route>
|
||||
<Route
|
||||
exact
|
||||
path="/projects"
|
||||
render={(props) => (
|
||||
<ProjectIndex {...this.props} {...props} />
|
||||
|
|
|
@ -89,9 +89,9 @@ class CoderRootDirectory extends Component {
|
|||
if (search && search.indexOf("?url=") > -1) {
|
||||
let url = search.split("?url=")[1];
|
||||
this.setState({
|
||||
filePath: url,
|
||||
filePath: decodeURI(url),
|
||||
});
|
||||
this.getFileDetail(url);
|
||||
this.getFileDetail(decodeURI(url));
|
||||
} else {
|
||||
const { branch } = this.state;
|
||||
this.getProjectRoot(branchName || branch);
|
||||
|
@ -195,6 +195,9 @@ class CoderRootDirectory extends Component {
|
|||
}
|
||||
}).then((result)=>{
|
||||
let entries = result.data && result.data.entries;
|
||||
this.setState({
|
||||
isSpin:false
|
||||
})
|
||||
if( entries && entries.length > 0){
|
||||
let { chooseType } = this.state;
|
||||
// 当前返回的子目录只有一条数据,且这条数据返回的是文件类型
|
||||
|
@ -202,14 +205,12 @@ class CoderRootDirectory extends Component {
|
|||
this.setState({
|
||||
fileDetail:entries,
|
||||
rootList:undefined,
|
||||
isSpin:false,
|
||||
subFileType:false
|
||||
})
|
||||
}else{
|
||||
this.setState({
|
||||
fileDetail:undefined,
|
||||
rootList:entries,
|
||||
isSpin:false,
|
||||
branchLastCommit:result.data.last_commit && result.data.last_commit.commit,
|
||||
lastCommitAuthor:result.data.last_commit && (result.data.last_commit.author || (result.data.last_commit.commit && result.data.last_commit.commit.author))
|
||||
})
|
||||
|
@ -326,9 +327,9 @@ class CoderRootDirectory extends Component {
|
|||
if (search && search.indexOf("?url=") > -1) {
|
||||
let url = search.split("?url=")[1];
|
||||
this.setState({
|
||||
filePath: url,
|
||||
filePath: decodeURI(url),
|
||||
});
|
||||
this.getFileDetail(url, value);
|
||||
this.getFileDetail(decodeURI(url), value);
|
||||
} else {
|
||||
this.getProjectRoot(value);
|
||||
}
|
||||
|
@ -448,7 +449,7 @@ class CoderRootDirectory extends Component {
|
|||
const urlRoot = filePath === undefined ? "" : `/${filePath}`;
|
||||
let array = filePath && filePath.split("/");
|
||||
return (
|
||||
<Spin spinning={isSpin}>
|
||||
<Spin spinning={false}>
|
||||
<div className="main">
|
||||
<div className="f-wrap-between mb20">
|
||||
<div className="f-wrap-alignCenter">
|
||||
|
|
|
@ -162,6 +162,9 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
this.setState({
|
||||
tpmLoading: false
|
||||
})
|
||||
if (this.props.match.path === "/" && response.data.login) {
|
||||
this.props.history.push(`/users/${response.data.login}`);
|
||||
}
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error)
|
||||
|
@ -394,11 +397,15 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
tip={this._gLoadingTip || "加载中..."}
|
||||
>
|
||||
<div className="newContainer newContainers">
|
||||
{
|
||||
current_user &&
|
||||
<WrappedComponent initCommonState={(user) => this.initCommonState(user)}
|
||||
{...this.props} {...this.state}
|
||||
{...common}
|
||||
>
|
||||
</WrappedComponent>
|
||||
}
|
||||
|
||||
</div>
|
||||
</Spin>
|
||||
<NewFooter
|
||||
|
|
Loading…
Reference in New Issue