Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

topic_bank
cxt 5 years ago
commit 55ab874409

@ -287,7 +287,7 @@ class BoardsNew extends Component{
const isAdmin = this.props.isAdmin() const isAdmin = this.props.isAdmin()
const courseId=this.props.match.params.coursesId; const courseId=this.props.match.params.coursesId;
const boardId = this.props.match.params.boardId const boardId = this.props.match.params.boardId
const isCourseEnd = this.props.isCourseEnd()
return( return(
<div className="newMain "> <div className="newMain ">
<AddDirModal {...this.props} <AddDirModal {...this.props}
@ -381,7 +381,7 @@ class BoardsNew extends Component{
<div> <div>
{menu} {menu}
{ {
isAdmin && isAdmin && !isCourseEnd &&
<React.Fragment> <React.Fragment>
<Divider style={{ margin: '4px 0' }} /> <Divider style={{ margin: '4px 0' }} />
<div style={{ padding: '8px', cursor: 'pointer' }} onMouseDown={() => this.refs['addDirModal'].open()}> <div style={{ padding: '8px', cursor: 'pointer' }} onMouseDown={() => this.refs['addDirModal'].open()}>

@ -51,10 +51,7 @@ class Boards extends Component{
const sort_type = this.state.sort_type const sort_type = this.state.sort_type
// page_size // page_size
const url = `/boards/${bid}/messages.json?page_size=15&search=${_serachText || ''}&page=${_page}&sort=0&sort_type=${sort_type}` const url = `/boards/${bid}/messages.json?page_size=15&search=${_serachText || ''}&page=${_page}&sort=0&sort_type=${sort_type}`
axios.get(url, { axios.get(encodeURI(url)).then((response) => {
})
.then((response) => {
if (response.data.status == 0 && response.data.data) { if (response.data.status == 0 && response.data.data) {
let _newBoards = response.data.data.messages let _newBoards = response.data.data.messages
// if (_page > 1) { // if (_page > 1) {
@ -391,7 +388,7 @@ class Boards extends Component{
return <li onClick={() => this.moveTo(item)} title={item.name}>{item.name}</li> return <li onClick={() => this.moveTo(item)} title={item.name}>{item.name}</li>
}) })
} }
{ isAdmin && { isAdmin && !isCourseEnd &&
<p className="drop_down_btn"> <p className="drop_down_btn">
<a href="javascript:void(0)" className="color-grey-6" <a href="javascript:void(0)" className="color-grey-6"
onClick={()=>this.addDir()} onClick={()=>this.addDir()}

@ -124,7 +124,7 @@ class commonWork extends Component{
if(search!=""){ if(search!=""){
url+="&search="+search; url+="&search="+search;
} }
axios.get((url)).then((result)=>{ axios.get(encodeURI(url)).then((result)=>{
if(result.status==200){ if(result.status==200){
this.setState({ this.setState({
mainList:result.data, mainList:result.data,

@ -80,8 +80,9 @@ class AddStudentModal extends Component{
} }
setVisible = (visible) => { setVisible = (visible) => {
if (visible) { if (visible) {
this.setState({school_name: this.props.user.user_school}) this.setState({school_name: this.props.user.user_school},()=>{
this.fetchMemberList() this.fetchMemberList();
})
this.fetchOptions() this.fetchOptions()
} }
this.refs.modalWrapper.setVisible(visible) this.refs.modalWrapper.setVisible(visible)

@ -324,7 +324,7 @@ class studentsList extends Component{
if(!!searchValue){ if(!!searchValue){
url+='&search='+searchValue; url+='&search='+searchValue;
} }
axios.get((url)).then((result)=>{ axios.get(encodeURI(url)).then((result)=>{
if (result.data.students) { if (result.data.students) {
this.setState({ this.setState({
students: result.data.students, students: result.data.students,
@ -675,7 +675,7 @@ class studentsList extends Component{
) )
}) } }) }
{ course_groups && course_groups.length > 0 && <Divider className="dividerStyle"></Divider> } { course_groups && course_groups.length > 0 && <Divider className="dividerStyle"></Divider> }
{ isAdmin && { isAdmin && !isCourseEnd &&
<p className="drop_down_btn"> <p className="drop_down_btn">
<a href="javascript:void(0)" className="color-grey-6" <a href="javascript:void(0)" className="color-grey-6"

@ -112,7 +112,7 @@ class ShixunHomework extends Component{
let coursesId=this.props.match.params.coursesId; let coursesId=this.props.match.params.coursesId;
let url="/courses/"+coursesId+"/homework_commons.json?type=4"; let url="/courses/"+coursesId+"/homework_commons.json?type=4";
axios.get(url,{ axios.get(encodeURI(url),{
params: { params: {
search:undefined, search:undefined,
page:1, page:1,

@ -95,7 +95,7 @@ class DetailCardsEditAndEdit extends Component{
if(id!=0){ if(id!=0){
url+="&type="+id; url+="&type="+id;
} }
axios.get(url).then((result)=>{ axios.get(encodeURI(url)).then((result)=>{
if(result.status===200){ if(result.status===200){
this.setState({ this.setState({
ChooseShixunList:result.data, ChooseShixunList:result.data,
@ -369,7 +369,7 @@ class DetailCardsEditAndEdit extends Component{
if(type!=0){ if(type!=0){
url+="&type="+type; url+="&type="+type;
} }
axios.get(url).then((result)=>{ axios.get(encodeURI(url)).then((result)=>{
if(result.status===200){ if(result.status===200){
let list =result.data.shixun_list; let list =result.data.shixun_list;

Loading…
Cancel
Save