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 style={radioStyle} value={0}>
立即发布 立即发布
</Radio> </Radio>
<Radio style={radioStyle} value={1} className={"fl"}> <Radio style={radioStyle} value={1} className={"fl"} disabled={this.props.isStudent()}>
<span className={"mr5"}>延迟发布</span> <span className={"mr5"}>延迟发布</span>
<DatePicker <DatePicker
dropdownClassName="hideDisable" dropdownClassName="hideDisable"

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

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

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

@ -1224,7 +1224,7 @@ submittojoinclass=(value)=>{
} }
{ {
this.props.Headertop && this.props.Headertop.laboratory_user && 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> <li><a href={`/account/profile`}>账号管理</a></li>

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

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

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

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

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

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

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

Loading…
Cancel
Save