|
|
|
@ -53,17 +53,17 @@ class ActionView extends Component {
|
|
|
|
|
// request
|
|
|
|
|
window._tpiWidthResize = () => {
|
|
|
|
|
const _w = window.$('#actionView').width();
|
|
|
|
|
if (_w < 446) {
|
|
|
|
|
window.$('#time-consuming').hide()
|
|
|
|
|
// window.$('#time-consuming').hide()
|
|
|
|
|
} else if (_w < 746) {
|
|
|
|
|
// 文字放出来之前是 580
|
|
|
|
|
window.$('#time-consuming').show()
|
|
|
|
|
window.$('.time_limit').hide()
|
|
|
|
|
} else {
|
|
|
|
|
window.$('#time-consuming').show()
|
|
|
|
|
window.$('.time_limit').show()
|
|
|
|
|
}
|
|
|
|
|
// if (_w < 446) {
|
|
|
|
|
// window.$('#time-consuming').hide()
|
|
|
|
|
// // window.$('#time-consuming').hide()
|
|
|
|
|
// } else if (_w < 746) {
|
|
|
|
|
// // 文字放出来之前是 580
|
|
|
|
|
// window.$('#time-consuming').show()
|
|
|
|
|
// window.$('.time_limit').hide()
|
|
|
|
|
// } else {
|
|
|
|
|
// window.$('#time-consuming').show()
|
|
|
|
|
// window.$('.time_limit').show()
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -77,6 +77,9 @@ class ActionView extends Component {
|
|
|
|
|
return (
|
|
|
|
|
<div className="-flex -layout-h" id="game_operate_action">
|
|
|
|
|
<style>{`
|
|
|
|
|
#game_operate_action {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
.time_limit {
|
|
|
|
|
margin-right: 0px;
|
|
|
|
|
}
|
|
|
|
@ -89,6 +92,14 @@ class ActionView extends Component {
|
|
|
|
|
position: relative;
|
|
|
|
|
top: 3px;
|
|
|
|
|
}
|
|
|
|
|
#time-consuming {
|
|
|
|
|
flex: auto;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
#game_operate_action .act_btn {
|
|
|
|
|
flex: 0 0 90px;
|
|
|
|
|
}
|
|
|
|
|
`}</style>
|
|
|
|
|
<span className="mt10 -flex c_grey ml15" id="time-consuming">
|
|
|
|
|
{!!time_limit &&
|
|
|
|
@ -105,7 +116,10 @@ class ActionView extends Component {
|
|
|
|
|
{/*将第一个按钮改为visibility方式隐藏,不然加载时测评按钮会出现没有垂直居中的情况*/}
|
|
|
|
|
<Tooltip title={ "倒计时为0时,服务将被关闭" }>
|
|
|
|
|
<Button size="small" className={classes.button + ' actionViewfirstButton'} onClick={()=>this.showWebDisplay(challenge)}
|
|
|
|
|
style={{ visibility: challenge.showWebDisplayButton ? '': 'hidden'}}
|
|
|
|
|
style={{ visibility: challenge.showWebDisplayButton ? '': 'hidden',
|
|
|
|
|
minWidth: challenge.showWebDisplayButton ? '': '1px',
|
|
|
|
|
width: challenge.showWebDisplayButton ? '': '1px',
|
|
|
|
|
}}
|
|
|
|
|
id="showWebDisplayButton"
|
|
|
|
|
// style={{ display: challenge.showWebDisplayButton ? 'flex': 'none'}}
|
|
|
|
|
>
|
|
|
|
@ -116,7 +130,7 @@ class ActionView extends Component {
|
|
|
|
|
{
|
|
|
|
|
!gameBuilding &&
|
|
|
|
|
(game && !!game.prev_game) ?
|
|
|
|
|
<Link to={`/tasks/${game.prev_game}`} className={classes.buttonText}>
|
|
|
|
|
<Link to={`/tasks/${game.prev_game}`} className={classes.buttonText + ' act_btn'}>
|
|
|
|
|
<Button size="small" className={classes.button}>
|
|
|
|
|
上一关
|
|
|
|
|
</Button>
|
|
|
|
@ -126,7 +140,7 @@ class ActionView extends Component {
|
|
|
|
|
{/*未发布的都能跳转*/}
|
|
|
|
|
{ !gameBuilding &&
|
|
|
|
|
((game && (game.status === 2 || shixun.status < 2) || shixun && shixun.task_pass ) && !!game.next_game) ?
|
|
|
|
|
<Link to={`/tasks/${game.next_game}`} className={classes.buttonText}>
|
|
|
|
|
<Link to={`/tasks/${game.next_game}`} className={classes.buttonText + ' act_btn'}>
|
|
|
|
|
<Button size="small" className={classes.button}>
|
|
|
|
|
下一关
|
|
|
|
|
</Button>
|
|
|
|
@ -135,11 +149,11 @@ class ActionView extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div id="code_test">
|
|
|
|
|
<div id="code_test" className="act_btn">
|
|
|
|
|
{
|
|
|
|
|
st === 1 && game.status === 2 ?
|
|
|
|
|
<Tooltip title={ "已通关的选择题任务无法再次测评" }>
|
|
|
|
|
<a href="javascript:void(0)" className="shixun-task-btn mr15 gray"
|
|
|
|
|
<a href="javascript:void(0)" className="shixun-task-btn mr15 gray "
|
|
|
|
|
>
|
|
|
|
|
<i className="fa fa-play-circle font-16"></i>
|
|
|
|
|
测评
|
|
|
|
@ -148,7 +162,7 @@ class ActionView extends Component {
|
|
|
|
|
:
|
|
|
|
|
gameBuilding ?
|
|
|
|
|
|
|
|
|
|
<a href="javascript:void(0)" className="shixun-task-btn mr15 gray"
|
|
|
|
|
<a href="javascript:void(0)" className="shixun-task-btn mr15 gray "
|
|
|
|
|
>
|
|
|
|
|
<i className="fa fa-play-circle font-16"></i>
|
|
|
|
|
测评
|
|
|
|
|