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

issues25489
cxt 5 years ago
commit b633580051

@ -421,7 +421,7 @@ class Selectresource extends Component{
<Radio style={radioStyle} value={0}>
立即发布
</Radio>
<Radio style={radioStyle} value={1} className={"fl"}>
<Radio style={radioStyle} value={1} className={"fl"} disabled={this.props.isStudent()}>
<span className={"mr5"}>延迟发布</span>
<DatePicker
dropdownClassName="hideDisable"

@ -529,7 +529,7 @@ class Selectsetting extends Component{
<Radio style={radioStyle} value={0}>
立即发布
</Radio>
<Radio style={radioStyle} value={1} className={"fl"}>
<Radio style={radioStyle} value={1} className={"fl"} disabled={this.props.isStudent()}>
<span className={"mr5"}>延迟发布</span>
<DatePicker

@ -263,6 +263,8 @@ class Sendresource extends Component{
height: '30px',
lineHeight: '30px',
};
return(
<div>
{/*提示*/}
@ -396,7 +398,7 @@ class Sendresource extends Component{
<Radio style={radioStyle} value={0}>
立即发布
</Radio>
<Radio style={radioStyle} value={1} className={"fl"}>
<Radio style={radioStyle} value={1} className={"fl"} disabled={this.props.isStudent()}>
<span className={"mr5"}>延迟发布</span>
<DatePicker

@ -296,23 +296,15 @@ class SingleEditor extends Component{
}) }
<div className="mb20">
{/* {!exerciseIsPublish && <ActionBtn style="grey" className="middle mr20" onClick={this.addOption}>新增选项</ActionBtn>} */}
{answerTagArray && !!answerTagArray.length ? "" :
<span
style={{color: '#FF6800'}}>{'温馨提示:点击选项输入框可设置答案;选中的选项即为正确答案,选择多个答案即为多选题'}</span>
}
<span
style={{color: '#FF6800'}}>{!exerciseIsPublish ? '温馨提示:点击选项输入框可设置答案;选中的选项即为正确答案,选择多个答案即为多选题' : ' '}</span>
{ answerTagArray && !!answerTagArray.length ?
<div style={{
display: "flex",
flexDirection: "row-reverse"
}}>
<React.Fragment>
<span className="fr color-orange">{answerTagArray.join(' ')}</span>
<span className="fr">标准答案</span>
</React.Fragment>
</div>
<React.Fragment>
<span className="fr color-orange">{answerTagArray.join(' ')}</span>
<span className="fr">标准答案</span>
</React.Fragment>
:
""
<span className="fr color-orange">请点击正确选项</span>
}
</div>

@ -1224,7 +1224,7 @@ submittojoinclass=(value)=>{
}
{
this.props.Headertop && this.props.Headertop.laboratory_user &&
<li><a href="/cooperative">后台管理</a></li>
<li><a href="/admins">后台管理</a></li>
}
<li><a href={`/account/profile`}>账号管理</a></li>

@ -38,6 +38,7 @@ class AccountSecure extends Component {
}
return flag;
}
componentDidMount() {
let {basicInfo}=this.props;
let {list}=this.state;
@ -47,7 +48,7 @@ class AccountSecure extends Component {
}else{
basicInfo&&basicInfo.open_users.map((item,key)=>{
newlist.map((items,keys)=>{
if(item.en_type===items.en_type){
if(items.en_type===item.en_type){
items.id=item.id;
items.nickname=item.nickname;
}
@ -60,6 +61,30 @@ class AccountSecure extends Component {
})
}
componentDidUpdate=(prevProps)=>{
if(prevProps!=this.props){
let {basicInfo}=this.props;
let {list}=this.state;
let newlist=list;
if(basicInfo===undefined||JSON.stringify(basicInfo) == "{}"||basicInfo&&basicInfo.open_users.length===0){
}else{
basicInfo&&basicInfo.open_users.map((item,key)=>{
newlist.map((items,keys)=>{
if(items.en_type===item.en_type){
items.id=item.id;
items.nickname=item.nickname;
}
})
})
}
this.setState({
list:newlist
})
}
}
showModal=()=>{
this.setState({
visible: true,
@ -86,11 +111,21 @@ class AccountSecure extends Component {
})
}
Saveundologin=(id)=>{
Saveundologin=(type,id)=>{
let {basicInfo}=this.props;
let {list}=this.state;
let newlist=list;
let url=`/users/accounts/${basicInfo.id}/open_users/${id}.json`;
axios.delete(url).then((result)=>{
if(result.data.status===0){
newlist.map((item,key)=>{
if(item.en_type===type){
item.id=null
}
})
this.setState({
list:newlist
})
this.props.showNotification('解绑成功');
this.Cancelundologins()
this.props.getBasicInfo()
@ -105,7 +140,7 @@ class AccountSecure extends Component {
Modalstype:true,
Modalstopval:type==="wechat"?"是否确定解绑微信账号?":"是否确定解绑QQ账号",
ModalCancel:this.Cancelundologins,
ModalSave:()=>this.Saveundologin(id),
ModalSave:()=>this.Saveundologin(type,id),
})
}
openqqlogin=()=>{
@ -120,6 +155,7 @@ class AccountSecure extends Component {
render() {
let flag = this.IsPC(); //true为PC端false为手机端
let {list}=this.state;
console.log(window.location.host)
return (
<div>
<div className="basicForm settingForm">
@ -217,7 +253,7 @@ class AccountSecure extends Component {
</div>
<div className="description lineheight60">
<span className={"color-grey-9 ml80"}>{item.nickname}</span>
<span className={"color-grey-9 ml80"}>{item.id===null?"":item.nickname}</span>
</div>
<div className="status pt19">
@ -227,7 +263,7 @@ class AccountSecure extends Component {
}
>{item.id===null?"绑定":"解绑"}</WordsBtn>:<WordsBtn style={ item.id===null?"blue":"colorgrey9"} className={item.id===null?"borderBottom":""}
onClick={
item.id===null?flag===true?() => this.openphoneqqlogin():() => this.openqqlogin():() => this.undologin("qq",item.id)
item.id===null?flag===true?() => this.openqqlogin():() => this.openphoneqqlogin():() => this.undologin("qq",item.id)
}
>{item.id===null?"绑定":"解绑"}</WordsBtn>}
</div>

@ -180,6 +180,12 @@ class InfosCourse extends Component{
.whitepanelysllis {
width: 66px !important;
height: 48px !important;
line-height: 46px !important;
margin-left: 40px !important;
}
.whitepanelysllik {
width: 80px !important;
height: 48px !important;
line-height: 46px !important;
margin-left: 40px !important;
@ -207,11 +213,11 @@ class InfosCourse extends Component{
<li className={category ? " font-16 whitepanelyslli" : "active font-16 whitepanelyslli"}><a
href="javascript:void(0)" onClick={() => this.changeCategory()} className="font-16 w32">全部</a></li>
<li className={category == "manage" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("manage")}
className="font-16 w66">{is_current ? "我" : "TA"}管理的</a></li>
href="javascript:void(0)" onClick={() => this.changeCategory("manage")}
className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}管理的</a></li>
<li className={category == "study" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("study")}
className="font-16 w66">{is_current ? "我" : "TA"}学习的</a></li>
href="javascript:void(0)" onClick={() => this.changeCategory("study")}
className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}学习的</a></li>
</div>
<style>
@ -242,11 +248,12 @@ class InfosCourse extends Component{
href="javascript:void(0)" onClick={() => this.changeStatus("end")} className="w66">已结束</a></li>
</div>
}
<p className="pl25 pr25 clearfix font-12 " style={{
<p className=" clearfix font-12 " style={{
lineHeight: "41px",
marginTop: "10px",
}}>
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"课堂"}</span>
<sapn className="relativef fr"
<sapn className="relativef color-grey-9 fr"
style={{
display: "flex",
flexDirection: "column",

@ -216,10 +216,10 @@ class InfosPath extends Component{
href="javascript:void(0)" onClick={() => this.changeCategory()} className="font-16 w32">全部</a></li>
<li className={category == "manage" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("manage")}
className="font-16 w66">{is_current ? "我" : "TA"}管理的</a></li>
className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}管理的</a></li>
<li className={category == "study" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("study")}
className="font-16 w66">{is_current ? "我" : "TA"}学习的</a></li>
className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}学习的</a></li>
</div>
<style>
@ -264,11 +264,12 @@ class InfosPath extends Component{
href="javascript:void(0)" onClick={() => this.changeStatus("finished")} className="w60">已完成</a></li>
</div>
}
<div className="pl25 pr25 clearfix font-12 " style={{
<div className="clearfix font-12 " style={{
lineHeight: "41px",
marginTop: "10px",
}}>
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"实践课程"}</span>
<sapn className="relativef fr"
<sapn className="relativef color-grey-9 fr"
style={{
display: "flex",
flexDirection: "column",

@ -217,10 +217,10 @@ class InfosProject extends Component{
href="javascript:void(0)" onClick={() => this.changeCategory()} className="font-16 w32">全部</a></li>
<li className={category == "manage" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("manage")}
className="font-16 w66">{is_current ? "我" : "TA"}管理的</a></li>
className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}管理的</a></li>
<li className={category == "study" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("study")}
className="font-16 w66">{is_current ? "我" : "TA"}学习的</a></li>
className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}学习的</a></li>
</div>
<style>
{
@ -250,11 +250,12 @@ class InfosProject extends Component{
href="javascript:void(0)" onClick={() => this.changeStatus("personal")} className=" w60">私有</a></li>
</div>
}
<p className="pl25 pr25 clearfix font-12 " style={{
<p className="clearfix font-12 " style={{
lineHeight: "41px",
marginTop: "10px",
}}>
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"项目"}</span>
<sapn className="relativef fr"
<sapn className="relativef color-grey-9 fr"
style={{
display: "flex",
flexDirection: "column",

@ -217,10 +217,10 @@ class InfosShixun extends Component{
href="javascript:void(0)" onClick={() => this.changeCategory()} className="font-16 w32">全部</a></li>
<li className={category == "manage" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("manage")}
className="font-16 w66">{is_current ? "我" : "TA"}管理的</a></li>
className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}管理的</a></li>
<li className={category == "study" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("study")}
className="font-16 w66">{is_current ? "我" : "TA"}学习的</a></li>
className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}学习的</a></li>
</div>
<style>
{
@ -267,11 +267,12 @@ class InfosShixun extends Component{
href="javascript:void(0)" onClick={() => this.changeStatus("passed")} className="w60">已通关</a></li>
</div>
}
<div className="pl25 pr25 clearfix font-12 " style={{
<div className=" clearfix font-12 " style={{
lineHeight: "41px",
marginTop: "10px",
}}>
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"实训"}</span>
<sapn className="relativef fr"
<sapn className="relativef color-grey-9 fr"
style={{
display: "flex",
flexDirection: "column",

@ -451,3 +451,7 @@
.w60 {
width: 60px !important;
}
.w80 {
width: 80px !important;
}

@ -346,8 +346,8 @@ function InfoVideo (props) {
marginRight: " 5px",
}}>{"最新上传"}</span>
<sapn className="relativef fr"
style={{
<sapn className="relativef color-grey-9 fr"
style={{
display: "flex",
flexDirection: "column",
height: "40px",

Loading…
Cancel
Save