From de4ad7ce08658feb1700dd505c7513e294c73f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 21 Nov 2019 11:08:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=91=E5=AE=A2=E6=9D=BE=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E8=B0=83=E6=95=B4=20=E8=AF=BE=E5=A0=82=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6=E8=B0=83?= =?UTF-8?q?=E6=95=B4=20=E5=AE=9E=E8=AE=AD=E4=BD=9C=E4=B8=9A=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E7=94=A8=E6=88=B7=E6=8F=90=E7=A4=BA=E4=BD=93=E9=AA=8C?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesDetail/CoursesBanner.js | 36 ++++++++++++++----- .../shixunreport/ConclusionEvaluation.js | 14 ++++++-- .../src/modules/osshackathon/Osshackathon.css | 2 -- .../src/modules/osshackathon/Osshackathon.js | 1 + .../react/src/modules/user/AccountProfile.js | 29 ++++++++------- 5 files changed, 56 insertions(+), 26 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 503c73a10..bf1ac2bc0 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -130,16 +130,29 @@ class CoursesBanner extends Component { axios.get(url,{params: dataqueryss }).then((result) => { - if( result!=undefined){ - let data = result.data; - this.setState({ - coursedata: data, - excellent:data.excellent, - }) - this.props.ispostexcellenttype(data.excellent) + debugger + if(result.data.status===-2){ + this.setState({ + AccountProfiletype:true, + content:result.data.message, + okText:"立即认证", + cannelText:"稍后认证", + okHref:`/account/certification`, + Accounturltype:true + }) }else{ - this.onloadupdatabanner() + if( result!=undefined){ + let data = result.data; + this.setState({ + coursedata: data, + excellent:data.excellent, + }) + this.props.ispostexcellenttype(data.excellent) + }else{ + this.onloadupdatabanner() + } } + }) }; foo=(url)=> { @@ -452,7 +465,12 @@ class CoursesBanner extends Component { hideAccountProfile=()=>{ this.setState({ - AccountProfiletype:false + AccountProfiletype:false, + content:undefined, + okText:undefined, + okHref:undefined, + cannelText:undefined, + Accounturltype:undefined }) }; ysljoinmodalCancel=()=>{ diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js b/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js index 5430b9e8c..e9771157c 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js +++ b/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js @@ -1,6 +1,6 @@ import React, {Component} from "react"; import {WordsBtn} from 'educoder'; -import {Table,Tooltip,} from "antd"; +import {Table,Tooltip} from "antd"; import {Link,Switch,Route,Redirect} from 'react-router-dom'; class ConclusionEvaluation extends Component { @@ -23,10 +23,18 @@ class ConclusionEvaluation extends Component { dataIndex: 'type', key: 'type', render: (text, record) => ( - {record.type} + + 按照总分的百分比评价,而不是分值
+ [90,100]优秀
+ [70,90]良好
+ [60,70]及格
+ [0,60]不及格
+ + }> {record.type}
), }, { - title: '获得经验值', + title:获得经验值, dataIndex: 'empirical', key: 'empirical', render: (text, record) => ( diff --git a/public/react/src/modules/osshackathon/Osshackathon.css b/public/react/src/modules/osshackathon/Osshackathon.css index 679f4afb0..227bd1150 100644 --- a/public/react/src/modules/osshackathon/Osshackathon.css +++ b/public/react/src/modules/osshackathon/Osshackathon.css @@ -37,11 +37,9 @@ } .OsshackathonCardtitle{ - height:24px; font-size:24px; font-weight:400; color:rgba(5,16,26,1); - line-height:24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; diff --git a/public/react/src/modules/osshackathon/Osshackathon.js b/public/react/src/modules/osshackathon/Osshackathon.js index 7edc18d63..c48b4b656 100644 --- a/public/react/src/modules/osshackathon/Osshackathon.js +++ b/public/react/src/modules/osshackathon/Osshackathon.js @@ -357,6 +357,7 @@ class Osshackathon extends Component { + 报名人数:{item.hack_users_count} {item.entry_info===true?:} diff --git a/public/react/src/modules/user/AccountProfile.js b/public/react/src/modules/user/AccountProfile.js index ea8d20b8a..1774a9fd5 100644 --- a/public/react/src/modules/user/AccountProfile.js +++ b/public/react/src/modules/user/AccountProfile.js @@ -31,18 +31,23 @@ class AccountProfile extends Component { } - gotoback=()=>{ - if(this.props.AccountProfiletype!=undefined){ - this.setState({ - AccountProfiletype:false - }) - this.props.hideAccountProfile() - }else{ + gotoback=(type)=>{ + if(type===true){ window.location.href="/"; - this.setState({ - AccountProfiletype:false - }) + }else{ + if(this.props.AccountProfiletype!=undefined){ + this.setState({ + AccountProfiletype:false + }) + this.props.hideAccountProfile() + }else{ + window.location.href="/"; + this.setState({ + AccountProfiletype:false + }) + } } + } @@ -52,7 +57,7 @@ okText: '立即完成', okHref: '/account/certification' */ render() { - const { content, okText, okHref } = this.props; + const { content, okText, okHref,cannelText,Accounturltype} = this.props; return(

{content || '您需要去完善您的个人资料,才能使用此功能'}

- this.gotoback()}>稍后完善 + this.gotoback(Accounturltype)}>{cannelText ||'稍后完善'} {okText || '立即完善'}