From 86eb0e53dcf6bb94acbafc59ce19c7df8a6c1209 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 14:09:26 +0800 Subject: [PATCH 1/6] create_kindeditor --- public/react/scripts/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/scripts/build.js b/public/react/scripts/build.js index 29035ffed..211b360d9 100644 --- a/public/react/scripts/build.js +++ b/public/react/scripts/build.js @@ -200,7 +200,7 @@ function generateNewIndexJsp() { .replace('/css/css_min_all.css', `${cdnHost}/react/build/css/css_min_all.css?v=${newVersion}`) .replace('/css/iconfont.css', `${cdnHost}/react/build/css/iconfont.css?v=${newVersion}`) - .replace('/js/create_kindeditor.js', `${cdnHost}/react/build/js/create_kindeditor.js?v=${newVersion}`) + .replace(/\/js\/create_kindeditor.js/g, `${cdnHost}/react/build/js/create_kindeditor.js?v=${newVersion}`) // .replace('/react/build/./static/css/main', `${cdnHost}/react/build/./static/css/main`) // .replace('/react/build/./static/js/main', `${cdnHost}/react/build/./static/js/main`) From 371b03458c032786294ef248826947791ca13aad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 20 Jul 2019 14:21:30 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 7 +++--- .../courses/coursesHome/coursesHomeCard.js | 4 ++-- public/react/src/modules/tpm/NewHeader.js | 5 +--- .../react/src/modules/user/usersInfo/Infos.js | 24 +++++++++++++++---- 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index d5d002e52..c7a4e80cc 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -26,9 +26,10 @@ function locationurl(list){ } // TODO 开发期多个身份切换 -const debugType =window.location.search.indexOf('debug=t') != -1 ? 'teacher' : - window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin' -window._debugType = debugType; +const debugType ="" +// window.location.search.indexOf('debug=t') != -1 ? 'teacher' : +// window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin' +// window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/public/react/src/modules/courses/coursesHome/coursesHomeCard.js b/public/react/src/modules/courses/coursesHome/coursesHomeCard.js index 6869b6b71..2f65c622f 100644 --- a/public/react/src/modules/courses/coursesHome/coursesHomeCard.js +++ b/public/react/src/modules/courses/coursesHome/coursesHomeCard.js @@ -40,8 +40,8 @@ class coursesHomeCard extends Component{ className="mt80 mb25"/>

非成员不能访问

- {/**/} - + + {/**/} {/*target="_blank"*/} { item.is_public===1&&item.id===1309? diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 44a1ebbbd..2acfc5c08 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -702,10 +702,7 @@ submittojoinclass=(value)=>{ {/**/} -
+
console.log(value)} diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index 402032c65..2c9dd5bd3 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -253,22 +253,34 @@ class Infos extends Component{ { data && is_current == false && data.identity =="学生" ? "" : {data && data.identity} } - + - + - + - + @@ -276,7 +288,9 @@ class Infos extends Component{ {/* */} { data && data.college_identifier && - + From 04f9948acc61360fa010013481e6e6661734d097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 20 Jul 2019 14:24:10 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/user/usersInfo/InfosProject.js | 382 +++++++++--------- 1 file changed, 191 insertions(+), 191 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/InfosProject.js b/public/react/src/modules/user/usersInfo/InfosProject.js index cfd2bc443..33eac0e6b 100644 --- a/public/react/src/modules/user/usersInfo/InfosProject.js +++ b/public/react/src/modules/user/usersInfo/InfosProject.js @@ -1,192 +1,192 @@ -import React, { Component } from 'react'; -import { SnackbarHOC } from 'educoder'; -import {BrowserRouter as Router,Route,Switch} from 'react-router-dom'; -import {Tooltip,Pagination,Spin} from 'antd'; -import axios from 'axios'; -import NoneData from '../../courses/coursesPublic/NoneData' -import {getImageUrl} from 'educoder'; -import "./usersInfo.css" -import Create from './publicCreatNew' - -class InfosProject extends Component{ - constructor(props){ - super(props); - this.state={ - category:undefined, - status:undefined, - page:1, - per_page:16, - - totalCount:undefined, - data:undefined, - isSpin:false - } - } - - componentDidMount=()=>{ - this.setState({ - isSpin:true - }) - let{category,status,page}=this.state; - this.getCourses(category,status,page); - } - - getCourses=(category,status,page)=>{ - let url=`/users/${this.props.match.params.username}/projects.json`; - axios.get((url),{params:{ - category, - status, - 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, - page:1, - isSpin:true - }) - let{status}=this.state; - this.getCourses(cate,status,1); - } - //切换状态 - changeStatus=(status)=>{ - this.setState({ - status:status, - page:1, - isSpin:true - }) - let{category}=this.state; - this.getCourses(category,status,1); - } - //切换页数 - changePage=(page)=>{ - this.setState({ - page, - isSpin:true - }) - let{category,status}=this.state; - this.getCourses(category,status,page); - } - - // 进入项目 - turnToCourses=(url,flag)=>{ - if(flag){ - this.props.history.push(url); - } - } - - render(){ - let{ - category, - status, - page, - data, - totalCount, - isSpin - } = this.state; - let isStudent = this.props.isStudent(); - let is_current=this.props.is_current; - return( -
- -
-
  • this.changeCategory()}>全部
  • -
  • this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的
  • -
  • this.changeCategory("study")}>{is_current ? "我":"TA"}学习的
  • -
    - { - is_current && -
    -
  • this.changeStatus()}>全部
  • -
  • this.changeStatus("publicly")}>公开
  • -
  • this.changeStatus("personal")}>私有
  • -
    - } -

    - 共参与{totalCount}个{category?category=="manage"?"发布":"学习":"项目"} - 时间最新 -

    -
    - { - !isStudent && page == 1 && !category && is_current && - - } - { - (!data || data.projects.length==0) && (isStudent || category) && - } - { - data && data.projects && data.projects.map((item,key)=>{ - return( -
    this.turnToCourses(`${this.props.Headertop && this.props.Headertop.old_url}/projects/${item.id}`,item.can_visited)} style={{"cursor": "pointer"}}> - { - item.is_public==1 && - -
    - - 公开 -
    - } - { - item.can_visited ==false? -
    - -

    非成员不能访问

    -
    :"" - } -
    -

    - {item.name} -

    - 用户 -

    {item.owner.real_name}

    -

    {item.owner.school_name}

    -
    -
    -
    - { - item.members_count> 0 && - - {item.members_count} - } - { - item.issues_count> 0 && - - {item.issues_count} - } - { - item.changesets_count> 0 && - - {item.changesets_count} - } -
    -
    -
    - ) - }) - } -
    - { - totalCount > 15 && -
    - -
    - } - -
    - ) - } -} +import React, { Component } from 'react'; +import { SnackbarHOC } from 'educoder'; +import {BrowserRouter as Router,Route,Switch} from 'react-router-dom'; +import {Tooltip,Pagination,Spin} from 'antd'; +import axios from 'axios'; +import NoneData from '../../courses/coursesPublic/NoneData' +import {getImageUrl} from 'educoder'; +import "./usersInfo.css" +import Create from './publicCreatNew' + +class InfosProject extends Component{ + constructor(props){ + super(props); + this.state={ + category:undefined, + status:undefined, + page:1, + per_page:16, + + totalCount:undefined, + data:undefined, + isSpin:false + } + } + + componentDidMount=()=>{ + this.setState({ + isSpin:true + }) + let{category,status,page}=this.state; + this.getCourses(category,status,page); + } + + getCourses=(category,status,page)=>{ + let url=`/users/${this.props.match.params.username}/projects.json`; + axios.get((url),{params:{ + category, + status, + 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, + page:1, + isSpin:true + }) + let{status}=this.state; + this.getCourses(cate,status,1); + } + //切换状态 + changeStatus=(status)=>{ + this.setState({ + status:status, + page:1, + isSpin:true + }) + let{category}=this.state; + this.getCourses(category,status,1); + } + //切换页数 + changePage=(page)=>{ + this.setState({ + page, + isSpin:true + }) + let{category,status}=this.state; + this.getCourses(category,status,page); + } + + // 进入项目 + turnToCourses=(url,flag)=>{ + if(flag){ + this.props.history.push(url); + } + } + + render(){ + let{ + category, + status, + page, + data, + totalCount, + isSpin + } = this.state; + let isStudent = this.props.isStudent(); + let is_current=this.props.is_current; + return( +
    + +
    +
  • this.changeCategory()}>全部
  • +
  • this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的
  • +
  • this.changeCategory("study")}>{is_current ? "我":"TA"}学习的
  • +
    + { + is_current && +
    +
  • this.changeStatus()}>全部
  • +
  • this.changeStatus("publicly")}>公开
  • +
  • this.changeStatus("personal")}>私有
  • +
    + } +

    + 共参与{totalCount}个{category?category=="manage"?"发布":"学习":"项目"} + 时间最新 +

    +
    + { + !isStudent && page == 1 && !category && is_current && + + } + { + (!data || data.projects.length==0) && (isStudent || category) && + } + { + data && data.projects && data.projects.map((item,key)=>{ + return( +
    this.turnToCourses(`/projects/${item.id}`,item.can_visited)} style={{"cursor": "pointer"}}> + { + item.is_public==1 && + +
    + + 公开 +
    + } + { + item.can_visited ==false? +
    + +

    非成员不能访问

    +
    :"" + } +
    +

    + {item.name} +

    + 用户 +

    {item.owner.real_name}

    +

    {item.owner.school_name}

    +
    +
    +
    + { + item.members_count> 0 && + + {item.members_count} + } + { + item.issues_count> 0 && + + {item.issues_count} + } + { + item.changesets_count> 0 && + + {item.changesets_count} + } +
    +
    +
    + ) + }) + } +
    + { + totalCount > 15 && +
    + +
    + } +
    +
    + ) + } +} export default InfosProject; \ No newline at end of file From 7a73f04bf17e3cd315c339a8f2b260f7524129a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 20 Jul 2019 14:30:57 +0800 Subject: [PATCH 4/6] Merge branch 'master' of https://bdgit.educoder.net/Hjqreturn/educoder # Conflicts: # public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js --- public/react/src/modules/tpm/NewHeader.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 0cb776245..2f1195644 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -702,7 +702,9 @@ submittojoinclass=(value)=>{ {/**/} -
    +
    console.log(value)} @@ -792,7 +794,7 @@ submittojoinclass=(value)=>{ {this.props.current_user&&this.props.current_user.user_identity==="学生"?"":
  • 新建课堂
  • }
  • 新建实训
  • 新建实践课程
  • -
  • 新建项目
  • +
  • 新建项目
    • From 881d777a846dc8ddb1c90eb0231ec0ff05bbfb7f Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 14:38:54 +0800 Subject: [PATCH 5/6] !! --- public/react/src/modules/page/main/CodeEvaluateView.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/page/main/CodeEvaluateView.js b/public/react/src/modules/page/main/CodeEvaluateView.js index 16932b818..a121a53d5 100644 --- a/public/react/src/modules/page/main/CodeEvaluateView.js +++ b/public/react/src/modules/page/main/CodeEvaluateView.js @@ -184,9 +184,9 @@ class CodeEvaluateView extends Component { { headIconClass && } { _headLockIconClass && } - { item.ts_mem && 消耗内存{item.ts_mem}MB } - { item.ts_mem && item.ts_time && } - { item.ts_time && 代码执行时长:{item.ts_time}秒 } + { !!item.ts_mem && 消耗内存{item.ts_mem}MB } + { !!item.ts_mem && !!item.ts_time && } + { !!item.ts_time && 代码执行时长:{item.ts_time}秒 }

    From b6c33a7256de78f9519749025dc714b0b816b4af Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 14:39:04 +0800 Subject: [PATCH 6/6] 8 --- public/react/src/modules/page/taskList/TaskList.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/page/taskList/TaskList.css b/public/react/src/modules/page/taskList/TaskList.css index b8899ddc1..46dfd5076 100644 --- a/public/react/src/modules/page/taskList/TaskList.css +++ b/public/react/src/modules/page/taskList/TaskList.css @@ -26,7 +26,7 @@ height: 22px; width: 0px; position: absolute; - top: 13px; + top: 8px; } #all_task_index .grades {