明日签到的金币数

dev_forum
caishi 6 years ago
parent 0a6b09d227
commit 58bf03e694

@ -73,8 +73,9 @@ class ExerciseReviewAndAnswer extends Component{
setScoreReason:undefined,
setTip:"",
Id:undefined
Id:undefined,
// 试卷总分
exerciseTotalScore:undefined
}
}
componentDidUpdate (prevProps) {
@ -185,7 +186,8 @@ class ExerciseReviewAndAnswer extends Component{
exercise_answer_user:result.data.exercise_answer_user,
exercise_questions:result.data.exercise_questions,
user_exercise_status:1,
Id:result.data.exercise_answer_user.user_id
Id:result.data.exercise_answer_user.user_id,
exerciseTotalScore:result.data.exercise_answer_user.score
})
}
}).catch((error)=>{
@ -207,7 +209,8 @@ class ExerciseReviewAndAnswer extends Component{
exercise_scores:result.data.exercise_scores,
exercise_questions:result.data.exercise_questions,
user_exercise_status:result.data.exercise.user_exercise_status,
time:result.data.exercise.left_time
time:result.data.exercise.left_time,
exerciseTotalScore:result.data.user_score
})
if(result.data.exercise.left_time != null){
this.remainTime();
@ -490,7 +493,8 @@ class ExerciseReviewAndAnswer extends Component{
modalsBottomval,
ModalCancel,
ModalSave,
Loadtype
Loadtype,
exerciseTotalScore
}=this.state
let isAdmin = this.props.isAdmin();
let isStudent =this.props.isStudent();
@ -579,8 +583,8 @@ class ExerciseReviewAndAnswer extends Component{
exercise_start_at && <span className="fl color-grey-9">开始答题时间{ exercise_start_at && moment(exercise_start_at).format(format) }</span>
}
{
exercise_answer_user && !!exercise_answer_user.score &&
<span className="color-grey-9 fr">总分<span className="color-orange-tip"> { exercise_answer_user.score }</span> </span>
(isAdmin || (isStudent && exercise && exercise.exercise_status == 3)) && exerciseTotalScore &&
<span className="color-grey-9 fr">总分<span className="color-orange-tip"> { exerciseTotalScore }</span> </span>
}
</span>
{

@ -269,7 +269,7 @@ class shixunAnswer extends Component{
}
{
item.operation ?
<a className={isAdmin ? "color-blue ml20":"color-blue"} target="_blank" href='javascript:void(0)' onClick={()=>this.scrollToAnchor(`${index+1}`)}>查看</a>
<a className={isAdmin ? "color-blue ml20":"color-blue"} target="_blank" href='javascript:void(0)' onClick={()=>this.scrollToAnchor(`${questionType.question_id}${index+1}`)}>查看</a>
:
<a className={isAdmin ? "color-grey-9 ml20":"color-grey-9"} target="_blank" href='javascript:void(0)'>--</a>
}
@ -292,7 +292,7 @@ class shixunAnswer extends Component{
{
challenge.map((item,key)=>{
return(
<div className="pl30 pr30" id={`challenge_${key+1}`}>
<div className="pl30 pr30" id={`challenge_${questionType.question_id}${key+1}`}>
<p className="clearfix mb20">
<span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF">
<i className="fa fa-code font-16 color_white"></i>

@ -46,7 +46,8 @@ class Infos extends Component{
type:0,
login:undefined,
isRenders:false,
moduleName:"courses"
moduleName:"courses",
next_gold:undefined
}
}
componentDidMount =()=>{
@ -75,7 +76,8 @@ class Infos extends Component{
data:result.data,
followed:result.data.followed,
sign:result.data.brief_introduction,
id:result.data.id
id:result.data.id,
next_gold:result.data.tomorrow_attendance_gold
})
}
}).catch((error)=>{
@ -133,6 +135,9 @@ class Infos extends Component{
data : update(prevState.data, {attendance_signed: {$set: true} })
})
)
this.setState({
next_gold:result.data.next_gold
})
}
}).catch((error)=>{
console.log(error);
@ -195,7 +200,8 @@ class Infos extends Component{
id,
login,
isRenders,
moduleName
moduleName,
next_gold
}=this.state;
let {username}= this.props.match.params;
@ -291,7 +297,7 @@ class Infos extends Component{
data.attendance_signed ?
<React.Fragment>
<span className="user_default_btn user_grey_btn mb5 fl">已签到</span>
<span id="attendance_notice" className="none font-12 color-grey-6" style={{"display":"block"}}>明日签到&nbsp;<font className="color-orange">+{data && data.tomorrow_attendance_gold}</font>&nbsp;</span>
<span id="attendance_notice" className="none font-12 color-grey-6" style={{"display":"block"}}>明日签到&nbsp;<font className="color-orange">+{next_gold}</font>&nbsp;</span>
</React.Fragment>
:
<a herf="javascript:void(0);" onClick={this.signFor} id="attendance" className="user_default_btn user_orange_btn fl mb15">签到</a>

Loading…
Cancel
Save