diff --git a/public/react/src/modules/courses/exercise/ExerciseDisplay.js b/public/react/src/modules/courses/exercise/ExerciseDisplay.js
index a0296476f..984f96114 100644
--- a/public/react/src/modules/courses/exercise/ExerciseDisplay.js
+++ b/public/react/src/modules/courses/exercise/ExerciseDisplay.js
@@ -53,11 +53,14 @@ class ExerciseDisplay extends Component{
componentDidMount = () => {
const Id = this.props.match.params.Id
if (Id) {
- const url = `/exercises/${Id}.json`
+ const url = `/${this.props.urlPath || 'exercises'}/${Id}.json`
axios.get(url)
.then((response) => {
if (response.data.status == 0) {
- this.setState({...response.data})
+ response.data.exercise_description = response.data.exercise_description || response.data.description
+ response.data.exercise_name = response.data.exercise_name || response.data.name
+ response.data.exercise_status = response.data.exercise_status == undefined ? 1 : response.data.exercise_status
+ this.setState({...response.data})
}
})
.catch(function (error) {
diff --git a/public/react/src/modules/user/usersInfo/banks/BanksIndex.js b/public/react/src/modules/user/usersInfo/banks/BanksIndex.js
index 916601420..6a303f62b 100644
--- a/public/react/src/modules/user/usersInfo/banks/BanksIndex.js
+++ b/public/react/src/modules/user/usersInfo/banks/BanksIndex.js
@@ -149,6 +149,13 @@ class BanksIndex extends Component{
/>)
}
}>
+ {
+ return ()
+ }
+ }>
import('./PollBanksContent'),
loading: Loading,
})
+// 试卷详情
+const ExerciseBanksDetail = Loadable({
+ loader: () => import('./ExerciseBanksDetail'),
+ loading: Loading,
+});
class BanksTabIndex extends Component{
constructor(props){
@@ -53,7 +58,13 @@ class BanksTabIndex extends Component{
>
}
-
+ {
+ return ()
+ }
+ }>
{
+
+ }
+ detailFetchCallback = (result) => {
+ let Id=this.props.match.params.Id;
+
+ const crumbData={
+ title: result.data.exercise && result.data.exercise.name,
+ is_public: result.data.exercise && result.data.exercise.is_public,
+ crumbArray:[
+ {content:'详情'},
+ ]
+ }
+ const menuData={
+ tab:'0',//tab选中的index
+ menuArray:[//tab以及tab路由
+ {to:`/banks/exercise/${Id}`,content:'内容详情'}
+ ],
+ category:'exercise',//毕设选题
+ tos: `/banks/exercise/${Id}/edit`,
+ id: Id,
+
+ }
+ this.props.initPublic(crumbData,menuData);
+ }
+
+ render(){
+ let { pollDetail } = this.state
+
+ return(
+
+
+
+
+ )
+ }
+}
+export default ExerciseBanksDetail