Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_home
cxt 5 years ago
commit 3aa8fe9745

@ -77,6 +77,7 @@
"react-redux": "5.0.7", "react-redux": "5.0.7",
"react-router": "^4.2.0", "react-router": "^4.2.0",
"react-router-dom": "^4.2.2", "react-router-dom": "^4.2.2",
"react-split-pane": "^0.1.87",
"react-url-query": "^1.4.0", "react-url-query": "^1.4.0",
"redux": "^4.0.0", "redux": "^4.0.0",
"redux-thunk": "2.3.0", "redux-thunk": "2.3.0",

@ -17,7 +17,14 @@ class CompetitionContentspdf extends Component{
componentDidMount(){ componentDidMount(){
window.document.title = '竞赛'; window.document.title = '竞赛';
let query=this.props.location&&this.props.location.search;
const types = query.split('user_id=')
if(types[1]===undefined){
}else{
this.setState({
Tabskey:"2"
})
}
} }
Competitioncallback=(key)=>{ Competitioncallback=(key)=>{
@ -54,4 +61,4 @@ class CompetitionContentspdf extends Component{
) )
} }
} }
export default CompetitionContentspdf; export default CompetitionContentspdf;

@ -340,7 +340,11 @@ class CompetitionContentspdfpeopledata extends Component {
render() { render() {
const {updating, seconds, secondsFlag, basicInfo, phonebool, emailbool, certification, formationdata, bank_account_editable, leader, bank_account} = this.state const admins=this.props.user.admin;
if(admins===undefined||admins===null) {
admins === false;
}
const {updating, seconds, secondsFlag, basicInfo, phonebool, emailbool, certification, formationdata, bank_account_editable, leader, bank_account} = this.state
return ( return (
<div className="flexdidirectionss mt17"> <div className="flexdidirectionss mt17">
{this.state.certification === 1 ? {this.state.certification === 1 ?
@ -528,7 +532,19 @@ class CompetitionContentspdfpeopledata extends Component {
} }
</div> </div>
: "" :
<div>
{
admins===true?
<Bankcardnumberverifications {...this.props} {...this.state} basicInfo={this.state.basicInfo}
hideUpdating={(i) => this.hideUpdating(i)}
getdata={() => this.getdata()}
GetawardinformationAPI={() => this.GetawardinformationAPI()}
bank_account={this.state.bank_account}
></Bankcardnumberverifications>
:""
}
</div>
} }

@ -222,8 +222,10 @@ class CodeRepositoryView extends Component {
const { game_id, host, password, port, username, webssh_url} = response.data const { game_id, host, password, port, username, webssh_url} = response.data
// js_min_all.js有同样的计算逻辑用来拖拽时计算ssh高宽 // js_min_all.js有同样的计算逻辑用来拖拽时计算ssh高宽
// TODO 结合new Terminal 时的fontSize参数来定高度 // TODO 结合new Terminal 时的fontSize参数来定高度
var h = $("#games_repository_contents").height() - 50; const gameCtx = $("#games_repository_contents");
var w = $("#games_repository_contents").width(); gameCtx.css({'padding-bottom': '50px', 'background': '#000'});
var h = gameCtx.height() - 50;
var w = gameCtx.width();
var line_h = (navigator.userAgent.indexOf('Chrome') >= 0 ? 18 : 19); var line_h = (navigator.userAgent.indexOf('Chrome') >= 0 ? 18 : 19);
var rows = Math.round(h / line_h); var rows = Math.round(h / line_h);
var cols = parseInt(w / 9.9); var cols = parseInt(w / 9.9);
@ -233,14 +235,13 @@ class CodeRepositoryView extends Component {
response.data.line_h = line_h; response.data.line_h = line_h;
response.data.rows = rows; response.data.rows = rows;
response.data.cols = cols; response.data.cols = cols;
// https://stackoverflow.com/questions/5645485/detect-mousemove-when-over-an-iframe // https://stackoverflow.com/questions/5645485/detect-mousemove-when-over-an-iframe
// this.loadSshInIframe( response.data, tabIndex ) // this.loadSshInIframe( response.data, tabIndex )
this.loadSshNormal(response.data, tabIndex, isReInit) this.loadSshNormal(response.data, tabIndex, isReInit)
} }
console.log(response) // console.log(response)
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}) })
@ -542,13 +543,13 @@ class CodeRepositoryView extends Component {
{/* { tabIndex === STABLE_SSH_TAB_ID && this.state.sshData && <Webssh {...this.state.sshData} ></Webssh> } */} {/* { tabIndex === STABLE_SSH_TAB_ID && this.state.sshData && <Webssh {...this.state.sshData} ></Webssh> } */}
</div> </div>
<div id="codetab_con_82" className="undis -relative" <div id="codetab_con_82" className="undis -relative"
style={ { color: '#fff', display: tabIndex === 82 ? 'block' : 'none', 'marginLeft': '2px'} }> style={ { color: '#fff', display: tabIndex === 82 ? 'block' : 'none', 'marginLeft': '2px', 'paddingBottom': '50px' } }>
</div> </div>
<div id="codetab_con_83" className="undis -relative" <div id="codetab_con_83" className="undis -relative"
style={ { color: '#fff', display: tabIndex === 83 ? 'block' : 'none', 'marginLeft': '2px'} }> style={ { color: '#fff', display: tabIndex === 83 ? 'block' : 'none', 'marginLeft': '2px', 'paddingBottom': '50px'} }>
</div> </div>
<div id="codetab_con_84" className="undis -relative" <div id="codetab_con_84" className="undis -relative"
style={ { color: '#fff', display: tabIndex === 84 ? 'block' : 'none', 'marginLeft': '2px'} }> style={ { color: '#fff', display: tabIndex === 84 ? 'block' : 'none', 'marginLeft': '2px', 'paddingBottom': '50px'} }>
</div> </div>
<div id="codetab_con_3" className="undis -relative" style={{display: 'none'}}></div> <div id="codetab_con_3" className="undis -relative" style={{display: 'none'}}></div>
</React.Fragment> </React.Fragment>

Loading…
Cancel
Save