取消
确定
diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js
index e052ed1e3..eb1627e83 100644
--- a/public/react/src/modules/courses/new/CoursesNew.js
+++ b/public/react/src/modules/courses/new/CoursesNew.js
@@ -257,7 +257,13 @@ class CoursesNew extends Component {
}
goback = () => {
- window.history.go(-1)
+
+ if(this.props.match.params.coursesId===undefined){
+ this.props.history.push("/courses");
+ }else{
+ this.props.history.push(`/courses/${this.props.match.params.coursesId}`);
+ }
+ // window.history.go(-1)
}
onCheckAllChange = (e) => {
diff --git a/public/react/src/modules/home/shixunsHome.js b/public/react/src/modules/home/shixunsHome.js
index 780691e6c..5400368ec 100644
--- a/public/react/src/modules/home/shixunsHome.js
+++ b/public/react/src/modules/home/shixunsHome.js
@@ -361,7 +361,7 @@ class ShixunsHome extends Component {
- {item.name}
+ {item.username}
)
@@ -375,7 +375,7 @@ class ShixunsHome extends Component {
- {item.name}
+ {item.username}
)
@@ -389,7 +389,7 @@ class ShixunsHome extends Component {
- {item.name}
+ {item.username}
)
@@ -405,7 +405,7 @@ class ShixunsHome extends Component {
- {item.name}
+ {item.username}
)
@@ -437,7 +437,7 @@ class ShixunsHome extends Component {
- {item.name}
+ {item.username}
)
@@ -451,7 +451,7 @@ class ShixunsHome extends Component {
- {item.name}
+ {item.username}
)
@@ -465,7 +465,7 @@ class ShixunsHome extends Component {
- {item.name}
+ {item.username}
)
@@ -481,7 +481,7 @@ class ShixunsHome extends Component {
- {item.name}
+ {item.username}
)
diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js
index c9404a792..68113f133 100644
--- a/public/react/src/modules/tpm/TPMBanner.js
+++ b/public/react/src/modules/tpm/TPMBanner.js
@@ -39,7 +39,7 @@ class TPMBanner extends Component {
this.state={
Forkvisible: false,
Senttothetype:false,
- Senttothevcalue:1,
+ Senttothevcalue:undefined,
courses_count:1,
course_list:[],
pagenum:1,
@@ -62,6 +62,7 @@ class TPMBanner extends Component {
isIE:false,
Forkvisibletype: false,
isSpin:false,
+ Senttothevcaluetype:false
}
}
@@ -233,12 +234,21 @@ class TPMBanner extends Component {
});
}
sendeSenttothevcalue=()=>{
+
let {Senttothevcalue}=this.state;
+
+ if(Senttothevcalue===undefined){
+ this.setState({
+ Senttothevcaluetype:true
+ })
+ return
+ }
let id = this.props.match.params.shixunId;
let url="/shixuns/" + id +"/send_to_course.json";
axios.post(url,{
course_id:Senttothevcalue
}).then((response) => {
+
this.props.showSnackbar(response.data.message);
this.setState({
Senttothetype:false,
@@ -466,6 +476,7 @@ class TPMBanner extends Component {
shixunsreplace,
hidestartshixunsreplacevalue,
Forkvisibletype,
+ Senttothevcaluetype,
isIE} = this.state;
let {shixunsDetails, shixunId, star_info, star_infos} = this.props;
let challengeBtnTipText = '';
@@ -839,7 +850,7 @@ class TPMBanner extends Component {
/>
-