diff --git a/public/react/src/modules/courses/gradinforms/Eduinforms.js b/public/react/src/modules/courses/gradinforms/Eduinforms.js
index 6e172977a..f52471094 100644
--- a/public/react/src/modules/courses/gradinforms/Eduinforms.js
+++ b/public/react/src/modules/courses/gradinforms/Eduinforms.js
@@ -58,7 +58,7 @@ class Eduinforms extends Component{
}
this.getinputdatas(dataqueryss);
}
-
+ //截取数据
foo=(url)=> {
var json = {};
var regExp = /[\?\&](\w+)(=?)(\w*)/g;
@@ -131,14 +131,14 @@ class Eduinforms extends Component{
})
});
}
- getinputdatas=(dataquerys)=>{
+ getinputdatas=(yslwebobject)=>{
this.setState({
isSpin:true,
})
let url = `/courses/${this.props.match.params.coursesId}/informs.json`;
//
axios.get(url,
- {params:dataquerys}
+ {params:yslwebobject}
).then((response) => {
if(response){
if(response.data){
diff --git a/public/react/src/modules/paths/Index.js b/public/react/src/modules/paths/Index.js
index 0f3bd349b..813251d28 100644
--- a/public/react/src/modules/paths/Index.js
+++ b/public/react/src/modules/paths/Index.js
@@ -43,7 +43,7 @@ class Index extends Component{
()}
>
-
+ {/*编辑页面*/}
()}
>
diff --git a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js
index 16c7d43c3..c04c74e87 100644
--- a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js
+++ b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js
@@ -146,11 +146,114 @@ class PathDetailIndex extends Component{
}
componentDidMount(){
- this.getdatasindex()
+ const query = this.props.location.search;
+ // const type = query.split('?chinaoocTimestamp=');
+ // console.log("Eduinforms12345");
+ // console.log(this.foo(query));
+ // console.log(JSON.stringify(this.foo(query)));
+ var dataqueryss={}
+ try {
+ var foqus=this.foo(query);
+ if(JSON.stringify(foqus) ==="{}"){
+ this.setState({
+ dataquerys:{},
+ });
+ return
+ }
+ this.setState({
+ dataquerys:foqus,
+ });
+ dataqueryss=foqus;
+ }catch (e) {
+ this.setState({
+ dataquerys:{},
+ })
+ }
+ this.getdatasindexs(undefined,dataqueryss)
+ }
+ //截取url 数据的
+ foo=(url)=> {
+ var json = {};
+ var regExp = /[\?\&](\w+)(=?)(\w*)/g;
+ var arr;
+ do {
+ arr = regExp.exec(url);
+ // console.log(arr); // arr = [完整的字符串, key, 等号或'', value或'']
+
+ if (arr) {
+ var key = arr[1];
+ var value = arr[3];
+ // arr[2] === ''时, value = undefined
+ if (!arr[2])
+ value = undefined;
+
+ json[key] = value;
+ }
+ } while (arr);
+
+ return json;
}
+ getdatasindexs=(key,yslwebobject)=>{
+ // yslwebobject 后端需要的接口
+ let pathid=this.props.match.params.pathId;
+ let url="/paths/"+pathid+".json";
+ axios.get(url,
+ {params:yslwebobject}
+ ).then((result)=>{
+ if (result.data.status === 407 || result.data.status === 401) {
+ debugger
+ return;
+ }
+
+ if (result.data.status === 403) {
+ debugger
+ // window.location.href = "/403";
+ return;
+ }
+ configShareForCustom(result.data.name, result.data.description)
+
+ if(result.data.allow_visit===true){
+ this.setState({
+ detailInfoList:result.data,
+ courses:result.data.courses,
+ pathtopskey:key===undefined?1:key,
+ // items: getItems(result.data.members.length),
+ })
+ }
- getdatasindex=(key)=>{
+ }).catch((error)=>{
+ console.log(error);
+ })
+
+ let righturl="/paths/"+pathid+"/right_banner.json";
+ axios.get(righturl).then((result)=>{
+ if (result.data.status === 407 || result.data.status === 401) {
+ debugger
+ return;
+ }
+
+ if (result.data.status === 403) {
+ debugger
+ // window.location.href = "/403";
+ return;
+ }
+
+ this.setState({
+ // detailInfoList:result.data,
+ tags:result.data.tags,
+ progress:result.data.progress,
+ members:result.data.members,
+ items: getItems(result.data.members.length),
+ })
+
+ }).catch((error)=>{
+ console.log(error);
+ })
+ };
+
+ getdatasindex=(key,yslwebobject)=>{
+ // yslwebobject 后端需要的接口
let pathid=this.props.match.params.pathId;
let url="/paths/"+pathid+".json";
axios.get(url).then((result)=>{
@@ -177,7 +280,7 @@ class PathDetailIndex extends Component{
}).catch((error)=>{
console.log(error);
- })
+ });
let righturl="/paths/"+pathid+"/right_banner.json";