From 5dedb3f80a8f018431ec462278e1e991e4889719 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 14 Mar 2019 15:03:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85=E8=AF=B7=E5=8F=82=E8=A7=81?= =?UTF-8?q?=E2=80=9C=E6=B5=8B=E8=AF=95=E7=BB=93=E6=9E=9C=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/context/TPIContextProvider.js | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index cc0fdbee..b4a645df 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -533,6 +533,14 @@ pop_box_new(htmlvalue, 480, 182); if (currentGamePassed) { game.status = 2; game.next_game = next_game; + } else { + this.showDialog({ + contentText:
+
评测未通过
+
详情请参见“测试结果”
+
, + isSingleButton: true + }) } const output_sets = { @@ -630,11 +638,12 @@ pop_box_new(htmlvalue, 480, 182); @param okButtonText “确定”按钮显示文本,如 继续查看 */ showDialog(params) { - const { contentText, callback, moreButtonsRender, okButtonText } = params; + const { contentText, callback, moreButtonsRender, okButtonText, isSingleButton } = params; this.dialogOkCallback = callback; this.moreButtonsRender = moreButtonsRender this.okButtonText = okButtonText; + this.isSingleButton = !!isSingleButton this.setState({ gDialogOpen: true, gDialogContentText: contentText @@ -696,14 +705,23 @@ pop_box_new(htmlvalue, 480, 182); - - - {this.moreButtonsRender && this.moreButtonsRender()} + { this.isSingleButton ?
+ 知道啦 +
: + + + + + } + {this.moreButtonsRender && this.moreButtonsRender()}