diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 2ac4761e1..f30e43d21 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -97,13 +97,6 @@ class CommonWorkItem extends Component{ setupdate = () => { } - toCreateProject = () => { - if (window.location.port == 3007) { - window.location.href = '/testbdweb.educoder.net/projects/new' - } else { - window.location.href = '/projects/new' - } - } render(){ let { mainList,workType }=this.props; const { aModalVisible, fileList, revise_reason } = this.state diff --git a/public/react/src/modules/courses/busyWork/ConnectProject.js b/public/react/src/modules/courses/busyWork/ConnectProject.js index 73a4da8f8..c1fd4185c 100644 --- a/public/react/src/modules/courses/busyWork/ConnectProject.js +++ b/public/react/src/modules/courses/busyWork/ConnectProject.js @@ -85,13 +85,6 @@ class ConnectProject extends Component{ console.log(error); }) } - toCreateProject = () => { - if (window.location.port == 3007) { - window.location.href = '/testbdweb.educoder.net/projects/new' - } else { - window.location.href = '/projects/new' - } - } //关联项目 openConnectionProject=(work)=>{ this.work = work; @@ -175,7 +168,7 @@ class ConnectProject extends Component{ { (!haveProjects) &&
- 您当前尚未管理任何项目,请先创建项目再关联 + 您当前尚未管理任何项目,请先创建项目再关联
} diff --git a/public/react/src/modules/courses/busyWork/common.js b/public/react/src/modules/courses/busyWork/common.js index 61bd7fcee..9eb901d9d 100644 --- a/public/react/src/modules/courses/busyWork/common.js +++ b/public/react/src/modules/courses/busyWork/common.js @@ -17,6 +17,13 @@ export function RouteHOC(options = {}) { } } + toCreateProject = () => { + if (window.location.port == 3007) { + window.location.href = '/testbdweb.educoder.net/projects/new' + } else { + window.location.href = '/projects/new' + } + } // common_homework group_homework // 是否是分组作业 isGroup = () => { @@ -156,7 +163,7 @@ export function RouteHOC(options = {}) { toWorkQuestionPage={this.toWorkQuestionPage} toWorkSettingPage={this.toWorkSettingPage} - + toCreateProject={this.toCreateProject} isGroup={this.isGroup} getModuleName={this.getModuleName}