杨树林 6 years ago
commit a60cb218ea

@ -63,6 +63,15 @@ class CoursesBanner extends Component {
console.log(e)
}
}
componentDidUpdate = (prevProps) => {
if(prevProps.current_user!=this.props.current_user){
if(this.props.current_user!==undefined){
this.setState({
user_phone_binded :this.props.current_user.user_phone_binded,
})
}
}
}
onloadupdatabanner=()=>{
this.updatabanner()
@ -344,16 +353,7 @@ class CoursesBanner extends Component {
render() {
let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state;
try {
if(this.props.current_user!==undefined){
this.setState({
user_phone_binded :this.props.current_user.user_phone_binded,
})
}
}catch (e) {
console.log("CoursesBanner 354")
console.log(e)
}
return (
<div>
<Trialapplication {...this.state} user_phone_binded={user_phone_binded} ></Trialapplication>

@ -1,5 +1,5 @@
import React,{ Component } from "react";
import { Input,Checkbox,Table, Pagination, Modal,Menu ,Spin} from "antd";
import { Input,Checkbox,Table, Pagination, Modal,Menu ,Spin, Tooltip} from "antd";
import ClipboardJS from 'clipboard'
import '../css/Courses.css'
import '../css/members.css'
@ -31,14 +31,6 @@ const dataSource = [{
const buildColumns = (that) => {
const columns=[{
title: '',
dataIndex: 'check',
key: 'check',
render: (text, item) => {
return <Checkbox value={item.course_member_id}></Checkbox>
},
width:"5%"
},{
title: '序号',
dataIndex: 'id',
key: 'id',
@ -71,6 +63,19 @@ const buildColumns = (that) => {
width:"50%",
className:"color-grey-6"
}];
const isAdmin = that.props.isAdmin()
if (isAdmin) {
columns.unshift({
title: '',
dataIndex: 'check',
key: 'check',
render: (text, item) => {
return <Checkbox value={item.course_member_id}></Checkbox>
},
width:"5%"
})
}
return columns;
}
@ -445,7 +450,14 @@ class studentsList extends Component{
<span className="color-orange font-16">
{invite_code}
</span>
<Tooltip title={<div>
<div>成员可以通过邀请码主动加入课堂</div>
<div>点击立刻复制邀请码</div>
</div>}>
<span>
<i class="iconfont icon-fuzhi font-14 ml10 copybtn" style={{color: '#FF6800', cursor: 'pointer', verticalAlign: 'baseline'}} data-clipboard-text={invite_code} ></i>
</span>
</Tooltip>
</React.Fragment>
}
@ -528,7 +540,7 @@ class studentsList extends Component{
total_count > 0 ?
<div className="mt20 edu-back-white padding20">
<div className="clearfix stu_head" style={{paddingLeft: '15px'}}>
<Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue} >已选 {checkBoxValues.length} </Checkbox>
{isAdmin && <Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue} >已选 {checkBoxValues.length} </Checkbox>}
<div className="studentList_operation_ul">
{isAdmin && <li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onDelete}>删除</a></li>}
{isAdmin && <li className="li_line drop_down">

Loading…
Cancel
Save