From 14ca822b2ab57d55d9c44940eab9eea7e73d1f56 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Fri, 6 Sep 2019 18:20:12 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E8=AF=95=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/exercise/ExerciseReviewAndAnswer.js | 2 +- public/react/src/modules/courses/exercise/question/single.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js index 0965a19f1..930593c15 100644 --- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js +++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js @@ -548,7 +548,7 @@ class ExerciseReviewAndAnswer extends Component{ } .setRadioStyle .ant-radio,.setRadioStyle .ant-checkbox{ height:16px; - margin-top:4px; + margin-top:5px; } .standardAnswer.editormd-html-preview,.answerStyle.editormd-html-preview{ width:100%!important diff --git a/public/react/src/modules/courses/exercise/question/single.js b/public/react/src/modules/courses/exercise/question/single.js index 5cfd8a902..e739b8f1c 100644 --- a/public/react/src/modules/courses/exercise/question/single.js +++ b/public/react/src/modules/courses/exercise/question/single.js @@ -49,7 +49,7 @@ class single extends Component{ {prefix}

From 78f26dba2adc949cd5cb78352a54e7df9450bfce Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Fri, 6 Sep 2019 18:27:11 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E5=AE=9E=E8=B7=B5=E8=AF=BE=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/paths/ShixunPaths.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/paths/ShixunPaths.css b/public/react/src/modules/paths/ShixunPaths.css index dc2b21a05..0aab397e7 100644 --- a/public/react/src/modules/paths/ShixunPaths.css +++ b/public/react/src/modules/paths/ShixunPaths.css @@ -76,7 +76,7 @@ width: 100%; } .squareCard .squareImg img:hover{ - transform: scale(1.2); + transform: scale(1.05); } /* card info */ From 148e02365c94829329135a3b2d3ccf2312acc8db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 6 Sep 2019 18:30:23 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/user/usersInfo/InfosTopics.js | 4 ++++ .../modules/user/usersInfo/banks/NewGtaskForm.js | 16 +++++----------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js index 8f9c394a5..d90feed0f 100644 --- a/public/react/src/modules/user/usersInfo/InfosTopics.js +++ b/public/react/src/modules/user/usersInfo/InfosTopics.js @@ -107,6 +107,10 @@ class InfosTopics extends Component{ isSpin:false }) }); + }else{ + this.setState({ + isSpin:false + }) } } diff --git a/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js b/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js index e2c2208da..cfd85b260 100644 --- a/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js +++ b/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js @@ -18,7 +18,7 @@ class NewGtaskForms extends Component{ initValue = (data) => { - if (data.isEdit) { + const contentFileList = data.attachments.map(item => { return { id: item.id, @@ -47,9 +47,7 @@ class NewGtaskForms extends Component{ }); }) - } else { // new - } } @@ -109,19 +107,19 @@ class NewGtaskForms extends Component{ } handleSubmit = () => { + debugger let {contentFileList,min_num,max_num,base_on_project}=this.state; let {data}=this.props; let task_type=data.task_type let topicId=this.props.topicId - this.props.form.validateFieldsAndScroll((err, values) => { + this.props.form.validateFields((err, values) => { const mdContnet = this.contentMdRef.current.getValue().trim(); values.description = mdContnet; if (!err) { - if (this.state.isEdit) { let url="/task_banks/"+topicId+".json"; axios.put(url, { gtask_bank: { @@ -143,10 +141,6 @@ class NewGtaskForms extends Component{ console.log(error) }) - } else { - - } - } else { $("html").animate({ scrollTop: $('html').scrollTop() - 100 }) } @@ -222,7 +216,7 @@ class NewGtaskForms extends Component{ ` } -
+
{this.props.data&&this.props.data.task_type===1?"普通作业":this.props.data&&this.props.data.task_type===2?"分组作业":""} @@ -342,7 +336,7 @@ class NewGtaskForms extends Component{
{/* htmlType="submit" */} - + this.props.onCancel()}>取消
From 1958989ee11b440df0627928d375ad5e97315a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 6 Sep 2019 18:44:06 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E8=B0=83=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/usersInfo/InfosTopics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js index d90feed0f..2cffce0ec 100644 --- a/public/react/src/modules/user/usersInfo/InfosTopics.js +++ b/public/react/src/modules/user/usersInfo/InfosTopics.js @@ -74,7 +74,7 @@ class InfosTopics extends Component{ isSpin:true }) let types=this.props.match.params.topicstype; - let user_id=""; + let user_id=undefined; if(types==="publicly"){ user_id=this.props.current_user&&this.props.current_user.login; @@ -83,7 +83,7 @@ class InfosTopics extends Component{ } if(user_id!=undefined){ - console.log(user_id) + let {per_page}=this.state; let url=`/users/${user_id}/question_banks.json`; From d0d90a1e1fc4c3d8a48c201b3ff2bb5079e45b58 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Fri, 6 Sep 2019 18:44:33 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E9=A2=98=E5=BA=93=E9=97=AE=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/poll/PollDetailTabThirdInfo.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/poll/PollDetailTabThirdInfo.js b/public/react/src/modules/courses/poll/PollDetailTabThirdInfo.js index 792c1b64f..dfe8ad4e7 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabThirdInfo.js +++ b/public/react/src/modules/courses/poll/PollDetailTabThirdInfo.js @@ -21,11 +21,11 @@ class PollDetailTabThirdInfo extends Component{

{ pollDetail.poll.polls_description }

}

- { pollDetail && pollDetail.question_types.q_counts===0 ? "" : + { !pollDetail || !pollDetail.question_types || pollDetail.question_types.q_counts===0 ? "" : { - pollDetail && pollDetail.question_types.q_counts > 0 && - 合计{pollDetail.question_types.q_counts}题: + pollDetail && pollDetail.question_types && pollDetail.question_types.q_counts > 0 && + 合计{pollDetail.question_types && pollDetail.question_types.q_counts}题: } { pollDetail && pollDetail.question_types.q_singles > 0 && @@ -44,7 +44,7 @@ class PollDetailTabThirdInfo extends Component{

{ - pollDetail && pollDetail.questions.map((item,key)=>{ + pollDetail && pollDetail.questions && pollDetail.questions.map((item,key)=>{ return(

From 38c309c216e9e77ba16bb6f57f1125148e87b5ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 6 Sep 2019 18:50:28 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/usersInfo/InfosTopics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js index 2cffce0ec..d90feed0f 100644 --- a/public/react/src/modules/user/usersInfo/InfosTopics.js +++ b/public/react/src/modules/user/usersInfo/InfosTopics.js @@ -74,7 +74,7 @@ class InfosTopics extends Component{ isSpin:true }) let types=this.props.match.params.topicstype; - let user_id=undefined; + let user_id=""; if(types==="publicly"){ user_id=this.props.current_user&&this.props.current_user.login; @@ -83,7 +83,7 @@ class InfosTopics extends Component{ } if(user_id!=undefined){ - + console.log(user_id) let {per_page}=this.state; let url=`/users/${user_id}/question_banks.json`; From 1d86e0f641bfb9fa4d6fe1a212caedae6fe05ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 6 Sep 2019 19:01:26 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 20 ++++++------ .../src/modules/user/usersInfo/InfosTopics.js | 32 +++++++++---------- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 939d2cdaa..2fbee86da 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -21,16 +21,16 @@ let hashTimeout // TODO 开发期多个身份切换 let debugType ="" -if (isDev) { - const _search = window.location.search; - let parsed = {}; - if (_search) { - parsed = queryString.parse(_search); - } - debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : - window.location.search.indexOf('debug=s') != -1 ? 'student' : - window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' -} +// if (isDev) { +// const _search = window.location.search; +// let parsed = {}; +// if (_search) { +// parsed = queryString.parse(_search); +// } +// debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : +// window.location.search.indexOf('debug=s') != -1 ? 'student' : +// window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' +// } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js index d90feed0f..edd7e554a 100644 --- a/public/react/src/modules/user/usersInfo/InfosTopics.js +++ b/public/react/src/modules/user/usersInfo/InfosTopics.js @@ -70,20 +70,22 @@ class InfosTopics extends Component{ // }else{ // // } - this.setState({ - isSpin:true - }) - let types=this.props.match.params.topicstype; - let user_id=""; + this.setState({ + isSpin:true + }) + let types=this.props.match.params.topicstype; + let user_id=""; + + if(types==="publicly"){ + user_id=this.props.current_user&&this.props.current_user.login; + }else{ + user_id=this.props.match.params&&this.props.match.params.username; + } - if(types==="publicly"){ - user_id=this.props.current_user&&this.props.current_user.login; - }else{ - user_id=this.props.match.params&&this.props.match.params.username; - } - if(user_id!=undefined){ - console.log(user_id) + if(user_id===undefined){ + user_id=this.props.match.params&&this.props.match.params.username; + } let {per_page}=this.state; let url=`/users/${user_id}/question_banks.json`; @@ -107,11 +109,7 @@ class InfosTopics extends Component{ isSpin:false }) }); - }else{ - this.setState({ - isSpin:false - }) - } + } searchCategory=(type)=>{