From f049d7763c066101b30ac397f8b105f2b7637f44 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Wed, 24 Jul 2019 15:40:08 +0800
Subject: [PATCH 1/6] addSuc
---
.../src/modules/user/account/AccountBasicEdit.js | 11 ++++++++++-
.../src/modules/user/modal/ApplyForAddOrgModal.js | 1 +
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js
index 8af24022d..13741fd5b 100644
--- a/public/react/src/modules/user/account/AccountBasicEdit.js
+++ b/public/react/src/modules/user/account/AccountBasicEdit.js
@@ -273,6 +273,14 @@ class AccountBasic extends Component {
}
}
+ addOrgSuccess = (name) => {
+ const schoolList = this.state.schoolList.slice(0)
+ schoolList.push({ id: schoolList.length + 2000, name: name})
+ this.setState({ schoolList })
+ this.props.form.setFieldsValue({
+ name: name
+ })
+ }
showApplyForAddOrgModal = () => {
this.applyForAddOrgForm.setVisible(true)
@@ -309,7 +317,8 @@ class AccountBasic extends Component {
return (
this.applyForAddOrgForm = form} schoolName={school}
- {...propsWithoutForm}>
+ {...propsWithoutForm} addOrgSuccess={this.addOrgSuccess}
+ >
this.applyForAddChildOrgForm = form} >
diff --git a/public/react/src/modules/user/modal/ApplyForAddOrgModal.js b/public/react/src/modules/user/modal/ApplyForAddOrgModal.js
index 95cfa9105..72ae542c6 100644
--- a/public/react/src/modules/user/modal/ApplyForAddOrgModal.js
+++ b/public/react/src/modules/user/modal/ApplyForAddOrgModal.js
@@ -48,6 +48,7 @@ class ApplyForAddOrgModal extends Component{
}).then((result)=>{
if(result){
this.props.showNotification("新增学校/单位成功!");
+ this.props.addOrgSuccess(values.schoolName)
this.setVisible(false);
}
}).catch((error)=>{
From 42c2cc50cb2099dd8630806ebc3da9bff0e087fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Wed, 24 Jul 2019 18:02:32 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/courses/new/CoursesNew.js | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js
index 149f9bc27..87b6c63ab 100644
--- a/public/react/src/modules/courses/new/CoursesNew.js
+++ b/public/react/src/modules/courses/new/CoursesNew.js
@@ -46,7 +46,8 @@ class CoursesNew extends Component {
let coursesId = this.props.match.params.coursesId;
let user_school=this.props.current_user&&this.props.current_user.user_school;
-
+ this.getschool("")
+ this.Searchvalue("")
if (coursesId != undefined) {
let url = "/courses/" + coursesId + "/settings.json"
axios.get(url).then((result) => {
@@ -85,8 +86,7 @@ class CoursesNew extends Component {
})
}
- this.getschool("")
- this.Searchvalue("")
+
}
componentDidUpdate(prevProps){
@@ -292,7 +292,8 @@ class CoursesNew extends Component {
search:value
}).then((result)=>{
// console.log(result.data)
- if (result.data.status===0) {
+ if (result.data.message===undefined) {
+
this.setState({
searchlist: result.data.course_lists,
// course:value,
@@ -357,7 +358,9 @@ class CoursesNew extends Component {
};
getschool=(value)=>{
-
+ this.props.form.setFieldsValue({
+ school: value
+ })
let url="/schools/school_list.json";
axios.get(url,{
params: {
@@ -369,9 +372,7 @@ class CoursesNew extends Component {
searchlistscholl: result.data.school_names,
school: value
})
- this.props.form.setFieldsValue({
- school: value
- })
+
}
}).catch((error)=>{
console.log(error)
@@ -389,7 +390,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(optionschool)
+ console.log(options)
return (
From 4b388e090b74a950e4dfb5be88fb29ba1d4d90e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Wed, 24 Jul 2019 18:02:59 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/user/Interestpage.js | 2 ++
public/react/src/modules/user/InterestpageMax.js | 8 +++-----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/public/react/src/modules/user/Interestpage.js b/public/react/src/modules/user/Interestpage.js
index dbca5a242..1054d620e 100644
--- a/public/react/src/modules/user/Interestpage.js
+++ b/public/react/src/modules/user/Interestpage.js
@@ -192,6 +192,8 @@ class InterestpageComponent extends Component {
ints.push(this.state.gouxuans4[i].id);
}
}
+ console.log("195195");
+ console.log(ints);
if(ints.length<1){
this.openNotification("请至少选择一个您感兴趣的内容");
return
diff --git a/public/react/src/modules/user/InterestpageMax.js b/public/react/src/modules/user/InterestpageMax.js
index e0585ed33..6dc182154 100644
--- a/public/react/src/modules/user/InterestpageMax.js
+++ b/public/react/src/modules/user/InterestpageMax.js
@@ -182,10 +182,6 @@ class InterestpageMax extends Component {
//兴趣页面点击
Interestcompletionpage(){
-
- this.setState({
- setpagecomplet:true
- })
if(this.state.gouxuans.length === 0){
this.openNotification("请选择职业");
return
@@ -197,6 +193,8 @@ class InterestpageMax extends Component {
ints.push(this.state.gouxuans4[i].id);
}
}
+ console.log("200200");
+ console.log(ints);
if(ints.length<1){
this.openNotification("请至少选择一个您感兴趣的内容");
return
@@ -302,7 +300,7 @@ class InterestpageMax extends Component {
)
})}
-