From 306240a2c55b44996f12d9966945da97af5eb7df Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Fri, 19 Jul 2019 18:33:51 +0800
Subject: [PATCH 01/23] did
---
public/react/src/modules/user/usersInfo/Infos.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js
index 49e84efa7..a76d98628 100644
--- a/public/react/src/modules/user/usersInfo/Infos.js
+++ b/public/react/src/modules/user/usersInfo/Infos.js
@@ -63,6 +63,10 @@ class Infos extends Component{
login:this.props.current_user.login
})
}
+ } else {
+ if (prevProps.match.params.username != this.props.match.params.username) {
+ this.getInfo(this.props.match.params.username);
+ }
}
}
From 99d113cf3b8650590446ef2dfe7c496e1c975bad Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Fri, 19 Jul 2019 18:34:05 +0800
Subject: [PATCH 02/23] disabeld
---
public/react/src/modules/user/account/AccountBasicEdit.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js
index 8221bae59..5e2c1213c 100644
--- a/public/react/src/modules/user/account/AccountBasicEdit.js
+++ b/public/react/src/modules/user/account/AccountBasicEdit.js
@@ -424,8 +424,8 @@ class AccountBasic extends Component {
}],
})(
- 男
- 女
+ 男
+ 女
)}
From 2ee80388c69f482509b64d45aa1e7417c929e397 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 20 Jul 2019 10:49:08 +0800
Subject: [PATCH 03/23] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=E5=8A=A0=E6=B3=A8?=
=?UTF-8?q?=E9=87=8Adebugger?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../react/src/modules/user/LoginRegisterComponent.js | 10 ++++++----
public/react/src/search/SearchPage.js | 5 +++--
public/react/src/search/searchc.css | 1 +
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js
index 7f8d40c65..71b048edb 100644
--- a/public/react/src/modules/user/LoginRegisterComponent.js
+++ b/public/react/src/modules/user/LoginRegisterComponent.js
@@ -214,10 +214,7 @@ class LoginRegisterComponent extends Component {
if (response === undefined) {
return
}
- if(response.data.identity === null || response.data.identity === undefined){
- this.props.history.push("/interesse");
- return;
- }
+
if(response.data.status === -2){
if("该手机号尚未注册" || "该邮箱尚未注册"){
this.setState({
@@ -246,6 +243,11 @@ class LoginRegisterComponent extends Component {
}
+ if(response.data.identity === null || response.data.identity === undefined){
+ this.props.history.push("/interesse");
+ return;
+ }
+
if (response.status === 200) {
if (response.data.status === 402) {
window.location.href = response.data.url;
diff --git a/public/react/src/search/SearchPage.js b/public/react/src/search/SearchPage.js
index f05e6df5e..990700983 100644
--- a/public/react/src/search/SearchPage.js
+++ b/public/react/src/search/SearchPage.js
@@ -45,7 +45,8 @@ class SearchPage extends Component{
}
this.setState({
tab:e.key,
- type:types
+ type:types,
+ page:1,
})
this.getdata(1,types,this.state.keywords);
}
@@ -228,7 +229,7 @@ class SearchPage extends Component{
@@ -173,8 +172,7 @@ class EducoderLogin extends Component {
display: "flex",
justifyContent: "center",
width: "100%",
- height: "550px",
- marginTop: "20px",
+ marginTop: "25px",
}}>
Date: Sat, 20 Jul 2019 11:24:41 +0800
Subject: [PATCH 08/23] 0
---
public/react/src/modules/courses/css/Courses.css | 5 +++++
.../graduation/tasks/GraduationTasksappraiseMainEditor.js | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css
index ff5ad3e7e..5766c571c 100644
--- a/public/react/src/modules/courses/css/Courses.css
+++ b/public/react/src/modules/courses/css/Courses.css
@@ -949,6 +949,11 @@ kbd,
samp {
font-family: "Monospaced Number", "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
+
+/* 表格间距太大 */
+.ant-table-tbody>tr>td, .ant-table-thead>tr>th {
+ padding: 16px 0px;
+}
/* FORM START */
.ant-form label{
/* 为了覆盖antd的样式,这里使用了important,TODO */
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseMainEditor.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseMainEditor.js
index dc87c9272..24fdd75cf 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseMainEditor.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseMainEditor.js
@@ -72,7 +72,7 @@ class GraduationTasksappraiseMainEditor extends Component{
}
clearInputs = () => {
this.setState({
- score: 0,
+ score: undefined,
same_score: false,
fileList: []
})
From ec72a8cc59a12624d7e7b1f5e4c18472675b8780 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 20 Jul 2019 11:29:49 +0800
Subject: [PATCH 09/23] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../shixunHomework/Listofworksstudentone.js | 20 ++++++-------------
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
index f31cb954d..2284cedd6 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
@@ -1067,7 +1067,6 @@ class Listofworksstudentone extends Component {
}
}
let columns2= arr;
- var teacherlist = undefined;
var teacherlists = undefined;
if (teacherdata !== undefined) {
// console.log("seacthdata设置数据")
@@ -1075,7 +1074,6 @@ class Listofworksstudentone extends Component {
if (teacherdata.id === undefined) {
this.setState({
data: [],
- teacherlist: undefined,
loadingstate: false,
styletable: styletable,
})
@@ -1115,10 +1113,6 @@ class Listofworksstudentone extends Component {
// current: this.state.page,
// }
styletable = {"display": "block",}
- } else {
- // console.log("seacthdata设置数据2")
- teacherlist = undefined;
-
}
}
@@ -1488,7 +1482,7 @@ class Listofworksstudentone extends Component {
limit:20,
}
axios.post(urll, data).then((result) => {
- // debugger
+ debugger
if (result !== undefined) {
// console.log(url)
// console.log("作品列表6789077")
@@ -1583,7 +1577,7 @@ class Listofworksstudentone extends Component {
// 设置数据
seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => {
- // debugger
+ debugger
let {page, limit} = this.state;
let datalist = [];
let columns = this.state.columns;
@@ -1707,11 +1701,9 @@ class Listofworksstudentone extends Component {
}
} else {
- var teacherlist = undefined;
}
this.setState({
data: datalist,
- teacherlist: teacherlist,
columns: columns2,
loadingstate: false,
})
@@ -2197,10 +2189,10 @@ class Listofworksstudentone extends Component {
// console.log(this.state.data);
// console.log("841");
- // console.log(this.state.columns);
- // console.log(data);
- // console.log("2202");
- // console.log(this.props.isAdmin());
+ console.log(this.state.columns);
+ console.log(data);
+ console.log("2202");
+ console.log(this.props.isAdmin());
return (
this.props.isAdmin() === true ?
From dfa3d96c4adee4d2ee170a4461d264227d17396f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 20 Jul 2019 11:36:34 +0800
Subject: [PATCH 10/23] =?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.js | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js
index 7e072e2bf..fcb467e12 100644
--- a/public/react/src/modules/login/LoginDialog.js
+++ b/public/react/src/modules/login/LoginDialog.js
@@ -346,10 +346,7 @@ class LoginDialog extends Component {
if(response===undefined){
return
}
- if(response.data.identity === null || response.data.identity === undefined){
- this.props.history.push("/interesse");
- return;
- }
+
if(response.status===200){
if (response.data.status === 402) {
window.location.href = response.data.url;
@@ -359,6 +356,10 @@ class LoginDialog extends Component {
description:response.data.message,
});
}else{
+ if(response.data.identity === null || response.data.identity === undefined){
+ this.props.history.push("/interesse");
+ return;
+ }
broadcastChannelPostMessage('refreshPage')
this.setState({
isRender:false
From 02651e5ce397570d5df3aa03c911611215374855 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 12:28:01 +0800
Subject: [PATCH 11/23] =?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 | 20 +-
.../components}/Notcompleted.js | 6 +-
.../src/common/components/SetAppModel.js | 33 +
public/react/src/common/educoder.js | 107 +--
.../src/modules/courses/busyWork/UseBank.js | 2 +-
.../src/modules/page/main/CodeEvaluateView.js | 766 +++++++++---------
.../react/src/modules/page/main/LeftView.js | 2 +-
public/react/src/modules/page/main/Webssh.js | 2 +-
public/react/src/modules/tpm/TPMIndexHOC.js | 3 +-
public/react/src/modules/user/Interestpage.js | 7 +-
10 files changed, 495 insertions(+), 453 deletions(-)
rename public/react/src/{modules/user => common/components}/Notcompleted.js (87%)
create mode 100644 public/react/src/common/components/SetAppModel.js
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index 6cbf499ee..d5d002e52 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 } from 'educoder'
+import { broadcastChannelOnmessage ,SetAppModel} from 'educoder';
import { notification } from 'antd';
import './index.css'
broadcastChannelOnmessage('refreshPage', () => {
@@ -10,11 +10,19 @@ broadcastChannelOnmessage('refreshPage', () => {
})
function locationurl(list){
- if (window.location.port === "3007") {
+ if (window.location.port === "3007") {
- } else {
- window.location.replace(list)
- }
+ } else {
+
+ if(list===402){
+ SetAppModel(402)
+ }else if(list===407){
+
+ }else{
+ window.location.replace(list)
+ }
+
+ }
}
// TODO 开发期多个身份切换
@@ -149,7 +157,7 @@ export function initAxiosInterceptors(props) {
debugger
console.log(response.data.status);
console.log(response.data);
- locationurl(response.data.message);
+ locationurl(402);
}
diff --git a/public/react/src/modules/user/Notcompleted.js b/public/react/src/common/components/Notcompleted.js
similarity index 87%
rename from public/react/src/modules/user/Notcompleted.js
rename to public/react/src/common/components/Notcompleted.js
index 848eded48..e974003de 100644
--- a/public/react/src/modules/user/Notcompleted.js
+++ b/public/react/src/common/components/Notcompleted.js
@@ -1,8 +1,8 @@
import React, { Component } from 'react';
-import {getImageUrl} from 'educoder';
+import {getImageUrl} from 'public/react/src/common/educoder';
import { Modal} from 'antd';
import axios from 'axios';
-import './common.css';
+import '../../modules/user/common.css';
//完善个人资料
class Notcompleted extends Component {
@@ -21,7 +21,7 @@ class Notcompleted extends Component {
render() {
-
+ console.log(this.props)
return(
+ {/* */}
+
+ )
+ }
+ }
+ }
+}
+
diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js
index 749d2a1e5..128963c25 100644
--- a/public/react/src/common/educoder.js
+++ b/public/react/src/common/educoder.js
@@ -1,53 +1,56 @@
-import { from } from '_array-flatten@2.1.2@array-flatten';
-
-// export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil';
-
-export { getImageUrl as getImageUrl, getUrl as getUrl, getUrl2 as getUrl2, setImagesUrl as setImagesUrl, getUploadActionUrl as getUploadActionUrl } from './UrlTool';
-export { default as queryString } from './UrlTool2';
-
-export { SnackbarHOC as SnackbarHOC } from './SnackbarHOC';
-
-export { trigger as trigger, on as on, off as off
- , broadcastChannelPostMessage, broadcastChannelOnmessage } from './EventUtil';
-
-export { updatePageParams as updatePageParams } from './RouterUtil';
-
-export { bytesToSize as bytesToSize } from './UnitUtil';
-
-export { markdownToHTML, uploadNameSizeSeperator, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll, isImageExtension } from './TextUtil'
-export { handleDateString, getNextHalfHourOfMoment,formatDuring } from './DateUtil'
-
-
-export { isDev as isDev } from './Env'
-
-export { toStore as toStore, fromStore as fromStore } from './Store'
-
-export { trace_collapse, trace, debug, info, warn, error, trace_c, debug_c, info_c, warn_c, error_c } from './LogUtil'
-
-export { EDU_ADMIN, EDU_BUSINESS, EDU_SHIXUN_MANAGER, EDU_SHIXUN_MEMBER, EDU_CERTIFICATION_TEACHER
- , EDU_GAME_MANAGER, EDU_TEACHER, EDU_NORMAL} from './Const'
-
-export { themes, ThemeContext } from './context/ThemeContext'
-
-export { ModalHOC } from './components/ModalHOC'
-export { default as Cropper } from './components/Cropper'
-export { default as ConditionToolTip } from './components/ConditionToolTip'
-export { default as DragValidator } from './components/DragValidator'
-
-export { default as PopInstruction } from './components/instruction/PopInstruction'
-
-export { default as City } from './components/form/City'
-
-
-// course
-export { default as WordsBtn } from './course/WordsBtn'
-
-export { default as ActionBtn } from './course/ActionBtn'
-
-export { default as MarkdownToHtml } from './components/markdown/MarkdownToHtml'
-
-export { default as DMDEditor } from './components/markdown/DMDEditor'
-
-
-
+import { from } from '_array-flatten@2.1.2@array-flatten';
+
+// export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil';
+
+export { getImageUrl as getImageUrl, getUrl as getUrl, getUrl2 as getUrl2, setImagesUrl as setImagesUrl, getUploadActionUrl as getUploadActionUrl } from './UrlTool';
+export { default as queryString } from './UrlTool2';
+
+export { SnackbarHOC as SnackbarHOC } from './SnackbarHOC';
+
+export { trigger as trigger, on as on, off as off
+ , broadcastChannelPostMessage, broadcastChannelOnmessage } from './EventUtil';
+
+export { updatePageParams as updatePageParams } from './RouterUtil';
+
+export { bytesToSize as bytesToSize } from './UnitUtil';
+
+export { markdownToHTML, uploadNameSizeSeperator, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll, isImageExtension } from './TextUtil'
+export { handleDateString, getNextHalfHourOfMoment,formatDuring } from './DateUtil'
+
+
+export { isDev as isDev } from './Env'
+
+export { toStore as toStore, fromStore as fromStore } from './Store'
+
+export { trace_collapse, trace, debug, info, warn, error, trace_c, debug_c, info_c, warn_c, error_c } from './LogUtil'
+
+export { EDU_ADMIN, EDU_BUSINESS, EDU_SHIXUN_MANAGER, EDU_SHIXUN_MEMBER, EDU_CERTIFICATION_TEACHER
+ , EDU_GAME_MANAGER, EDU_TEACHER, EDU_NORMAL} from './Const'
+
+export { themes, ThemeContext } from './context/ThemeContext'
+
+export { ModalHOC } from './components/ModalHOC'
+
+export { SetAppModel } from './components/SetAppModel'
+
+export { default as Cropper } from './components/Cropper'
+export { default as ConditionToolTip } from './components/ConditionToolTip'
+export { default as DragValidator } from './components/DragValidator'
+
+export { default as PopInstruction } from './components/instruction/PopInstruction'
+
+export { default as City } from './components/form/City'
+
+
+// course
+export { default as WordsBtn } from './course/WordsBtn'
+
+export { default as ActionBtn } from './course/ActionBtn'
+
+export { default as MarkdownToHtml } from './components/markdown/MarkdownToHtml'
+
+export { default as DMDEditor } from './components/markdown/DMDEditor'
+
+
+
export { default as ImageLayerHook } from './hooks/ImageLayerHook'
\ No newline at end of file
diff --git a/public/react/src/modules/courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js
index 69e51da3d..4cd1b424e 100644
--- a/public/react/src/modules/courses/busyWork/UseBank.js
+++ b/public/react/src/modules/courses/busyWork/UseBank.js
@@ -252,7 +252,7 @@ class UseBank extends Component{
:
diff --git a/public/react/src/modules/page/main/CodeEvaluateView.js b/public/react/src/modules/page/main/CodeEvaluateView.js
index 8be0b8765..16932b818 100644
--- a/public/react/src/modules/page/main/CodeEvaluateView.js
+++ b/public/react/src/modules/page/main/CodeEvaluateView.js
@@ -1,383 +1,383 @@
-import React, { Component } from 'react';
-
-import IconButton from 'material-ui/IconButton';
-import Tooltip from 'material-ui/Tooltip';
-import Button from 'material-ui/Button';
-
-import './CodeEvaluateView.css'
-import { CircularProgress } from 'material-ui/Progress';
-import { on, off } from 'educoder'
-const testSetsExpandedArrayInitVal = [false, false, false, false, false,
- false, false, false, false, false,
- false, false, false, false, false,
- false, false, false, false, false]
-
-const $ = window.$;
-const TAB_INDEX_WEB_DISPLAY = 0;
-const TAB_INDEX_EVALUATE_RESULT_INDEX = 1
-
-class CodeEvaluateView extends Component {
-
- constructor(props) {
- super(props)
-
- this.onEvaluateViewExpand = this.onEvaluateViewExpand.bind(this)
-
- this.state = {
- // TODO 最多20个测试集?
- testSetsInitedArray: testSetsExpandedArrayInitVal.slice(0),
-
- evaluateViewExpanded: false,
-
- tabIndex: 1,
- }
- }
-
- componentDidMount() {
- const { challenge } = this.props;
-
- on('showWebDisplayEvent', () => {
- if (challenge.isHtml) {
- this.setState({
- tabIndex: TAB_INDEX_WEB_DISPLAY
- })
- }
- })
-
- if (challenge.isHtml === true) {
- this.tabIndexChange(TAB_INDEX_WEB_DISPLAY)
- }
-
- }
- componentWillUnmount() {
- off('showWebDisplayEvent')
- }
-
- componentWillReceiveProps(newProps, newContext) {
- if (this.props.game && newProps.game && (newProps.game.id !== this.props.game.id
- || newProps.gameBuilding !== this.props.gameBuilding )) { // 切换game时重置state
- if (newProps.gameBuilding === false) {
- // 清空codemirror的内容,TODO最好调用codemirror的销毁方法
- $('#evaluating_contents .result_different_show').html('')
- this.setState({
- tabIndex: TAB_INDEX_EVALUATE_RESULT_INDEX
- })
- }
- this.setState({
- testSetsInitedArray: testSetsExpandedArrayInitVal.slice(0),
- })
- if (newProps.game.id !== this.props.game.id) {
- if (this.props.challenge.isHtml === true) {
- this.tabIndexChange(TAB_INDEX_WEB_DISPLAY)
- }
- }
- }
- }
-
- componentDidUpdate(prevProps, prevState, snapshot) {
- // 通关后重置为0
- if (!prevProps.currentGamePassed && this.props.currentGamePassed === true) {
- this.tabIndexChange(TAB_INDEX_WEB_DISPLAY)
- }
- }
-
-
- tabIndexChange(index) {
- this.setState({tabIndex: index});
- }
-
- onTestSetHeaderClick(index) {
- const { output_sets, power, game } = this.props;
- const { test_sets_array } = output_sets;
-
- const { testSetsInitedArray } = this.state;
-
- // TODO 评测了以后,测试集会变化,
- var current_test_set = test_sets_array[index];
- if (!current_test_set.output) {
- current_test_set.output = ''
- }
- // 优化,但是会增加代码复杂度
- if (( game.test_sets_view === true || power == 1 || current_test_set.is_public == 1 ) && testSetsInitedArray[index] === false ) { // 如果测试集没有初始化过(如果重新评测了,都需要重新初始化)
- const id = "result_different_show_" + index;
-
- var mv = window.CodeMirror.k_init(id, current_test_set.actual_output || "", current_test_set.output);
-
-
- var height=0;
- // 以前的代码用不了,2个pane的高度都是300
- // if($("#"+id).find(".CodeMirror-merge-pane").eq(0).height()>$("#"+id).find(".CodeMirror-merge-pane").eq(1).height()){
- // height = parseInt($("#"+id).find(".CodeMirror-merge-pane").eq(0).height());
- // }else{
- // height = parseInt($("#"+id).find(".CodeMirror-merge-pane").eq(1).height());
- // }
- var lineNumber = Math.max( current_test_set.output.split('\n').length
- , (current_test_set.actual_output ? current_test_set.actual_output.split('\n').length : 1 ))
-
- height = lineNumber * 19 + 25;
- console.log('height ', height)
- $("#"+id).find(".CodeMirror").height(height);
- $(".CodeMirror-merge-gap").find("svg").css("height", height);
- // 取真实高度
- $(".CodeMirror-merge-gap").css("height", $('.CodeMirror-merge-pane.CodeMirror-merge-editor').height());
- setTimeout(()=>{ // 解决第一次打开时高度不准的问题
- $('#game_test_set_results .CodeMirror-merge').css('display', 'flex')
- }, 100)
- // refresh一下,解决CM显示不全的问题
- mv.edit.refresh()
- mv.right.orig.refresh()
- testSetsInitedArray[index] = true;
- }
-
- this.props.onTestSetHeaderClick(index)
- this.setState({
- testSetsInitedArray,
- })
- }
- goToCertification() {
- window.open('/account/professional_certification', '_blank');
- }
- renderTestSets() {
- const { output_sets, testSetsExpandedArray, power, allowed_unlock, testSetUnlock, showDialog, challenge, game, user } = this.props;
- const { testSetsInitedArray } = this.state;
-
- const { test_sets_array, test_sets_count, had_test_count, test_sets_hidden_count, test_sets_public_count
- , had_passed_testsests_error_count, had_passed_testsests_hidden_count, had_passed_testsests_public_count } = output_sets;
-
- const testSetsComponentArray = []
-
- if (!test_sets_array) {
- console.error('no test_sets_array error')
- return ''
- }
- test_sets_array.forEach( (item, index) => {
- // function toggle_test_case(open, output, actual_output, id, power){
- // onclick={toggle_test_case(1, output, actual_output, 0, true)}
-
- const isExpanded = testSetsExpandedArray[index]
-
- let headIconClass = '';
- let _headLockIconClass = '';
-
- if (item.is_public == 0) {
- if (game.test_sets_view === true || power === 1){
- _headLockIconClass = 'fas fa-unlock-alt'
- } else {
- _headLockIconClass = 'fa-lock'
- }
- }
-
- if (item.result == true) {
- headIconClass = 'fa-check-circle color-light-green font-16'
- } else if (item.result == false) {
- headIconClass = 'fa-exclamation-circle -text-danger'
- }
-
- testSetsComponentArray.push(
-
-
-
- 测试集 {index + 1}
-
- { headIconClass && }
- { _headLockIconClass && }
-
- { item.ts_mem && 消耗内存{item.ts_mem}MB }
- { item.ts_mem && item.ts_time && }
- { item.ts_time && 代码执行时长:{item.ts_time}秒 }
-
-
-
- )
-
- //
- let contentText = (power === 0 && user.is_teacher) ?
-
- {`已经过职业认证的教师可以免金币查看隐藏测试集。`}
- {`解锁本关所有测试集需要扣除${challenge.score*5}金币,确定要解锁吗?`}
- this.goToCertification()} style={{color: '#4CACFF', cursor: 'pointer', 'text-decoration': 'underline'
- , 'margin-top': '12px'}}>立即认证
- :
-
- {`解锁本关所有测试集需要扣除${challenge.score*5}金币`}
- {`确定要解锁吗?`}
-
-
- const moreButtonsRender = () => {
- return ''
- // ${this.props.classes.button}
- // return (power === 0 && user.is_teacher) ? (
- //
this.goToCertification()} color="primary">
- // { '立即认证' }
- //
- // ) : ''
- }
- testSetsComponentArray.push(
-
-
-
- {/*测试集已解锁||管理员||公开的测试集||TODO应该是全通过时 已通过的测试集*/}
- {
- (game.test_sets_view == true || power == 1 || item.is_public == 1 || !!item.result === true) ?
-
- : ""
- }
-
-
- )
- })
- return testSetsComponentArray;
- }
-
- onEvaluateViewExpand() {
- window.valuation_extend_and_zoom();
- this.setState({
- evaluateViewExpanded: !this.state.evaluateViewExpanded
- })
- }
-
- render() {
- const { evaluateViewExpanded, tabIndex } = this.state;
- const { output_sets, latest_output, record, challenge, gameBuilding, myshixun } = this.props;
-
- if (!output_sets) {
- return (
-
loading
- )
- }
-
- const { test_sets, test_sets_count, had_test_count, test_sets_hidden_count, test_sets_public_count
- , had_passed_testsests_error_count, had_passed_testsests_hidden_count, had_passed_testsests_public_count } = output_sets;
-
-
- /*
-
-
-
-
-
-
- 评测信息
-
-
- onclick="check_tab('blacktab_con','blacktab_hover',this);"
- */
- return (
-
-
-
-
- { challenge.isHtml ?
- this.tabIndexChange(0)}>
- 效果显示
- : ''}
- this.tabIndexChange(1)}>
- 测试结果
-
-
-
- {/*TODO 按钮大小改造,css*/}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {/*
- record ?
本次评测耗时:{ record }秒 : ""
- */}
- { had_test_count === 0 || test_sets_count == null ?
:
- had_passed_testsests_error_count === test_sets_count ?
-
-
- {test_sets_count}/{test_sets_count} 全部通过
-
:
-
-
- {had_passed_testsests_error_count}/{test_sets_count}
- {/*.replace(/\\u/gi, '%u') unicode转码 */}
- {latest_output ?
-
- : ""}
-
- }
- {this.renderTestSets()}
-
-
-
-
-
-
-
-
- );
- }
-}
-
-export default CodeEvaluateView;
+import React, { Component } from 'react';
+
+import IconButton from 'material-ui/IconButton';
+import Tooltip from 'material-ui/Tooltip';
+import Button from 'material-ui/Button';
+
+import './CodeEvaluateView.css'
+import { CircularProgress } from 'material-ui/Progress';
+import { on, off } from 'educoder'
+const testSetsExpandedArrayInitVal = [false, false, false, false, false,
+ false, false, false, false, false,
+ false, false, false, false, false,
+ false, false, false, false, false]
+
+const $ = window.$;
+const TAB_INDEX_WEB_DISPLAY = 0;
+const TAB_INDEX_EVALUATE_RESULT_INDEX = 1
+
+class CodeEvaluateView extends Component {
+
+ constructor(props) {
+ super(props)
+
+ this.onEvaluateViewExpand = this.onEvaluateViewExpand.bind(this)
+
+ this.state = {
+ // TODO 最多20个测试集?
+ testSetsInitedArray: testSetsExpandedArrayInitVal.slice(0),
+
+ evaluateViewExpanded: false,
+
+ tabIndex: 1,
+ }
+ }
+
+ componentDidMount() {
+ const { challenge } = this.props;
+
+ on('showWebDisplayEvent', () => {
+ if (challenge.isHtml) {
+ this.setState({
+ tabIndex: TAB_INDEX_WEB_DISPLAY
+ })
+ }
+ })
+
+ if (challenge.isHtml === true) {
+ this.tabIndexChange(TAB_INDEX_WEB_DISPLAY)
+ }
+
+ }
+ componentWillUnmount() {
+ off('showWebDisplayEvent')
+ }
+
+ componentWillReceiveProps(newProps, newContext) {
+ if (this.props.game && newProps.game && (newProps.game.id !== this.props.game.id
+ || newProps.gameBuilding !== this.props.gameBuilding )) { // 切换game时重置state
+ if (newProps.gameBuilding === false) {
+ // 清空codemirror的内容,TODO最好调用codemirror的销毁方法
+ $('#evaluating_contents .result_different_show').html('')
+ this.setState({
+ tabIndex: TAB_INDEX_EVALUATE_RESULT_INDEX
+ })
+ }
+ this.setState({
+ testSetsInitedArray: testSetsExpandedArrayInitVal.slice(0),
+ })
+ if (newProps.game.id !== this.props.game.id) {
+ if (this.props.challenge.isHtml === true) {
+ this.tabIndexChange(TAB_INDEX_WEB_DISPLAY)
+ }
+ }
+ }
+ }
+
+ componentDidUpdate(prevProps, prevState, snapshot) {
+ // 通关后重置为0
+ if (!prevProps.currentGamePassed && this.props.currentGamePassed === true) {
+ this.tabIndexChange(TAB_INDEX_WEB_DISPLAY)
+ }
+ }
+
+
+ tabIndexChange(index) {
+ this.setState({tabIndex: index});
+ }
+
+ onTestSetHeaderClick(index) {
+ const { output_sets, power, game } = this.props;
+ const { test_sets_array } = output_sets;
+
+ const { testSetsInitedArray } = this.state;
+
+ // TODO 评测了以后,测试集会变化,
+ var current_test_set = test_sets_array[index];
+ if (!current_test_set.output) {
+ current_test_set.output = ''
+ }
+ // 优化,但是会增加代码复杂度
+ if (( game.test_sets_view === true || power == 1 || current_test_set.is_public == 1 ) && testSetsInitedArray[index] === false ) { // 如果测试集没有初始化过(如果重新评测了,都需要重新初始化)
+ const id = "result_different_show_" + index;
+
+ var mv = window.CodeMirror.k_init(id, current_test_set.actual_output || "", current_test_set.output);
+
+
+ var height=0;
+ // 以前的代码用不了,2个pane的高度都是300
+ // if($("#"+id).find(".CodeMirror-merge-pane").eq(0).height()>$("#"+id).find(".CodeMirror-merge-pane").eq(1).height()){
+ // height = parseInt($("#"+id).find(".CodeMirror-merge-pane").eq(0).height());
+ // }else{
+ // height = parseInt($("#"+id).find(".CodeMirror-merge-pane").eq(1).height());
+ // }
+ var lineNumber = Math.max( current_test_set.output.split('\n').length
+ , (current_test_set.actual_output ? current_test_set.actual_output.split('\n').length : 1 ))
+
+ height = lineNumber * 19 + 25;
+ console.log('height ', height)
+ $("#"+id).find(".CodeMirror").height(height);
+ $(".CodeMirror-merge-gap").find("svg").css("height", height);
+ // 取真实高度
+ $(".CodeMirror-merge-gap").css("height", $('.CodeMirror-merge-pane.CodeMirror-merge-editor').height());
+ setTimeout(()=>{ // 解决第一次打开时高度不准的问题
+ $('#game_test_set_results .CodeMirror-merge').css('display', 'flex')
+ }, 100)
+ // refresh一下,解决CM显示不全的问题
+ mv.edit.refresh()
+ mv.right.orig.refresh()
+ testSetsInitedArray[index] = true;
+ }
+
+ this.props.onTestSetHeaderClick(index)
+ this.setState({
+ testSetsInitedArray,
+ })
+ }
+ goToCertification() {
+ window.open('/account/certification', '_blank');
+ }
+ renderTestSets() {
+ const { output_sets, testSetsExpandedArray, power, allowed_unlock, testSetUnlock, showDialog, challenge, game, user } = this.props;
+ const { testSetsInitedArray } = this.state;
+
+ const { test_sets_array, test_sets_count, had_test_count, test_sets_hidden_count, test_sets_public_count
+ , had_passed_testsests_error_count, had_passed_testsests_hidden_count, had_passed_testsests_public_count } = output_sets;
+
+ const testSetsComponentArray = []
+
+ if (!test_sets_array) {
+ console.error('no test_sets_array error')
+ return ''
+ }
+ test_sets_array.forEach( (item, index) => {
+ // function toggle_test_case(open, output, actual_output, id, power){
+ // onclick={toggle_test_case(1, output, actual_output, 0, true)}
+
+ const isExpanded = testSetsExpandedArray[index]
+
+ let headIconClass = '';
+ let _headLockIconClass = '';
+
+ if (item.is_public == 0) {
+ if (game.test_sets_view === true || power === 1){
+ _headLockIconClass = 'fas fa-unlock-alt'
+ } else {
+ _headLockIconClass = 'fa-lock'
+ }
+ }
+
+ if (item.result == true) {
+ headIconClass = 'fa-check-circle color-light-green font-16'
+ } else if (item.result == false) {
+ headIconClass = 'fa-exclamation-circle -text-danger'
+ }
+
+ testSetsComponentArray.push(
+
+
+
+ 测试集 {index + 1}
+
+ { headIconClass && }
+ { _headLockIconClass && }
+
+ { item.ts_mem && 消耗内存{item.ts_mem}MB }
+ { item.ts_mem && item.ts_time && }
+ { item.ts_time && 代码执行时长:{item.ts_time}秒 }
+
+
+
+ )
+
+ //
+ let contentText = (power === 0 && user.is_teacher) ?
+
+ {`已经过职业认证的教师可以免金币查看隐藏测试集。`}
+ {`解锁本关所有测试集需要扣除${challenge.score*5}金币,确定要解锁吗?`}
+ this.goToCertification()} style={{color: '#4CACFF', cursor: 'pointer', 'text-decoration': 'underline'
+ , 'margin-top': '12px'}}>立即认证
+ :
+
+ {`解锁本关所有测试集需要扣除${challenge.score*5}金币`}
+ {`确定要解锁吗?`}
+
+
+ const moreButtonsRender = () => {
+ return ''
+ // ${this.props.classes.button}
+ // return (power === 0 && user.is_teacher) ? (
+ //
this.goToCertification()} color="primary">
+ // { '立即认证' }
+ //
+ // ) : ''
+ }
+ testSetsComponentArray.push(
+
+
+
+ {/*测试集已解锁||管理员||公开的测试集||TODO应该是全通过时 已通过的测试集*/}
+ {
+ (game.test_sets_view == true || power == 1 || item.is_public == 1 || !!item.result === true) ?
+
+ : ""
+ }
+
+
+ )
+ })
+ return testSetsComponentArray;
+ }
+
+ onEvaluateViewExpand() {
+ window.valuation_extend_and_zoom();
+ this.setState({
+ evaluateViewExpanded: !this.state.evaluateViewExpanded
+ })
+ }
+
+ render() {
+ const { evaluateViewExpanded, tabIndex } = this.state;
+ const { output_sets, latest_output, record, challenge, gameBuilding, myshixun } = this.props;
+
+ if (!output_sets) {
+ return (
+
loading
+ )
+ }
+
+ const { test_sets, test_sets_count, had_test_count, test_sets_hidden_count, test_sets_public_count
+ , had_passed_testsests_error_count, had_passed_testsests_hidden_count, had_passed_testsests_public_count } = output_sets;
+
+
+ /*
+
+
+
+
+
+
+ 评测信息
+
+
+ onclick="check_tab('blacktab_con','blacktab_hover',this);"
+ */
+ return (
+
+
+
+
+ { challenge.isHtml ?
+ this.tabIndexChange(0)}>
+ 效果显示
+ : ''}
+ this.tabIndexChange(1)}>
+ 测试结果
+
+
+
+ {/*TODO 按钮大小改造,css*/}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/*
+ record ?
本次评测耗时:{ record }秒 : ""
+ */}
+ { had_test_count === 0 || test_sets_count == null ?
:
+ had_passed_testsests_error_count === test_sets_count ?
+
+
+ {test_sets_count}/{test_sets_count} 全部通过
+
:
+
+
+ {had_passed_testsests_error_count}/{test_sets_count}
+ {/*.replace(/\\u/gi, '%u') unicode转码 */}
+ {latest_output ?
+
+ : ""}
+
+ }
+ {this.renderTestSets()}
+
+
+
+
+
+
+
+
+ );
+ }
+}
+
+export default CodeEvaluateView;
diff --git a/public/react/src/modules/page/main/LeftView.js b/public/react/src/modules/page/main/LeftView.js
index 9e39a5508..428d898cb 100644
--- a/public/react/src/modules/page/main/LeftView.js
+++ b/public/react/src/modules/page/main/LeftView.js
@@ -68,7 +68,7 @@ const styles = MUIDialogStyleUtil.getTwoButtonStyle(
class LeftView extends Component {
goToCertification() {
- window.open('/account/professional_certification', '_blank');
+ window.open('/account/certification', '_blank');
}
// /shixuns/mnf6b7z3/shixun_discuss?challenge_id=88
render() {
diff --git a/public/react/src/modules/page/main/Webssh.js b/public/react/src/modules/page/main/Webssh.js
index b5924c2d4..a76210909 100644
--- a/public/react/src/modules/page/main/Webssh.js
+++ b/public/react/src/modules/page/main/Webssh.js
@@ -7,7 +7,7 @@ export function loadSshScript(callback) {
prefix = ''
} else {
// _url_origin = `https://testeduplus2.educoder.net/`;
- _url_origin = 'http://47.96.87.25:48080/';
+ _url_origin = '';
}
const $ = window.$;
// 未加载过
diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js
index cc89f3003..2c38e602d 100644
--- a/public/react/src/modules/tpm/TPMIndexHOC.js
+++ b/public/react/src/modules/tpm/TPMIndexHOC.js
@@ -18,7 +18,8 @@ import Trialapplication from "../login/Trialapplication";
const $ = window.$;
const versionNum = '0001';
// let _url_origin = getUrl()
-let _url_origin=`http://47.96.87.25:48080`;
+console.log(this.props)
+let _url_origin='';
// let _url_origin=`https://www.educoder.net`;
if (!window['indexHOCLoaded']) {
diff --git a/public/react/src/modules/user/Interestpage.js b/public/react/src/modules/user/Interestpage.js
index 939e9d5f9..c7fd23443 100644
--- a/public/react/src/modules/user/Interestpage.js
+++ b/public/react/src/modules/user/Interestpage.js
@@ -2,7 +2,7 @@ import React, {Component} from 'react';
import {Button,notification} from 'antd';
import {broadcastChannelPostMessage} from 'educoder';
import MyEduCoderModal from './MyEduCoderModal';
-import Notcompleted from './Notcompleted';
+// import Notcompleted from '../../common/Notcompleted';
import axios from 'axios';
import './common.css';
import mytc from './img/mytc.png';
@@ -31,7 +31,7 @@ class InterestpageComponent extends Component {
passmm:this.props.passmm,
homedatalist:undefined,
hometypepvisible: undefined,
-
+ MyEduCoderModals:false
}
}
openNotification = (messge) => {
@@ -249,9 +249,6 @@ class InterestpageComponent extends Component {
setNotcompleteds={()=>{this.setNotcompleteds()}}
/>
-
请选择你的职业
From c74b55e38fff8e4e2e98693f9caa7ebf20ae3266 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 20 Jul 2019 12:29:22 +0800
Subject: [PATCH 12/23] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/user/FindPasswordComponent.js | 72 +++++++++++++++----
.../modules/user/LoginRegisterComponent.js | 47 +++++++++---
2 files changed, 98 insertions(+), 21 deletions(-)
diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js
index 7542bc4ee..18243ea4a 100644
--- a/public/react/src/modules/user/FindPasswordComponent.js
+++ b/public/react/src/modules/user/FindPasswordComponent.js
@@ -42,11 +42,32 @@ class LoginRegisterComponent extends Component {
dragOk: false,
Whethertoverify:false,
modalsType:false,
-
+ pciphone:true,
}
}
+ //判断是否是手机端
+ IsPC=()=> {
+ var userAgentInfo = navigator.userAgent;
+ var Agents = ["Android", "iPhone",
+ "SymbianOS", "Windows Phone",
+ "iPad", "iPod"];
+ var flag = true;//这个意思是说自己的是pc 端
+ for (var v = 0; v < Agents.length; v++) {
+ if (userAgentInfo.indexOf(Agents[v]) > 0) {
+ flag = false;
+ break;
+ }
+ }
+ return flag;
+ }
+ componentDidMount = () => {
+ let pcipns=this.IsPC();
+ this.setState({
+ pciphone:pcipns,
+ })
+ }
openNotification = (messge) => {
notification.open({
message: "提示",
@@ -170,13 +191,16 @@ class LoginRegisterComponent extends Component {
})
return
}
- if (this.state.dragOk === false) {
- // this.openNotification(`请拖动滑块完成验证`,2);
- this.setState({
- Phonenumberisnotcosytdhk:"请拖动滑块完成验证",
- })
- return
+ if(this.state.pciphone===true){
+ if (this.state.dragOk === false) {
+ // this.openNotification(`请拖动滑块完成验证`,2);
+ this.setState({
+ Phonenumberisnotcosytdhk:"请拖动滑块完成验证",
+ })
+ return
+ }
}
+
if (this.state.password === undefined || this.state.password.length ===0 || this.state.password === "") {
this.setState({
Phonenumberisnotcosmmm:"密码不能为空",
@@ -379,9 +403,8 @@ class LoginRegisterComponent extends Component {
return
}
}
- //是否验证通过
- dragOkCallback = () => {
- console.log(this.state.login);
+
+ inputOnBlurzhuche = (e)=>{
if(this.state.login===""||this.state.login.length===0){
this.setState({
Phonenumberisnotco: "账号不能为空",
@@ -394,7 +417,28 @@ class LoginRegisterComponent extends Component {
this.setState({
Phonenumberisnotcosytdhk:undefined,
})
- this.Emailphonenumberverification(this.state.login)
+ this.Emailphonenumberverification(e.target.value)
+ }
+ //是否验证通过
+ dragOkCallback = () => {
+ console.log(this.state.login);
+ if(this.state.pciphone===false) {
+
+ if (this.state.login === "" || this.state.login.length === 0) {
+ this.setState({
+ Phonenumberisnotco: "账号不能为空",
+ Phonenumberisnotcobool: true,
+ dragOk: false,
+ Whethertoverify: this.state.Whethertoverify === true ? false : true,
+ })
+ return
+ }
+ this.setState({
+ Phonenumberisnotcosytdhk: undefined,
+ })
+ this.Emailphonenumberverification(this.state.login)
+
+ }
}
//邮箱手机号验证
@@ -454,6 +498,7 @@ class LoginRegisterComponent extends Component {
readonlyInput,
codes,
Whethertoverify,
+ pciphone,
} = this.state
// height: 346px;
return (
@@ -528,6 +573,7 @@ class LoginRegisterComponent extends Component {
this.inputOnBlurzhuche(e)}
onChange={this.loginInputonChange} style={{marginTop: '10px', height: "38px"}}>
{
Phonenumberisnotco && Phonenumberisnotco !== "" ?
@@ -538,7 +584,7 @@ class LoginRegisterComponent extends Component {
}
{
- Whethertoverify===false?
+ Whethertoverify===false&&pciphone===true?
{
+ var userAgentInfo = navigator.userAgent;
+ var Agents = ["Android", "iPhone",
+ "SymbianOS", "Windows Phone",
+ "iPad", "iPod"];
+ var flag = true;//这个意思是说自己的是pc 端
+ for (var v = 0; v < Agents.length; v++) {
+ if (userAgentInfo.indexOf(Agents[v]) > 0) {
+ flag = false;
+ break;
+ }
+ }
+ return flag;
+ }
// 点击表单后,改变type
changeType = () => {
this.setState({classpass: 'password'});
@@ -106,17 +123,21 @@ class LoginRegisterComponent extends Component {
componentDidMount = () => {
// console.log("componentDidUpdate");
// console.log(this.props);
+ let pcipns=this.IsPC();
if (this.props.match.url === "/login") {
console.log("11111111111111111111111111");
this.state = {
tab:["0"],
+ pciphone:pcipns,
}
} else if (this.props.match.url === "/register") {
this.state = {
tab:["1"],
+ pciphone:pcipns,
}
}
+
}
openNotification = (messge,type) => {
// type 1 成功提示绿色 2提醒颜色黄色 3错误提示红色
@@ -286,17 +307,20 @@ class LoginRegisterComponent extends Component {
// this.openNotification(`请同意服务协议条款`,2);
// return;
// }
+ if(this.state.pciphone===true){
+ if (this.state.dragOk === false) {
+ // this.openNotification(`请拖动滑块完成验证`,2);
+ this.setState({
+ Phonenumberisnotcosytdhk:"请拖动滑块完成验证",
+ })
+ return
+ }
+ }
if (this.state.logins === undefined || this.state.logins === ""||this.state.logins.length===0) {
this.setState({
Phonenumberisnotcos:"账号不能为空",
})
return
- } else if (this.state.dragOk === false) {
- // this.openNotification(`请拖动滑块完成验证`,2);
- this.setState({
- Phonenumberisnotcosytdhk:"请拖动滑块完成验证",
- })
- return
} else if (this.state.codes === undefined || this.state.codes == ""||this.state.codes.length===0) {
// this.openNotification(`请输入验证码`,2);
this.setState({
@@ -557,6 +581,11 @@ class LoginRegisterComponent extends Component {
this.isCorrectname(e.target.value, id);
// this.Emailphonenumberverification(e.target.value, id);
}
+ inputOnBlurzhuche = (e, id) => {
+ if(this.state.pciphone===false) {
+ this.Emailphonenumberverification(e.target.value, id);
+ }
+ }
//获取登入密码
passwordonChange = (e) => {
// console.log(e.target.value);
@@ -673,6 +702,7 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcodmm,
// 注册
readAgreement,
+ pciphone,
} = this.state
// height: 346px;
if (this.state.seconds === 0) {
@@ -780,6 +810,7 @@ class LoginRegisterComponent extends Component {
value={this.state.logins}
type="text" autoComplete="off"
onChange={this.loginInputonChanges}
+ onBlur={(e) => this.inputOnBlurzhuche(e, 2)}
style={{marginTop: '30px' , height: '38px',color:'#999999',fontSize:"14px"}}>
{
Phonenumberisnotcos && Phonenumberisnotcos !== "" ?
@@ -790,7 +821,7 @@ class LoginRegisterComponent extends Component {
}
{
- Whethertoverify===false?
+ Whethertoverify===false&&pciphone===true?
Date: Sat, 20 Jul 2019 12:33:12 +0800
Subject: [PATCH 13/23] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/courses/shixunHomework/Listofworksstudentone.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
index 2284cedd6..f6b606605 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
@@ -1156,7 +1156,6 @@ class Listofworksstudentone extends Component {
this.setState({
data: datalist,
datas: datalists,
- teacherlist: teacherlist,
teacherlists: teacherlists,
loadingstate: false,
styletable: styletable,
From e96edd6496e22c430d87f5e6be76c4eebc744097 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 12:34:18 +0800
Subject: [PATCH 14/23] b
---
.../src/modules/courses/shixunHomework/Listofworksstudentone.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
index 2284cedd6..8af603d14 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
@@ -1156,7 +1156,7 @@ class Listofworksstudentone extends Component {
this.setState({
data: datalist,
datas: datalists,
- teacherlist: teacherlist,
+ // teacherlist: teacherlist,
teacherlists: teacherlists,
loadingstate: false,
styletable: styletable,
From f306445025df4910d2384ddf0223fbf4c3524dbe 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 12:53:26 +0800
Subject: [PATCH 15/23] =?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/modules/page/main/Webssh.js | 3 ++-
public/react/src/modules/tpm/TPMIndexHOC.js | 5 ++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/page/main/Webssh.js b/public/react/src/modules/page/main/Webssh.js
index a76210909..ef38ccba9 100644
--- a/public/react/src/modules/page/main/Webssh.js
+++ b/public/react/src/modules/page/main/Webssh.js
@@ -5,9 +5,10 @@ export function loadSshScript(callback) {
let prefix = 'react/build'
if (window.location.port == 3007) {
prefix = ''
+ _url_origin = 'https://newweb.educoder.net/';
} else {
// _url_origin = `https://testeduplus2.educoder.net/`;
- _url_origin = '';
+ _url_origin = '/';
}
const $ = window.$;
// 未加载过
diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js
index 2c38e602d..7a568c99f 100644
--- a/public/react/src/modules/tpm/TPMIndexHOC.js
+++ b/public/react/src/modules/tpm/TPMIndexHOC.js
@@ -18,8 +18,11 @@ import Trialapplication from "../login/Trialapplication";
const $ = window.$;
const versionNum = '0001';
// let _url_origin = getUrl()
-console.log(this.props)
let _url_origin='';
+if(window.location.port === "3007"){
+ _url_origin="https://newweb.educoder.net";
+}
+
// let _url_origin=`https://www.educoder.net`;
if (!window['indexHOCLoaded']) {
From a19fec40e1597b8724d860f69e6caab87dea307e 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 12:57:45 +0800
Subject: [PATCH 16/23] b
---
public/react/src/modules/page/layers/TaskResultLayer.css | 2 +-
public/react/src/modules/page/layers/TaskResultLayer.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/page/layers/TaskResultLayer.css b/public/react/src/modules/page/layers/TaskResultLayer.css
index c9912b710..7bc0b6f46 100644
--- a/public/react/src/modules/page/layers/TaskResultLayer.css
+++ b/public/react/src/modules/page/layers/TaskResultLayer.css
@@ -82,7 +82,7 @@
margin-left: -154px;
text-align: center;
}
-.inline{
+.inlines{
display: inline-block;
width: auto;
line-height: 26px;
diff --git a/public/react/src/modules/page/layers/TaskResultLayer.js b/public/react/src/modules/page/layers/TaskResultLayer.js
index 7c8e6b6d9..1469653f9 100644
--- a/public/react/src/modules/page/layers/TaskResultLayer.js
+++ b/public/react/src/modules/page/layers/TaskResultLayer.js
@@ -168,7 +168,7 @@ class TaskResultLayer extends Component {
-
+
{currentPassedGameGainGold >= 0 ? `+${currentPassedGameGainGold}` : '+0'}
From 90cbd852a91f37930dd247c3ff93731b233f8e2f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 20 Jul 2019 13:00:38 +0800
Subject: [PATCH 17/23] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/user/FindPasswordComponent.js | 8 +++++--
public/react/src/modules/user/Interestpage.js | 4 ++--
.../modules/user/LoginRegisterComponent.js | 21 ++++++++++++-------
public/react/src/modules/user/common.css | 8 +++----
4 files changed, 26 insertions(+), 15 deletions(-)
diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js
index 18243ea4a..5edc7b0b4 100644
--- a/public/react/src/modules/user/FindPasswordComponent.js
+++ b/public/react/src/modules/user/FindPasswordComponent.js
@@ -604,13 +604,17 @@ class LoginRegisterComponent extends Component {
:
""
}
- {
+
+ {pciphone===true?
+ (
Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk !=="" ?
{Phonenumberisnotcosytdhk}
:
- }
+ )
+ :""}
+
+
- this.Interestcompletionpage()} style={{width:"255px",height: "36px",background: "#4CACFF",marginTop: "30px"} }>完成
+ this.Interestcompletionpage()} style={{width:"255px",height: "35px",background: "#4CACFF",marginTop: "17px"} }>完成
diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js
index cf765f3e0..efd04db70 100644
--- a/public/react/src/modules/user/LoginRegisterComponent.js
+++ b/public/react/src/modules/user/LoginRegisterComponent.js
@@ -841,14 +841,21 @@ class LoginRegisterComponent extends Component {
:
""
}
- {
- Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk !== "" ?
-
- {Phonenumberisnotcosytdhk}
-
- :
+
+ {
+ pciphone===true?
+ (
+ Phonenumberisnotcosytdhk && Phonenumberisnotcosytdhk !== "" ?
+
+ {Phonenumberisnotcosytdhk}
+
+ :
+
+ )
+ :""
+ }
+
- }
diff --git a/public/react/src/modules/user/common.css b/public/react/src/modules/user/common.css
index 0b681a72a..be8480464 100644
--- a/public/react/src/modules/user/common.css
+++ b/public/react/src/modules/user/common.css
@@ -71,7 +71,7 @@
}
.ysldivhomediv{
width: 101px;
- height: 147px;
+ height: 130px;
}
.ysldivhomediv1{
@@ -83,7 +83,7 @@
display: flex;
flex-direction:column;
margin-left: 73px;
- margin-top: 8px;
+ margin-top: 5px;
}
.ysldivhomediv2{
width: 110px;
@@ -94,7 +94,7 @@
display: flex;
flex-direction:column;
margin-left: 73px;
- margin-top: 20px;
+ margin-top: 10px;
}
.ysldivhomedivtxt{
width:101px;
@@ -159,7 +159,7 @@
display: flex;
justify-content:center;
width: 60px;
- margin-left: 27px;
+ margin-left: 21px;
}
.yslgouxuanimg{
From 991d7fc06f6faf0099dafb17647db3b667c9e93e 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 13:05:20 +0800
Subject: [PATCH 18/23] Merge branch 'master' of
https://bdgit.educoder.net/Hjqreturn/educoder
# Conflicts:
# public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
---
public/react/public/index.html | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/public/react/public/index.html b/public/react/public/index.html
index e38beda7c..d76d8f893 100755
--- a/public/react/public/index.html
+++ b/public/react/public/index.html
@@ -148,14 +148,18 @@