This commit is contained in:
caishi 2020-05-06 17:52:08 +08:00
parent 5f35b8dc91
commit 3e96e210f3
5 changed files with 96 additions and 160 deletions

View File

@ -39,7 +39,7 @@ class InfosCourse extends Component {
page,
sort_by,
sort_direction,
per_page: this.props.is_current && category && page == 1 ? 17 : 16
per_page: this.props.is_current && category && page === 1 ? 17 : 16
}
}).then((result) => {
if (result) {
@ -193,39 +193,19 @@ class InfosCourse extends Component {
border: none !important;
color: #4CACFF;
}
`
}
</style>
<div className="white-panel edu-back-white pt20 pb20 clearfix ">
<li className={category ? " font-16 whitepanelyslli" : "active font-16 whitepanelyslli"}><a
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
onClick={() => this.changeCategory("manage")}
className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}管理的</a></li>
<li className={category == "study" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
<li className={category === "study" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
onClick={() => this.changeCategory("study")}
className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}学习的</a></li>
</div>
<style>
{
` .secondNavs li {
color: #676767;
/* margin: 0px 20px; */
float: left;
}
.secondNavs li a:hover{
color: #4CACFF
}
.secondNavs li.active a{
color: #4CACFF
}
`
}
</style>
{
is_current &&
<div className="edu-back-white padding10-30 clearfix secondNavs bor-top-greyE">

View File

@ -1,11 +1,8 @@
import React, { Component } from 'react';
import {Link} from 'react-router-dom';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import { Route, Switch } from 'react-router-dom';
import { SnackbarHOC } from 'educoder';
import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
import { CNotificationHOC } from '../../courses/common/CNotificationHOC'
import Loadable from 'react-loadable';
import Loading from '../../../Loading';
@ -30,31 +27,10 @@ const VideoProtocol = Loadable({
const $ = window.$;
class InfosIndex extends Component {
constructor(props){
super(props);
this.state={
data:undefined,
}
}
componentDidMount =()=>{
}
//判断是否看的是当前用户的个人主页
componentDidUpdate =(prevProps)=> {
}
render() {
let {
data ,
}=this.state;
return (
<Switch {...this.props}>
{/* --------------------------------------------------------------------- */}
{/* 视频发布 */}
<Route exact path="/users/:username/videos/upload"
render={
@ -71,18 +47,11 @@ class InfosIndex extends Component{
(props) => (<VideoProtocol {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/users/:username"
render={
(props) => (<UsersInfo {...this.props} {...props} {...this.state} />)
}
></Route>
</Switch>
)
}

View File

@ -1,9 +1,6 @@
import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import { Tooltip, Menu, Pagination, Spin } from 'antd';
import { Pagination, Spin } from 'antd';
import axios from 'axios';
import { getImageUrl } from 'educoder';
import Modals from '../../modals/Modals';
import NoneData from '../../courses/coursesPublic/NoneData';
import "./usersInfo.css"
@ -19,7 +16,6 @@ let categorylist = [
{ name: "运维与测试", value: "devops_and_test" },
{ name: "其他", value: "other" },
]
//
function setcategorylist(val) {
let vals = ""
categorylist.some((item, key) => {
@ -29,7 +25,6 @@ function setcategorylist(val) {
}
}
)
return vals
}
class InfosPackage extends Component {
@ -139,7 +134,7 @@ class InfosPackage extends Component {
let url = `/project_packages/${id}.json`
axios.delete(url).then((response) => {
if (response.data.status == 0) {
if (response.data.status === 0) {
this.getCourses(category, status, 1);
}
})

View File

@ -1,23 +1,8 @@
import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import {Tooltip,Menu,Pagination} from 'antd';
import Loadable from 'react-loadable';
import Loading from '../../../Loading';
import axios from 'axios';
import {getImageUrl} from 'educoder';
import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
import { CNotificationHOC } from '../../courses/common/CNotificationHOC';
import GotoQQgroup from '../../../modal/GotoQQgroup';
import "./usersInfo.css"
class publicCreateNew extends Component {
constructor(props){
super(props);
this.state={
}
}
//头部获取是否已经登录了
getUser = (url, name) => {
@ -31,8 +16,6 @@ class publicCreateNew extends Component{
return;
}
}
if (url !== undefined || url !== "") {
window.location.href = url;
}
@ -57,7 +40,7 @@ class publicCreateNew extends Component{
let { href, name, index } = this.props;
return (
<div className="square-Item" style={{"height":`${index=="1"?"289":index=="2"?"298":index=="3"?"295":"289"}px`}}>
<div className="square-Item" style={{ "height": `${index === "1" ? "289" : index === "2" ? "298" : index === "3" ? "295" : "289"}px` }}>
<div className="substance substancepad">
{this.props.Createtype === "projects" ? <a onClick={() => this.getUser(href, name)}>

View File

@ -14,7 +14,16 @@
font-size: 16px;
position: relative;
}
.secondNavs li {
color: #676767;
float: left;
}
.secondNavs li a:hover{
color: #4CACFF
}
.secondNavs li.active a{
color: #4CACFF
}
.navInfo li.active::after {
position: absolute;
left: 0px;