From 0c59855e9c8fc66883d41ff1c14a656d2ed58c16 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Wed, 11 Nov 2020 16:09:57 +0800
Subject: [PATCH] bug
---
src/AppConfig.js | 5 +--
src/common/components/comment/util.js | 2 -
src/forge/Component/Keys.jsx | 2 -
src/forge/Main/Diff.jsx | 2 +-
src/forge/Merge/Files.jsx | 4 +-
src/forge/Merge/MergeSubmit.js | 20 ++++------
src/forge/Merge/merge_footer.js | 40 +++++++------------
src/modules/comment/CommentsHOC.js | 6 +--
.../courses/common/button/CheckAllGroup.js | 1 -
.../CompetitionContentsMd.js | 2 -
.../Bankcardnumberverification.js | 2 -
11 files changed, 29 insertions(+), 57 deletions(-)
diff --git a/src/AppConfig.js b/src/AppConfig.js
index e8bf6d5e..d387eb1d 100644
--- a/src/AppConfig.js
+++ b/src/AppConfig.js
@@ -38,7 +38,6 @@ clearAllCookie();
function setpostcookie() {
const str = window.location.pathname;
if (str.indexOf("/wxcode") !== -1) {
- console.log("123")
cookie.remove('_educoder_session', { path: '/' });
cookie.remove('autologin_trustie', { path: '/' });
const _params = window.location.search;
@@ -58,8 +57,8 @@ export function initAxiosInterceptors(props) {
initOnlineOfflineListener()
// TODO 避免重复的请求 https://github.com/axios/axios#cancellation
var
- proxy = "http://localhost:3000"
- proxy = "https://testforgeplus.trustie.net"
+ proxy = "http://localhost:3000";
+ proxy = "https://testforgeplus.trustie.net";
const requestMap = {};
window.setfalseInRequestMap = function (keyName) {
diff --git a/src/common/components/comment/util.js b/src/common/components/comment/util.js
index 8694161a..d81c4ee4 100644
--- a/src/common/components/comment/util.js
+++ b/src/common/components/comment/util.js
@@ -38,13 +38,11 @@ export const formatDelta = (deltas) => {
alt="${alt}"
/>
`;
- // text = "
";
}
}
formatted.push(text);
});
- console.log(formatted);
return formatted.join('');
}
diff --git a/src/forge/Component/Keys.jsx b/src/forge/Component/Keys.jsx
index 80753447..fb493cf6 100644
--- a/src/forge/Component/Keys.jsx
+++ b/src/forge/Component/Keys.jsx
@@ -1,8 +1,6 @@
import React from 'react';
import styled from 'styled-components';
-
-
export default ({title , value , className})=>{
const Keys = styled.span`
display:flex;
diff --git a/src/forge/Main/Diff.jsx b/src/forge/Main/Diff.jsx
index c10cb81a..8926ec6d 100644
--- a/src/forge/Main/Diff.jsx
+++ b/src/forge/Main/Diff.jsx
@@ -74,7 +74,7 @@ export default ({ match , history }) => {
{
parents && parents.length > 0 && parents.map((item,key)=>{
return(
-
+
)
})
}
diff --git a/src/forge/Merge/Files.jsx b/src/forge/Merge/Files.jsx
index 7422a177..0adda45f 100644
--- a/src/forge/Merge/Files.jsx
+++ b/src/forge/Merge/Files.jsx
@@ -40,7 +40,7 @@ function Files({data,history,owner,projectsId}){
{
files.map((item,key)=>{
return(
-
+
showDown(item.flag,key,item.isBin)}>
{!item.isBin ? :""}
@@ -61,7 +61,7 @@ function Files({data,history,owner,projectsId}){
return(
i.lines && i.lines.length>0 && i.lines.map((item,key)=>{
return(
-
+
{item.leftIdx && item.leftIdx !=="0" ? item.leftIdx :"" }
{item.rightIdx && item.rightIdx !=="0" ? item.rightIdx :"" }
diff --git a/src/forge/Merge/MergeSubmit.js b/src/forge/Merge/MergeSubmit.js
index 478081be..27156f0e 100644
--- a/src/forge/Merge/MergeSubmit.js
+++ b/src/forge/Merge/MergeSubmit.js
@@ -37,7 +37,6 @@ class MergeSubmit extends Component{
}
getDetail=()=>{
-
const { projectsId , mergeId, owner} = this.props.match.params;
const url = `/projects/${owner}/${projectsId}/pull_requests/${mergeId}.json`;
axios.get(url).then((result)=>{
@@ -84,6 +83,13 @@ class MergeSubmit extends Component{
}).catch((error)=>{console.log(error)})
}
+ title =()=>{
+ return(
+
+ 提交列表
+
+ )
+ }
render(){
const { projectsId , owner } = this.props.match.params;
@@ -120,14 +126,6 @@ class MergeSubmit extends Component{
{text}
)
}]
-
- const title =()=>{
- return(
-
- 提交列表
-
- )
- }
return(
@@ -138,11 +136,9 @@ class MergeSubmit extends Component{
showHeader={false}
size="small"
pagination={false}
- title={() => title()}
+ title={() => this.title()}
/>
- //
- //
)
}
}
diff --git a/src/forge/Merge/merge_footer.js b/src/forge/Merge/merge_footer.js
index 72608b71..44043414 100644
--- a/src/forge/Merge/merge_footer.js
+++ b/src/forge/Merge/merge_footer.js
@@ -63,59 +63,49 @@ class MergeFooter extends Component {
})
const { footer_type , comparesData } = this.props;
const { projectsId , owner , mergeId } = this.props.match.params;
- if(index === "2"){
- if(footer_type){
+
+ if(footer_type){
+ if(index === "2"){
this.getCommit(owner,projectsId,mergeId);
- }else{
- this.setState({
- commitsData:comparesData.commits,
- filesData:comparesData.diff,
- commitCount:comparesData.commits_count,
- filesCount:comparesData.diff && comparesData.diff.files_count,
- isSpin:false
- })
- this.setState({
- isSpin:false
- })
- }
- }else if(index === "3"){
- if(footer_type){
+ }else if(index === "3"){
this.getFile(owner,projectsId,mergeId);
}else{
- this.setState({
- commitsData:comparesData.commits,
- filesData:comparesData.diff,
- filesCount:comparesData.diff && comparesData.diff.files_count,
- commitCount:comparesData.commits_count
- })
this.setState({
isSpin:false
})
}
}else{
this.setState({
+ commitsData:comparesData.commits,
+ filesData:comparesData.diff,
+ commitCount:comparesData.commits_count,
+ filesCount:comparesData.diff && comparesData.diff.files_count,
isSpin:false
})
}
}
+
getCommit =(owner,projectsId,mergeId)=>{
const url = `/${owner}/${projectsId}/pulls/${mergeId}/commits.json`;
axios.get(url).then(result=>{
if(result){
this.setState({
commitsData:result.data.commits,
- isSpin:false
+ isSpin:false,
+ commitCount:result.data.commits_count
})
}
}).catch(error=>{})
}
+
getFile =(owner,projectsId,mergeId)=>{
const url = `/${owner}/${projectsId}/pulls/${mergeId}/files.json`;
axios.get(url).then(result=>{
if(result){
this.setState({
filesData:result.data,
- isSpin:false
+ isSpin:false,
+ filesCount:result.data.files_count,
})
}
}).catch(error=>{})
@@ -125,7 +115,7 @@ class MergeFooter extends Component {
const { projectsId , owner } = this.props.match.params;
const { footer_type, order_id, data , comparesData } = this.props;
- let { pageData , isSpin , activeKey , filesCount, commitCount , filesData , commitsData } = this.state;
+ let { isSpin , activeKey , filesCount, commitCount , filesData , commitsData } = this.state;
return (
!footer_type && !comparesData || (comparesData && ((comparesData.commits && comparesData.commits.length===0)||(comparesData && !comparesData.diff)) )?"":
diff --git a/src/modules/comment/CommentsHOC.js b/src/modules/comment/CommentsHOC.js
index 6a9419ea..26099493 100644
--- a/src/modules/comment/CommentsHOC.js
+++ b/src/modules/comment/CommentsHOC.js
@@ -307,20 +307,18 @@ export function commentHOC(WrappedComponent) {
this.setState({ newComments })
}
}
- console.log(response)
}).catch((error) => {
console.log(error)
})
}
rewardCode(parrentComment, childComment, amount) {
- const { challenge, shixun, showSnackbar } = this.props;
+ const { showSnackbar } = this.props;
let handleComment = parrentComment
if (childComment) {
handleComment = childComment;
}
let handleCommentId = handleComment.id;
- // const url = `/api/v1/discusses/${handleCommentId}/reward_code`
const url = `/discusses/${handleCommentId}/reward_code.json`
axios.post(url, {
@@ -380,7 +378,6 @@ export function commentHOC(WrappedComponent) {
comments: newComments
})
}
- console.log(response)
}).catch((error) => {
console.log(error)
})
@@ -421,7 +418,6 @@ export function commentHOC(WrappedComponent) {
}
}
})
- console.log(response)
}).catch((error) => {
console.log(error)
})
diff --git a/src/modules/courses/common/button/CheckAllGroup.js b/src/modules/courses/common/button/CheckAllGroup.js
index 51840826..4414bf2b 100644
--- a/src/modules/courses/common/button/CheckAllGroup.js
+++ b/src/modules/courses/common/button/CheckAllGroup.js
@@ -40,7 +40,6 @@ class CheckAllGroup extends Component{
})
this.props.onChange && this.props.onChange(checkedValues, true);
}
- console.log(checkedValues, arguments)
}
render() {
diff --git a/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js b/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js
index 0cae1e2a..81f34c8f 100644
--- a/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js
+++ b/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js
@@ -36,7 +36,6 @@ class CompetitionContentsMd extends Component{
chart_rules.rule_contents.map((items,keys)=>{
if(parseInt(this.props.tabkey)===items.competition_stage_id){
- console.log(items)
this.contentMdRef.current.setValue(items.content);
this.setState({
contentFileList:undefined,
@@ -110,7 +109,6 @@ class CompetitionContentsMd extends Component{
if (response.data) {
const { status } = response.data;
if (status == 0) {
- console.log('--- success')
this.props.showNotification(response.data.message);
this.setState((state) => {
const index = state[stateName].indexOf(file);
diff --git a/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Bankcardnumberverification.js b/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Bankcardnumberverification.js
index 6c4cf72a..6c31051f 100644
--- a/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Bankcardnumberverification.js
+++ b/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Bankcardnumberverification.js
@@ -35,7 +35,6 @@ class Bankcardnumberverification extends Component {
} catch (e) {
}
- console.log(this.props.bank_account);
//初始化值
if (this.props.bank_account) {
@@ -147,7 +146,6 @@ class Bankcardnumberverification extends Component {
render() {
const { getFieldDecorator } = this.props.form;
- const { updating, seconds, secondsFlag, basicInfo, phonebool, emailbool, certification, formationdata, bank_account_editable, leader, bank_account } = this.state
return (