From b59765568af5921864b437121bf187412251f763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 24 Jul 2019 10:54:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/Interestpage.js | 4 ++++ public/react/src/modules/user/InterestpageMax.js | 5 +++++ public/react/src/modules/user/common.css | 3 +++ 3 files changed, 12 insertions(+) diff --git a/public/react/src/modules/user/Interestpage.js b/public/react/src/modules/user/Interestpage.js index 5b4b69cf6..4c3c39406 100644 --- a/public/react/src/modules/user/Interestpage.js +++ b/public/react/src/modules/user/Interestpage.js @@ -188,6 +188,10 @@ class InterestpageComponent extends Component { if (response !== undefined) { // this.Jumptotheinterestpage(); // window.location.href = "/" + if(response.data.message!==undefined){ + + return; + } this.setMyEduCoderModals() } diff --git a/public/react/src/modules/user/InterestpageMax.js b/public/react/src/modules/user/InterestpageMax.js index 8ed2580d7..82b3e7e0f 100644 --- a/public/react/src/modules/user/InterestpageMax.js +++ b/public/react/src/modules/user/InterestpageMax.js @@ -189,6 +189,11 @@ class InterestpageMax extends Component { if (response !== undefined) { // this.Jumptotheinterestpage(); // window.location.href = "/" + + if(response.data.message!==undefined){ + + return; + } this.setMyEduCoderModals() } diff --git a/public/react/src/modules/user/common.css b/public/react/src/modules/user/common.css index 6271c9941..b80677ee5 100644 --- a/public/react/src/modules/user/common.css +++ b/public/react/src/modules/user/common.css @@ -262,4 +262,7 @@ .bth100{ width: 100px; margin: 0 auto; +} +.ant-input-affix-wrapper .ant-input-prefix, .ant-input-affix-wrapper .ant-input-suffix { + background: #ffffff!important; } \ No newline at end of file From 2967988215dc15bfe1b0054ab2a4630cb7d9b949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 24 Jul 2019 12:50:52 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/login/LoginDialog.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/login/LoginDialog.css b/public/react/src/modules/login/LoginDialog.css index 34a711154..aba5596c5 100644 --- a/public/react/src/modules/login/LoginDialog.css +++ b/public/react/src/modules/login/LoginDialog.css @@ -9,7 +9,7 @@ /* z-index: 20000; */ } #DialogID .dialogBox { - width: 402px; + width: 400px; } .MuiPaper-elevation24-45{ box-shadow:none !important; From 9204560e1fc5eb1132791c0ffd8d1ca04e79bb53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 24 Jul 2019 12:52:11 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=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 | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index cf62730d7..02d8c2be5 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -2,7 +2,7 @@ import React from "react"; import axios from 'axios'; import { requestProxy } from "./indexEduplus2RequestProxy"; -import { broadcastChannelOnmessage ,SetAppModel, isDev, queryString} from 'educoder'; +import { broadcastChannelOnmessage ,SetAppModel} from 'educoder'; import { notification } from 'antd'; import './index.css' broadcastChannelOnmessage('refreshPage', () => { @@ -18,17 +18,10 @@ function locationurl(list){ } // TODO 开发期多个身份切换 -let debugType = "" -if (isDev) { - const _search = window.location.search; - let parsed = {}; - if (_search) { - parsed = queryString.parse(_search); - } - debugType = window.location.search.indexOf('debug=t') != -1 ? "cxt" : '' -} - -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) { // TODO 避免重复的请求 https://github.com/axios/axios#cancellation @@ -119,7 +112,7 @@ export function initAxiosInterceptors(props) { // https://github.com/axios/axios/issues/583 // message.info(response.data.message || '服务端返回status -1,请联系管理员。'); // props.showSnackbar( response.data.message || '服务器异常,请联系管理员。' ) - if (window.location.pathname.startsWith('/tasks/')) { + if (window.location.pathname.startsWith('/tasks/')) { props.showSnackbar( response.data.message || '服务器异常,请联系管理员。' ) } else { notification.open({ @@ -134,7 +127,7 @@ export function initAxiosInterceptors(props) { // description: response.data.message || '服务器异常,请联系管理员。', // }); } - + throw new axios.Cancel('Operation canceled by the user.'); } // if(response.data.status === 401){ @@ -142,7 +135,6 @@ export function initAxiosInterceptors(props) { // } if (response.data.status === 403) { // props.history.replace('/403') - debugger // 这里会分2个情况,1、刚进入页面发请求返回的403;2、进入页面后,其他用户操作触发请求返回的403; // TODO 这里做一个403弹框比较好? locationurl('/403');