diff --git a/public/react/src/modules/developer/studentStudy/index.js b/public/react/src/modules/developer/studentStudy/index.js index d40269e7c..7abf93841 100644 --- a/public/react/src/modules/developer/studentStudy/index.js +++ b/public/react/src/modules/developer/studentStudy/index.js @@ -1,7 +1,7 @@ /* * @Description: 学员学习 * @Author: tangjiang - * @Github: + * @Github: * @Date: 2019-11-23 10:53:19 * @LastEditors : tangjiang * @LastEditTime : 2020-02-10 18:24:01 @@ -45,7 +45,18 @@ function StudentStudy(props) { // 保存当前的id saveUserProgramIdentifier(id); // startProgramQuestion(id); - getUserProgramDetail(id); + // console.log("getUserProgramDetail(id)"); + // console.log(id); + // console.log(id.charAt(id.length-1)); + try { + if(id.charAt(id.length-1)==="?"){ + id = id.substring(0, id.length - 1); + } + }catch (e) { + + } + + getUserProgramDetail(id); const $searchs = window.location.search && window.location.search.substring(1); if ($searchs) { const $params = $searchs.split('&') || []; @@ -107,7 +118,7 @@ function StudentStudy(props) { props.clearOjForUserReducer(); props.history.push(`/problems/${identifier}/edit?{searchParams}`); } - // 处理退出 + // 处理退出 const handleClickQuit = () => { // 退出时,清空内容 props.clearOjForUserReducer(); @@ -179,7 +190,7 @@ const mapStateToProps = (state) => { user_program_identifier, hack_identifier, searchParams - }; + }; }; const mapDispatchToProps = (dispatch) => ({ diff --git a/public/react/src/services/ojService.js b/public/react/src/services/ojService.js index d0d0ae0ae..806364ef4 100644 --- a/public/react/src/services/ojService.js +++ b/public/react/src/services/ojService.js @@ -154,4 +154,4 @@ export async function fetchQuestion (params) { export async function fetchTagDisciplines (params) { const url = `/tag_disciplines.json`; return axios.post(url, params); -} \ No newline at end of file +}