详情请参见“测试结果”

dev_haigong
hjm 6 years ago
parent ed321e58ef
commit 5dedb3f80a

@ -533,6 +533,14 @@ pop_box_new(htmlvalue, 480, 182);
if (currentGamePassed) { if (currentGamePassed) {
game.status = 2; game.status = 2;
game.next_game = next_game; game.next_game = next_game;
} else {
this.showDialog({
contentText: <div>
<div>评测未通过</div>
<div>详情请参见测试结果</div>
</div>,
isSingleButton: true
})
} }
const output_sets = { const output_sets = {
@ -630,11 +638,12 @@ pop_box_new(htmlvalue, 480, 182);
@param okButtonText 确定按钮显示文本 继续查看 @param okButtonText 确定按钮显示文本 继续查看
*/ */
showDialog(params) { showDialog(params) {
const { contentText, callback, moreButtonsRender, okButtonText } = params; const { contentText, callback, moreButtonsRender, okButtonText, isSingleButton } = params;
this.dialogOkCallback = callback; this.dialogOkCallback = callback;
this.moreButtonsRender = moreButtonsRender this.moreButtonsRender = moreButtonsRender
this.okButtonText = okButtonText; this.okButtonText = okButtonText;
this.isSingleButton = !!isSingleButton
this.setState({ this.setState({
gDialogOpen: true, gDialogOpen: true,
gDialogContentText: contentText gDialogContentText: contentText
@ -696,14 +705,23 @@ pop_box_new(htmlvalue, 480, 182);
</DialogContentText> </DialogContentText>
</DialogContent> </DialogContent>
<DialogActions> <DialogActions>
<Button onClick={() => this.handleGdialogClose()} color="primary"> { this.isSingleButton ? <div className="task-popup-submit clearfix"
关闭 style={{ textAlign: 'center' }}>
</Button> <a className="task-btn task-btn-orange"
<Button variant="raised" onClick={this.handleGdialogClose}
onClick={() => this.onGdialogOkBtnClick() } color="primary" autoFocus> >知道啦</a>
{ this.okButtonText ? this.okButtonText : '确定' } </div> :
</Button> <React.Fragment>
{this.moreButtonsRender && this.moreButtonsRender()} <Button onClick={() => this.handleGdialogClose()} color="primary">
关闭
</Button>
<Button variant="raised"
onClick={() => this.onGdialogOkBtnClick() } color="primary" autoFocus>
{ this.okButtonText ? this.okButtonText : '确定' }
</Button>
</React.Fragment>
}
{this.moreButtonsRender && this.moreButtonsRender()}
</DialogActions> </DialogActions>
</Dialog> </Dialog>

Loading…
Cancel
Save