|
@@ -5,7 +5,7 @@
|
|
|
|
|
|
|
|
import React, {Component} from 'react'
|
|
import React, {Component} from 'react'
|
|
|
import ImagesViewer from "../../components/imagesVIewer";
|
|
import ImagesViewer from "../../components/imagesVIewer";
|
|
|
-import {getArrayValue, getIntValue, getStrValue, isObjEmpty} from "../../utils/common";
|
|
|
|
|
|
|
+import {getArrayValue, getIntValue, getSearchParams, getStrValue, isObjEmpty} from "../../utils/common";
|
|
|
import NotifyBoBean from "../../model/NotifyBoBean";
|
|
import NotifyBoBean from "../../model/NotifyBoBean";
|
|
|
import {fetchGet, fetchPost} from "../../utils/fetchRequest";
|
|
import {fetchGet, fetchPost} from "../../utils/fetchRequest";
|
|
|
import {_baseURL, API} from "../../configs/api.config";
|
|
import {_baseURL, API} from "../../configs/api.config";
|
|
@@ -25,11 +25,15 @@ class NotifyBoardDetail extends Component {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- componentDidMount() {
|
|
|
|
|
- document.title = '通知公告详情'
|
|
|
|
|
|
|
+ componentWillMount() {
|
|
|
|
|
+ this.searchParams = getSearchParams(this.props.location.search)
|
|
|
|
|
|
|
|
this.notifyId = this.props.match.params.notifyId
|
|
this.notifyId = this.props.match.params.notifyId
|
|
|
this.role = this.props.match.params.role
|
|
this.role = this.props.match.params.role
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ componentDidMount() {
|
|
|
|
|
+ document.title = '通知公告详情'
|
|
|
|
|
|
|
|
this.obtainDetail()
|
|
this.obtainDetail()
|
|
|
}
|
|
}
|
|
@@ -125,15 +129,23 @@ class NotifyBoardDetail extends Component {
|
|
|
let url = '', params = {}
|
|
let url = '', params = {}
|
|
|
if (this.role === 'teacher') {
|
|
if (this.role === 'teacher') {
|
|
|
url = API.NOTIFY_DETAIL_TEACHER
|
|
url = API.NOTIFY_DETAIL_TEACHER
|
|
|
|
|
+ let id = this.props.userInfo.user.userFunId
|
|
|
|
|
+ if (this.searchParams && this.searchParams.teacherId) {
|
|
|
|
|
+ id = this.searchParams.teacherId
|
|
|
|
|
+ }
|
|
|
params = {
|
|
params = {
|
|
|
notifyId: this.notifyId,
|
|
notifyId: this.notifyId,
|
|
|
- teacherId: this.props.userInfo.user.userFunId
|
|
|
|
|
|
|
+ teacherId: id
|
|
|
}
|
|
}
|
|
|
} else if (this.role === 'parent') {
|
|
} else if (this.role === 'parent') {
|
|
|
url = API.NOTIFY_DETAIL_PARENT
|
|
url = API.NOTIFY_DETAIL_PARENT
|
|
|
|
|
+ let id = this.props.userInfo.user.student.stuId
|
|
|
|
|
+ if (this.searchParams && this.searchParams.stuId) {
|
|
|
|
|
+ id = this.searchParams.stuId
|
|
|
|
|
+ }
|
|
|
params = {
|
|
params = {
|
|
|
notifyId: this.notifyId,
|
|
notifyId: this.notifyId,
|
|
|
- stuId: this.props.userInfo.user.student.stuId
|
|
|
|
|
|
|
+ stuId: id
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
return
|
|
return
|