From 3e96e210f3e6abecfffc1cf4b262592cccc38f3a Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Wed, 6 May 2020 17:52:08 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/modules/user/usersInfo/InfosCourse.js | 26 +----
src/modules/user/usersInfo/InfosIndex.js | 103 +++++++------------
src/modules/user/usersInfo/InfosPackage.js | 15 +--
src/modules/user/usersInfo/publicCreatNew.js | 101 ++++++++----------
src/modules/user/usersInfo/usersInfo.css | 11 +-
5 files changed, 96 insertions(+), 160 deletions(-)
diff --git a/src/modules/user/usersInfo/InfosCourse.js b/src/modules/user/usersInfo/InfosCourse.js
index f3235883..71ca840d 100644
--- a/src/modules/user/usersInfo/InfosCourse.js
+++ b/src/modules/user/usersInfo/InfosCourse.js
@@ -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;
}
-
-
-
`
}
diff --git a/src/modules/user/usersInfo/InfosIndex.js b/src/modules/user/usersInfo/InfosIndex.js
index 89d69ab5..e132220f 100644
--- a/src/modules/user/usersInfo/InfosIndex.js
+++ b/src/modules/user/usersInfo/InfosIndex.js
@@ -1,90 +1,59 @@
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';
const UsersInfo = Loadable({
- loader: () => import('./Infos'),
- loading: Loading,
+ loader: () => import('./Infos'),
+ loading: Loading,
})
const VideoUploadList = Loadable({
- loader: () => import('./video/VideoUploadList'),
- loading: Loading,
+ loader: () => import('./video/VideoUploadList'),
+ loading: Loading,
})
const VideoPublishSuccess = Loadable({
- loader: () => import('./video/VideoPublishSuccess'),
- loading: Loading,
+ loader: () => import('./video/VideoPublishSuccess'),
+ loading: Loading,
})
const VideoProtocol = Loadable({
- loader: () => import('./video/VideoProtocol'),
- loading: Loading,
+ loader: () => import('./video/VideoProtocol'),
+ loading: Loading,
})
const $ = window.$;
-class InfosIndex extends Component{
- constructor(props){
- super(props);
- this.state={
- data:undefined,
- }
- }
- componentDidMount =()=>{
-
- }
+class InfosIndex extends Component {
-
- //判断是否看的是当前用户的个人主页
- componentDidUpdate =(prevProps)=> {
-
- }
- render(){
- let {
- data ,
- }=this.state;
- return(
-
-
- {/* --------------------------------------------------------------------- */}
-
-
- {/* 视频发布 */}
- ()
- }
- >
- ()
- }
- >
- ()
- }
- >
-
-
-
-
-
-
- ()
- }
- >
-
-
+ render() {
+ return (
+
+ {/* 视频发布 */}
+ ()
+ }
+ >
+ ()
+ }
+ >
+ ()
+ }
+ >
+ ()
+ }
+ >
+
)
}
}
-export default CNotificationHOC() ( SnackbarHOC() ( TPMIndexHOC(InfosIndex) ));
\ No newline at end of file
+export default CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(InfosIndex)));
\ No newline at end of file
diff --git a/src/modules/user/usersInfo/InfosPackage.js b/src/modules/user/usersInfo/InfosPackage.js
index 903353e2..ec1659c9 100644
--- a/src/modules/user/usersInfo/InfosPackage.js
+++ b/src/modules/user/usersInfo/InfosPackage.js
@@ -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,13 +134,13 @@ 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);
}
})
- .catch(function (error) {
- console.log(error);
- });
+ .catch(function (error) {
+ console.log(error);
+ });
this.cancelProject();
}
render() {
diff --git a/src/modules/user/usersInfo/publicCreatNew.js b/src/modules/user/usersInfo/publicCreatNew.js
index da89143d..be365b10 100644
--- a/src/modules/user/usersInfo/publicCreatNew.js
+++ b/src/modules/user/usersInfo/publicCreatNew.js
@@ -1,86 +1,69 @@
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={
- }
- }
+class publicCreateNew extends Component {
//头部获取是否已经登录了
- getUser=(url,name)=> {
- if (this.props.user&&this.props.user.email===undefined||this.props.user&&this.props.user.email===null||this.props.user&&this.props.user.email==="") {
- this.props.showNotification("请先绑定邮箱,谢谢");
- return
+ getUser = (url, name) => {
+ if (this.props.user && this.props.user.email === undefined || this.props.user && this.props.user.email === null || this.props.user && this.props.user.email === "") {
+ this.props.showNotification("请先绑定邮箱,谢谢");
+ return
+ }
+ if (name === "新建实训") {
+ if (this.props && this.props.current_user && this.props.current_user.is_shixun_marker === false) {
+ this.props.setgoshowqqgtounp(true);
+ return;
}
- if(name==="新建实训"){
- if(this.props&&this.props.current_user&&this.props.current_user.is_shixun_marker===false){
- this.props.setgoshowqqgtounp(true);
- return;
- }
- }
-
-
- if(url !== undefined || url!==""){
+ }
+ if (url !== undefined || url !== "") {
window.location.href = url;
}
}
- getUsers=(url,name)=> {
+ getUsers = (url, name) => {
- if(name==="新建实训"){
- if(this.props&&this.props.current_user&&this.props.current_user.is_shixun_marker===false){
- this.props.setgoshowqqgtounp(true);
- return;
+ if (name === "新建实训") {
+ if (this.props && this.props.current_user && this.props.current_user.is_shixun_marker === false) {
+ this.props.setgoshowqqgtounp(true);
+ return;
+ }
}
- }
- if(url !== undefined || url!==""){
+ if (url !== undefined || url !== "") {
window.location.href = url;
}
}
- render() {
- let {href,name,index}=this.props;
+ render() {
+ let { href, name, index } = this.props;
- return (
-
+ )
+ }
}
export default publicCreateNew;
diff --git a/src/modules/user/usersInfo/usersInfo.css b/src/modules/user/usersInfo/usersInfo.css
index 4755c6c7..dbe34429 100644
--- a/src/modules/user/usersInfo/usersInfo.css
+++ b/src/modules/user/usersInfo/usersInfo.css
@@ -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;