From a11da1841a3ddde377b2361189f6e845aa26122a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Tue, 24 Sep 2019 15:37:58 +0800
Subject: [PATCH] =?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/AppConfig.js | 20 +++----
.../modules/courses/Resource/Fileslistitem.js | 11 ++--
.../graduation/tasks/GraduateTaskItem.js | 19 ++++---
.../graduation/topics/GraduateTopicItem.js | 13 +++--
.../shixunHomework/ShixunHomeworkPage.js | 4 +-
.../shixunHomework/ShixunhomeWorkItem.js | 55 +++++++++++++++----
public/react/src/modules/login/LoginDialog.js | 20 +++----
7 files changed, 93 insertions(+), 49 deletions(-)
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index 025db7f5c..f6598a3c4 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -21,16 +21,16 @@ let hashTimeout
// TODO 开发期多个身份切换
let debugType =""
-if (isDev) {
- const _search = window.location.search;
- let parsed = {};
- if (_search) {
- parsed = queryString.parse(_search);
- }
- debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
- window.location.search.indexOf('debug=s') != -1 ? 'student' :
- window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
-}
+// if (isDev) {
+// const _search = window.location.search;
+// let parsed = {};
+// if (_search) {
+// parsed = queryString.parse(_search);
+// }
+// debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
+// window.location.search.indexOf('debug=s') != -1 ? 'student' :
+// window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
+// }
window._debugType = debugType;
export function initAxiosInterceptors(props) {
diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js
index 4e8e89567..d5c4725c3 100644
--- a/public/react/src/modules/courses/Resource/Fileslistitem.js
+++ b/public/react/src/modules/courses/Resource/Fileslistitem.js
@@ -194,6 +194,9 @@ class Fileslistitem extends Component{
text-overflow:ellipsis;
white-space:nowrap
}
+ .fileslistitemsA{
+
+ }
`}
window.$(`.sourceitem${index} input`).click() }>
this.eventStop(event)}>
@@ -205,23 +208,23 @@ class Fileslistitem extends Component{
// href={"/courses/" + coursesId + "/graduation/graduation_tasks/" + categoryid + "/" + taskid + "/list"}
onClick={()=>this.showfiles(discussMessage)}
title={discussMessage.title}
- className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title} : ""
+ className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title} : ""
}
{
this.props.isStudent? this.showfiles(discussMessage)}
title={discussMessage.title}
- className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title} :""
+ className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title} :""
}
{
this.props.isNotMember===true?
discussMessage.is_lock === true ?
- {discussMessage.title}
+ {discussMessage.title}
:this.showfiles(discussMessage)}
title={discussMessage.title}
- className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}:""
+ className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}:""
}
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js
index ef16e06a4..8ab3c3628 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js
@@ -211,26 +211,31 @@ class GraduateTaskItem extends Component{
text-overflow:ellipsis;
white-space:nowrap
}
+ .graduatetaskitemA{
+ }
`}
{
- this.props.isAdmin?{discussMessage.name}:""
+ className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
}
{
- this.props.isStudent? {discussMessage.name}:""
+ className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
}
{
this.props.isNotMember===true?this.props.discussMessage.private_icon===true?
- {discussMessage.name}
- :{discussMessage.name}
+ :{discussMessage.name}:""
+ className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
}
diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js
index bac04c699..dbcb0fc05 100644
--- a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js
+++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js
@@ -67,19 +67,24 @@ class GraduateTopicItem extends Component{
text-overflow:ellipsis;
white-space:nowrap
}
+ .GraduateTopicItemA{
+ }
`}
{
isNotMember?
- {discussMessage.name}:""
+ {discussMessage.name}:""
}
{
- isStudent? this.toDetailPage(`${discussMessage.id}`)}
- className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
+ isStudent? this.toDetailPage(`${discussMessage.id}`)}
+ className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
}
{
- isAdmin? this.toDetailPage(`${discussMessage.id}`)} className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
+ isAdmin? this.toDetailPage(`${discussMessage.id}`)} className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
}
{
discussMessage.private_icon===true?
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js
index cb0e98ac6..f130ce0b8 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js
@@ -181,9 +181,7 @@ class ShixunHomeworkPage extends Component {
const isAdmin = this.props.isAdmin();
// console.log(119)
- console.log(jobsettingsdatapage);
-
-
+ // console.log(jobsettingsdatapage);
return (
{
+ this.setState({
+ isRender:false,
+ })
+ };
+ showfiles =(url)=>{
+ // console.log("ShixunhomeWorkItemshowfiles");
+ // console.log( this.props.current_user.username);
+ try {
+ if(this.props.current_user.username==="游客"){
+ this.setState({
+ isRender:true,
+ match:"",
+ });
+ return
+ }
+ }catch (e) {
+ }
+ this.props.history.push(url);
+ // this.props.current_user
+
+ };
render(){
let {
Modalstype,
@@ -158,7 +182,7 @@ class ShixunhomeWorkItem extends Component{
startshixunCombattype,
shixunsmessage,
startbtn,
-
+ isRender,
} = this.state;
const { checkBox,
@@ -179,6 +203,12 @@ class ShixunhomeWorkItem extends Component{
cannerNavmoda={()=>this.cannerNavmoda()}
/>
:""}
+ {isRender===true?this.Modifyloginvalue()}
+ {...this.props}
+ {...this.state}
+ />:""}
+
{/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/}
{
- this.props.isAdmin?{discussMessage.name}:""
+ this.props.isAdmin?this.showfiles("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")}
+ title={discussMessage.name}
+ className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
}
{
- this.props.isStudent? this.showfiles(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)}
title={discussMessage.name}
- className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
+ className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
}
{
this.props.isNotMember===true? this.props.discussMessage.private_icon===true?
- {discussMessage.name}
- : {discussMessage.name}
+ : this.showfiles(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)}
title={discussMessage.name}
- className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
+ className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
}
diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js
index 2521a96d2..09a836a56 100644
--- a/public/react/src/modules/login/LoginDialog.js
+++ b/public/react/src/modules/login/LoginDialog.js
@@ -398,19 +398,19 @@ class LoginDialog extends Component {
});
}
handleDialogClose = () => {
- // https://www.trustie.net/issues/24441
- // console.log(JSON.stringify(this.props));
- // console.log("handleDialogClose");
- // console.log(this.props.match);
- // if(this.props.match===undefined){
- // window.location.href="/";
- // }else{
- // this.props.history.goBack();
+ // this.setState({
+ // isRender:true,
+ // match:"",
+ // });
+ // 上头像上面传个""就不是undefined了 就会不隐藏了
+ if(this.props.match===undefined){
+ window.location.href="/";
+ }else{
this.setState({
isRender: false
- });
+ })
this.props.Modifyloginvalue();
- // }
+ }
// this.setState({
// isRender: false
// })