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

dev_hs
杨树明 5 years ago
commit 8f94a169a7

@ -60,20 +60,25 @@ class Bullsubdirectory extends Component{
}; };
changeTopicName = (e) => { changeTopicName = (e) => {
console.log("调用了changeTopicName"); console.log("调用了changeTopicName");
let num = parseInt(e.target.value.length); let num = e.target.value.length;
if(num>60){ if(num>60){
return; return;
} }
this.setState({ this.setState({
addonAfter: num < 0 ? 0 : num addonAfter: num < 0 ? 0 : num
}); });
this.setState({ if(num<=60){
eduintits: e.target.value this.setState({
}) eduintits: e.target.value
})
this.props.form.setFieldsValue({
eduintits: e.target.value,
});
}
this.props.form.setFieldsValue({
eduintits: e.target.value,
});
} }
handleSubmit=(e) => { handleSubmit=(e) => {
e.preventDefault(); e.preventDefault();
@ -91,11 +96,25 @@ class Bullsubdirectory extends Component{
} }
var id=this.props.match.params.coursesId var id=this.props.match.params.coursesId
var titname="";
try {
if(values.eduintits.length>0){
if( values.eduintits.length>60){
var str=values.eduintits;
titname=str.substring(0,60);
}else {
titname=values.eduintits;
}
}else {
titname=values.eduintits;
}
}catch (e) {
titname=values.eduintits;
}
var url = `/courses/${id}/update_informs.json`; var url = `/courses/${id}/update_informs.json`;
axios.post(url,{ axios.post(url,{
inform_id:this.state.id, inform_id:this.state.id,
name:values.eduintits, name:titname,
description:values.description, description:values.description,
}).then((result) => { }).then((result) => {
if(result){ if(result){
@ -103,13 +122,13 @@ class Bullsubdirectory extends Component{
if(result.data.status === 0){ if(result.data.status === 0){
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
id:this.state.id, id:this.state.id,
eduintits:values.eduintits, eduintits:titname,
description:values.description, description:values.description,
}); });
this.setState({ this.setState({
whethertoeditysl:false, whethertoeditysl:false,
id:this.state.id, id:this.state.id,
eduintits:values.eduintits, eduintits:titname,
description:values.description, description:values.description,
}); });
this.props.getinputdata(); this.props.getinputdata();
@ -192,8 +211,6 @@ class Bullsubdirectory extends Component{
{getFieldDecorator('eduintits',{ initialValue: this.state.eduintits }, { {getFieldDecorator('eduintits',{ initialValue: this.state.eduintits }, {
rules: [{ rules: [{
required: true, message: '请在此输入标题,最多60个字符', required: true, message: '请在此输入标题,最多60个字符',
}, {
max: 60, message: '最大限制为60个字符',
}], }],
})( })(
<div className="ysleduinwh"> <div className="ysleduinwh">
@ -275,7 +292,7 @@ class Bullsubdirectory extends Component{
rules: [{ rules: [{
required: true, message: '请在此输入内容,最多5000个字符', required: true, message: '请在此输入内容,最多5000个字符',
}, { }, {
max: 5000, message: '最大限制为5000个字符', len: 5000, message: '最大限制为5000个字符',
}], }],
})( })(
<TPMMDEditor ref={this.messageRef} <TPMMDEditor ref={this.messageRef}

@ -8,6 +8,8 @@ import Bullsubdirectory from "./Bullsubdirectory";
import moment from "../new/CoursesNew"; import moment from "../new/CoursesNew";
import Fileslistitem from "../Resource/Fileslistitem"; import Fileslistitem from "../Resource/Fileslistitem";
// 公告栏 // 公告栏
// var isOnComposition = false;
// const isChrome = !!window.chrome && !!window.chrome.webstore
class Eduinforms extends Component{ class Eduinforms extends Component{
constructor(props){ constructor(props){
super(props); super(props);
@ -18,7 +20,7 @@ class Eduinforms extends Component{
isSpin:true, isSpin:true,
whethertoedit:false, whethertoedit:false,
addonAfter:0, addonAfter:0,
eduintit:"", eduintits:"",
informs:[], informs:[],
yslbool:false, yslbool:false,
} }
@ -90,7 +92,7 @@ class Eduinforms extends Component{
this.setState({ this.setState({
whethertoedit:bians, whethertoedit:bians,
description:"", description:"",
eduintit:"", eduintits:"",
addonAfter:0, addonAfter:0,
}); });
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
@ -106,21 +108,51 @@ class Eduinforms extends Component{
}; };
changeTopicName = (e) => { changeTopicName = (e) => {
console.log("调用了changeTopicName"); console.log("调用了changeTopicName");
let num = parseInt(e.target.value.length); let num = e.target.value.length;
if(num>60){ if(num>60){
return; return;
} }
this.setState({ this.setState({
addonAfter: num < 0 ? 0 : num addonAfter: num < 0 ? 0 : num
}); });
this.setState({ if(num<=60){
eduintit: e.target.value this.setState({
}) eduintits: e.target.value
})
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
eduintits: e.target.value, eduintits: e.target.value,
}); });
} }
};
// handleComposition=(e)=>{
// if (e.type === 'compositionend') {
// // composition is end
// isOnComposition = false
//
// if (!isOnComposition && isChrome) {
// // fire onChange
// console.log(!isOnComposition);
// this.changeTopicName(e);
// }
// } else {
// // in composition
// isOnComposition = true
// }
// };
// handleComposition = (e) => {
// console.log(e.type + ": " + e.target.value);
// if (e.type === 'compositionend') {
// // composition is end
// const value = e.target.value;
// this.setState({ isOnComposition: false },()=>{
// // this.handleFixedChange(value);
// });
// } else {
// // in composition
// this.setState({ isOnComposition: true });
// }
// }
handleSubmit=(e) => { handleSubmit=(e) => {
e.preventDefault(); e.preventDefault();
this.props.form.validateFields((err, values) => { this.props.form.validateFields((err, values) => {
@ -137,10 +169,24 @@ class Eduinforms extends Component{
} }
var id=this.props.match.params.coursesId var id=this.props.match.params.coursesId
var titname="";
try {
if(values.eduintits.length>0){
if( values.eduintits.length>60){
var str=values.eduintits;
titname=str.substring(0,60);
}else {
titname=values.eduintits;
}
}else {
titname=values.eduintits;
}
}catch (e) {
titname=values.eduintits;
}
var url = `/courses/${id}/new_informs.json`; var url = `/courses/${id}/new_informs.json`;
axios.post(url,{ axios.post(url,{
name:values.eduintits, name:titname,
description:values.description, description:values.description,
}).then((result) => { }).then((result) => {
if(result){ if(result){
@ -172,7 +218,7 @@ class Eduinforms extends Component{
render(){ render(){
let{description,whethertoedit,addonAfter,eduintit,informs,yslbool} =this.state; let{description,whethertoedit,addonAfter,eduintits,informs,yslbool} =this.state;
const {getFieldDecorator} = this.props.form; const {getFieldDecorator} = this.props.form;
return( return(
@ -234,8 +280,6 @@ class Eduinforms extends Component{
{getFieldDecorator('eduintits', { {getFieldDecorator('eduintits', {
rules: [{ rules: [{
required: true, message: '请在此输入标题,最多60个字符', required: true, message: '请在此输入标题,最多60个字符',
}, {
max: 60, message: '最大限制为60个字符',
}], }],
})( })(
<div className="ysleduinwh"> <div className="ysleduinwh">
@ -243,12 +287,12 @@ class Eduinforms extends Component{
<span className="yslduincolorred">*</span> <span className="yslduincolorred">*</span>
</div> </div>
<div className="yslduinleft"> <div className="yslduinleft">
<Input placeholder="请在此输入标题最多60个字符" maxLength="60" <Input placeholder="请在此输入标题最多60个字符" maxLength={60}
style={{ textAlign: "left",width:"100%",}} style={{ textAlign: "left",width:"100%",}}
onInput={this.changeTopicName} onInput={this.changeTopicName}
autoComplete="off" autoComplete="off"
suffix={String(addonAfter)+"/60"} suffix={String(addonAfter)+"/60"}
value={eduintit} value={eduintits}
className="searchViewAfter"></Input> className="searchViewAfter"></Input>
</div> </div>

@ -294,7 +294,7 @@ class ShixunsHome extends Component {
{/*精选实训 改为 开发社区*/} {/*精选实训 改为 开发社区*/}
<div className="clearfix pt20 educontent pr pb20"> <div className="clearfix pt20 educontent pr pb20">
<div className="edu-txt-center"> <div className="edu-txt-center">
<p className="color-dark edu-txt-center font-24" style={{lineHeight: '30px'}}>开发社区</p> <p className="color-dark edu-txt-center font-24" style={{lineHeight: '30px'}}>实训项目</p>
<p className="color-grey-cd font-12">DEVELOPMENT COMMUNITY</p> <p className="color-grey-cd font-12">DEVELOPMENT COMMUNITY</p>
</div> </div>
<Link to={"/shixuns"} className="moreitem">更多<i className="fa fa-angle-right ml5"></i></Link> <Link to={"/shixuns"} className="moreitem">更多<i className="fa fa-angle-right ml5"></i></Link>

@ -734,7 +734,7 @@ submittojoinclass=(value)=>{
</li> </li>
<li className={`${activeShixuns === true ? 'pr active' : 'pr'}`}> <li className={`${activeShixuns === true ? 'pr active' : 'pr'}`}>
<Link to="/shixuns">开发社区</Link> <Link to="/shixuns">实训项目</Link>
<img src={getImageUrl("images/educoder/hot-h.png")} className="nav-img"> <img src={getImageUrl("images/educoder/hot-h.png")} className="nav-img">
</img> </img>
</li> </li>
@ -814,7 +814,7 @@ submittojoinclass=(value)=>{
onBlur={(e)=>this.hideshowSearchOpen(e)} onMouseLeave={()=>this.setevaluatinghides()}> onBlur={(e)=>this.hideshowSearchOpen(e)} onMouseLeave={()=>this.setevaluatinghides()}>
<Search <Search
id={"HeaderSearchs"} id={"HeaderSearchs"}
placeholder="实践课程/翻转课堂/开发社区/交流问答" placeholder="实践课程/翻转课堂/实训项目/交流问答"
onInput={()=>this.onKeywordSearchKeyDowns()} onInput={()=>this.onKeywordSearchKeyDowns()}
onSearch={(value) => this.onKeywordSearchKeyDown(value)} onSearch={(value) => this.onKeywordSearchKeyDown(value)}
// onPressEnter={this.onKeywordSearchKeyDown} // onPressEnter={this.onKeywordSearchKeyDown}
@ -862,13 +862,13 @@ submittojoinclass=(value)=>{
<span className="bor-bottom-greyE currentName task-hide">{user.username}</span> <span className="bor-bottom-greyE currentName task-hide">{user.username}</span>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/courses`}>我的课堂</Link></li> <li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/courses`}>我的课堂</Link></li>
{/* p 老师 l 学生 */} {/* p 老师 l 学生 */}
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训</Link></li> <li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训项目</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>我的实践课程</Link></li> <li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>我的实践课程</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/projects`}>我的开发项目</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/package`}>我的众包</Link></li>
<li style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.customer_management_url===null || this.props.Headertop.customer_management_url===""? 'none' : 'block'}}> <li style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.customer_management_url===null || this.props.Headertop.customer_management_url===""? 'none' : 'block'}}>
<a href={this.props.Headertop === undefined ? '' : this.props.Headertop.customer_management_url}>客户管理</a> <a href={this.props.Headertop === undefined ? '' : this.props.Headertop.customer_management_url}>客户管理</a>
</li> </li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/projects`}>我的项目</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/package`}>我的众包</Link></li>
<li><a href={`/account/profile`}>账号管理</a></li> <li><a href={`/account/profile`}>账号管理</a></li>
{/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/} {/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/}
{/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/} {/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/}
@ -903,11 +903,11 @@ submittojoinclass=(value)=>{
<div className="overPart"></div> <div className="overPart"></div>
<ul className="fl with50 edu-txt-center pr ul-leftline"> <ul className="fl with50 edu-txt-center pr ul-leftline">
{this.props.current_user&&this.props.current_user.user_identity==="学生"?"":<li><a onClick={(url)=>this.getUser("/courses/new")}>新建课堂</a></li>} {this.props.current_user&&this.props.current_user.user_identity==="学生"?"":<li><a onClick={(url)=>this.getUser("/courses/new")}>新建课堂</a></li>}
<li><a onClick={(url)=>this.getUser("/shixuns/new")}>新建实训</a></li> <li><a onClick={(url)=>this.getUser("/shixuns/new")}>新建实训项目</a></li>
{this.props.Headertop===undefined?"": {this.props.Headertop===undefined?"":
<li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li> <li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li>
} }
<li><a onClick={(url)=>this.getUser("/projects/new")} target="_blank">新建项目</a></li> <li><a onClick={(url)=>this.getUser("/projects/new")} target="_blank">新建开发项目</a></li>
</ul> </ul>
<ul className="fl with50 edu-txt-center"> <ul className="fl with50 edu-txt-center">
@ -925,7 +925,7 @@ submittojoinclass=(value)=>{
{/* /courses/join_course_multi_role */} {/* /courses/join_course_multi_role */}
<li> <li>
<a onClick={this.tojoinitem}>加入项目</a> <a onClick={this.tojoinitem}>加入开发项目</a>
</li> </li>
{tojoinitemtype===true?<Modal {tojoinitemtype===true?<Modal
keyboard={false} keyboard={false}
@ -941,7 +941,7 @@ submittojoinclass=(value)=>{
<label className="panel-form-label fl">项目邀请码</label> <label className="panel-form-label fl">项目邀请码</label>
<Input type="text" className="input-60-40 fl mt5" name="invite_code" <Input type="text" className="input-60-40 fl mt5" name="invite_code"
style={{width: '275px'}} style={{width: '275px'}}
placeholder="请输入6位项目邀请码" value={tojoinclasstitle} onInput={this.inputjoinclassvalue}/> placeholder="请输入6位开发项目邀请码" value={tojoinclasstitle} onInput={this.inputjoinclassvalue}/>
</li> </li>
<p id="none_invite_code_notice" <p id="none_invite_code_notice"

@ -141,7 +141,7 @@ export function TPMIndexHOC(WrappedComponent) {
}else if(this.props.match.path==="/nopage"){ }else if(this.props.match.path==="/nopage"){
document.title="没有找到该页面"; document.title="没有找到该页面";
}else if(this.props.match.path==="/shixuns"){ }else if(this.props.match.path==="/shixuns"){
document.title="开发社区"; document.title="实训项目";
}else if(this.props.match.path==="/paths"){ }else if(this.props.match.path==="/paths"){
document.title="实践课程"; document.title="实践课程";
}else if(this.props.match.path==="/courses"){ }else if(this.props.match.path==="/courses"){

@ -1,115 +1,115 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import {Tooltip,Menu} from 'antd'; import {Tooltip,Menu} from 'antd';
import {getImageUrl} from 'educoder'; import {getImageUrl} from 'educoder';
import "./usersInfo.css" import "./usersInfo.css"
import "../../courses/css/members.css" import "../../courses/css/members.css"
import "../../courses/css/Courses.css" import "../../courses/css/Courses.css"
import banner from '../../../images/account/infobanner.png' import banner from '../../../images/account/infobanner.png'
class InfosBanner extends Component{ class InfosBanner extends Component{
constructor(props){ constructor(props){
super(props); super(props);
} }
render(){ render(){
let { let {
data , data ,
id, id,
login, login,
moduleName, moduleName,
current_user, current_user,
}=this.props; }=this.props;
let is_current=this.props.is_current; let is_current=this.props.is_current;
let {username}= this.props.match.params; let {username}= this.props.match.params;
let {pathname}=this.props.location; let {pathname}=this.props.location;
moduleName=pathname.split("/")[3]; moduleName=pathname.split("/")[3];
return( return(
<div className="bannerPanel mb60"> <div className="bannerPanel mb60">
<div className="educontent"> <div className="educontent">
<div className="clearfix color-white mb25"> <div className="clearfix color-white mb25">
<p className="myPhoto mr20 fl"><img alt="头像" src={data && `${getImageUrl('images/'+data.avatar_url)}`}/></p> <p className="myPhoto mr20 fl"><img alt="头像" src={data && `${getImageUrl('images/'+data.avatar_url)}`}/></p>
<div className="fl"> <div className="fl">
<p className="clearfix mt20"> <p className="clearfix mt20">
<span className="username task-hide" style={{"maxWidth":'370px'}}>{data && data.name}</span> <span className="username task-hide" style={{"maxWidth":'370px'}}>{data && data.name}</span>
{ {
data && is_current == false && data.identity =="学生" ? "" : data && is_current == false && data.identity =="学生" ? "" :
<span className="userpost"><label>{data && data.identity}</label></span> <span className="userpost"><label>{data && data.identity}</label></span>
} }
</p> </p>
<p className="mt15"> <p className="mt15">
<Tooltip placement='bottom' title={ data && data.professional_certification ?"已职业认证":"未职业认证"}> <Tooltip placement='bottom' title={ data && data.professional_certification ?"已职业认证":"未职业认证"}>
<i className={ data && data.professional_certification ? "iconfont icon-shenfenzhenghaomaguizheng font-18 user-colorgrey-green mr20 ml2":"iconfont icon-shenfenzhenghaomaguizheng font-18 user-colorgrey-B8 mr20 ml2"}></i> <i className={ data && data.professional_certification ? "iconfont icon-shenfenzhenghaomaguizheng font-18 user-colorgrey-green mr20 ml2":"iconfont icon-shenfenzhenghaomaguizheng font-18 user-colorgrey-B8 mr20 ml2"}></i>
</Tooltip> </Tooltip>
<Tooltip placement='bottom' title={ data && data.authentication ?"已实名认证":"未实名认证"}> <Tooltip placement='bottom' title={ data && data.authentication ?"已实名认证":"未实名认证"}>
<i className={ data && data.authentication ? "iconfont icon-renzhengshangjia font-18 user-colorgrey-green":"iconfont icon-renzhengshangjia font-18 user-colorgrey-B8"}></i> <i className={ data && data.authentication ? "iconfont icon-renzhengshangjia font-18 user-colorgrey-green":"iconfont icon-renzhengshangjia font-18 user-colorgrey-B8"}></i>
</Tooltip> </Tooltip>
</p> </p>
</div> </div>
<div className="fr"> <div className="fr">
<div class="fl headtab mt20"> <div class="fl headtab mt20">
<span>{is_current ? "我":"TA"}的经验值</span> <span>{is_current ? "我":"TA"}的经验值</span>
<a style={{"cursor":"default"}}>{data && data.experience}</a> <a style={{"cursor":"default"}}>{data && data.experience}</a>
</div> </div>
<div class="fl headtab mt20 pr leftTransform pl20"> <div class="fl headtab mt20 pr leftTransform pl20">
<span>{is_current ? "我":"TA"}的金币</span> <span>{is_current ? "我":"TA"}的金币</span>
<a style={{"cursor":"default"}}>{data && data.grade}</a> <a style={{"cursor":"default"}}>{data && data.grade}</a>
</div> </div>
{ {
is_current ? is_current ?
<span className="fl mt35 ml60"> <span className="fl mt35 ml60">
{ {
data && data.attendance_signed ? data && data.attendance_signed ?
<span className="user_default_btn user_grey_btn font-18">已签到</span> <span className="user_default_btn user_grey_btn font-18">已签到</span>
: :
<a herf="javascript:void(0);" onClick={this.props.signFor} className="user_default_btn user_yellow_btn fl font-18">签到</a> <a herf="javascript:void(0);" onClick={this.props.signFor} className="user_default_btn user_yellow_btn fl font-18">签到</a>
} }
</span> </span>
: :
<span className="fl mt35 ml60"> <span className="fl mt35 ml60">
<a href={`/messages/${login}/message_detail?target_ids=${id}`} className="user_default_btn user_yellow_btn fl font-18">私信</a> <a href={`/messages/${login}/message_detail?target_ids=${id}`} className="user_default_btn user_yellow_btn fl font-18">私信</a>
</span> </span>
} }
</div> </div>
</div> </div>
<div className="userNav"> <div className="userNav">
<li className={`${moduleName == 'courses' ||moduleName == undefined ? 'active' : '' }`}> <li className={`${moduleName == 'courses' ||moduleName == undefined ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'courses'})} onClick={() => this.setState({moduleName: 'courses'})}
to={`/users/${username}/courses`}>翻转课堂</Link> to={`/users/${username}/courses`}>翻转课堂</Link>
</li> </li>
<li className={`${moduleName == 'shixuns' ? 'active' : '' }`}> <li className={`${moduleName == 'shixuns' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'shixuns'})} onClick={() => this.setState({moduleName: 'shixuns'})}
to={`/users/${username}/shixuns`}>开发社区</Link> to={`/users/${username}/shixuns`}>实训项目</Link>
</li> </li>
<li className={`${moduleName == 'paths' ? 'active' : '' }`}> <li className={`${moduleName == 'paths' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'paths'})} onClick={() => this.setState({moduleName: 'paths'})}
to={`/users/${username}/paths`}>实践课程</Link> to={`/users/${username}/paths`}>实践课程</Link>
</li> </li>
<li className={`${moduleName == 'projects' ? 'active' : '' }`}> <li className={`${moduleName == 'projects' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'projects'})} onClick={() => this.setState({moduleName: 'projects'})}
to={`/users/${username}/projects`}>项目</Link> to={`/users/${username}/projects`}>开发项目</Link>
</li> </li>
<li className={`${moduleName == 'package' ? 'active' : '' }`}> <li className={`${moduleName == 'package' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'package'})} onClick={() => this.setState({moduleName: 'package'})}
to={`/users/${username}/package`}>众包</Link> to={`/users/${username}/package`}>众包</Link>
</li> </li>
{((is_current && current_user && current_user.is_teacher ) || current_user && current_user.admin) {((is_current && current_user && current_user.is_teacher ) || current_user && current_user.admin)
&& <li className={`${moduleName == 'videos' ? 'active' : '' }`}> && <li className={`${moduleName == 'videos' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'videos'})} onClick={() => this.setState({moduleName: 'videos'})}
to={`/users/${username}/videos`}>视频</Link> to={`/users/${username}/videos`}>视频</Link>
</li>} </li>}
</div> </div>
</div> </div>
</div> </div>
) )
} }
} }
export default InfosBanner; export default InfosBanner;

@ -122,7 +122,7 @@ class InfosProject extends Component{
<div className="square-list clearfix"> <div className="square-list clearfix">
{ {
page == 1 && is_current && this.props.current_user && !category && this.props.current_user.user_identity != "学生" ? page == 1 && is_current && this.props.current_user && !category && this.props.current_user.user_identity != "学生" ?
<Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建项目"} index="4"></Create>:"" <Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建开发项目"} index="4"></Create>:""
} }
{ {
(!data || data.projects.length==0) && (!is_current || (this.props.current_user && this.props.current_user.user_identity === "学生" )) && <NoneData></NoneData> (!data || data.projects.length==0) && (!is_current || (this.props.current_user && this.props.current_user.user_identity === "学生" )) && <NoneData></NoneData>

@ -1,190 +1,190 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import {Tooltip,Menu} from 'antd'; import {Tooltip,Menu} from 'antd';
import {getImageUrl} from 'educoder'; import {getImageUrl} from 'educoder';
import "./usersInfo.css" import "./usersInfo.css"
import "../../courses/css/members.css" import "../../courses/css/members.css"
import "../../courses/css/Courses.css" import "../../courses/css/Courses.css"
class banner_out extends Component{ class banner_out extends Component{
constructor(props){ constructor(props){
super(props); super(props);
} }
render(){ render(){
let { let {
data , data ,
is_current, is_current,
is_edit, is_edit,
sign, sign,
type, type,
followed, followed,
id, id,
login, login,
moduleName, moduleName,
next_gold next_gold
}=this.props; }=this.props;
let {username}= this.props.match.params; let {username}= this.props.match.params;
return( return(
<div className="user-main-half"> <div className="user-main-half">
<div className="user-headImg"></div> <div className="user-headImg"></div>
<div className="user-headCon"> <div className="user-headCon">
<div className="pr" style={{"min-height": "465px"}}> <div className="pr" style={{"min-height": "465px"}}>
<div className="educontent pt80 clearfix edu-txt-center"> <div className="educontent pt80 clearfix edu-txt-center">
<div className="inline"> <div className="inline">
<div className="fl headtab"> <div className="fl headtab">
<span>{is_current ? "我":"TA"}的经验值</span> <span>{is_current ? "我":"TA"}的经验值</span>
<a style={{ cursor: 'default' }} <a style={{ cursor: 'default' }}
// href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_experience`} // href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_experience`}
>{data && data.experience}</a> >{data && data.experience}</a>
</div> </div>
<em className="v-h-line fl"></em> <em className="v-h-line fl"></em>
<div className="fl headtab"> <div className="fl headtab">
<span>{is_current ? "我":"TA"}的金币</span> <span>{is_current ? "我":"TA"}的金币</span>
<a style={{ cursor: 'default' }} <a style={{ cursor: 'default' }}
// href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_grade`} // href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_grade`}
id="user_code">{data && data.grade}</a> id="user_code">{data && data.grade}</a>
</div> </div>
<div className="headphoto mt14"> <div className="headphoto mt14">
<img alt="头像" id="user_avatar_show" nhname="avatar_image" src={data && `${getImageUrl('images/'+data.avatar_url)}`}/> <img alt="头像" id="user_avatar_show" nhname="avatar_image" src={data && `${getImageUrl('images/'+data.avatar_url)}`}/>
</div> </div>
<div className="fl headtab"> <div className="fl headtab">
<span>{is_current ? "我":"TA"}的粉丝</span> <span>{is_current ? "我":"TA"}的粉丝</span>
<a style={{ cursor: 'default' }} <a style={{ cursor: 'default' }}
// href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_fanslist`} // href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_fanslist`}
id="user_h_fan_count">{data && data.fan_count}</a> id="user_h_fan_count">{data && data.fan_count}</a>
</div> </div>
<em className="v-h-line fl"></em> <em className="v-h-line fl"></em>
<div className="fl headtab"> <div className="fl headtab">
<span>{is_current ? "我":"TA"}的关注</span> <span>{is_current ? "我":"TA"}的关注</span>
<a style={{ cursor: 'default' }} <a style={{ cursor: 'default' }}
// href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_watchlist`} // href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_watchlist`}
>{data && data.follow_count}</a> >{data && data.follow_count}</a>
</div> </div>
<span className="clearfix"></span> <span className="clearfix"></span>
<span className="myName">{data && data.name}</span> <span className="myName">{data && data.name}</span>
</div> </div>
</div> </div>
<div className="educontent mt10 clearfix edu-txt-center"> <div className="educontent mt10 clearfix edu-txt-center">
<div className="inline"> <div className="inline">
{ {
data && is_current == false && data.identity =="学生" ? "" : <span className="mypost fl mr10">{data && data.identity}</span> data && is_current == false && data.identity =="学生" ? "" : <span className="mypost fl mr10">{data && data.identity}</span>
} }
<a <a
// href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/authentication` :"javascript:void(0)"} // href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/authentication` :"javascript:void(0)"}
// target="_blank" // target="_blank"
className={is_current ? "ringauto fl" :"ringauto fl cdefault"}> className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<Tooltip placement='bottom' title={ data && data.authentication ?"已实名认证":"未实名认证"}> <Tooltip placement='bottom' title={ data && data.authentication ?"已实名认证":"未实名认证"}>
<i className={ data && data.authentication ? "iconfont icon-shenfenrenzheng font-13 color-blue":"iconfont icon-shenfenrenzheng font-13 color-grey-9"}></i> <i className={ data && data.authentication ? "iconfont icon-shenfenrenzheng font-13 color-blue":"iconfont icon-shenfenrenzheng font-13 color-grey-9"}></i>
</Tooltip> </Tooltip>
</a> </a>
<a <a
// href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/professional_certification` :"javascript:void(0)"} // href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/professional_certification` :"javascript:void(0)"}
// target="_blank" // target="_blank"
className={is_current ? "ringauto fl" :"ringauto fl cdefault"}> className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<Tooltip placement='bottom' title={ data && data.professional_certification ?"已职业认证":"未职业认证"}> <Tooltip placement='bottom' title={ data && data.professional_certification ?"已职业认证":"未职业认证"}>
<i className={ data && data.professional_certification ? "iconfont icon-zhiyerenzheng font-13 color-blue":"iconfont icon-zhiyerenzheng font-13 color-grey-9"}></i> <i className={ data && data.professional_certification ? "iconfont icon-zhiyerenzheng font-13 color-blue":"iconfont icon-zhiyerenzheng font-13 color-grey-9"}></i>
</Tooltip> </Tooltip>
</a> </a>
<a <a
// href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/change_or_bind?type=phone` :"javascript:void(0)"} // href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/change_or_bind?type=phone` :"javascript:void(0)"}
// target="_blank" // target="_blank"
className={is_current ? "ringauto fl" :"ringauto fl cdefault"}> className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<Tooltip placement='bottom' title={ data && data.phone_binded ?"已手机认证":"未手机认证"}> <Tooltip placement='bottom' title={ data && data.phone_binded ?"已手机认证":"未手机认证"}>
<i className={ data && data.phone_binded ? "iconfont icon-shoujirenzheng font-13 color-blue":"iconfont icon-shoujirenzheng font-13 color-grey-9"}></i> <i className={ data && data.phone_binded ? "iconfont icon-shoujirenzheng font-13 color-blue":"iconfont icon-shoujirenzheng font-13 color-grey-9"}></i>
</Tooltip> </Tooltip>
</a> </a>
<a <a
// href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/my/account` :"javascript:void(0)"} // href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/my/account` :"javascript:void(0)"}
// target="_blank" // target="_blank"
className={is_current ? "ringauto fl" :"ringauto fl cdefault"}> className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<Tooltip placement='bottom' title={ data && data.email_binded ?"已邮箱认证":"未邮箱认证"}> <Tooltip placement='bottom' title={ data && data.email_binded ?"已邮箱认证":"未邮箱认证"}>
<i className={ data && data.email_binded ? "iconfont icon-youxiangrenzheng font-13 color-blue":"iconfont icon-youxiangrenzheng font-13 color-grey-9"}></i> <i className={ data && data.email_binded ? "iconfont icon-youxiangrenzheng font-13 color-blue":"iconfont icon-youxiangrenzheng font-13 color-grey-9"}></i>
</Tooltip> </Tooltip>
</a> </a>
{/* <!--学院管理员身份--> */} {/* <!--学院管理员身份--> */}
{ {
data && data.college_identifier && data && data.college_identifier &&
<a <a
// href={`${this.props.Headertop && this.props.Headertop.old_url}/colleges/${data.college_identifier}/statistics`} target="_blank" // href={`${this.props.Headertop && this.props.Headertop.old_url}/colleges/${data.college_identifier}/statistics`} target="_blank"
className={is_current ? "ringauto fl" :"ringauto fl cdefault"}> className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<Tooltip placement='bottom' title="学院管理员"> <Tooltip placement='bottom' title="学院管理员">
<i className="iconfont icon-chengyuanguanli font-12 color-blue" data-tip-down="学院管理员"></i> <i className="iconfont icon-chengyuanguanli font-12 color-blue" data-tip-down="学院管理员"></i>
</Tooltip> </Tooltip>
</a> </a>
} }
</div> </div>
</div> </div>
<div className="mt15 educontent clearfix edu-txt-center"> <div className="mt15 educontent clearfix edu-txt-center">
<p className="mb20" style={{"height": "28px"}}> <p className="mb20" style={{"height": "28px"}}>
{ {
is_edit && is_current ? is_edit && is_current ?
<input type="text" id="mysign" class="mysign-input" placeholder="请输入您的个性签名" style={{height:"20px"}} value={sign} onInput={this.inputSign} onBlur={this.savemysign}/> <input type="text" id="mysign" class="mysign-input" placeholder="请输入您的个性签名" style={{height:"20px"}} value={sign} onInput={this.inputSign} onBlur={this.savemysign}/>
: :
is_current ? is_current ?
<a className="mysign-span" onClick={this.editmysign} style={{"display": "block"}}>{sign || "这家伙很懒,什么都没留下~"}</a> <a className="mysign-span" onClick={this.editmysign} style={{"display": "block"}}>{sign || "这家伙很懒,什么都没留下~"}</a>
: :
<span className="mysign-span" style={{"display": "block","cursor":"default"}}>{sign || "这家伙很懒,什么都没留下~"}</span> <span className="mysign-span" style={{"display": "block","cursor":"default"}}>{sign || "这家伙很懒,什么都没留下~"}</span>
} }
</p> </p>
{ {
is_current ? is_current ?
<div className="inline"> <div className="inline">
{ {
data && data.attendance_signed ? data && data.attendance_signed ?
<React.Fragment> <React.Fragment>
<span className="user_default_btn user_grey_btn mb5">已签到</span> <span className="user_default_btn user_grey_btn mb5">已签到</span>
<p id="attendance_notice" className="none font-12 color-grey-6" style={{"display":"block"}}>明日签到&nbsp;<font className="color-orange">+{next_gold}</font>&nbsp;</p> <p id="attendance_notice" className="none font-12 color-grey-6" style={{"display":"block"}}>明日签到&nbsp;<font className="color-orange">+{next_gold}</font>&nbsp;</p>
</React.Fragment> </React.Fragment>
: :
<a herf="javascript:void(0);" onClick={this.props.signFor} id="attendance" className="user_default_btn user_orange_btn fl mb15">签到</a> <a herf="javascript:void(0);" onClick={this.props.signFor} id="attendance" className="user_default_btn user_orange_btn fl mb15">签到</a>
// <a herf="javascript:void(0);" onClick={this.trialapplications} id="authentication_apply" className="user_default_btn user_private_btn fl ml15">试用申请</a> // <a herf="javascript:void(0);" onClick={this.trialapplications} id="authentication_apply" className="user_default_btn user_private_btn fl ml15">试用申请</a>
} }
</div> </div>
: :
<div className="inline"> <div className="inline">
<a href="javascript:void(0);" onClick={this.props.followPerson} className="user_default_btn user_watch_btn user_private_btn fl mr20">{followed ? "取消关注":"关注"}</a> <a href="javascript:void(0);" onClick={this.props.followPerson} className="user_default_btn user_watch_btn user_private_btn fl mr20">{followed ? "取消关注":"关注"}</a>
<a href={`${this.props.Headertop && this.props.Headertop.old_url}/messages/${login}/message_detail?target_ids=${id}`} className="user_default_btn user_private_btn fl">私信</a> <a href={`${this.props.Headertop && this.props.Headertop.old_url}/messages/${login}/message_detail?target_ids=${id}`} className="user_default_btn user_private_btn fl">私信</a>
</div> </div>
} }
</div> </div>
<div className="edu-txt-center navInfo"> <div className="edu-txt-center navInfo">
<div className="inline"> <div className="inline">
<li className={`${moduleName == 'courses' ||moduleName == undefined ? 'active' : '' }`}> <li className={`${moduleName == 'courses' ||moduleName == undefined ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'courses'})} onClick={() => this.setState({moduleName: 'courses'})}
to={`/users/${username}/courses`}>课堂</Link> to={`/users/${username}/courses`}>课堂</Link>
</li> </li>
<li className={`${moduleName == 'shixuns' ? 'active' : '' }`}> <li className={`${moduleName == 'shixuns' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'shixuns'})} onClick={() => this.setState({moduleName: 'shixuns'})}
to={`/users/${username}/shixuns`}>实训</Link> to={`/users/${username}/shixuns`}>实训</Link>
</li> </li>
<li className={`${moduleName == 'paths' ? 'active' : '' }`}> <li className={`${moduleName == 'paths' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'paths'})} onClick={() => this.setState({moduleName: 'paths'})}
to={`/users/${username}/paths`}>实践课程</Link> to={`/users/${username}/paths`}>实践课程</Link>
</li> </li>
<li className={`${moduleName == 'projects' ? 'active' : '' }`}> <li className={`${moduleName == 'projects' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'projects'})} onClick={() => this.setState({moduleName: 'projects'})}
to={`/users/${username}/projects`}>项目</Link> to={`/users/${username}/projects`}>开发项目</Link>
</li> </li>
<li className={`${moduleName == 'package' ? 'active' : '' }`}> <li className={`${moduleName == 'package' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'package'})} onClick={() => this.setState({moduleName: 'package'})}
to={`/users/${username}/package`}>众包</Link> to={`/users/${username}/package`}>众包</Link>
</li> </li>
{/*{ data && data.identity!="学生" && <li> <a href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}?type=m_bank`}>题库</a></li>}*/} {/*{ data && data.identity!="学生" && <li> <a href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}?type=m_bank`}>题库</a></li>}*/}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
) )
} }
} }
export default banner_out; export default banner_out;

@ -412,7 +412,7 @@ function VideoUploadList (props) {
<div className={`description ${noUploads ? 'noUploads' : ''}`}> <div className={`description ${noUploads ? 'noUploads' : ''}`}>
<div className="">视频大小不支持断点续传单个视频文件最大200M单次最多支持3个视频文件上传 </div> <div className="">视频大小不支持断点续传单个视频文件最大200M单次最多支持3个视频文件上传 </div>
<div className="">视频规格aviflvf4vm4vmovmp4rmvbswfwebm </div> <div className="">视频规格aviflvf4vm4vmovmp4rmvbswfwebm </div>
<div className="">温馨提示请勿上传违法视频平台将为每一个视频分配一个地址您可以通过引用该地址将视频使用在开发社区等模块</div> <div className="">温馨提示请勿上传违法视频平台将为每一个视频分配一个地址您可以通过引用该地址将视频使用在实训项目等模块</div>
</div> </div>
{!noUploads && <React.Fragment> {!noUploads && <React.Fragment>

@ -152,7 +152,7 @@ class SearchPage extends Component{
<Menu mode="horizontal" className="tabtitless" selectedKeys={tab} onClick={this.changeTab}> <Menu mode="horizontal" className="tabtitless" selectedKeys={tab} onClick={this.changeTab}>
<Menu.Item className={"tabtitle1"} key="1">实践课程</Menu.Item> <Menu.Item className={"tabtitle1"} key="1">实践课程</Menu.Item>
<Menu.Item className={"tabtitle2"} key="2">翻转课堂</Menu.Item> <Menu.Item className={"tabtitle2"} key="2">翻转课堂</Menu.Item>
<Menu.Item className={"tabtitle2"} key="0">开发社区</Menu.Item> <Menu.Item className={"tabtitle2"} key="0">实训项目</Menu.Item>
<Menu.Item className={"tabtitle2"} key="3">交流问答</Menu.Item> <Menu.Item className={"tabtitle2"} key="3">交流问答</Menu.Item>
</Menu> </Menu>
</div> </div>

Loading…
Cancel
Save