From 92337c947934e0071603db24190d367716bb6bd0 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 25 Jul 2019 09:11:54 +0800 Subject: [PATCH 1/9] =?UTF-8?q?user=5Finfo=E4=B8=AD=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E8=AF=BE=E5=A0=82=E7=9A=84=E7=AC=AC=E4=B8=80=E4=B8=AA=E6=A8=A1?= =?UTF-8?q?=E5=9D=97url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/get_user_info.json.jbuilder | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/users/get_user_info.json.jbuilder b/app/views/users/get_user_info.json.jbuilder index fbb9778e2..164c943d0 100644 --- a/app/views/users/get_user_info.json.jbuilder +++ b/app/views/users/get_user_info.json.jbuilder @@ -14,6 +14,7 @@ if @course if params[:group_info] json.group_info @course.teacher_group(@user.id) if @course_identity < Course::STUDENT end + json.first_category_url module_url(@course.none_hidden_course_modules.first, @course) end if params[:school] From 4745a3b2804301403431d168fb98b6991a25ae73 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 25 Jul 2019 10:00:55 +0800 Subject: [PATCH 2/9] 40px --- .../modules/user/account/AccountBasicEdit.js | 6 ++-- .../src/modules/user/account/AccountSecure.js | 6 ++-- .../react/src/modules/user/account/common.css | 30 +++++++++++++++++++ 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js index 9a37f866e..1755ca365 100644 --- a/public/react/src/modules/user/account/AccountBasicEdit.js +++ b/public/react/src/modules/user/account/AccountBasicEdit.js @@ -448,9 +448,7 @@ class AccountBasic extends Component { .basicForm .cancelBtn { margin-left: 0px; } - .basicForm .ant-input-lg { - height: 32px; - } + .basicForm .ant-form-item-label { width: 100px; padding-right: 10px; @@ -576,6 +574,7 @@ class AccountBasic extends Component {
{/*
{/*
-
-
- {coursename} + {coursename} > 毕设任务 > diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 291095008..d773d8411 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -57,11 +57,15 @@ class GraduationTaskssettinglist extends Component{ let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search}=this.state; this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,this.state.page); } + goback=()=>{ // window.history.back(-1) let courseId=this.props.match.params.coursesId; - let category_id=this.props.match.params.category_id; - window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id; + if(courseId===undefined){ + this.props.history.push("/courses"); + }else{ + this.props.history.push(this.props.current_user.first_category_url); + } } @@ -1058,7 +1062,7 @@ class GraduationTaskssettinglist extends Component{
- {taskslistdata.course_name} + {taskslistdata.course_name} > {taskslistdata.graduation_name} > diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js index dee8f0c91..1bf6eb962 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js @@ -55,7 +55,12 @@ class GraduationTasksquestions extends Component{ // let courseId=this.props.match.params.coursesId; // let category_id=this.props.match.params.category_id; // window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id; - window.history.go(-1) + let courseId = this.props.match.params.coursesId; + if(courseId===undefined){ + this.props.history.push("/courses"); + }else{ + this.props.history.push(this.props.current_user.first_category_url); + } } end=()=>{ @@ -300,7 +305,7 @@ class GraduationTasksquestions extends Component{
- {questionslist.course_name}
+ {questionslist.course_name}
>
{questionslist.graduation_name}
>
diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js
index 6e996297b..fce6cd732 100644
--- a/public/react/src/modules/courses/new/CoursesNew.js
+++ b/public/react/src/modules/courses/new/CoursesNew.js
@@ -28,6 +28,7 @@ function disabledDateTime() {
};
}
+
class CoursesNew extends Component {
constructor(props) {
@@ -191,17 +192,7 @@ class CoursesNew extends Component {
).then((response) => {
// debugger
if (response.data.status === 0) {
- // this.setState({
- // Modalstype: true,
- // Modalstopval: response.data.message,
- // ModalSave: this.cancelmodel,
- // Loadtype: true,
- // checkBoxValues: [],
- // checkAllValue: false,
- // // Realnamecertification : authentication,
- // // professional_certification: values.Professionalcertification
- // })
- window.location.href = "/courses/" + coursesId+"/students";
+ this.goback
}
}).catch((error) => {
console.log(error)
@@ -262,7 +253,7 @@ class CoursesNew extends Component {
if(this.props.match.params.coursesId===undefined){
this.props.history.push("/courses");
}else{
- this.props.history.push(`/courses/${this.props.match.params.coursesId}`);
+ this.props.history.push(this.props.current_user.first_category_url);
}
// window.history.go(-1)
}
@@ -390,7 +381,7 @@ class CoursesNew extends Component {
const optionschool = this.state.searchlistscholl&&this.state.searchlistscholl.map(z => );
// console.log(this.props.current_user.user_school)
// form合并了
- console.log(options)
+
return (
From e8b0866ff0a41f389c323a6c60c50e91855e9b1f Mon Sep 17 00:00:00 2001
From: p31729568