Merge branches 'dev_aliyun' and 'master' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_forum
杨树明 5 years ago
commit 27ad2e0906

@ -18,10 +18,9 @@ function locationurl(list){
} }
// TODO 开发期多个身份切换 // TODO 开发期多个身份切换
const debugType ="" const debugType =window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
// window.location.search.indexOf('debug=t') != -1 ? 'teacher' : window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin'
// window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin' window._debugType = debugType;
// window._debugType = debugType;
export function initAxiosInterceptors(props) { export function initAxiosInterceptors(props) {
// TODO 避免重复的请求 https://github.com/axios/axios#cancellation // TODO 避免重复的请求 https://github.com/axios/axios#cancellation

@ -91,7 +91,7 @@ class PathModal extends Component{
this.setState({ this.setState({
type:types, type:types,
page:1, page:1,
newshixunmodallist:[] newshixunmodallist:undefined
}) })
this.funshixunpathlist(Searchvalue,types,true,1) this.funshixunpathlist(Searchvalue,types,true,1)
} }
@ -105,7 +105,7 @@ class PathModal extends Component{
SenttotheSearch=(value)=>{ SenttotheSearch=(value)=>{
this.setState({ this.setState({
page:1, page:1,
newshixunmodallist:[] newshixunmodallist:undefined
}) })
let{type}=this.state; let{type}=this.state;
this.funshixunpathlist(value,type,true,1) this.funshixunpathlist(value,type,true,1)
@ -267,12 +267,19 @@ class PathModal extends Component{
margin-top:0px !important; margin-top:0px !important;
height: 40px; height: 40px;
} }
`} `}
</style> </style>
{ newshixunmodallist&&newshixunmodallist.length===0?"":<div className="over210 pl20 pr20"
{ newshixunmodallist === undefined ? <div className="over210 pl20 pr20" style={{height:"204px"}}></div>:newshixunmodallist&&newshixunmodallist.length===0?<div className="alltask edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂时还没有相关数据哦</p></div>
</div>:<div className="over210 pl20 pr20"
onScroll={this.contentViewScrolledit} onScroll={this.contentViewScrolledit}
style={{"Height":"204px"}}> style={{height:"204px"}}>
<Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}> <Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}>
{ {

@ -82,7 +82,6 @@ class ShixunModal extends Component{
//勾选实训 //勾选实训
shixunhomeworkedit=(list)=>{ shixunhomeworkedit=(list)=>{
debugger
let newpatheditarry=[]; let newpatheditarry=[];
if (this.props.singleChoose == true) { if (this.props.singleChoose == true) {
if (list.length > 0) { if (list.length > 0) {
@ -330,7 +329,7 @@ debugger
<div className="over210 pl20 pr20" <div className="over210 pl20 pr20"
onScroll={this.contentViewScrolledit} onScroll={this.contentViewScrolledit}
style={{height:"158px"}}> >
<style> <style>
{ {
` `
@ -355,8 +354,12 @@ debugger
{/*<Loading visible={hometypepvisible} shape="dot-circle" className="newnext-loading" color='#4AC7FF'>*/} {/*<Loading visible={hometypepvisible} shape="dot-circle" className="newnext-loading" color='#4AC7FF'>*/}
<Checkbox.Group style={{ width: '100%' }} value={patheditarry} onChange={this.shixunhomeworkedit}> <Checkbox.Group style={{ width: '100%' }} value={patheditarry} onChange={this.shixunhomeworkedit}>
{ {
newshixunmodallist === undefined ? "": newshixunmodallist.map((item,key)=>{ newshixunmodallist === undefined ? "":newshixunmodallist.length===0?
console.log(item) <div className="alltask edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂时还没有相关数据哦</p></div>
</div>:newshixunmodallist.map((item,key)=>{
return( return(
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}> <div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
<li className="fl with40 edu-txt-left task-hide paddingl5 newtaskhide"> <li className="fl with40 edu-txt-left task-hide paddingl5 newtaskhide">

@ -117,7 +117,6 @@ class GraduationTasksSubmitnew extends Component{
} }
// 附件相关 START // 附件相关 START
handleChange = (info) => { handleChange = (info) => {
debugger
if (info.file.status === 'uploading') { if (info.file.status === 'uploading') {
let fileList = info.fileList; let fileList = info.fileList;
this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) }); this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) });

@ -80,7 +80,6 @@ class GraduateTopicDetailTable extends Component{
} }
sureAgreeTopic=(count)=>{ sureAgreeTopic=(count)=>{
if(count > 0){ if(count > 0){
debugger
let{tableData}=this.props; let{tableData}=this.props;
let{operationId,classesId}=this.state let{operationId,classesId}=this.state
let courseId=this.props.match.params.course_id; let courseId=this.props.match.params.course_id;
@ -118,7 +117,6 @@ class GraduateTopicDetailTable extends Component{
//切换分班 //切换分班
changeClasses=(value)=>{ changeClasses=(value)=>{
debugger
this.setState({ this.setState({
classesId:value classesId:value
}) })

@ -134,7 +134,6 @@ class CoursesNew extends Component {
let coursesId = this.props.match.params.coursesId; let coursesId = this.props.match.params.coursesId;
let {is_public,datatime} = this.state let {is_public,datatime} = this.state
// console.log(is_public) // console.log(is_public)
if (coursesId != undefined) { if (coursesId != undefined) {
// 编辑 // 编辑
@ -180,7 +179,7 @@ class CoursesNew extends Component {
name: values.classroom, name: values.classroom,
class_period: values.period, class_period: values.period,
credit: parseFloat(values.credit), credit: parseFloat(values.credit),
end_date: datatime, end_date: datatime===undefined?"":datatime,
is_public: is_public === true || is_public === 1 ? 1 : 0, is_public: is_public === true || is_public === 1 ? 1 : 0,
course_module_types: values.checkboxgroup, course_module_types: values.checkboxgroup,
authentication: this.state.Realnamecertification, authentication: this.state.Realnamecertification,
@ -234,7 +233,7 @@ class CoursesNew extends Component {
name: values.classroom, name: values.classroom,
class_period: values.period, class_period: values.period,
credit: parseFloat(values.credit), credit: parseFloat(values.credit),
end_date: datatime, end_date: datatime===undefined?"":datatime,
is_public: is_public === true || is_public === 1 ? 1 : 0, is_public: is_public === true || is_public === 1 ? 1 : 0,
course_module_types: values.checkboxgroup, course_module_types: values.checkboxgroup,
authentication: this.state.Realnamecertification, authentication: this.state.Realnamecertification,

@ -2074,7 +2074,6 @@ class PollNew extends Component {
//最小值 //最小值
HandleGradationGroupChangee = (value, index, max, length) => { HandleGradationGroupChangee = (value, index, max, length) => {
debugger
var minbool = false; var minbool = false;
var maxbool = false; var maxbool = false;
let arr = this.state.adddom; let arr = this.state.adddom;

@ -993,7 +993,7 @@ class Listofworksstudentone extends Component {
} }
axios.post(urll, datasysl).then((result) => { axios.post(urll, datasysl).then((result) => {
console.log("980000000____________________"); console.log("980000000____________________");
debugger
if(result === undefined){ if(result === undefined){
return return
} }

@ -337,6 +337,7 @@ class LoginDialog extends Component {
} }
loginEDU=()=>{ loginEDU=()=>{
let {loginValue,passValue,regular,isGoingValue}=this.state; let {loginValue,passValue,regular,isGoingValue}=this.state;
if(regular===1){ if(regular===1){
return return
@ -372,14 +373,16 @@ class LoginDialog extends Component {
this.setState({ this.setState({
isRender:false isRender:false
}) })
this.props.Modifyloginvalue();
window.location.reload(); window.location.reload();
} }
} }
try { // try {
this.props.Modifyloginvalue(); // this.props.Modifyloginvalue();
}catch (e) { // }catch (e) {
//
} // }
}).catch((error) => { }).catch((error) => {
console.log("356"); console.log("356");
console.log(error) console.log(error)

@ -298,7 +298,6 @@ class DetailCardsEditAndAdd extends Component{
//滑动到底判断 //滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
// console.log("到达底部"); // console.log("到达底部");
debugger
this.setState({ this.setState({
hometypepvisible:true hometypepvisible:true
}) })

@ -139,21 +139,20 @@ class PathDetailIndex extends Component{
let pathid=this.props.match.params.pathId; let pathid=this.props.match.params.pathId;
let url="/paths/"+pathid+".json"; let url="/paths/"+pathid+".json";
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
if (result.data.status == 407 || result.data.status == 401) { if (result.data.status === 407 || result.data.status === 401) {
return; return;
} }
if(result.data.allow_visit===true){
this.setState({ if (result.data.status === 403) {
detailInfoList:result.data, return;
items: getItems(result.data.members.length), }
})
}else{ if(result.data.allow_visit===true){
window.location.href = "/403"; this.setState({
// this.setState({ detailInfoList:result.data,
// Modalstype:true, items: getItems(result.data.members.length),
// Modalstopval:'你没有权限访问,请联系对应课程管理人员开通', })
// }) }
}
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
@ -168,6 +167,9 @@ class PathDetailIndex extends Component{
if (result.data.status == 407 || result.data.status == 401) { if (result.data.status == 407 || result.data.status == 401) {
return; return;
} }
if (result.data.status === 403 ) {
return;
}
if(result.data.allow_visit===true){ if(result.data.allow_visit===true){
this.setState({ this.setState({
@ -175,13 +177,8 @@ class PathDetailIndex extends Component{
items: getItems(result.data.members.length), items: getItems(result.data.members.length),
user_id:undefined, user_id:undefined,
}) })
}else{
window.location.href = "/403";
// this.setState({
// Modalstype:true,
// Modalstopval:'你没有权限访问,请联系对应课程管理人员开通',
// })
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })

@ -487,7 +487,6 @@ submittojoinclass=(value)=>{
} }
showSearchOpen=(e)=>{ showSearchOpen=(e)=>{
debugger
this.setState({ this.setState({
showSearchOpentype:true showSearchOpentype:true
}) })
@ -495,7 +494,6 @@ submittojoinclass=(value)=>{
} }
hideshowSearchOpen=(e)=>{ hideshowSearchOpen=(e)=>{
debugger
let {setevaluatinghides}=this.state; let {setevaluatinghides}=this.state;
if(setevaluatinghides===true){ if(setevaluatinghides===true){
this.setState({ this.setState({
@ -520,7 +518,6 @@ submittojoinclass=(value)=>{
} }
setevaluatinghides=()=>{ setevaluatinghides=()=>{
debugger
this.setState( this.setState(
{ {
setevaluatinghides:true setevaluatinghides:true
@ -602,7 +599,6 @@ submittojoinclass=(value)=>{
// rolearr:["",""], // rolearr:["",""],
// console.log("618"); // console.log("618");
// console.log(user_phone_binded); // console.log(user_phone_binded);
console.log(showSearchOpentype)
return ( return (
<div className="newHeader" id="nHeader" > <div className="newHeader" id="nHeader" >

Loading…
Cancel
Save