Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_daiao
cxt 5 years ago
commit 6d56eb4cf3

@ -179,7 +179,6 @@ class DeveloperHome extends React.PureComponent {
componentDidMount() { componentDidMount() {
// 是否是我的,如果是我的 显示编辑按钮 // 是否是我的,如果是我的 显示编辑按钮
const { isMySource } = this.props; const { isMySource } = this.props;
console.log(this.props); console.log(this.props);
if (isMySource) { if (isMySource) {
this.handleFilterSearch({come_from: 'mine'}); this.handleFilterSearch({come_from: 'mine'});

@ -7,6 +7,7 @@
*/ */
import React from 'react'; import React from 'react';
import { TPMIndexHOC } from '../tpm/TPMIndexHOC'; import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
import { SnackbarHOC } from 'educoder';
import DeveloperHome from './DeveloperHome'; import DeveloperHome from './DeveloperHome';
const App = (props) => { const App = (props) => {
@ -15,4 +16,4 @@ const App = (props) => {
); );
} }
export default TPMIndexHOC(App); export default SnackbarHOC()(TPMIndexHOC(App));

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-20 10:35:40 * @Date: 2019-11-20 10:35:40
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-12-04 19:56:43 * @LastEditTime: 2019-12-05 18:07:32
*/ */
import 'quill/dist/quill.core.css'; import 'quill/dist/quill.core.css';
import 'quill/dist/quill.bubble.css'; import 'quill/dist/quill.bubble.css';
@ -18,6 +18,7 @@ import AddTestDemo from './AddTestDemo';
import QuillEditor from '../../../quillEditor'; import QuillEditor from '../../../quillEditor';
import actions from '../../../../../redux/actions'; import actions from '../../../../../redux/actions';
import CONST from '../../../../../constants'; import CONST from '../../../../../constants';
import { fromStore, toStore } from 'educoder'; // 保存和读取store值
const scrollIntoView = require('scroll-into-view'); const scrollIntoView = require('scroll-into-view');
const {jcLabel} = CONST; const {jcLabel} = CONST;
const FormItem = Form.Item; const FormItem = Form.Item;
@ -110,6 +111,8 @@ class EditTab extends React.Component {
// 改变描述信息 // 改变描述信息
handleChangeDescription = (value) => { handleChangeDescription = (value) => {
// console.log('获取的编辑器内容为: ', value); // console.log('获取的编辑器内容为: ', value);
// 描述信息变化时将信息保存至store中
toStore('oj_description', value);
this.props.validateOjDescription(value); this.props.validateOjDescription(value);
} }
// 改变难易度 // 改变难易度

@ -47,7 +47,7 @@ const five_min = 5 * 60 * 1000;
倒计时为0时出现重启按钮 倒计时为0时出现重启按钮
*/ */
const isSSHInIframe = false; const isSSHInIframe = false;
class WebSSHTimer extends React.PureComponent { class WebSSHTimer extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
@ -165,7 +165,6 @@ class WebSSHTimer extends React.PureComponent {
}) })
} }
componentDidUpdate(prevProps, prevState, snapshot) { componentDidUpdate(prevProps, prevState, snapshot) {
console.log('======',prevProps, this.state, this.startTimeRemain);
// 仅初始化一次 // 仅初始化一次
if (prevProps.showTimerProp === false && this.props.showTimerProp === true) { if (prevProps.showTimerProp === false && this.props.showTimerProp === true) {
if (this.intervalHandler) { if (this.intervalHandler) {
@ -199,8 +198,8 @@ class WebSSHTimer extends React.PureComponent {
// } // }
} else if (e.data.tp === "sshWorking") { } else if (e.data.tp === "sshWorking") {
this.startTimeRemain = 60; // this.startTimeRemain = 60;
this.forceUpdate() // this.forceUpdate();
} }
}); });
// } else { // } else {

@ -244,7 +244,9 @@ class TPIMonaco extends Component {
// 重要setState(因获取代码、重置代码等接口引起的调用)调用引起的变化才需要setValue // 重要setState(因获取代码、重置代码等接口引起的调用)调用引起的变化才需要setValue
editor_monaco.setValue(this.props.repositoryCode) editor_monaco.setValue(this.props.repositoryCode)
} }
// 代码没变也需要layout可能从命令行自动切回了代码tab // 代码没变也需要layout可能从命令行自动切回了代码tab
editor_monaco.layout();
// Clears the editor's undo history. // Clears the editor's undo history.
// TODO // TODO

Loading…
Cancel
Save