parent
fc2aff16e4
commit
89c7c078cf
File diff suppressed because it is too large
Load Diff
@ -1,142 +1,142 @@
|
||||
import React, { Component } from 'react';
|
||||
import { SnackbarHOC } from 'educoder';
|
||||
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
|
||||
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
|
||||
import Loadable from 'react-loadable';
|
||||
import Loading from '../../../Loading';
|
||||
import { CNotificationHOC } from '../common/CNotificationHOC'
|
||||
import CNotificationHOC from '../common/CNotificationHOC'
|
||||
import { RouteHOC } from './common'
|
||||
import "../css/busyWork.css"
|
||||
//引入对应跳转的组件
|
||||
const ListPageIndex = Loadable({
|
||||
loader: () => import('../ListPageIndex'),
|
||||
loading:Loading,
|
||||
loader: () => import('../ListPageIndex'),
|
||||
loading: Loading,
|
||||
})
|
||||
//新建分组/普通作业
|
||||
const NewWork = Loadable({
|
||||
loader: () => import('./NewWork'),
|
||||
loading:Loading,
|
||||
loader: () => import('./NewWork'),
|
||||
loading: Loading,
|
||||
})
|
||||
const CommonWorkDetailIndex = Loadable({
|
||||
loader: () => import('./CommonWorkDetailIndex'),
|
||||
loading:Loading,
|
||||
loading: Loading,
|
||||
})
|
||||
const CommonWorkSetting = Loadable({
|
||||
loader: () => import('./CommonWorkSetting'),
|
||||
loading:Loading,
|
||||
loading: Loading,
|
||||
})
|
||||
const CommonWorkList = Loadable({
|
||||
loader: () => import('./CommonWorkList'),
|
||||
loading:Loading,
|
||||
loading: Loading,
|
||||
})
|
||||
const CommonWorkQuestion = Loadable({
|
||||
loader: () => import('./CommonWorkQuestion'),
|
||||
loading:Loading,
|
||||
loading: Loading,
|
||||
})
|
||||
const CommonWorkAnswer = Loadable({
|
||||
loader: () => import('./CommonWorkAnswer'),
|
||||
loading:Loading,
|
||||
loading: Loading,
|
||||
})
|
||||
const CommonWorkAppraise = Loadable({
|
||||
loader: () => import('./CommonWorkAppraise'),
|
||||
loading:Loading,
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
const CommonWorkPost = Loadable({
|
||||
loader: () => import('./CommonWorkPost'),
|
||||
loading:Loading,
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
const CommonWork = Loadable({
|
||||
loader: () => import('./commonWork'),
|
||||
loading:Loading,
|
||||
loading: Loading,
|
||||
})
|
||||
class CoursesWorkIndex extends Component{
|
||||
class CoursesWorkIndex extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<Switch {...this.props}>
|
||||
|
||||
{/* --------------------------------------------------------------------- */}
|
||||
|
||||
{/* 作业设置 */}
|
||||
{/* http://localhost:3007/courses/1309/homework/9300/setting */}
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:workId/setting"
|
||||
render={
|
||||
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 作品列表 */}
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:workId/list"
|
||||
render={
|
||||
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 作业问答 */}
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:workId/question"
|
||||
render={
|
||||
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:workId/answer"
|
||||
render={
|
||||
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 评阅 */}
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:workId/:studentWorkId/appraise"
|
||||
render={
|
||||
(props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 提交作品 */}
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:workId/post"
|
||||
render={
|
||||
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:workId/:studentWorkId/post_edit"
|
||||
render={
|
||||
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
|
||||
{/* 新建 */}
|
||||
{/* http://localhost:3007/courses/1309/common_homeworks/9299/edit/1 */}
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:workId/:pageType"
|
||||
render={
|
||||
(props) => (<NewWork {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:categroy_id/new"
|
||||
render={
|
||||
(props) => (<NewWork {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
|
||||
|
||||
{/* 作业列表 */}
|
||||
<Route path="/courses/:coursesId/common_homeworks"
|
||||
render={
|
||||
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* --------------------------------------------------------------------- */}
|
||||
|
||||
|
||||
|
||||
</Switch>
|
||||
<Switch {...this.props}>
|
||||
|
||||
{/* --------------------------------------------------------------------- */}
|
||||
|
||||
{/* 作业设置 */}
|
||||
{/* http://localhost:3007/courses/1309/homework/9300/setting */}
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:workId/setting"
|
||||
render={
|
||||
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 作品列表 */}
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:workId/list"
|
||||
render={
|
||||
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 作业问答 */}
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:workId/question"
|
||||
render={
|
||||
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:workId/answer"
|
||||
render={
|
||||
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 评阅 */}
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:workId/:studentWorkId/appraise"
|
||||
render={
|
||||
(props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 提交作品 */}
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:workId/post"
|
||||
render={
|
||||
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:workId/:studentWorkId/post_edit"
|
||||
render={
|
||||
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
|
||||
{/* 新建 */}
|
||||
{/* http://localhost:3007/courses/1309/common_homeworks/9299/edit/1 */}
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:workId/:pageType"
|
||||
render={
|
||||
(props) => (<NewWork {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route exact path="/courses/:coursesId/common_homeworks/:categroy_id/new"
|
||||
render={
|
||||
(props) => (<NewWork {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
|
||||
|
||||
{/* 作业列表 */}
|
||||
<Route path="/courses/:coursesId/common_homeworks"
|
||||
render={
|
||||
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* --------------------------------------------------------------------- */}
|
||||
|
||||
|
||||
|
||||
</Switch>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default RouteHOC() (CNotificationHOC() (SnackbarHOC() ( CoursesWorkIndex) ));
|
||||
export default RouteHOC()(CNotificationHOC()(SnackbarHOC()(CoursesWorkIndex)));
|
@ -1,140 +1,140 @@
|
||||
import React, { Component } from 'react';
|
||||
import { SnackbarHOC } from 'educoder';
|
||||
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
|
||||
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
|
||||
import Loadable from 'react-loadable';
|
||||
import Loading from '../../../Loading';
|
||||
import { CNotificationHOC } from '../common/CNotificationHOC'
|
||||
import CNotificationHOC from '../common/CNotificationHOC'
|
||||
import { RouteHOC } from './common'
|
||||
import "../css/busyWork.css"
|
||||
//引入对应跳转的组件
|
||||
const ListPageIndex = Loadable({
|
||||
loader: () => import('../ListPageIndex'),
|
||||
loading:Loading,
|
||||
loader: () => import('../ListPageIndex'),
|
||||
loading: Loading,
|
||||
})
|
||||
//新建分组/普通作业
|
||||
const NewWork = Loadable({
|
||||
loader: () => import('./NewWork'),
|
||||
loading:Loading,
|
||||
loader: () => import('./NewWork'),
|
||||
loading: Loading,
|
||||
})
|
||||
const CommonWorkPost = Loadable({
|
||||
loader: () => import('./CommonWorkPost'),
|
||||
loading:Loading,
|
||||
loading: Loading,
|
||||
})
|
||||
const CommonWorkSetting = Loadable({
|
||||
loader: () => import('./CommonWorkSetting'),
|
||||
loading:Loading,
|
||||
loading: Loading,
|
||||
})
|
||||
const CommonWorkList = Loadable({
|
||||
loader: () => import('./CommonWorkList'),
|
||||
loading:Loading,
|
||||
loading: Loading,
|
||||
})
|
||||
const CommonWorkQuestion = Loadable({
|
||||
loader: () => import('./CommonWorkQuestion'),
|
||||
loading:Loading,
|
||||
loading: Loading,
|
||||
})
|
||||
const CommonWorkAnswer = Loadable({
|
||||
loader: () => import('./CommonWorkAnswer'),
|
||||
loading:Loading,
|
||||
loading: Loading,
|
||||
})
|
||||
const CommonWorkAppraise = Loadable({
|
||||
loader: () => import('./CommonWorkAppraise'),
|
||||
loading:Loading,
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
|
||||
const CommonWork = Loadable({
|
||||
loader: () => import('./commonWork'),
|
||||
loading:Loading,
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
const CommonWorkDetailIndex = Loadable({
|
||||
loader: () => import('./CommonWorkDetailIndex'),
|
||||
loading:Loading,
|
||||
loading: Loading,
|
||||
})
|
||||
class CoursesWorkIndex extends Component{
|
||||
class CoursesWorkIndex extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<Switch {...this.props}>
|
||||
|
||||
|
||||
{/* --------------------------------------------------------------------- */}
|
||||
|
||||
{/* --------------------------------------------------------------------- */}
|
||||
|
||||
{/* 作业设置 */}
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:workId/setting"
|
||||
render={
|
||||
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 作品列表 */}
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:workId/list"
|
||||
render={
|
||||
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 作业问答 */}
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:workId/question"
|
||||
render={
|
||||
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 参考答案 */}
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:workId/answer"
|
||||
render={
|
||||
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 评阅 */}
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:workId/:studentWorkId/appraise"
|
||||
render={
|
||||
(props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:workId/post"
|
||||
render={
|
||||
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:workId/:studentWorkId/post_edit"
|
||||
render={
|
||||
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 新建 */}
|
||||
{/* http://localhost:3007/courses/1309/group_homeworks/9299/edit/1 */}
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:workId/:pageType"
|
||||
render={
|
||||
(props) => (<NewWork {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:categroy_id/new"
|
||||
render={
|
||||
(props) => (<NewWork {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 作业列表 */}
|
||||
<Route path="/courses/:coursesId/group_homeworks"
|
||||
render={
|
||||
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
|
||||
</Switch>
|
||||
<Switch {...this.props}>
|
||||
|
||||
|
||||
{/* --------------------------------------------------------------------- */}
|
||||
|
||||
{/* --------------------------------------------------------------------- */}
|
||||
|
||||
{/* 作业设置 */}
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:workId/setting"
|
||||
render={
|
||||
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 作品列表 */}
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:workId/list"
|
||||
render={
|
||||
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 作业问答 */}
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:workId/question"
|
||||
render={
|
||||
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 参考答案 */}
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:workId/answer"
|
||||
render={
|
||||
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 评阅 */}
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:workId/:studentWorkId/appraise"
|
||||
render={
|
||||
(props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:workId/post"
|
||||
render={
|
||||
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:workId/:studentWorkId/post_edit"
|
||||
render={
|
||||
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 新建 */}
|
||||
{/* http://localhost:3007/courses/1309/group_homeworks/9299/edit/1 */}
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:workId/:pageType"
|
||||
render={
|
||||
(props) => (<NewWork {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route exact path="/courses/:coursesId/group_homeworks/:categroy_id/new"
|
||||
render={
|
||||
(props) => (<NewWork {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 作业列表 */}
|
||||
<Route path="/courses/:coursesId/group_homeworks"
|
||||
render={
|
||||
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
|
||||
</Switch>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default RouteHOC() (CNotificationHOC() (SnackbarHOC() ( CoursesWorkIndex) ));
|
||||
export default RouteHOC()(CNotificationHOC()(SnackbarHOC()(CoursesWorkIndex)));
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,73 +1,62 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import classNames from 'classnames'
|
||||
import postPaginationHOC from './PostPaginationHOC'
|
||||
|
||||
import Pagination from 'rc-pagination';
|
||||
|
||||
import { postPaginationHOC } from './PostPaginationHOC'
|
||||
|
||||
import PostItem from './PostItem'
|
||||
|
||||
import ForumsNavTab from './ForumsNavTab'
|
||||
|
||||
// import queryString from 'query-string'
|
||||
import { queryString } from 'educoder'
|
||||
import MemoList from './MemoList'
|
||||
|
||||
|
||||
class MemoMyPublish extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
this.state = {
|
||||
this.state = {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onPaginationChange(pageNum, pageSize) {
|
||||
this.props.onPaginationChange(pageNum, pageSize)
|
||||
}
|
||||
onPaginationChange(pageNum, pageSize) {
|
||||
this.props.onPaginationChange(pageNum, pageSize)
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
componentDidMount() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
componentWillUnmount() {
|
||||
|
||||
}
|
||||
componentWillReceiveProps(newProps, newContext) {
|
||||
}
|
||||
componentWillReceiveProps(newProps, newContext) {
|
||||
|
||||
}
|
||||
renderMemoList() {
|
||||
}
|
||||
renderMemoList() {
|
||||
|
||||
|
||||
return this.props.renderMemoList();
|
||||
}
|
||||
return this.props.renderMemoList();
|
||||
}
|
||||
|
||||
render() {
|
||||
const { match, history, currentPage, memo_count, memo_list } = this.props
|
||||
render() {
|
||||
const { match, history, currentPage, memo_count, memo_list } = this.props
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="discuss-tab bor-bottom-greyE clearfix pr boxsizing">
|
||||
<p className="_forum_tab pl20 pr20 clearfix boxsizing" style={{fontSize:'18px', color:'rgba(5,16,26,1)'}}>
|
||||
我的发布
|
||||
<p className="_forum_tab pl20 pr20 clearfix boxsizing" style={{ fontSize: '18px', color: 'rgba(5,16,26,1)' }}>
|
||||
我的发布
|
||||
<Link className="returnBtnA fr mr10" to={`/forums`}><span className="color-grey-9 font-16">返回</span></Link>
|
||||
</p>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
<MemoList {...this.props} renderMemoList={() => this.renderMemoList()}
|
||||
onPaginationChange={ (pageNum, pageSize) => this.props.onPaginationChange(pageNum, pageSize) }
|
||||
onPaginationChange={(pageNum, pageSize) => this.props.onPaginationChange(pageNum, pageSize)}
|
||||
>
|
||||
</MemoList>
|
||||
</React.Fragment>
|
||||
</React.Fragment>
|
||||
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default postPaginationHOC({ isMyPublish: true }) ( MemoMyPublish );
|
||||
export default postPaginationHOC({ isMyPublish: true })(MemoMyPublish);
|
||||
|
@ -1,65 +1,56 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import classNames from 'classnames'
|
||||
|
||||
import Pagination from 'rc-pagination';
|
||||
|
||||
import { postPaginationHOC } from './PostPaginationHOC'
|
||||
|
||||
import PostItem from './PostItem'
|
||||
import postPaginationHOC from './PostPaginationHOC'
|
||||
|
||||
|
||||
import ForumsNavTab from './ForumsNavTab'
|
||||
|
||||
class MemoGuide extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
this.state = {
|
||||
this.state = {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
onPaginationChange(pageNum, pageSize) {
|
||||
|
||||
this.props.onPaginationChange(pageNum, pageSize)
|
||||
}
|
||||
|
||||
|
||||
renderMemoList() {
|
||||
// const { memo_list, user } = this.props;
|
||||
// if (!memo_list) {
|
||||
// return ''
|
||||
// }
|
||||
// return memo_list.map( (item, index) => {
|
||||
// return (
|
||||
// <PostItem key={item.id} memo={item} user={user} index={index} {...this.props}></PostItem>
|
||||
// )
|
||||
// })
|
||||
return this.props.renderMemoList();
|
||||
}
|
||||
render() {
|
||||
const { match, history, currentPage, memo_count } = this.props
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
}
|
||||
|
||||
onPaginationChange(pageNum, pageSize) {
|
||||
|
||||
this.props.onPaginationChange(pageNum, pageSize)
|
||||
}
|
||||
|
||||
|
||||
renderMemoList() {
|
||||
// const { memo_list, user } = this.props;
|
||||
// if (!memo_list) {
|
||||
// return ''
|
||||
// }
|
||||
// return memo_list.map( (item, index) => {
|
||||
// return (
|
||||
// <PostItem key={item.id} memo={item} user={user} index={index} {...this.props}></PostItem>
|
||||
// )
|
||||
// })
|
||||
return this.props.renderMemoList();
|
||||
}
|
||||
render() {
|
||||
const { match, history, currentPage, memo_count } = this.props
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<ForumsNavTab {...this.props}></ForumsNavTab>
|
||||
<div id="forum_list" className="forum_table mh650">
|
||||
<div id="forum_list" className="forum_table mh650">
|
||||
|
||||
{this.renderMemoList()}
|
||||
|
||||
{ !!memo_count && <Pagination onChange={(pageNum, pageSize) => this.onPaginationChange(pageNum, pageSize)}
|
||||
showQuickJumper current={currentPage} total={memo_count} pageSize={15}/> }
|
||||
{!!memo_count && <Pagination onChange={(pageNum, pageSize) => this.onPaginationChange(pageNum, pageSize)}
|
||||
showQuickJumper current={currentPage} total={memo_count} pageSize={15} />}
|
||||
</div>
|
||||
</React.Fragment>
|
||||
</React.Fragment>
|
||||
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default postPaginationHOC( MemoGuide );
|
||||
export default postPaginationHOC(MemoGuide);
|
||||
|
@ -1,84 +1,74 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import classNames from 'classnames'
|
||||
|
||||
import Pagination from 'rc-pagination';
|
||||
|
||||
import { postPaginationHOC } from './PostPaginationHOC'
|
||||
|
||||
import PostItem from './PostItem'
|
||||
|
||||
import postPaginationHOC from './PostPaginationHOC'
|
||||
|
||||
import ForumsNavTab from './ForumsNavTab'
|
||||
|
||||
class MemoHottest extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
this.handleLocationChange = this.handleLocationChange.bind(this);
|
||||
this.handleLocationChange = this.handleLocationChange.bind(this);
|
||||
|
||||
this.state = {
|
||||
this.state = {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onPaginationChange(pageNum, pageSize) {
|
||||
onPaginationChange(pageNum, pageSize) {
|
||||
|
||||
this.props.onPaginationChange(pageNum, pageSize)
|
||||
}
|
||||
this.props.onPaginationChange(pageNum, pageSize)
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
// this.handleLocationChange(this.props.history.location);
|
||||
this.unlisten = this.props.history.listen(this.handleLocationChange);
|
||||
}
|
||||
componentDidMount() {
|
||||
// this.handleLocationChange(this.props.history.location);
|
||||
this.unlisten = this.props.history.listen(this.handleLocationChange);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.unlisten();
|
||||
}
|
||||
|
||||
handleLocationChange(location) {
|
||||
// your staff here
|
||||
console.log(`- - - location: '${location.pathname}'`);
|
||||
if (location.pathname && location.pathname.indexOf('/forums/categories/all') != -1
|
||||
&& this.locationSearch != location.search) {
|
||||
this.props.fetchMemos();
|
||||
}
|
||||
this.locationSearch = location.search;
|
||||
}
|
||||
componentWillUnmount() {
|
||||
this.unlisten();
|
||||
}
|
||||
|
||||
renderMemoList() {
|
||||
// const { memo_list, user } = this.props;
|
||||
// if (!memo_list) {
|
||||
// return ''
|
||||
// }
|
||||
// return memo_list.map( (item, index) => {
|
||||
// return (
|
||||
// <PostItem key={item.id} memo={item} user={user} index={index} {...this.props}></PostItem>
|
||||
// )
|
||||
// })
|
||||
return this.props.renderMemoList();
|
||||
handleLocationChange(location) {
|
||||
// your staff here
|
||||
console.log(`- - - location: '${location.pathname}'`);
|
||||
if (location.pathname && location.pathname.indexOf('/forums/categories/all') != -1
|
||||
&& this.locationSearch != location.search) {
|
||||
this.props.fetchMemos();
|
||||
}
|
||||
render() {
|
||||
const { match, history, currentPage, memo_count } = this.props
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<ForumsNavTab {...this.props}></ForumsNavTab>
|
||||
<div id="forum_list" className="forum_table mh650">
|
||||
|
||||
{this.renderMemoList()}
|
||||
|
||||
{ !!memo_count && <Pagination onChange={(pageNum, pageSize) => this.onPaginationChange(pageNum, pageSize)}
|
||||
showQuickJumper current={currentPage} total={memo_count} pageSize={15}/> }
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
this.locationSearch = location.search;
|
||||
}
|
||||
|
||||
renderMemoList() {
|
||||
// const { memo_list, user } = this.props;
|
||||
// if (!memo_list) {
|
||||
// return ''
|
||||
// }
|
||||
// return memo_list.map( (item, index) => {
|
||||
// return (
|
||||
// <PostItem key={item.id} memo={item} user={user} index={index} {...this.props}></PostItem>
|
||||
// )
|
||||
// })
|
||||
return this.props.renderMemoList();
|
||||
}
|
||||
render() {
|
||||
const { match, history, currentPage, memo_count } = this.props
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<ForumsNavTab {...this.props}></ForumsNavTab>
|
||||
<div id="forum_list" className="forum_table mh650">
|
||||
|
||||
{this.renderMemoList()}
|
||||
|
||||
{!!memo_count && <Pagination onChange={(pageNum, pageSize) => this.onPaginationChange(pageNum, pageSize)}
|
||||
showQuickJumper current={currentPage} total={memo_count} pageSize={15} />}
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default postPaginationHOC( MemoHottest );
|
||||
export default postPaginationHOC(MemoHottest);
|
||||
|
@ -1,63 +1,53 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import classNames from 'classnames'
|
||||
|
||||
import Pagination from 'rc-pagination';
|
||||
|
||||
import { postPaginationHOC } from './PostPaginationHOC'
|
||||
|
||||
import PostItem from './PostItem'
|
||||
|
||||
import postPaginationHOC from './PostPaginationHOC'
|
||||
|
||||
import ForumsNavTab from './ForumsNavTab'
|
||||
|
||||
class MemoNewest extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
this.state = {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
onPaginationChange(pageNum, pageSize) {
|
||||
|
||||
this.props.onPaginationChange(pageNum, pageSize)
|
||||
}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
this.state = {
|
||||
|
||||
renderMemoList() {
|
||||
// const { memo_list, user } = this.props;
|
||||
// if (!memo_list) {
|
||||
// return ''
|
||||
// }
|
||||
// return memo_list.map( (item, index) => {
|
||||
// return (
|
||||
// <PostItem key={item.id} memo={item} user={user} index={index} {...this.props}></PostItem>
|
||||
// )
|
||||
// })
|
||||
return this.props.renderMemoList();
|
||||
}
|
||||
render() {
|
||||
const { match, history, currentPage, memo_count } = this.props
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<ForumsNavTab {...this.props}></ForumsNavTab>
|
||||
<div id="forum_list" className="forum_table mh650">
|
||||
{this.renderMemoList()}
|
||||
|
||||
{ !!memo_count && <Pagination onChange={(pageNum, pageSize) => this.onPaginationChange(pageNum, pageSize)}
|
||||
showQuickJumper current={currentPage} total={memo_count} pageSize={15}/> }
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
onPaginationChange(pageNum, pageSize) {
|
||||
|
||||
this.props.onPaginationChange(pageNum, pageSize)
|
||||
}
|
||||
|
||||
|
||||
renderMemoList() {
|
||||
// const { memo_list, user } = this.props;
|
||||
// if (!memo_list) {
|
||||
// return ''
|
||||
// }
|
||||
// return memo_list.map( (item, index) => {
|
||||
// return (
|
||||
// <PostItem key={item.id} memo={item} user={user} index={index} {...this.props}></PostItem>
|
||||
// )
|
||||
// })
|
||||
return this.props.renderMemoList();
|
||||
}
|
||||
render() {
|
||||
const { match, history, currentPage, memo_count } = this.props
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<ForumsNavTab {...this.props}></ForumsNavTab>
|
||||
<div id="forum_list" className="forum_table mh650">
|
||||
{this.renderMemoList()}
|
||||
|
||||
{!!memo_count && <Pagination onChange={(pageNum, pageSize) => this.onPaginationChange(pageNum, pageSize)}
|
||||
showQuickJumper current={currentPage} total={memo_count} pageSize={15} />}
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default postPaginationHOC( MemoNewest );
|
||||
export default postPaginationHOC(MemoNewest);
|
||||
|
@ -1,116 +1,104 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import classNames from 'classnames'
|
||||
|
||||
import Pagination from 'rc-pagination';
|
||||
|
||||
import { postPaginationHOC } from './PostPaginationHOC'
|
||||
|
||||
import PostItem from './PostItem'
|
||||
import postPaginationHOC from './PostPaginationHOC'
|
||||
|
||||
import ForumsNavTab from './ForumsNavTab'
|
||||
|
||||
// import queryString from 'query-string'
|
||||
import { queryString } from 'educoder'
|
||||
import { queryString } from 'educoder'
|
||||
|
||||
import MemoList from './MemoList'
|
||||
|
||||
|
||||
class MemoTechShare extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
this.handleLocationChange = this.handleLocationChange.bind(this);
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
this.state = {
|
||||
this.handleLocationChange = this.handleLocationChange.bind(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
onPaginationChange(pageNum, pageSize) {
|
||||
this.props.onPaginationChange(pageNum, pageSize)
|
||||
}
|
||||
this.state = {
|
||||
|
||||
componentDidMount() {
|
||||
// this.handleLocationChange(this.props.history.location);
|
||||
// this.unlisten = this.props.history.listen(this.handleLocationChange);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
// this.unlisten();
|
||||
}
|
||||
|
||||
onPaginationChange(pageNum, pageSize) {
|
||||
this.props.onPaginationChange(pageNum, pageSize)
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
// this.handleLocationChange(this.props.history.location);
|
||||
// this.unlisten = this.props.history.listen(this.handleLocationChange);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
// this.unlisten();
|
||||
}
|
||||
componentDidUpdate(prevProps) {
|
||||
if (this.props.match.params.memoType !== prevProps.match.params.memoType) {
|
||||
// do something
|
||||
console.log(`memoType changed`)
|
||||
this.props.fetchMemos();
|
||||
}
|
||||
componentDidUpdate(prevProps) {
|
||||
if(this.props.match.params.memoType !== prevProps.match.params.memoType) {
|
||||
// do something
|
||||
console.log(`memoType changed`)
|
||||
this.props.fetchMemos();
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(newProps, newContext) {
|
||||
if (newProps.match.url === this.props.match.url) {
|
||||
const oldParsed = queryString.parse(this.props.location.search);
|
||||
const newParsed = queryString.parse(newProps.location.search);
|
||||
if (!newParsed.page && oldParsed.page ||
|
||||
(oldParsed.order && newParsed.order && oldParsed.order != newParsed.order)) {
|
||||
this.props.fetchMemos();
|
||||
}
|
||||
// console.log('componentWillReceiveProps...')
|
||||
}
|
||||
|
||||
componentWillReceiveProps(newProps, newContext) {
|
||||
if (newProps.match.url === this.props.match.url) {
|
||||
}
|
||||
|
||||
handleLocationChange(location) {
|
||||
console.log(`- - - location: '${location.pathname}'`);
|
||||
if (location.pathname) {
|
||||
if (location.pathname.indexOf('/forums/categories/all') != -1
|
||||
&& this.props.location.search && this.props.location.search.indexOf('order=') != -1
|
||||
&& location.search.indexOf('order=') != -1) {
|
||||
const oldParsed = queryString.parse(this.props.location.search);
|
||||
const newParsed = queryString.parse(newProps.location.search);
|
||||
if (!newParsed.page && oldParsed.page ||
|
||||
(oldParsed.order && newParsed.order && oldParsed.order != newParsed.order)) {
|
||||
const newParsed = queryString.parse(location.search);
|
||||
if (oldParsed.order != newParsed.order) { // 只有在热门和最新间跳转时,才需要处理
|
||||
this.props.fetchMemos();
|
||||
}
|
||||
// console.log('componentWillReceiveProps...')
|
||||
}
|
||||
}
|
||||
|
||||
handleLocationChange(location) {
|
||||
console.log(`- - - location: '${location.pathname}'`);
|
||||
if (location.pathname) {
|
||||
if (location.pathname.indexOf('/forums/categories/all') != -1
|
||||
&& this.props.location.search && this.props.location.search.indexOf('order=') != -1
|
||||
&& location.search.indexOf('order=') != -1) {
|
||||
const oldParsed = queryString.parse(this.props.location.search);
|
||||
const newParsed = queryString.parse(location.search);
|
||||
if (oldParsed.order != newParsed.order) { // 只有在热门和最新间跳转时,才需要处理
|
||||
this.props.fetchMemos();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
renderMemoList() {
|
||||
|
||||
|
||||
// const { memo_list, user } = this.props;
|
||||
// if (!memo_list) {
|
||||
// return ''
|
||||
// }
|
||||
// return memo_list.map( (item, index) => {
|
||||
|
||||
// return (
|
||||
// <PostItem key={item.id} user={user} index={index} {...this.props}
|
||||
// setTop={(memo)=>this.setTop(memo)}
|
||||
// setDown={(memo)=>this.setDown(memo)} memo={item}
|
||||
// ></PostItem>
|
||||
// )
|
||||
// })
|
||||
return this.props.renderMemoList();
|
||||
}
|
||||
|
||||
render() {
|
||||
const { match, history, currentPage, memo_count ,memo_list } = this.props
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<ForumsNavTab {...this.props}></ForumsNavTab>
|
||||
<MemoList {...this.props} renderMemoList={() => this.renderMemoList()}
|
||||
onPaginationChange={ (pageNum, pageSize) => this.props.onPaginationChange(pageNum, pageSize) }
|
||||
>
|
||||
</MemoList>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
renderMemoList() {
|
||||
|
||||
|
||||
// const { memo_list, user } = this.props;
|
||||
// if (!memo_list) {
|
||||
// return ''
|
||||
// }
|
||||
// return memo_list.map( (item, index) => {
|
||||
|
||||
// return (
|
||||
// <PostItem key={item.id} user={user} index={index} {...this.props}
|
||||
// setTop={(memo)=>this.setTop(memo)}
|
||||
// setDown={(memo)=>this.setDown(memo)} memo={item}
|
||||
// ></PostItem>
|
||||
// )
|
||||
// })
|
||||
return this.props.renderMemoList();
|
||||
}
|
||||
|
||||
render() {
|
||||
const { match, history, currentPage, memo_count, memo_list } = this.props
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<ForumsNavTab {...this.props}></ForumsNavTab>
|
||||
<MemoList {...this.props} renderMemoList={() => this.renderMemoList()}
|
||||
onPaginationChange={(pageNum, pageSize) => this.props.onPaginationChange(pageNum, pageSize)}
|
||||
>
|
||||
</MemoList>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default postPaginationHOC() ( MemoTechShare );
|
||||
export default postPaginationHOC()(MemoTechShare);
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,30 +1,22 @@
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
||||
|
||||
import Loading from '../../Loading';
|
||||
|
||||
import Loadable from 'react-loadable';
|
||||
|
||||
// import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
|
||||
|
||||
import { SnackbarHOC, getImageUrl } from 'educoder';
|
||||
import { SnackbarHOC } from 'educoder';
|
||||
import LoginRegisterComponent from './LoginRegisterComponent';
|
||||
import FindPasswordComponent from './FindPasswordComponent';
|
||||
|
||||
class LoginRegisterPage extends Component {
|
||||
render() {
|
||||
// newMain clearfix
|
||||
return (
|
||||
<div className="">
|
||||
|
||||
<LoginRegisterComponent {...this.props} {...this.state}></LoginRegisterComponent>
|
||||
<br></br>
|
||||
<br></br>
|
||||
<FindPasswordComponent {...this.props} {...this.state}></FindPasswordComponent>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
render() {
|
||||
// newMain clearfix
|
||||
return (
|
||||
<div className="">
|
||||
|
||||
<LoginRegisterComponent {...this.props} {...this.state}></LoginRegisterComponent>
|
||||
<br></br>
|
||||
<br></br>
|
||||
<FindPasswordComponent {...this.props} {...this.state}></FindPasswordComponent>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SnackbarHOC() ( ( LoginRegisterPage ));
|
||||
export default SnackbarHOC()((LoginRegisterPage));
|
||||
|
@ -1,90 +1,89 @@
|
||||
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 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){
|
||||
class InfosIndex extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state={
|
||||
data:undefined,
|
||||
this.state = {
|
||||
data: undefined,
|
||||
}
|
||||
}
|
||||
componentDidMount =()=>{
|
||||
componentDidMount = () => {
|
||||
|
||||
}
|
||||
|
||||
|
||||
//判断是否看的是当前用户的个人主页
|
||||
componentDidUpdate =(prevProps)=> {
|
||||
componentDidUpdate = (prevProps) => {
|
||||
|
||||
}
|
||||
render(){
|
||||
render() {
|
||||
let {
|
||||
data ,
|
||||
}=this.state;
|
||||
return(
|
||||
<Switch {...this.props}>
|
||||
data,
|
||||
} = this.state;
|
||||
return (
|
||||
<Switch {...this.props}>
|
||||
|
||||
{/* --------------------------------------------------------------------- */}
|
||||
{/* --------------------------------------------------------------------- */}
|
||||
|
||||
|
||||
{/* 视频发布 */}
|
||||
<Route exact path="/users/:username/videos/upload"
|
||||
render={
|
||||
(props) => (<VideoUploadList {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route exact path="/users/:username/videos/success"
|
||||
render={
|
||||
(props) => (<VideoPublishSuccess {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route exact path="/users/:username/videos/protocol"
|
||||
render={
|
||||
(props) => (<VideoProtocol {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 视频发布 */}
|
||||
<Route exact path="/users/:username/videos/upload"
|
||||
render={
|
||||
(props) => (<VideoUploadList {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route exact path="/users/:username/videos/success"
|
||||
render={
|
||||
(props) => (<VideoPublishSuccess {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route exact path="/users/:username/videos/protocol"
|
||||
render={
|
||||
(props) => (<VideoProtocol {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Route path="/users/:username"
|
||||
render={
|
||||
(props) => (<UsersInfo {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/users/:username"
|
||||
render={
|
||||
(props) => (<UsersInfo {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
</Switch>
|
||||
</Switch>
|
||||
)
|
||||
}
|
||||
}
|
||||
export default CNotificationHOC() ( SnackbarHOC() ( TPMIndexHOC(InfosIndex) ));
|
||||
export default CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(InfosIndex)));
|
@ -1,86 +1,76 @@
|
||||
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 {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//头部获取是否已经登录了
|
||||
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 (
|
||||
<div className="square-Item" style={{"height":`${index=="1"?"289":index=="2"?"298":index=="3"?"295":"289"}px`}}>
|
||||
return (
|
||||
<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)}>
|
||||
<div className="substance substancepad">
|
||||
{this.props.Createtype === "projects" ? <a onClick={() => this.getUser(href, name)}>
|
||||
<div className="substancenenew">
|
||||
<div className="leftten"></div>
|
||||
<div className="topten"></div>
|
||||
</div>
|
||||
</a>: <a onClick={()=>this.getUsers(href,name)}>
|
||||
<div className="substancenenew">
|
||||
<div className="leftten"></div>
|
||||
<div className="topten"></div>
|
||||
</div>
|
||||
</a>}
|
||||
</div>
|
||||
<div className="edu-txt-center course-bottom">
|
||||
<div className="inline color-grey-6">
|
||||
<span className="fl ml10 mr10 squareIconSpan substancefont">
|
||||
{name}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
</a> : <a onClick={() => this.getUsers(href, name)}>
|
||||
<div className="substancenenew">
|
||||
<div className="leftten"></div>
|
||||
<div className="topten"></div>
|
||||
</div>
|
||||
</a>}
|
||||
</div>
|
||||
<div className="edu-txt-center course-bottom">
|
||||
<div className="inline color-grey-6">
|
||||
<span className="fl ml10 mr10 squareIconSpan substancefont">
|
||||
{name}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
export default publicCreateNew;
|
||||
|
Loading…
Reference in new issue