合并请求重复加密

This commit is contained in:
caishi 2024-09-11 10:21:16 +08:00
parent 16ad133bd2
commit b4bf41894d
2 changed files with 48 additions and 48 deletions

View File

@ -275,8 +275,8 @@ class CreateMerge extends Component {
let _url = `/${mergeOwner}/${projectId}/compare/`;
// type为pull时pullBranch取value否则取原有值
// type为pull时mergeBranch取原有值否则取value
let _pullBranch = type === 'pull' ? value : pullBranch;
let _mergeBranch = type === 'pull' ? mergeBranch : value;
let _pullBranch = type === 'pull' ? value : returnbar(pullBranch);
let _mergeBranch = type === 'pull' ? returnbar(mergeBranch): value;
if (pullOwner === mergeOwner) {
// 如果仓库相同, compare/目标分支...源分支
_url += `${turnbar(_mergeBranch)}...${turnbar(_pullBranch)}`;

View File

@ -24,52 +24,52 @@ class DetailTop extends Component {
this.state = {}
}
getProject = (num) => {
const { projectsId, owner } = this.props.match.params;
const url = `http://172.20.32.201:4000/${owner}/${projectsId}/simple.json`;
axios.get(url).then((result) => {
if (result && result.data) {
this.setState({
project: result.data,
open_devops: result.data.open_devops,
platform: result.data.platform && result.data.platform !== 'educoder'
})
if (result.data.type !== 0 && result.data.mirror_status === 1) {
console.log("--------start channel --------");
//
this.canvasChannel();
if (num) {
this.setState({
secondSync: true,
firstSync: false
})
} else {
this.setState({
firstSync: true,
secondSync: false
})
}
this.setState({
mirror_status:1
})
} else if (result.data.mirror_status === 2) {
this.setState({
mirror_status:2,
firstSync: false
})
this.deleteProjectBack();
} else {
this.setState({
firstSync: false,
secondSync: false,
mirror_status:0
})
this.getBanner();
this.getDetail();
}
}
})
}
// getProject = (num) => {
// const { projectsId, owner } = this.props.match.params;
// const url = `/${owner}/${projectsId}/simple.json`;
// axios.get(url).then((result) => {
// if (result && result.data) {
// this.setState({
// project: result.data,
// open_devops: result.data.open_devops,
// platform: result.data.platform && result.data.platform !== 'educoder'
// })
// if (result.data.type !== 0 && result.data.mirror_status === 1) {
// console.log("--------start channel --------");
// //
// this.canvasChannel();
// if (num) {
// this.setState({
// secondSync: true,
// firstSync: false
// })
// } else {
// this.setState({
// firstSync: true,
// secondSync: false
// })
// }
// this.setState({
// mirror_status:1
// })
// } else if (result.data.mirror_status === 2) {
// this.setState({
// mirror_status:2,
// firstSync: false
// })
// this.deleteProjectBack();
// } else {
// this.setState({
// firstSync: false,
// secondSync: false,
// mirror_status:0
// })
// this.getBanner();
// this.getDetail();
// }
// }
// })
// }
render() {
//