diff --git a/public/react/public/index.html b/public/react/public/index.html index 1e49b874c..ff03855aa 100755 --- a/public/react/public/index.html +++ b/public/react/public/index.html @@ -55,7 +55,7 @@ - + diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index b332c50a8..51769b605 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -714,10 +714,10 @@ pop_box_new(htmlvalue, 480, 182); } testSetUnlock() { - const { game } = this.state; - const url = `/v1/games/${game.identifier}/check_test_sets.json` + const { game, challenge } = this.state; + const url = `/tasks/${game.identifier}/check_test_sets.json` axios.get(url, { - withCredentials: true, + // withCredentials: true, }) .then((response) => { // TODO status -2 重复操作,直接解锁 @@ -727,12 +727,12 @@ pop_box_new(htmlvalue, 480, 182); return; } else { // 被扣除的金币,是负数 - const deltaScore = response.data.score; + const deltaScore = -challenge.score * 5; // output_sets let { output_sets } = this.state; output_sets = Object.assign({}, output_sets); - const test_sets_array = JSON.parse("[" + response.data.test_sets + "]"); - output_sets.test_sets_array = test_sets_array; + // const test_sets_array = JSON.parse("[" + response.data.test_sets + "]"); + output_sets.test_sets_array = response.data.test_sets; this.setState({ output_sets: output_sets, grade: this.state.grade + deltaScore, diff --git a/public/react/src/modules/comment/Comments.js b/public/react/src/modules/comment/Comments.js index 20f48cd92..711ece6fa 100644 --- a/public/react/src/modules/comment/Comments.js +++ b/public/react/src/modules/comment/Comments.js @@ -323,11 +323,14 @@ class Comments extends Component {
违规评论已被屏蔽!
- : - } + : */} + + {/* } */}