From 47e4342516e03109cff435b0a077959c7d3ec100 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Sat, 7 Sep 2019 17:29:59 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E9=87=8D=E5=A4=8D=E6=8F=90?=
=?UTF-8?q?=E4=BA=A4=E6=8B=A6=E6=88=AA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/courses/new/CoursesNew.js | 39 +++++++++++++----
.../src/modules/courses/new/Goldsubject.js | 42 ++++++++++++-------
public/react/src/modules/paths/PathNew.js | 29 +++++++++++--
.../src/modules/tpm/newshixuns/Newshixuns.js | 19 +++++++--
.../modules/tpm/newshixuns/css/Newshixuns.css | 6 +++
5 files changed, 106 insertions(+), 29 deletions(-)
diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js
index 4c020d7d4..b2b42dad3 100644
--- a/public/react/src/modules/courses/new/CoursesNew.js
+++ b/public/react/src/modules/courses/new/CoursesNew.js
@@ -48,7 +48,8 @@ class CoursesNew extends Component {
addonAfteronelenone:0,
addonAfteronelentwo:0,
bordebool:false,
- smallspinning:false
+ smallspinning:false,
+ bottonloading:false
}
}
componentDidMount() {
@@ -217,7 +218,9 @@ class CoursesNew extends Component {
if (!err) {
-
+ this.setState({
+ bottonloading:true
+ })
// console.log('Received values of form: ', values);
@@ -240,7 +243,7 @@ class CoursesNew extends Component {
if (response.data.status === 0) {
// this.goback()
- window.location.href=first_category_url;
+ window.location.href=first_category_url;
if(this.state.boolxinjian===true) {
var yslGuideone = window.localStorage.getItem('yslGuideone');
try {
@@ -257,11 +260,19 @@ class CoursesNew extends Component {
}
}
- }
+ }else{
+ this.setState({
+ bottonloading:false
+ })
+ }
}).catch((error) => {
console.log(error)
})
- }
+ }else{
+ this.setState({
+ bottonloading:false
+ })
+ }
});
} else {
this.props.form.validateFields((err, values) => {
@@ -283,6 +294,9 @@ class CoursesNew extends Component {
// debugger
//新建
// console.log('Received values of form: ', values);
+ this.setState({
+ bottonloading:true
+ })
let url = "/courses.json";
axios.post(url, {
@@ -300,6 +314,7 @@ class CoursesNew extends Component {
).then((response) => {
if (response.status === 200) {
// this.goback
+
window.location.href=response.data.first_category_url;
if(this.state.boolxinjian===true){
var yslGuideone = window.localStorage.getItem('yslGuideone');
@@ -318,11 +333,19 @@ class CoursesNew extends Component {
}
- }
+ }else{
+ this.setState({
+ bottonloading:false
+ })
+ }
}).catch((error) => {
console.log(error)
})
- }
+ }else{
+ this.setState({
+ bottonloading:false
+ })
+ }
});
}
@@ -934,7 +957,7 @@ class CoursesNew extends Component {
-