|
|
@@ -21,9 +21,9 @@ class ScoreNotification extends Component{
|
|
|
constructor(){
|
|
|
super();
|
|
|
this.state = {
|
|
|
- stuId:null,
|
|
|
- selectClass:null,
|
|
|
- selectTime:null,
|
|
|
+ stuId:'',
|
|
|
+ selectClass:'',
|
|
|
+ selectTime:'',
|
|
|
ScoreDataList:[
|
|
|
|
|
|
],
|
|
|
@@ -39,10 +39,10 @@ class ScoreNotification extends Component{
|
|
|
}
|
|
|
componentDidMount() {
|
|
|
let stuId
|
|
|
- if (this.props.match.params.stuId == null){
|
|
|
- stuId = this.props.userInfo.user.student.stuId
|
|
|
- }else {
|
|
|
+ if (this.props.match.params.stuId){
|
|
|
stuId = this.props.match.params.stuId
|
|
|
+ }else {
|
|
|
+ stuId = this.props.userInfo.user.student.stuId
|
|
|
}
|
|
|
this.setState({
|
|
|
stuId:stuId
|
|
|
@@ -75,7 +75,7 @@ class ScoreNotification extends Component{
|
|
|
)
|
|
|
}
|
|
|
getScoreData =()=>{
|
|
|
- if(this.state.stuId == null || this.state.stuId.trim().length == 0){
|
|
|
+ if(!isObjEmpty(this.state.stuId)){
|
|
|
return
|
|
|
}
|
|
|
try {
|