From 66e65946fbf32ad17d7ce4bba58d9d262dc6cd82 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Fri, 21 Jun 2019 16:25:51 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesPublic/HomeworkModal.js | 2 -- .../src/modules/login/Trialapplication.js | 27 +++++++++++-------- public/react/src/modules/tpm/NewHeader.js | 2 ++ 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/HomeworkModal.js b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js index 66bca0023..f448483d2 100644 --- a/public/react/src/modules/courses/coursesPublic/HomeworkModal.js +++ b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js @@ -27,8 +27,6 @@ class HomeworkModal extends Component{ group_ids:[], endtime:"" } - console.log("30"); - console.log(props); } componentDidMount() { diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index 9626a1475..b86b68930 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -69,6 +69,22 @@ class Trialapplication extends Component { }) } + // 是否不显示手机栏 + let url = `/users/get_user_info.json` + axios.get(url,{params:{ + school:1 + } + }, + ).then((response) => { + if(response !==undefined){ + this.setState({ + user_phone_binded:response.data.user_phone_binded + }) + } + }).catch((error) => { + console.log(error) + }) + axios.interceptors.response.use((response) => { if (response != undefined) if (response && response.data.status === 407) { @@ -81,18 +97,7 @@ class Trialapplication extends Component { // // // TODO 这里如果样式变了会出现css不加载的情况 }); // console.log("89"); - try { - // console.log(this.state.props.user && this.state.props.user.user_phone_binded); - if (this.state.props.user !== undefined) { - this.setState({ - user_phone_binded: this.state.props.user.user_phone_binded, - }) - } - } catch (e) { - console.log(e); - - } } diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index e97a728d4..956e9afc4 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -173,6 +173,8 @@ class NewHeader extends Component { showTrial:false, user:undefined, } + console.log("176") + console.log(props); } componentDidMount() { From 8791b8edf10412ab398fb267895ba8e6749288a9 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 16:39:24 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=88=86=E7=8F=AD=E8=AE=BE=E7=BD=AE=20?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/busyWork/CommonWorkSetting.js | 64 +++++++++++-------- .../modules/courses/members/teacherList.js | 2 +- 2 files changed, 39 insertions(+), 27 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js index 5ce5a5df3..ab00f3c00 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js @@ -271,8 +271,8 @@ class CommonWorkSetting extends Component{ absence_penalty = 2 } } else { - evaluation_start = '' - evaluation_end = '' + evaluation_start = null + evaluation_end = null evaluation_num = 0 absence_penalty = 0 } @@ -484,6 +484,7 @@ class CommonWorkSetting extends Component{ publish_time_type, end_time_type } = this.state; let group_settings_param = [] + let max_un_unified_setting_end_time = null if (!unified_setting) { const result = this.refs.pollDetailTabForthRules.notUnifiedSettingCheck(this.state.rules); this.setState({ @@ -494,6 +495,9 @@ class CommonWorkSetting extends Component{ return false; } group_settings_param = result.rules.map(item => { + if (!max_un_unified_setting_end_time || moment(item.end_time) > moment(max_un_unified_setting_end_time)) { + max_un_unified_setting_end_time = item.end_time; + } return { group_id: item.course_group_id, publish_time: item.publish_time, @@ -517,16 +521,22 @@ class CommonWorkSetting extends Component{ return false } - - let temp_publish_time = publish_time - let temp_end_time = end_time - if (!temp_publish_time) { - const publish_time_moment = getNextHalfHourOfMoment(moment()); - temp_publish_time = publish_time_moment.format(dateFormat); - } - if (!temp_end_time) { - temp_end_time = moment(handleDateString(temp_publish_time)).add(1, 'months').format(dateFormat) + let temp_publish_time + let temp_end_time + if (unified_setting) { + let temp_publish_time = publish_time + let temp_end_time = end_time + if (!temp_publish_time) { + const publish_time_moment = getNextHalfHourOfMoment(moment()); + temp_publish_time = publish_time_moment.format(dateFormat); + } + if (!temp_end_time) { + temp_end_time = moment(handleDateString(temp_publish_time)).add(1, 'months').format(dateFormat) + } + } else { + temp_end_time = max_un_unified_setting_end_time } + // 已发布的不检查 const isUnPublish= homework_status.indexOf(STATUS_UN_PUBLISH) != -1 const isAdmin = this.props.isAdmin() @@ -534,20 +544,22 @@ class CommonWorkSetting extends Component{ const publish_time_editable = isUnPublish; const end_time_editable = isAdmin || !end_time || moment(end_time) > current; - if (publish_time_editable && temp_publish_time && moment(temp_publish_time) < moment()) { - this.setState({ - publicTimeTip: '发布时间不能小于当前时间' - }) - scrollTo('.publicTimeTip') - return false - } - // 已截止的不检查 - if (end_time_editable && temp_end_time && moment(temp_end_time) <= moment(temp_publish_time)) { - this.setState({ - publicTimeTip: '截止时间必须晚于发布时间' - }) - scrollTo('.publicTimeTip') - return false + if (unified_setting) { + if (publish_time_editable && temp_publish_time && moment(temp_publish_time) < moment()) { + this.setState({ + publicTimeTip: '发布时间不能小于当前时间' + }) + scrollTo('.publicTimeTip') + return false + } + // 已截止的不检查 + if (end_time_editable && temp_end_time && moment(temp_end_time) <= moment(temp_publish_time)) { + this.setState({ + publicTimeTip: '截止时间必须晚于发布时间' + }) + scrollTo('.publicTimeTip') + return false + } } this.setState({ publicTimeTip: '' @@ -1201,7 +1213,7 @@ class CommonWorkSetting extends Component{ - {anonymous_comment_time_tip &&
{anonymous_comment_time_tip}
} + {
{anonymous_comment_time_tip}
} {/* 匿评数量 */}
diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 9b1a2ad6e..509bf56c1 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -49,7 +49,7 @@ function buildColumns(that) { width: 160, key: 'name', render: (name, record) => { - return {name} + return {name} } }, { title: '角色', From ad989177c7795488d10cc518d111a7a416312cc7 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 16:41:28 +0800 Subject: [PATCH 3/8] isAdmin --- public/react/src/modules/courses/busyWork/CommonWorkItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 295f55fe1..ad755338c 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -185,7 +185,7 @@ class CommonWorkItem extends Component{ } - {this.props.isAdmin &&
+ {isAdmin &&
{ this.props.toEditPage(this.props.match.params, item.homework_id) }}>编辑 { this.props.toWorkSettingPage(this.props.match.params, item.homework_id) }}>设置
} From 51467cf3ef8ddb5bfc0ec3bb333affd8123bb8ef Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Fri, 21 Jun 2019 16:41:42 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/login/Trialapplication.js | 45 +++++++++---------- public/react/src/modules/tpm/NewHeader.js | 2 +- 2 files changed, 21 insertions(+), 26 deletions(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index b86b68930..d98228856 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -44,18 +44,14 @@ class Trialapplication extends Component { componentWillReceiveProps(nextProps) { - // this.setState({ - // isRenders:nextProps.isRenders - // }) - // console.log("componentWillReceiveProps"); - // console.log(nextProps); + } //初始化数据 componentDidMount() { - // console.log("53"); + console.log("53"); - // console.log(this.props.isRenders); + console.log(this.props.isRenders); if (this.props.isRenders != undefined) { this.setState({ @@ -69,22 +65,6 @@ class Trialapplication extends Component { }) } - // 是否不显示手机栏 - let url = `/users/get_user_info.json` - axios.get(url,{params:{ - school:1 - } - }, - ).then((response) => { - if(response !==undefined){ - this.setState({ - user_phone_binded:response.data.user_phone_binded - }) - } - }).catch((error) => { - console.log(error) - }) - axios.interceptors.response.use((response) => { if (response != undefined) if (response && response.data.status === 407) { @@ -94,10 +74,22 @@ class Trialapplication extends Component { } return response; }, (error) => { - // // // TODO 这里如果样式变了会出现css不加载的情况 + //TODO 这里如果样式变了会出现css不加载的情况 + }); - // console.log("89"); + console.log("89"); + try { + if (this.state.props.user !== undefined) { + console.log(this.state.props.user && this.state.props.user.user_phone_binded); + this.setState({ + user_phone_binded: this.state.props.user.user_phone_binded, + }) + } + + } catch (e) { + console.log(e); + } } @@ -217,6 +209,7 @@ class Trialapplication extends Component { this.setState({ isRenders: false }) + this.Cancel(); window.location.href = "/"; } else { this.setState({ @@ -278,6 +271,8 @@ class Trialapplication extends Component { thiss.setState({ isRenders: false }) + thiss.Cancel(); + } else { thiss.setState({ isRenders: false diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 956e9afc4..3d3e83d36 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -583,7 +583,7 @@ submittojoinclass=(value)=>{ /> {/* :""*/} {/*}*/} - + {/*{*/} {/* isRenders&&isRenders===true?*/} From fbd6f3fe5df798dab16566487f1cc46eca0e2794 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 16:58:08 +0800 Subject: [PATCH 5/8] invalid --- .../modules/courses/busyWork/CommonWorkSetting.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js index ab00f3c00..1574d692d 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js @@ -1018,7 +1018,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择发布时间" id={"startime"} width={"210px"} - value={publish_time===null||publish_time===""?"":moment(publish_time, dateFormat)} + value={!publish_time?"":moment(publish_time, dateFormat)} onChange={this.onChangeTimepublish} // disabled={this.props.isSuperAdmin()?false:publish_time_type===true?true:false} disabled={moment(this.state.init_publish_time) < moment() || noAuth} @@ -1048,7 +1048,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择截止时间" id={"endTime"} width={"210px"} - value={end_time===null||end_time===""?"":moment(end_time, dateFormat)} + value={!end_time?"":moment(end_time, dateFormat)} onChange={this.onChangeTimeend} disabled={this.props.isSuperAdmin()?false:end_time_type===true?true:false} disabled={moment(this.state.init_end_time) < moment() || noAuth} @@ -1117,7 +1117,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择结束时间" id={"enTime"} width={"210px"} - value={late_time===null||late_time===""? undefined :moment(late_time, dateFormat)} + value={!late_time ? undefined :moment(late_time, dateFormat)} onChange={this.onChangeTimelatetime} disabledTime={disabledDateTime} disabled={!allow_late || noAuth || moment(init_late_time) < moment()} @@ -1165,7 +1165,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择匿名开启时间" id={"startime"} width={"210px"} - value={evaluation_start===null||evaluation_start===""?"":moment(evaluation_start, dateFormat)} + value={!evaluation_start ?"":moment(evaluation_start, dateFormat)} onChange={this.onChangeEvaluationStart} disabled={ (anonymous_comment && !noAuth ? false : true) || moment(init_evaluation_start) < moment() } // disabledDate={ (evaluation_start) => @@ -1194,7 +1194,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择匿名结束时间" id={"endtime"} width={"210px"} - value={evaluation_end===null||evaluation_end===""?"":moment(evaluation_end, dateFormat)} + value={!evaluation_end ?"":moment(evaluation_end, dateFormat)} onChange={this.onChangeEvaluationEnd} disabledTime={disabledDateTime} disabled={(anonymous_comment && !noAuth ? false : true) || moment(init_evaluation_end) < moment()} @@ -1289,7 +1289,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择申诉结束时间" id={"endtime"} width={"210px"} - value={appeal_time===null||appeal_time===""?"":moment(appeal_time, dateFormat)} + value={!appeal_time?"":moment(appeal_time, dateFormat)} onChange={this.appeal_time_change} disabled={ (anonymous_appeal && !noAuth ? false : true) || moment(init_appeal_time) < moment()} /> From fc7087ebca053667a742e1629b9ecbd997ba1c96 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 17:19:05 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E5=88=86=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/busyWork/CommonWorkList.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 11d26ebf1..7142d3d00 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -259,9 +259,9 @@ function buildColumns(that, student_works) {
最终调整成绩:{record.work_score}分
:
{ record.final_score &&
作业评分:{record.final_score}分
} - { !!that.state.late_penalty &&
迟交扣分:{that.state.late_penalty}分
} - { !!that.state.absence_penalty &&
缺评扣分:{that.state.absence_penalty}分
} - { !!that.state.appeal_penalty &&
违规匿评扣分:{that.state.appeal_penalty}分
} + { record.late_penalty >= 0 &&
迟交扣分:{record.late_penalty}分
} + { record.absence_penalty >= 0 &&
缺评扣分:{record.absence_penalty}分
} + { record.appeal_penalty >= 0 &&
违规匿评扣分:{record.appeal_penalty}分
}
最终成绩:{record.work_score}分
}
) From 28bbaf7d1ced57541de9299e2fff1d05191f587c Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 21 Jun 2019 17:20:01 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=88=B0=E8=80=81=E7=89=88=E7=9A=84=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/ExerciseReviewAndAnswer.js | 2 +- .../modules/courses/graduation/tasks/index.js | 3 +- public/react/src/modules/tpm/NewHeader.js | 12 +- .../react/src/modules/user/usersInfo/Infos.js | 133 +++++++++++++----- .../src/modules/user/usersInfo/InfosBank.js | 2 +- .../src/modules/user/usersInfo/InfosCourse.js | 2 +- .../src/modules/user/usersInfo/InfosPath.js | 2 +- .../modules/user/usersInfo/InfosProject.js | 2 +- .../src/modules/user/usersInfo/InfosShixun.js | 2 +- .../src/modules/user/usersInfo/usersInfo.css | 14 +- 10 files changed, 121 insertions(+), 53 deletions(-) diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js index d46b48038..58569554f 100644 --- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js +++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js @@ -656,7 +656,7 @@ class ExerciseReviewAndAnswer extends Component{ return(

- {parseInt(key+1)}、{type[item.question_type]}({item.question_score}分) + {exercise_questions.q_position}、{type[item.question_type]}({item.question_score}分) { // 填空(一直都有调分),和简答题调分:老师身份 已经评分的才能出现调分按钮 diff --git a/public/react/src/modules/courses/graduation/tasks/index.js b/public/react/src/modules/courses/graduation/tasks/index.js index d28b8f697..acb8508b2 100644 --- a/public/react/src/modules/courses/graduation/tasks/index.js +++ b/public/react/src/modules/courses/graduation/tasks/index.js @@ -13,6 +13,7 @@ import Modals from '../../../modals/Modals'; import UseBank from "../../busyWork/UseBank"; import '../../css/members.css'; import '../style.css'; +import moment from 'moment' class GraduationTasks extends Component{ @@ -413,7 +414,7 @@ class GraduationTasks extends Component{ Topval:"本操作只对“未发布”的对象生效", Botvalleft:"暂不发布", Botval:"则通过后续手动设置,定时发布", - starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), + starttime:"发布时间:"+moment(new Date()).format("YYYY-MM-DD HH:mm"), starttimes:this.props.getNowFormatDates(1), typs:"start", endtime:"截止时间:"+endtime, diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 25d290fac..e2ef85907 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -570,7 +570,7 @@ submittojoinclass=(value)=>{ // join_course_url: "https://www.educoder.net/courses/join_course_multi_role" // join_project_url: "https://www.educoder.net/applied_project/applied_project_info" // rolearr:["",""], - console.log() + console.log(this.props) return (

@@ -707,18 +707,18 @@ submittojoinclass=(value)=>{ 注册 :
- +
) } diff --git a/public/react/src/modules/user/usersInfo/InfosBank.js b/public/react/src/modules/user/usersInfo/InfosBank.js index 39015681d..cf670063d 100644 --- a/public/react/src/modules/user/usersInfo/InfosBank.js +++ b/public/react/src/modules/user/usersInfo/InfosBank.js @@ -39,7 +39,7 @@ class InfosBank extends Component{ } getCourses=(category,type,page,sort_by,CoursesId)=>{ - let url=`/users/${this.props.login}/question_banks.json`; + let url=`/users/${this.props.match.params.username}/question_banks.json`; axios.get((url),{params:{ category, type, diff --git a/public/react/src/modules/user/usersInfo/InfosCourse.js b/public/react/src/modules/user/usersInfo/InfosCourse.js index b864dff63..109a4d7b9 100644 --- a/public/react/src/modules/user/usersInfo/InfosCourse.js +++ b/public/react/src/modules/user/usersInfo/InfosCourse.js @@ -36,7 +36,7 @@ class InfosCourse extends Component{ } getCourses=(category,status,page)=>{ - let url=`/users/${this.props.login}/courses.json`; + let url=`/users/${this.props.match.params.username}/courses.json`; axios.get((url),{params:{ category, status, diff --git a/public/react/src/modules/user/usersInfo/InfosPath.js b/public/react/src/modules/user/usersInfo/InfosPath.js index 55422f208..ce3bcfba8 100644 --- a/public/react/src/modules/user/usersInfo/InfosPath.js +++ b/public/react/src/modules/user/usersInfo/InfosPath.js @@ -38,7 +38,7 @@ class InfosPath extends Component{ } getCourses=(category,status,sort_by,page,per_page)=>{ - let url=`/users/${this.props.login}/subjects.json`; + let url=`/users/${this.props.match.params.username}/subjects.json`; axios.get((url),{params:{ category, status, diff --git a/public/react/src/modules/user/usersInfo/InfosProject.js b/public/react/src/modules/user/usersInfo/InfosProject.js index fab96f59e..99232b8ef 100644 --- a/public/react/src/modules/user/usersInfo/InfosProject.js +++ b/public/react/src/modules/user/usersInfo/InfosProject.js @@ -32,7 +32,7 @@ class InfosProject extends Component{ } getCourses=(category,status,page)=>{ - let url=`/users/${this.props.login}/projects.json`; + let url=`/users/${this.props.match.params.username}/projects.json`; axios.get((url),{params:{ category, status, diff --git a/public/react/src/modules/user/usersInfo/InfosShixun.js b/public/react/src/modules/user/usersInfo/InfosShixun.js index 90575f9f0..d6835098a 100644 --- a/public/react/src/modules/user/usersInfo/InfosShixun.js +++ b/public/react/src/modules/user/usersInfo/InfosShixun.js @@ -38,7 +38,7 @@ class InfosShixun extends Component{ } getCourses=(category,status,sort_by,page)=>{ - let url=`/users/${this.props.login}/shixuns.json`; + let url=`/users/${this.props.match.params.username}/shixuns.json`; axios.get((url),{params:{ category, status, diff --git a/public/react/src/modules/user/usersInfo/usersInfo.css b/public/react/src/modules/user/usersInfo/usersInfo.css index 31bdd5a2c..0be9837bf 100644 --- a/public/react/src/modules/user/usersInfo/usersInfo.css +++ b/public/react/src/modules/user/usersInfo/usersInfo.css @@ -8,8 +8,20 @@ float: left; margin: 0px 40px; padding:0px; - height: 47px;line-height: 40px; + height: 45px; + line-height: 40px; font-size: 16px; + position: relative; +} +.navInfo li.active::after{ + position: absolute; + left: 0px; + height: 2px; + width: 100%; + content: ''; + bottom: 0px; + background: #05101A!important; + color: #666!important; } .navInfo li,.navInfo li.ant-menu-item-active{ border-bottom: none!important; From bda8393f2797eba03b0036653b94d037ccdb63ea Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Fri, 21 Jun 2019 17:21:11 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/login/Trialapplication.js | 6 +++--- public/react/src/modules/tpm/NewHeader.js | 2 -- public/react/src/modules/tpm/TPMIndexHOC.js | 21 ++++++++++++------- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index d98228856..d2b942ce7 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -79,10 +79,10 @@ class Trialapplication extends Component { }); console.log("89"); try { - if (this.state.props.user !== undefined) { - console.log(this.state.props.user && this.state.props.user.user_phone_binded); + if (this.state.props.user_phone_binded !== undefined) { + console.log(this.state.props.user_phone_binded); this.setState({ - user_phone_binded: this.state.props.user.user_phone_binded, + user_phone_binded: this.state.props.user_phone_binded, }) } diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 3d3e83d36..955ae593f 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -171,7 +171,6 @@ class NewHeader extends Component { isRender:false, isRenders:false, showTrial:false, - user:undefined, } console.log("176") console.log(props); @@ -583,7 +582,6 @@ submittojoinclass=(value)=>{ /> {/* :""*/} {/*}*/} - {/*{*/} {/* isRenders&&isRenders===true?*/} diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index c808a4808..7723af4fc 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -9,6 +9,7 @@ import { getUrl } from 'educoder' import axios from 'axios'; import './TPMIndex.css' +import Trialapplication from "../login/Trialapplication"; // import "antd/dist/antd.css"; // import '../../css/educoder/edu-common.css' // import '../../css/educoder/edu-all.css' @@ -246,10 +247,10 @@ export function TPMIndexHOC(WrappedComponent) { } */ if (response.data) { - this.initCommonState(response.data) - this.setState({ - tpmLoading: false, + this.setState({ + user_phone_binded:response.data.user_phone_binded, + tpmLoading: false, coursedata: { course_identity: response.data.course_identity >= 0 ? response.data.course_identity : undefined, course_public: response.data.course_public, @@ -266,7 +267,7 @@ export function TPMIndexHOC(WrappedComponent) { }) } render() { - let{Headertop,Footerdown}=this.state; + let{Headertop,Footerdown,user_phone_binded}=this.state; const common = { isSuperAdmin:this.isSuperAdmin, isAdminOrCreator:this.isAdminOrCreator, @@ -278,11 +279,17 @@ export function TPMIndexHOC(WrappedComponent) { isNotMember: this.isNotMember, isUserid:this.state.coursedata&&this.state.coursedata.userid } - - return (
- + + } + +