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

View File

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

View File

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

View File

@ -1,23 +1,8 @@
import React, { Component } from 'react'; 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" import "./usersInfo.css"
class publicCreateNew extends Component { class publicCreateNew extends Component {
constructor(props){
super(props);
this.state={
}
}
//头部获取是否已经登录了 //头部获取是否已经登录了
getUser = (url, name) => { getUser = (url, name) => {
@ -31,8 +16,6 @@ class publicCreateNew extends Component{
return; return;
} }
} }
if (url !== undefined || url !== "") { if (url !== undefined || url !== "") {
window.location.href = url; window.location.href = url;
} }
@ -57,7 +40,7 @@ class publicCreateNew extends Component{
let { href, name, index } = this.props; let { href, name, index } = this.props;
return ( 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"> <div className="substance substancepad">
{this.props.Createtype === "projects" ? <a onClick={() => this.getUser(href, name)}> {this.props.Createtype === "projects" ? <a onClick={() => this.getUser(href, name)}>

View File

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