From 29b6f6d2cda3f854484923c1e34a7ab65cbb9035 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 5 Jul 2019 10:51:20 +0800 Subject: [PATCH] toCreateProject --- public/react/src/modules/courses/busyWork/common.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/common.js b/public/react/src/modules/courses/busyWork/common.js index 9eb901d9d..8c37e78d2 100644 --- a/public/react/src/modules/courses/busyWork/common.js +++ b/public/react/src/modules/courses/busyWork/common.js @@ -18,11 +18,15 @@ export function RouteHOC(options = {}) { } } toCreateProject = () => { + let url = '/projects/new' if (window.location.port == 3007) { - window.location.href = '/testbdweb.educoder.net/projects/new' - } else { - window.location.href = '/projects/new' + // window.location.href + url = '/testbdweb.educoder.net/projects/new' } + window.open( + url, + '_blank' // <- This is what makes it open in a new window. + ); } // common_homework group_homework // 是否是分组作业