this.turnToCourses(`/paths/${item.id}`)}>
{
- item.tag &&
diff --git a/public/react/src/modules/user/usersInfo/InfosShixun.js b/public/react/src/modules/user/usersInfo/InfosShixun.js
index b86e69983..94ef3c29b 100644
--- a/public/react/src/modules/user/usersInfo/InfosShixun.js
+++ b/public/react/src/modules/user/usersInfo/InfosShixun.js
@@ -1,203 +1,205 @@
-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 Loadable from 'react-loadable';
-import Loading from '../../../Loading';
-import NoneData from '../../courses/coursesPublic/NoneData'
-import axios from 'axios';
-import {getImageUrl,setImagesUrl} from 'educoder';
-import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
-import { CNotificationHOC } from '../../courses/common/CNotificationHOC'
-import "./usersInfo.css"
-
-import Create from './publicCreatNew'
-
-class InfosShixun extends Component{
- constructor(props){
- super(props);
- this.state={
- category:undefined,
- page:1,
- sort_by:'time',
- status:undefined,
- per_page:16,
- isSpin:false,
-
- totalCount:undefined,
- data:undefined
- }
- }
-
- componentDidMount=()=>{
- this.setState({
- isSpin:true
- })
- let{category,status,sort_by,page}=this.state;
- this.getCourses(category,status,sort_by,page);
- }
-
- getCourses=(category,status,sort_by,page)=>{
- let url=`/users/${this.props.match.params.username}/shixuns.json`;
- axios.get((url),{params:{
- category,
- status,
- sort_by,
- page,
- per_page:this.props.is_current && category && page ==1?17:16
- }}).then((result)=>{
- if(result){
- this.setState({
- totalCount:result.data.count,
- data:result.data,
- isSpin:false
- })
- }
- }).catch((error)=>{
- console.log(error);
- })
- }
-
- //切换种类
- changeCategory=(cate)=>{
- this.setState({
- category:cate,
- status:undefined,
- page:1,
- isSpin:true
- })
- let{sort_by}=this.state;
- this.getCourses(cate,undefined,sort_by,1);
- }
- // 切换状态
- changeStatus=(status)=>{
- this.setState({
- status,
- page:1,
- isSpin:true
- })
- let{category,sort_by}=this.state;
- this.getCourses(category,status,sort_by,1);
- }
- //切换页数
- changePage=(page)=>{
- this.setState({
- page,
- isSpin:true
- })
- let{category,sort_by,status}=this.state;
- this.getCourses(category,status,sort_by,page);
- }
-
- // 进入课堂
- turnToCourses=(url)=>{
- this.props.history.push(url);
- }
-
-
- // 切换排序方式
- changeOrder= (sort)=>{
- this.setState({
- sort_by:sort,
- isSpin:true
- })
- let{category,status,page}=this.state;
- this.getCourses(category,status,sort,page);
- }
-
- render(){
- let{
- category,
- status,
- sort_by,
- page,
- data,
- totalCount,
- isSpin
- } = this.state;
- let isStudent = this.props.isStudent();
- let is_current=this.props.is_current;
- return(
-
-
-
- {
- category && category == "manage" && is_current &&
-
- }
- {
- category && category == "study" && is_current &&
-
- }
-
-
共参与{totalCount}个{category?category=="manage"?"发布":"学习":"实训"}
-
-
- {sort_by=="time"?"时间最新":"语言类别"}
-
- - this.changeOrder("time")}>时间最新
- - this.changeOrder("language")}>语言类别
-
-
-
-
-
- {
- page == 1 && is_current && !category && this.props.current_user && this.props.current_user.user_identity != "学生" ?
-
:""
- }
- {
- (!data || data.shixuns.length==0) && (!is_current || (this.props.current_user && this.props.current_user.user_identity === "学生" )) &&
- }
- {
- data && data.shixuns && data.shixuns.map((item,key)=>{
- return(
-
this.turnToCourses(`/shixuns/${item.identifier}/challenges`)}>
- {
- item.tag &&
{item.tag}
- }
-
-
-
-
-
- {item.name}
-
-
-
- 已完成 {item.finished_challenges_count} / {item.challenges_count}
-
-
-
- )
- })
- }
-
- {
- totalCount > 15 &&
-
- }
-
-
- )
- }
-}
+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 Loadable from 'react-loadable';
+import Loading from '../../../Loading';
+import NoneData from '../../courses/coursesPublic/NoneData'
+import axios from 'axios';
+import {getImageUrl,setImagesUrl} from 'educoder';
+import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
+import { CNotificationHOC } from '../../courses/common/CNotificationHOC'
+import "./usersInfo.css"
+
+import Create from './publicCreatNew'
+
+class InfosShixun extends Component{
+ constructor(props){
+ super(props);
+ this.state={
+ category:undefined,
+ page:1,
+ sort_by:'time',
+ status:undefined,
+ per_page:16,
+ isSpin:false,
+
+ totalCount:undefined,
+ data:undefined
+ }
+ }
+
+ componentDidMount=()=>{
+ this.setState({
+ isSpin:true
+ })
+ let{category,status,sort_by,page}=this.state;
+ this.getCourses(category,status,sort_by,page);
+ }
+
+ getCourses=(category,status,sort_by,page)=>{
+ let url=`/users/${this.props.match.params.username}/shixuns.json`;
+ axios.get((url),{params:{
+ category,
+ status,
+ sort_by,
+ page,
+ per_page:this.props.is_current && category && page ==1?17:16
+ }}).then((result)=>{
+ if(result){
+ this.setState({
+ totalCount:result.data.count,
+ data:result.data,
+ isSpin:false
+ })
+ }
+ }).catch((error)=>{
+ console.log(error);
+ })
+ }
+
+ //切换种类
+ changeCategory=(cate)=>{
+ this.setState({
+ category:cate,
+ status:undefined,
+ page:1,
+ isSpin:true
+ })
+ let{sort_by}=this.state;
+ this.getCourses(cate,undefined,sort_by,1);
+ }
+ // 切换状态
+ changeStatus=(status)=>{
+ this.setState({
+ status,
+ page:1,
+ isSpin:true
+ })
+ let{category,sort_by}=this.state;
+ this.getCourses(category,status,sort_by,1);
+ }
+ //切换页数
+ changePage=(page)=>{
+ this.setState({
+ page,
+ isSpin:true
+ })
+ let{category,sort_by,status}=this.state;
+ this.getCourses(category,status,sort_by,page);
+ }
+
+ // 进入课堂
+ turnToCourses=(url)=>{
+ this.props.history.push(url);
+ }
+
+
+ // 切换排序方式
+ changeOrder= (sort)=>{
+ this.setState({
+ sort_by:sort,
+ isSpin:true
+ })
+ let{category,status,page}=this.state;
+ this.getCourses(category,status,sort,page);
+ }
+
+ render(){
+ let{
+ category,
+ status,
+ sort_by,
+ page,
+ data,
+ totalCount,
+ isSpin
+ } = this.state;
+ let isStudent = this.props.isStudent();
+ let is_current=this.props.is_current;
+ return(
+
+
+
+ {
+ category && category == "manage" && is_current &&
+
+ }
+ {
+ category && category == "study" && is_current &&
+
+ }
+
+
共参与{totalCount}个{category?category=="manage"?"发布":"学习":"实训"}
+
+
+ {sort_by=="time"?"时间最新":"语言类别"}
+
+ - this.changeOrder("time")}>时间最新
+ - this.changeOrder("language")}>语言类别
+
+
+
+
+
+ {
+ page == 1 && is_current && !category && this.props.current_user && this.props.current_user.user_identity != "学生" ?
+
:""
+ }
+ {
+ (!data || data.shixuns.length==0) && (!is_current || (this.props.current_user && this.props.current_user.user_identity === "学生" )) &&
+ }
+ {
+ data && data.shixuns && data.shixuns.map((item,key)=>{
+ return(
+
this.turnToCourses(`/shixuns/${item.identifier}/challenges`)}>
+ {
+ item.tag &&
{item.tag}
+ {/*
*/}
+
+ }
+
+
+
+
+
+ {item.name}
+
+
+
+ 已完成 {item.finished_challenges_count} / {item.challenges_count}
+
+
+
+ )
+ })
+ }
+
+ {
+ totalCount > 15 &&
+
+ }
+
+
+ )
+ }
+}
export default InfosShixun;
\ No newline at end of file
diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css
index 6b156558f..a07102d67 100644
--- a/public/stylesheets/educoder/edu-all.css
+++ b/public/stylesheets/educoder/edu-all.css
@@ -114,8 +114,25 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px}
.smallSquare:nth-child(3n+0){margin-right: 0px;}
.partimg{height: 180px;width: 100%;border-radius: 6px 6px 0px 0px;}
/*块状列表上面的绿色标签*/
-.tag-green{position: absolute;left: 0px;top:20px;}
-.tag-green .tag-name{display: block;width: auto;background-image: url("/images/educoder/tag1.png");background-size: 100% 100%;padding: 0px 8px;color: #fff;float: left;}
+.tag-green{
+ position: absolute;
+ left: 15px;
+ bottom: 95px;}
+.tag-green .tag-name{display: block;width: auto;
+ /*background-image: url("/images/educoder/tag1.png");*/
+ background: #000000;
+ border: 1px solid #fff;
+ border-radius: 3px;
+ font-size: 14px;
+ background-size: 100% 100%;padding: 0px 8px;color: #fff;float: left;}
+.tag-orange{position: absolute;right: 0px;top:20px;}
+.tag-orange .tag-name{display: block;width: auto;background-color:#FF6800;
+ background-size: 100% 100%;padding: 0px 8px;color: #fff;float: left;
+ height: 28px;
+ line-height: 28px;
+ border-top-left-radius: 4px;
+ border-bottom-left-radius: 4px;
+}
/*发送至弹框里的下拉框*/
.downSelectOption{position: relative;height: 35px;}
.downSelectOption .showOption{background-color: #F4F4F4;border: 1px solid #EAEAEA;width: 100%;padding: 5px 40px 5px 5px;outline: none;height: 100%;box-sizing: border-box;}
diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css
index c23c3d350..4aa426192 100644
--- a/public/stylesheets/educoder/edu-main.css
+++ b/public/stylesheets/educoder/edu-main.css
@@ -551,7 +551,7 @@ a:hover.task-btn-orange{background: #459BE6;}
a.user_bluebg_btn{background-color:#4CACFF;color: #fff;}
a.user_orangebg_btn{background-color:#FF6800;color: #fff;}
a.user_greybg_btn{background-color:#747A7F;color: #fff;}
-
+/*.user_white_btn{border: 1px solid #ffffff;color: #ffffff!important;}*/
.pointer{cursor: pointer}
.cdefault{cursor: default}