This commit is contained in:
caicai8 2020-04-20 15:37:01 +08:00
parent e1b5834b4b
commit 09fe5c16ef
3 changed files with 86 additions and 453 deletions

View File

@ -30,7 +30,7 @@ function locationurl(list){
// TODO 开发期多个身份切换
let debugType =""
let debugType =""
if (isDev) {
const _search = window.location.search;
let parsed = {};
@ -49,9 +49,6 @@ if (isDev) {
//debugType="student";
function clearAllCookie() {
cookie.remove('_educoder_session', {path: '/'});
cookie.remove('autologin_trustie', {path: '/'});
@ -114,26 +111,12 @@ setpostcookie();
}
window._debugType = debugType;
export function initAxiosInterceptors(props) {
initOnlineOfflineListener()
// TODO 避免重复的请求 https://github.com/axios/axios#cancellation
// https://github.com/axios/axios/issues/1497
// TODO 读取到package.json中的配置
var //proxy = "http://localhost:3000"
proxy="https://testforgeplus.trustie.net/"
// proxy="http://localhost:3000"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求
// 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制
const requestMap = {};
window.setfalseInRequestMap = function(keyName) {
@ -145,69 +128,7 @@ export function initAxiosInterceptors(props) {
config => {
setpostcookie()
clearAllCookie()
// config.headers['Content-Type']= 'no-cache'
// if (token) { // 每次发送请求之前判断是否存在token如果存在则统一在http请求的header都加上token不用每次请求都手动添加了
// config.headers.Authorization = token;
// }
// --------------------------------------------- 測試3007连测试服的代码
// if (url.indexOf('file_update') != -1 || url.indexOf('game_build') != -1 || url.indexOf('game_status') != -1) {
// proxy = 'https://testbdweb.trustie.net'
// } else {
// proxy = 'http://localhost:3000'
// }
// ---------------------------------------------
// console.log("开始请求了");
// console.log(config.url);
// console.log(window.location.pathname);
//
// try {
// const str =window.location.pathname;
// if(str.indexOf("/wxcode") !== -1){
// // console.log("开始重写cookis");
// const _params = window.location.search;
// // console.log("1111");
// if (_params) {
// // console.log("22222");
// let _search = _params.split('?')[1];
// var _educoder_sessionmys="";
// var autologin_trusties="";
// _search.split('&').forEach(item => {
// const _arr = item.split('=');
// if(_arr[0]==='_educoder_session'){
// cookie.save('_educoder_session',_arr[1], { domain: '.educoder.net', path: '/'});
// _educoder_sessionmys=_arr[1];
// }else{
// cookie.save('autologin_trustie',_arr[1], { domain: '.educoder.net', path: '/'});
// autologin_trusties=_arr[1];
// }
// });
// try {
// const autlogins= `_educoder_session=${_educoder_sessionmys}; autologin_trustie=${autologin_trusties} `;
// config.params = {'Cookie': autlogins}
// config.headers['Cookie'] =autlogins;
// // console.log("设置了cookis");
// } catch (e) {
//
// }
// try {
// const autloginysls= `_educoder_session=${_educoder_sessionmys}; autologin_trustie=${autologin_trusties} `;
// config.params = {'autloginysls': autloginysls}
// config.headers['Cookie'] =autloginysls;
// // console.log("设置了cookis");
// }catch (e) {
//
// }
// }
// }
// }catch (e) {
//
// }
if (config.url.indexOf(proxy) != -1 || config.url.indexOf(':') != -1) {
if (config.url.indexOf(proxy) !== -1 || config.url.indexOf(':') !== -1) {
return config
}
requestProxy(config)
@ -223,11 +144,6 @@ export function initAxiosInterceptors(props) {
if(`${config[0]}`!=`true`){
let timestamp = Date.parse(new Date())/1000;
if (window.location.port === "3007") {
// let timestamp=railsgettimes(proxy);
// console.log(timestamp)
// `https://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`
// railsgettimes( `${proxy}/api/main/first_stamp.json`);
// let newopens=md5(opens+timestamp)
config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) {
config.url = `${config.url}?debug=${debugType}`;
@ -236,27 +152,12 @@ export function initAxiosInterceptors(props) {
}
} else {
// 加api前缀
// railsgettimes(`http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`);
// railsgettimes( `/api/main/first_stamp.json`);
// let newopens=md5(opens+timestamp)
config.url = url;
// if (config.url.indexOf('?') == -1) {
// config.url = `${config.url}?randomcode=${timestamp}&client_key=${newopens}`;
// } else {
// config.url = `${config.url}&randomcode=${timestamp}&client_key=${newopens}`;
// }
}
setpostcookie();
}
//
// console.log(config);
if (config.method === "post") {
if (requestMap[config.url] === true) { // 避免重复的请求 导致页面f5刷新 也会被阻止 显示这个方法会影响到定制信息
// console.log(config);
// console.log(JSON.parse(config));
// console.log(config.url);
// console.log("被阻止了是重复请求=================================");
return false;
}
}
@ -274,20 +175,11 @@ export function initAxiosInterceptors(props) {
});
axios.interceptors.response.use(function (response) {
// console.log(".............")
if(response===undefined){
return
}
const config = response.config
if (response.data.status === -1) {
// console.error('error:', response.data.message)
// throw new Error()
// https://github.com/axios/axios/issues?utf8=%E2%9C%93&q=cancel+request+in+response+interceptors+
// https://github.com/axios/axios/issues/583
// message.info(response.data.message || '服务端返回status -1请联系管理员。');
// props.showSnackbar( response.data.message || '服务器异常,请联系管理员。' )
if (window.location.pathname.startsWith('/tasks/')) {
props.showSnackbar( response.data.message || '服务器异常,请联系管理员。' )
} else {
@ -305,22 +197,7 @@ export function initAxiosInterceptors(props) {
}
throw new axios.Cancel('Operation canceled by the user.');
} else {
// hash跳转
// var hash = window.location.hash;
// if (hash) {
// hashTimeout && window.clearTimeout(hashTimeout)
// hashTimeout = setTimeout(() => {
// var element = document.querySelector(hash);
// if (element) {
// element.scrollIntoView();
// }
// }, 400)
// }
}
// if(response.data.status === 401){
// console.log("401401401")
// }
if (response.data.status === 403||response.data.status === "403") {
locationurl('/403');
}
@ -348,32 +225,6 @@ export function initAxiosInterceptors(props) {
message501=false
}, 2000);
}
// if (response.data.status === 402) {
// console.log(response.data.status);
// console.log(response.data);
// // locationurl(402);
// }
//
// if (response.data.status === 401) {
// console.log("161");
// console.log(config);
// return config;
// }
// if (response.data.status === 407) {
// 在app js 中解决 Trialapplication
// // </Trialapplication>
// ///在appjs
// notification.open({
// message:"提示",
// description: "账号未认证",
// });
// throw new axios.Cancel('Operation canceled by the user.');
// //
// }
requestMap[response.config.url] = false;
setpostcookie();
return response;

View File

@ -22,6 +22,7 @@ import img_fork from "../Images/fork.png";
* subfileType:保存当前点击目录的文件类型显示目录列表时才显示新建文件如果点击的是文件就不显示新建文件按钮
* readMeContent:根目录下面的readme文件内容
*/
class CoderRootDirectory extends Component{
constructor(props){
super(props);
@ -294,8 +295,6 @@ class CoderRootDirectory extends Component{
</React.Fragment>
:""
}
{/*<Link to={``} className="commitKey">{truncateCommitId(branchLastCommit.last_commit.id)}</Link>*/}
<span className="color-blue flex-1 hide-1">{branchLastCommit.last_commit.message}</span>
<span className="commitKey">{truncateCommitId(branchLastCommit.last_commit.id)}</span>
<span>{branchLastCommit.last_commit.time_from_now}</span>

View File

@ -886,9 +886,6 @@ submittojoinclass=(value)=>{
if(mygetHelmetapi2) {
if (mygetHelmetapi2.navbar) {
if (mygetHelmetapi2.navbar.length > 0) {
// console.log("mygetHelmetapi2.navbar.length>0====-=-=--=-=-=-=");
//
// console.log(match.path);
if (match.path === '/') {
if (headtypesonClickbool === false) {
headtypes = undefined;
@ -907,10 +904,6 @@ submittojoinclass=(value)=>{
}
}
}
// console.log(mygetHelmetapi2);
// console.log("NewHeadermygetHelmetapi123123123123");
let shixuntype=false;
let pathstype=false;
let coursestypes=false;
@ -1008,22 +1001,8 @@ submittojoinclass=(value)=>{
mygetHelmetapi2!==undefined&&mygetHelmetapi2.navbar!==null&&mygetHelmetapi2.navbar!==undefined&&mygetHelmetapi2.navbar.length>0?
<div className="head-nav pr" id={"head-navpre1"}>
<ul id="header-nav">
{/*<li className={`${activeIndex === true ? 'active' : ''}`}><a href="/">首页</a></li>*/}
{/*<li><a href={this.props.Headertop===undefined?"":this.props.Headertop.shixun_paths_url}>实训路径</a></li>*/}
{
mygetHelmetapi2.navbar && mygetHelmetapi2.navbar.map((item,key)=>{
// console.log("headtypes");
// console.log(headtypes);hidden
// var str=new RegExp("http");
// var strbool=false;
// //test方法返回值为(true或者false)
// if(item.link){
// if(str.test(item.link)===true){
// strbool=true
// }else{
// strbool=false
// }
// }
var new_link = item.link;
var user_login = this.props.user && this.props.user.login;
var is_hidden = item.hidden
@ -1043,7 +1022,6 @@ submittojoinclass=(value)=>{
var str=new RegExp("projects");
var strbool=false;
//test方法返回值为(true或者false)
if(item.link){
if(str.test(item.link)===true){
strbool=true
@ -1051,7 +1029,6 @@ submittojoinclass=(value)=>{
strbool=false
}
}
// console.log(item.hidden);
return(
<li key={key} onClick={()=>this.headtypesonClick(item.link,true)} className={`${this.matchpaths(item.link)===true?'pr active':'pr'}`} style={!is_hidden?{display: 'block'}:{display: 'none'}}>
{
@ -1078,65 +1055,21 @@ submittojoinclass=(value)=>{
`
}
</style>
{/*<li className={`pr questionbanks`}>*/}
{/* <Popover placement="bottom" content={contents} trigger="click" >*/}
{/* <div className=" sortinxdirection mr10">*/}
{/* <div style={{*/}
{/* color:"#fff"*/}
{/* }}>*/}
{/* 题库*/}
{/* </div>*/}
{/* </div>*/}
{/* </Popover>*/}
{/*</li>*/}
{/*<li*/}
{/*style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth === null ? 'none' : 'block'}}*/}
{/*><a href={this.props.Headertop === undefined ? "" : this.props.Headertop.auth}>工程认证</a></li>*/}
{/*<li className="fl edu-menu-panel careershover "*/}
{/*style={{display: this.props.Headertop === undefined ?'none' : this.props.Headertop.career_url.length > 0 ? 'block' : 'none'}}>*/}
{/*<a>职业路径</a>*/}
{/*<div*/}
{/*style={{display: this.props.Headertop === undefined ?'none' : this.props.Headertop.career_url.length > 0 ? 'block' : 'none'}}>*/}
{/*<ul className="edu-menu-list edu-menu-listnew " style={{top:'60px'}}>*/}
{/*{this.props.Headertop === undefined ? "" : this.props.Headertop.career_url.map((item, key) => {*/}
{/*return(*/}
{/*<li key={key}><i className="iconfont icon-java left careersiconfont"*/}
{/*style={{color: '#000 important'}}*/}
{/*></i><a style={{width: '83%'}}*/}
{/*href={item.url}>{item.name}</a></li>*/}
{/*)*/}
{/*})*/}
{/*}*/}
{/*</ul>*/}
{/*</div>*/}
{/*</li>*/}
{/*<li><Link to={`/projects`}>开源项目</Link></li>*/}
</ul>
</div>
:
<div className="head-nav pr" id={"head-navpre3"}>
<ul id="header-nav">
{/*<li className={`${activeIndex === true ? 'active' : ''}`}><a href="/">首页</a></li>*/}
{/*<li><a href={this.props.Headertop===undefined?"":this.props.Headertop.shixun_paths_url}>实训路径</a></li>*/}
<li className={`${activePaths === true ? 'pr active' : 'pr'}`}>
<Link to={'/projects'}>开源项目</Link>
</li>
{/*<li className={`${activePaths === true ? 'pr active' : 'pr'}`}>*/}
{/*<Link to={this.props.Headertop===undefined?"":'/paths'}>实践课程</Link>*/}
{/*</li>*/}
{/*<li><a href={this.props.Headertop===undefined?"":'/courses'}>课堂</a></li>*/}
<li className={`${coursestype === true ? 'pr active' : 'pr'}`}>
<Link to={this.props.Headertop===undefined?"":'/courses'}>翻转课堂</Link>
</li>
<li className={`${activeShixuns === true ? 'pr active' : 'pr'}`}>
<Link to="/shixuns">实训项目</Link>
{/*<img src={getImageUrl("images/educoder/hot-h.png")} className="nav-img">*/}
{/*</img>*/}
</li>
<li className="fl edu-menu-panel careershover "
@ -1158,17 +1091,10 @@ submittojoinclass=(value)=>{
</div>
</li>
{/*<li className=""><a href={"/libraries"}>教学案例</a></li>*/}
<li className={`${activeCompetitions === true ? 'pr active' : 'pr'}`}>
<a href={this.props.Headertop===undefined?"":this.props.Headertop.competitions_url}>在线竞赛</a>
{/*<img className="roundedRectangles"*/}
{/* src={require('./roundedRectangle.png')}*/}
{/*/>*/}
</li>
<li className={`${activeMoopCases === true ? 'pr active' : 'pr'}`}> <Link to={`/moop_cases`}>教学案例</Link></li>
{/*<li className={`${activePackages === true ? 'pr active' : 'pr'}`}>*/}
{/*<Link to={'/crowdsourcing'}>众包创新</Link>*/}
{/*</li>*/}
<li className={`${activeForums === true ? 'active' : ''}`}> <Link to={this.props.Headertop===undefined?"":this.props.Headertop.topic_url}>交流问答</Link></li>
<li
style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth===null? 'none' : 'block'}}
@ -1177,11 +1103,6 @@ submittojoinclass=(value)=>{
</div>
}
<style>
{
`
@ -1198,7 +1119,6 @@ submittojoinclass=(value)=>{
</style>
<div className="posi-searchs" >
<div className="search-all clearfix">
{/*<!--<a href="javascript:void(0)" className="search-clear fl" onclick="closeSearch();">×</a>-->*/}
<div className="fl pr search-clear edu-menu-panel" style={{display: 'none'}}>
<input type="hidden" id="search_type" value="1"></input>
<span className="searchkey">实训</span>
@ -1209,9 +1129,6 @@ submittojoinclass=(value)=>{
<li><a>用户</a></li>
</ul>
</div>
{/*<input type="text" className="search-input fl" id="search-input" */}
{/*onKeyDown={this.onKeywordSearchKeyDown} name="search_keyword" placeholder="搜索实训项目"/>*/}
{/*搜索框*/}
{showSearchOpentype===true?<div
className={"HeaderSearch"}
onBlur={(e)=>this.hideshowSearchOpen(e)} onMouseLeave={()=>this.setevaluatinghides()}>
@ -1225,26 +1142,8 @@ submittojoinclass=(value)=>{
autoFocus={true}
/>
</div>:""}
{/*<a className="search-icon fl" id="header_keyword_search" onClick={this.onKeywordSearch}>*/}
{/*/!*<i className="fa fa-search font-16 mt23 color-grey-6"></i>*!/*/}
{/*<i className="iconfont icon-sousuo color-blue"></i>*/}
{/*</a>*/}
{/* TODO
<div className="search-content none" style="width: 86%;left: 0px;">
<div className="search-title">最近搜索</div>
<div><a href="javascript:void(0)" className="search_history">绿盟</a></div>
<div><a href="javascript:void(0)" className="search_history">qwe</a></div>
</div>*/}
</div>
</div>
{/*<span className="font-15 fr mt17">
<%= link_to '登录', signin_path, :className => "mr5" %>
<em className="vertical-line"></em>
<%= link_to '注册', user_join_path, :className => "ml5" %>
</span>*/}
{ user===undefined?
<span className="font-15 fr mt17 ml5 mr25">
<a onClick={()=>this.educoderlogin()} className="mr5 color-white">登录</a>
@ -1258,8 +1157,6 @@ submittojoinclass=(value)=>{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.register_url &&
<span><em className="vertical-line"></em><a className="mr5 color-white" href={`${mygetHelmetapi2.new_course.register_url}`} target="_blank"></a></span>
}
{/*<em className="vertical-line"></em>*/}
{/*<a href={"/register"} className="mr5 color-white">注册</a>*/}
</span>:
<div className="fr edu-menu-panel mr25" style={{height:'60px'}}>
<a href={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/courses`} className="fl ml15">
@ -1276,10 +1173,6 @@ submittojoinclass=(value)=>{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.my_courses &&
<li><a href={`${mygetHelmetapi2.new_course.my_courses}`} target="_blank">我的课程</a></li>
}
{/*{*/}
{/*mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.my_projects &&*/}
{/*<li><Link to={`${mygetHelmetapi2.new_course.my_projects}`} >我的项目</Link></li>*/}
{/*}*/}
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.my_projects &&
<li><a href={`${mygetHelmetapi2.new_course.my_projects}`} target="_blank">我的项目</a></li>
@ -1288,51 +1181,17 @@ submittojoinclass=(value)=>{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.my_organ &&
<li><a href={`${mygetHelmetapi2.new_course.my_organ}`} target="_blank">我的组织</a></li>
}
{/*<span className="bor-bottom-greyE currentName task-hide">{user.username}</span>*/}
{/*<li><Link to={`/users/${this.props.current_user.login}/courses`}>我的个人主页</Link></li>*/}
{/*{coursestypes===true?"":<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/courses`}>{this.props.user&&this.props.user.main_site===false?"我的课堂":"我的翻转课堂"}</Link></li>}*/}
{/*/!* p 老师 l 学生 *!/*/}
{/*{shixuntype===true?"":<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训项目</Link></li>}*/}
{/*{pathstype===true?"":<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>{this.props.user&&this.props.user.main_site===false?"我的课程":"我的实践课程"}</Link></li>}*/}
{/*{this.props.user&&this.props.user.main_site===true?<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'}}>*/}
{/*<a href={this.props.Headertop === undefined ? '' : this.props.Headertop.customer_management_url}>客户管理</a>*/}
{/*</li>*/}
{/*{*/}
{/*this.props.Headertop && this.props.Headertop.college_identifier &&*/}
{/*<li><a href={`/colleges/${this.props.Headertop.college_identifier}/statistics`}>学院统计</a></li>*/}
{/*}*/}
{/*{*/}
{/*this.props.Headertop && this.props.Headertop.laboratory_user &&*/}
{/*<li><a href={this.props.Headertop.laboratory_admin_url}>后台管理</a></li>*/}
{/*}*/}
{/*<li><a href={`/account/profile`}>账号管理</a></li>*/}
{/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/}
{/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/}
{/*<li><Link to={`/interest`}>兴趣页</Link></li>*/}
<li className="bor-top-greyE">
{/*<a onClick={()=>this.educoderlogin()} >登录</a>*/}
<a onClick={()=>this.educoderloginysl()}>退出</a>
</li>
</ul>
</div>
}
{/*href="https://www.educoder.net/login"*/}
<div className="fr head-right">
{/*{ loadHeader()}*/}
{showSearchOpentype===true?"":this.props.user&&this.props.user.main_site===true?<a id="search-open" className="fl mr30 headIcon" onClick={(e)=>this.showSearchOpen(e)}>
{/*"/images/educoder/icon/search.svg"
<img src={getImageUrl(`images/educoder/icon/search.svg`)} /> */}
<i className="iconfont icon-sousuo color-white"></i>
</a>:""}
{/*</div>*/}
{
this.props.user&&this.props.user.login ?
<div className="fl mr30 edu-menu-panel headIcon">
@ -1343,17 +1202,6 @@ submittojoinclass=(value)=>{
<div className="edu-menu-list" style={{top: '60px',width:"240px"}}>
<div className="overPart"></div>
<ul className={coursestypes===true&&this.props.user&&this.props.user.main_site===false?"fl headwith100b edu-txt-center pr ul-leftline":"fl with50 edu-txt-center pr ul-leftline"}>
{/*{this.props.current_user&&this.props.current_user.user_identity==="学生"?"":coursestypes===false?*/}
{/*<li><a onClick={(url)=>this.getUser("/courses/new")}>{this.props.user&&this.props.user.main_site===false?"新建课堂":"新建翻转课堂"}</a></li>:""*/}
{/*}*/}
{/*{shixuntype===true?"":*/}
{/*<li><a onClick={(url)=>this.getUser("/shixuns/new","newshixuns")}>新建实训项目</a></li>*/}
{/*}*/}
{/*{this.props.user&&this.props.user.main_site===false?"":this.props.Headertop===undefined?"":<li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li>}*/}
{/*{this.props.user&&this.props.user.main_site===true?"":this.props.Headertop===undefined?"":*/}
{/*pathstype===true?"":this.props.user&&this.props.user.admin===true||this.props.user&&this.props.user.is_teacher===true||this.props.user&&this.props.user.business===true?<li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li>:""*/}
{/*}*/}
{/*{this.props.user&&this.props.user.login?<li><a onClick={(url)=>this.getUser("/projects/new","projects")} target="_blank">新建开发项目</a></li>:""}*/}
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.new_syllabuses &&
<li><a href={`${mygetHelmetapi2.new_course.new_syllabuses}`} target="_blank">新建课程</a></li>
@ -1366,69 +1214,6 @@ submittojoinclass=(value)=>{
{coursestypes===true&&this.props.user&&this.props.user.main_site===false?"":<ul className="fl with50 edu-txt-center">
<li><Link to={"/projects/mirror/new"}>新建镜像项目</Link></li>
<li><Link to={"/projects/deposit/new"}>新建托管项目</Link></li>
{/*{coursestypes===true?"":<li>*/}
{/*<a onClick={this.tojoinclass}>{this.props.user&&this.props.user.main_site===false?"加入课堂":"加入翻转课堂"}</a>*/}
{/*</li>}*/}
{/*{Addcoursestypes===true?<Addcourses*/}
{/*Addcoursestype={Addcoursestypes}*/}
{/*hideAddcoursestype={this.hideAddcoursestypes}*/}
{/*HideAddcoursestypess={(i)=>this.HideAddcoursestypess(i)}*/}
{/*/>:""}*/}
{/*<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.ModalCancelsy}/>*/}
{/*/!* /courses/join_course_multi_role *!/*/}
{/*{this.props.user&&this.props.user.main_site===true?<li>*/}
{/*<a onClick={this.tojoinitem}>加入开发项目</a>*/}
{/*</li>:""}*/}
{/*{tojoinitemtype===true?<Modal*/}
{/*keyboard={false}*/}
{/*title="加入项目"*/}
{/*visible={tojoinitemtype}*/}
{/*closable={false}*/}
{/*footer={null}*/}
{/*>*/}
{/*<div className="task_popup_con">*/}
{/*<div className="mr15">*/}
{/*<ul>*/}
{/*<li className="clearfix mb10">*/}
{/*<label className="panel-form-label fl">项目邀请码:</label>*/}
{/*<Input type="text" className="input-60-40 fl mt5" name="invite_code"*/}
{/*style={{width: '275px'}}*/}
{/*placeholder="请输入6位开发项目邀请码" value={tojoinclasstitle} onInput={this.inputjoinclassvalue}/>*/}
{/*</li>*/}
{/*<p id="none_invite_code_notice"*/}
{/*className="color-orange none f12"*/}
{/*style={{marginLeft: '90px',display:code_notice===true?'block':"none"}}>请输入6位项目邀请码</p>*/}
{/*<li className="clearfix ">*/}
{/*<label className="panel-form-label fl">身份:</label>*/}
{/*<RadioGroup className="mt10" onChange={this.onChangeRadioGroup}>*/}
{/*<Radio value={"manager"}>管理人员</Radio>*/}
{/*<Radio value={"developer"}>开发人员</Radio>*/}
{/*<Radio value={"reporter"}>报告人员</Radio>*/}
{/*</RadioGroup>*/}
{/*</li>*/}
{/*<p id="none_checked_notice" className="color-orange none f12"*/}
{/*style={{marginLeft: '90px',display:checked_notice===true?'block':"none"}}>请选择一个身份</p>*/}
{/*<li className="clearfix mt10 edu-txt-center">*/}
{/*<a className="task-btn mr10"*/}
{/*onClick={()=>this.hidetojoinclass(1)}>取消</a>*/}
{/*<a*/}
{/*className="task-btn task-btn-orange ml20"*/}
{/*onClick={()=>this.submittojoinclass(1)}>确定</a>*/}
{/*</li>*/}
{/*</ul>*/}
{/*</div>*/}
{/*</div>*/}
{/*</Modal>:""}*/}
</ul>}
</div>
</div>
@ -1443,8 +1228,6 @@ submittojoinclass=(value)=>{
>
<i className="iconfont icon-xiaoxilingdang color-white"></i>
<span className="newslight" style={{display:this.props.Headertop===undefined?"none":this.props.Headertop.new_message===true?"block":"none"}}>
{/*{this.props.Headertop===undefined?"":this.props.Headertop.unread_message_count > 99 ? '99+'*/}
{/*: this.props.Headertop===undefined?"":this.props.Headertop.unread_message_count}*/}
</span>
</a>
}