diff --git a/public/react/src/modules/home/index.jsx b/public/react/src/modules/home/index.jsx new file mode 100644 index 000000000..c46f0bf25 --- /dev/null +++ b/public/react/src/modules/home/index.jsx @@ -0,0 +1,10 @@ +import React, { useEffect, useState } from 'react' + +export default () => { + + return ( +
+ +
+ ) +} \ No newline at end of file diff --git a/public/react/src/modules/tpm/1.js b/public/react/src/modules/tpm/1.js deleted file mode 100644 index 7a79986f7..000000000 --- a/public/react/src/modules/tpm/1.js +++ /dev/null @@ -1,81 +0,0 @@ -import React, { Component } from 'react'; - -import Comments from '../comment/Comments' - -import commentHOC from '../comment/CommentsHOC' - -import './TPMShixunDiscuss.css' - -import TPMRightSection from './component/TPMRightSection' -import TPMNav from './component/TPMNav' -import Loading from '../../components/loading'; - - -class TPMShixunDiscuss extends Component { - constructor(props) { - super(props) - - } - - componentWillReceiveProps(newProps, newContext) { - if (newProps.shixun && newProps.shixun.id && (!this.props || !this.props.shixun || this.props.shixun.id != newProps.shixun.id)) { - window.document.title = newProps.shixun.name - // this.props.fetchCommentIfNotFetched && - // this.props.fetchCommentIfNotFetched(); - } - } - - componentDidMount() { - // TODO 加了HOC后 mount了两次 - this.props.fetchCommentIfNotFetched && - this.props.fetchCommentIfNotFetched(); - } - // - - onPaginationChange = (page) => { - window.$("html,body").animate({ "scrollTop": 160 }) - this.props.onPaginationChange(page) - } - - render() { - const { loadingComments, creator, shixun, myshixun, recommend_shixuns, current_user, watched, - aboutFocus, user, match - } = this.props; - - let _user = user; - if (user) { - _user = Object.assign({}, user); - _user.user_url = `/users/${user.login}` - } - return ( - -
- -
- - {loadingComments ? - : - - } -
- -
- -
-
-
- - ); - } -} - -export default commentHOC(TPMShixunDiscuss); diff --git a/public/react/src/modules/tpm/shixuns/shixun-card.js b/public/react/src/modules/tpm/shixuns/shixun-card.js index edd254427..7dd7a0f25 100644 --- a/public/react/src/modules/tpm/shixuns/shixun-card.js +++ b/public/react/src/modules/tpm/shixuns/shixun-card.js @@ -1,10 +1,9 @@ -import React from 'react'; -import { getImageUrl, setImagesUrl } from 'educoder'; -import { Spin, Tooltip, Rate } from 'antd'; +import React, { Fragment } from 'react'; import './shixunCss/shixunCard.less'; import Pagination from '../../../components/mini-pagination' import NodataPanel from '../../../components/nodata-panel' import List from '../../../components/shixun-card-list' +import Loading from '../../../components/loading' export default ({ middleshixundata, pagination, typepvisible, pages, totalcount, shixunsPage }) => { function onPageChange(number) { @@ -13,24 +12,23 @@ export default ({ middleshixundata, pagination, typepvisible, pages, totalcount, return (
- - {middleshixundata === undefined ? "" : middleshixundata.length === 0 ? : ""} - -
-
-
- -
-
-
- + {typepvisible ? : + + {middleshixundata === undefined ? "" : middleshixundata.length === 0 ? : ""} +
+
+
+ +
+
+
+ +
-
- -
- + + }
) } \ No newline at end of file