调整合作者

chromesetting
杨树明 5 years ago
parent 984e38c55c
commit cb44790e9e

@ -32,7 +32,7 @@ module.exports = {
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
// devtool: "cheap-module-eval-source-map", // devtool: "cheap-module-eval-source-map",
// 开启调试 // 开启调试
devtool: "source-map", // 开启调试 //devtool: "source-map", // 开启调试
// These are the "entry points" to our application. // These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle. // This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS. // The first two entry points enable "hot" CSS and auto-refreshes for JS.

@ -748,7 +748,7 @@ submittojoinclass=(value)=>{
return true return true
} else if (url.startsWith('/courses')&&match.path.startsWith('/courses')) { } else if (url.startsWith('/courses')&&match.path.startsWith('/courses')) {
return true return true
}else if (url.startsWith('/competitions')&&match.path.startsWith('/crowdsourcing')) { }else if (url.startsWith('/competitions')&&match.path.startsWith('/competitions')) {
return true return true
}else if (url.startsWith('/crowdsourcing')&&match.path.startsWith('/crowdsourcing')) { }else if (url.startsWith('/crowdsourcing')&&match.path.startsWith('/crowdsourcing')) {
return true return true
@ -789,7 +789,7 @@ submittojoinclass=(value)=>{
let coursestype=false; let coursestype=false;
let activePackages=false; let activePackages=false;
let activeMoopCases=false; let activeMoopCases=false;
let activeCompetitions=false;
if (match.path === '/forums') { if (match.path === '/forums') {
activeForums = true; activeForums = true;
@ -803,7 +803,9 @@ submittojoinclass=(value)=>{
activePackages = true; activePackages = true;
}else if(match.path.startsWith('/moop_cases')){ }else if(match.path.startsWith('/moop_cases')){
activeMoopCases = true; activeMoopCases = true;
}else { }else if(match.path.startsWith('/competitions')){
activeCompetitions = true;
}else {
activeIndex = true; activeIndex = true;
} }
@ -1097,7 +1099,7 @@ submittojoinclass=(value)=>{
</li> </li>
{/*<li className=""><a href={"/libraries"}>教学案例</a></li>*/} {/*<li className=""><a href={"/libraries"}>教学案例</a></li>*/}
<li className=""> <li className={`${activeCompetitions === true ? 'pr active' : 'pr'}`}>
<a href={this.props.Headertop===undefined?"":this.props.Headertop.competitions_url}>在线竞赛</a> <a href={this.props.Headertop===undefined?"":this.props.Headertop.competitions_url}>在线竞赛</a>
{/*<img className="roundedRectangles"*/} {/*<img className="roundedRectangles"*/}
{/* src={require('./roundedRectangle.png')}*/} {/* src={require('./roundedRectangle.png')}*/}

@ -25,14 +25,14 @@ class TPMCollaborators extends Component {
<React.Fragment> <React.Fragment>
<div className="educontent clearfix mt30 mb80"> <div className="educontent clearfix mt30 mb80">
<div className="with65 fl edu-back-white" > <div className={" with65 fl "}>
<TPMNav {/*<TPMNav*/}
match={match} {/* match={match}*/}
user={user} {/* user={user}*/}
shixun={shixun} {/* shixun={shixun}*/}
{...this.props} {/* {...this.props}*/}
is_jupyter={this.props.is_jupyter} {/* is_jupyter={this.props.is_jupyter}*/}
></TPMNav> {/*></TPMNav>*/}
<Collaborators <Collaborators
{...this.props} {...this.props}
/> />

@ -252,6 +252,9 @@ class TPMIndex extends Component {
//右侧数据 //右侧数据
let shixunsDetailsURL=`/shixuns/`+id+`/show_right.json`; let shixunsDetailsURL=`/shixuns/`+id+`/show_right.json`;
axios.get(shixunsDetailsURL).then((response)=> { axios.get(shixunsDetailsURL).then((response)=> {
if(response.data){
}
this.setState({ this.setState({
TPMRightSectionData: response.data TPMRightSectionData: response.data
}); });

@ -1,205 +1,230 @@
import React, { Component } from 'react'; import React, {Component} from 'react';
import { BrowserRouter as Router, Route, Link } from "react-router-dom"; import {BrowserRouter as Router, Route, Link} from "react-router-dom";
import axios from 'axios'; import axios from 'axios';
import { getImageUrl,} from "educoder"; import {getImageUrl,} from "educoder";
import './TPMright.css'; import './TPMright.css';
import {Icon,Tooltip} from 'antd'; import {Icon, Tooltip} from 'antd';
// import "antd/dist/antd.css"; // import "antd/dist/antd.css";
class TPMRightSection extends Component { class TPMRightSection extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
TPMRightSection:false, TPMRightSection: false,
clickNewsubscripttype:false clickNewsubscripttype: false
} }
} }
// componentDidMount() { // componentDidMount() {
// let id=this.props.match.params.shixunId; // let id=this.props.match.params.shixunId;
// //
// let shixunsDetailsURL=`/shixuns/`+id+`/show_right.json`; // let shixunsDetailsURL=`/shixuns/`+id+`/show_right.json`;
// //
// axios.get(shixunsDetailsURL).then((response)=> { // axios.get(shixunsDetailsURL).then((response)=> {
// if(response.status===200){ // if(response.status===200){
// this.setState({ // this.setState({
// TPMRightSectionData: response.data // TPMRightSectionData: response.data
// }); // });
// } // }
// }).catch((error)=>{ // }).catch((error)=>{
// console.log(error) // console.log(error)
// }); // });
// } // }
// shouldComponentUpdate(nextProps, nextState) { // shouldComponentUpdate(nextProps, nextState) {
// return nextProps.TPMRightSectionData !== this.state.TPMRightSectionData // return nextProps.TPMRightSectionData !== this.state.TPMRightSectionData
// } // }
clickNewsubscript=(val)=>{ clickNewsubscript = (val) => {
if(val===0){ if (val === 0) {
this.setState({ this.setState({
TPMRightSection:true, TPMRightSection: true,
clickNewsubscripttype:true clickNewsubscripttype: true
}) })
}else{ } else {
this.setState({ this.setState({
TPMRightSection:false, TPMRightSection: false,
clickNewsubscripttype:false clickNewsubscripttype: false
}) })
} }
} }
render() {
let {TPMRightSection,clickNewsubscripttype}=this.state; render() {
let {TPMRightSectionData}=this.props let {TPMRightSection, clickNewsubscripttype} = this.state;
let {TPMRightSectionData} = this.props
return (
<div> return (
{ <div>
TPMRightSectionData===undefined?"": {
<div> TPMRightSectionData === undefined ? "" :
<div className="edu-back-white padding40-20 mb10"> <div>
<p className="font-16 mb20">创建者</p> <div className="edu-back-white pd302020zuoze mb10">
<div className="df"> <p className="font-16 mb20">创建者</p>
<a href={TPMRightSectionData===undefined?"":TPMRightSectionData.creator===undefined?"":`/users/${TPMRightSectionData.creator.login}/courses`}> <div className="df">
<img alt="头像" className="radius mr10" height="80" src={getImageUrl(TPMRightSectionData===undefined?"":TPMRightSectionData.creator===undefined?"":'images/'+TPMRightSectionData.creator.image_url+"?1532489442")} width="80" /> <a
</a> href={TPMRightSectionData === undefined ? "" : TPMRightSectionData.creator === undefined ? "" : `/users/${TPMRightSectionData.creator.login}/courses`}>
<div className="flex1"> <img alt="头像" className="radius mr10" height="36"
src={getImageUrl(TPMRightSectionData === undefined ? "" : TPMRightSectionData.creator === undefined ? "" : 'images/' + TPMRightSectionData.creator.image_url + "?1532489442")}
<p className="mb20">{TPMRightSectionData===undefined?"":TPMRightSectionData.creator===undefined?"":TPMRightSectionData.creator.name}</p> width="36"/>
<div className="clearfix"> </a>
<span>发布 {TPMRightSectionData.user_shixuns_count}</span> <div className="flex1">
{/*<span className="ml20">粉丝 <span id="user_h_fan_count">{TPMRightSectionData.fans_count}</span></span>*/}
{/* <a href="/watchers/unwatch?className=fr+user_watch_btn+edu-default-btn+edu-focus-btn&amp;object_id=3039&amp;object_type=user&amp;shixun_id=61&amp;target_id=3039" className="fr edu-default-btn user_watch_btn edu-focus-btn" data-method="post" data-remote="true" id="cancel_watch" rel="nofollow">取消关注</a> */} <div className="creatorname sortinxdirection space-between">
</div> <div className={"creatornamelist"}>
{TPMRightSectionData === undefined ? "" : TPMRightSectionData.creator === undefined ? "" : TPMRightSectionData.creator.name}
</div> </div>
</div> <div className={"creatornamelist width80center"}>
</div> {TPMRightSectionData.user_shixuns_count}
{ </div>
TPMRightSectionData === undefined ? "" :TPMRightSectionData.tags===undefined?"": TPMRightSectionData.tags.length === 0 ? "" : </div>
<div className="edu-back-white padding40-20 mb10 relative"> <div className="clearfix">
<p className="font-16 mb20">技能标签 <span className="color-grey-c">{TPMRightSectionData.tags.length}</span></p> <span className={"fr color888hezuo"}>发布实训项目</span>
<div className={TPMRightSection===false?"newedbox newedboxheight":"newedbox newminheight"}> {/*<span className="ml20">粉丝 <span id="user_h_fan_count">{TPMRightSectionData.fans_count}</span></span>*/}
<div className="clearfix" id="boxheight"> {/* <a href="/watchers/unwatch?className=fr+user_watch_btn+edu-default-btn+edu-focus-btn&amp;object_id=3039&amp;object_type=user&amp;shixun_id=61&amp;target_id=3039" className="fr edu-default-btn user_watch_btn edu-focus-btn" data-method="post" data-remote="true" id="cancel_watch" rel="nofollow">取消关注</a> */}
{ TPMRightSectionData.tags.map((item,key)=>{ </div>
return(
<span className={item.status===false?"newedu-filter-btn fl":"edu-filter-btn29BD8B fl"} </div>
style={{display:item.tag_name===" "||item.tag_name===""?"none":""}} </div>
key={key}>{item.tag_name}</span> </div>
)}) {
} TPMRightSectionData === undefined ? "" : TPMRightSectionData.tags === undefined ? "" : TPMRightSectionData.tags.length === 0 ? "" :
</div> <div className="edu-back-white padding40-20 mb10 relative">
</div> <p className="font-16 mb20">
<span>技能标签</span>
<span className={"sortinxdirection space-between fr"}>
<div className={TPMRightSectionData.tags.length>15&&clickNewsubscripttype===false?"newsubscript mb9 color-grey-9":"newsubscript mb9 color-grey-9 none"} <span className="color888hezuo font-12">已获得 {TPMRightSectionData&&TPMRightSectionData.user_tag_count} / {TPMRightSectionData&&TPMRightSectionData.tag_count} </span>
</span>
data-tip-down="显示全部"
onClick={()=>this.clickNewsubscript(0)}><span className="mr8">...</span><Icon type="caret-down" /> </p>
</div> <div className={TPMRightSection === false ? "newedbox newedboxheight" : "newedbox newminheight"}>
<div className="clearfix" id="boxheight">
{TPMRightSectionData.tags.map((item, key) => {
<div className={clickNewsubscripttype===false?"newsubscript mb9 color-grey-9 none":"newsubscript mb9 color-grey-9"} return (
<span className={item.status === false ? "newedu-filter-btn fl" : "edu-filter-btn29BD8B fl"}
data-tip-down="显示全部" style={{display: item.tag_name === " " || item.tag_name === "" ? "none" : ""}}
onClick={()=>this.clickNewsubscript(1)}><Icon type="caret-up" /> key={key}>{item.tag_name}</span>
</div> )
})
</div> }
</div>
</div>
}
<div
<div className="padding20 edu-back-white mb10 mt10" style={{ className={TPMRightSectionData.tags.length > 15 && clickNewsubscripttype === false ? "newsubscript mb9 color-grey-9" : "newsubscript mb9 color-grey-9 none"}
display: TPMRightSectionData === undefined?"none":TPMRightSectionData.paths===undefined?"":TPMRightSectionData.paths.length === 0 ? "none" : "block"
}}> data-tip-down="显示全部"
<p className="mb20 font-16 clearfix">所属课程</p> onClick={() => this.clickNewsubscript(0)}><span className="mr8">...</span><Icon
<div className="recommend-list" > type="caret-down"/>
{ </div>
TPMRightSectionData===undefined?"":TPMRightSectionData.paths===undefined?"":TPMRightSectionData.paths.map((i,k)=>{
return( <div
className={clickNewsubscripttype === false ? "newsubscript mb9 color-grey-9 none" : "newsubscript mb9 color-grey-9"}
<div className="recomments clearfix df" key={k}>
data-tip-down="显示全部"
<a href={"/paths/"+i.id} height="96" width="128" target="_blank"> onClick={() => this.clickNewsubscript(1)}><Icon type="caret-up"/>
<img alt="实训" height="96" src={"/"+i.image_url} width="128" /> </div>
</a>
</div>
<div className="ml10 flex1">
<a href={"/paths/"+i.id} target="_blank" data-tip-down={i.name} className="color-grey-6 task-hide mb12 recomment-name">{i.name}</a>
<p className="clearfix mt8 font-12 color-grey-B4"> }
<Tooltip placement="bottom" title={"章节"}>
<span className="mr10 fl squareIconSpan"><i className="iconfont icon-shixun fl mr3"></i>{i.stages_count}</span> <div className="padding20 edu-back-white mb10 mt10" style={{
</Tooltip> display: TPMRightSectionData === undefined ? "none" : TPMRightSectionData.paths === undefined ? "" : TPMRightSectionData.paths.length === 0 ? "none" : "block"
}}>
{/*<Tooltip placement="bottom" title={"经验值"}>*/} <p className="mb20 font-16 clearfix">所属课程</p>
{/*<span className="mr10 fl squareIconSpan"><i className="iconfont icon-jingyan fl mr3"></i>{i.score_count}</span>*/} <div className="recommend-list">
{/*</Tooltip>*/} {
TPMRightSectionData === undefined ? "" : TPMRightSectionData.paths === undefined ? "" : TPMRightSectionData.paths.map((i, k) => {
<Tooltip placement="bottom" title={"学习人数"}>
<span className="mr10 fl squareIconSpan"><i className="iconfont icon-chengyuan fl mr3"></i>{i.members_count}</span> return (
</Tooltip>
<div className="recomments clearfix df" key={k}>
</p>
</div> <a href={"/paths/" + i.id} height="96" width="128" target="_blank">
<img alt="实训" height="96" src={"/" + i.image_url} width="128"/>
</div> </a>
) <div className="ml10 flex1">
}) <a href={"/paths/" + i.id} target="_blank" data-tip-down={i.name}
} className="color-grey-6 task-hide mb12 recomment-name">{i.name}</a>
</div> <p className="clearfix mt8 font-12 color-grey-B4">
</div>
<Tooltip placement="bottom" title={"章节"}>
{TPMRightSectionData === undefined?"":TPMRightSectionData.paths===undefined?"":TPMRightSectionData.paths.length === 0 ? "" : <span className="mr10 fl squareIconSpan"><i
this.props.user&&this.props.user.main_site===true?<div className="padding20 edu-back-white" className="iconfont icon-shixun fl mr3"></i>{i.stages_count}</span>
style={{ </Tooltip>
display:
TPMRightSectionData === undefined?"none":TPMRightSectionData.recommands===undefined?"none":TPMRightSectionData.recommands.length === 0 ? "none" : "block" {/*<Tooltip placement="bottom" title={"经验值"}>*/}
}} {/*<span className="mr10 fl squareIconSpan"><i className="iconfont icon-jingyan fl mr3"></i>{i.score_count}</span>*/}
> {/*</Tooltip>*/}
<p className="mb20 font-16 clearfix">推荐实训</p>
<div className="recommend-list"> <Tooltip placement="bottom" title={"学习人数"}>
{ <span className="mr10 fl squareIconSpan"><i
TPMRightSectionData===undefined?"":TPMRightSectionData.recommands===undefined?"":TPMRightSectionData.recommands.map((item,key)=>{ className="iconfont icon-chengyuan fl mr3"></i>{i.members_count}</span>
return( </Tooltip>
<div className="recomments clearfix df" key={key}>
<a href={"/shixuns/"+item.identifier+"/challenges"} target="_blank"> </p>
<img alt="69?1526971094" height="96" src={"/"+item.pic} width="128"/> </div>
</a>
<div className="ml10 flex1"> </div>
<Tooltip placement="bottom" title={item.name}>
<a href={"/shixuns/"+item.identifier+"/challenges"} target="_blank" className="color-grey-6 task-hide mb12 recomment-name">{item.name}</a> )
</Tooltip> })
<p className="clearfix mt8 font-12 color-grey-B4"> }
{item.stu_num} 人学习 </div>
</p> </div>
<p className="edu-txt-right color-orange pr10">{item.level}</p>
</div> {TPMRightSectionData === undefined ? "" : TPMRightSectionData.paths === undefined ? "" : TPMRightSectionData.paths.length === 0 ? "" :
</div> this.props.user && this.props.user.main_site === true ? <div className="padding20 edu-back-white"
) style={{
}) display:
} TPMRightSectionData === undefined ? "none" : TPMRightSectionData.recommands === undefined ? "none" : TPMRightSectionData.recommands.length === 0 ? "none" : "block"
</div> }}
</div>:"" >
} <p className="mb20 font-16 clearfix">推荐实训</p>
</div> <div className="recommend-list">
} {
</div> TPMRightSectionData === undefined ? "" : TPMRightSectionData.recommands === undefined ? "" : TPMRightSectionData.recommands.map((item, key) => {
) return (
<div className="recomments clearfix df" key={key}>
<a href={"/shixuns/" + item.identifier + "/challenges"} target="_blank">
} <img alt="69?1526971094" height="96" src={"/" + item.pic} width="128"/>
</a>
<div className="ml10 flex1">
<Tooltip placement="bottom" title={item.name}>
<a href={"/shixuns/" + item.identifier + "/challenges"} target="_blank"
className="color-grey-6 task-hide mb12 recomment-name">{item.name}</a>
</Tooltip>
<p className="clearfix mt8 font-12 color-grey-B4">
{item.stu_num} 人学习
</p>
<p className="edu-txt-right color-orange pr10">{item.level}</p>
</div>
</div>
)
})
}
</div>
</div> : ""
}
</div>
}
</div>
)
}
} }
export default TPMRightSection; export default TPMRightSection;

@ -1,5 +1,5 @@
/*bæ°æ ‡ç­¾*/ /*bæ°æ ‡ç­¾*/
.newedu-filter-btn{ .newedu-filter-btn {
display: block; display: block;
float: left; float: left;
padding: 0 9px; padding: 0 9px;
@ -11,24 +11,28 @@
margin-right: 10px; margin-right: 10px;
margin-bottom: 9px; margin-bottom: 9px;
} }
.newedbox{
.newedbox {
/*flex-wrap: wrap;*/ /*flex-wrap: wrap;*/
/*display: -webkit-flex; !* Safari *!*/ /*display: -webkit-flex; !* Safari *!*/
/*display: flex;*/ /*display: flex;*/
width: 360px; width: 360px;
position:relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.newsubscript{
.newsubscript {
position: absolute; position: absolute;
right: 23px; right: 23px;
bottom: 16px; bottom: 16px;
cursor: pointer; cursor: pointer;
} }
.newsubscript:hover{
color:deepskyblue; .newsubscript:hover {
color: deepskyblue;
} }
.edu-filter-btn29BD8B{
.edu-filter-btn29BD8B {
display: block; display: block;
float: left; float: left;
padding: 0 9px; padding: 0 9px;
@ -40,40 +44,71 @@
margin-right: 10px; margin-right: 10px;
margin-bottom: 9px; margin-bottom: 9px;
} }
.relative{
position:relative; .relative {
position: relative;
} }
.newedboxheight{
.newedboxheight {
max-height: 177px; max-height: 177px;
overflow-y: hidden; overflow-y: hidden;
} }
.newminheight{
.newminheight {
/*max-height: 670px;*/ /*max-height: 670px;*/
max-height: 300px; max-height: 300px;
overflow-y: auto; overflow-y: auto;
} }
.delSubentry{ .delSubentry {
font-size:7px; font-size: 7px;
font-family:MicrosoftYaHei; font-family: MicrosoftYaHei;
font-weight:400; font-weight: 400;
color:rgba(76,172,255,1); color: rgba(76, 172, 255, 1);
line-height:9px; line-height: 9px;
cursor: pointer; cursor: pointer;
} }
.operationalter .delSubentry{
font-size:15px !important; .operationalter .delSubentry {
font-size: 15px !important;
line-height: 25px; line-height: 25px;
} }
/*临时的tpi关闭按é®æ ·å¼*/ /*临时的tpi关闭按é®æ ·å¼*/
.headerRight a { .headerRight a {
color: #1a3f5f; color: #1a3f5f;
} }
/*实训做成弹窗a标签样式调整*/ /*实训做成弹窗a标签样式调整*/
.-task-list-title a:link, .-task-list-title a:visited {color: #bcc6cd;} .-task-list-title a:link, .-task-list-title a:visited {
.-task-list-title a:hover{ color: #bcc6cd;
}
.-task-list-title a:hover {
color: #459be5; color: #459be5;
} }
.headerLeft .-header-right{
.headerLeft .-header-right {
height: 32px; height: 32px;
}
.creatorname {
font-size: 16px;
color: rgba(51, 51, 51, 1);
}
.creatornamelist {
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
cursor: default;
}
.width80center {
width: 80px;
text-align: center;
}
.pd302020zuoze {
padding: 30px 20px 20px;
} }

@ -143,8 +143,8 @@
height:34px; height:34px;
line-height: 34px; line-height: 34px;
} }
.hezuozhe660{ .hezuozhe630{
width: 660px; width: 630px;
} }
.color333hezuo{ .color333hezuo{
@ -153,4 +153,25 @@
.color888hezuo{ .color888hezuo{
color:#888888; color:#888888;
}
.newyslusercjz{
display: inline-block;
position: absolute;
bottom: 0px;
left: -18px;
width: 44px;
height: 18px;
border-radius: 13px;
background: #F38B03;
color: #fff;
}
.newyslusercjztest{
width: 45px;
height: 29px;
font-size: 10px;
color: #fff;
line-height: 18px;
text-align: center;
} }
Loading…
Cancel
Save