|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
* @Github:
|
|
|
|
|
* @Date: 2020-01-15 09:56:34
|
|
|
|
|
* @LastEditors : tangjiang
|
|
|
|
|
* @LastEditTime : 2020-01-17 10:19:51
|
|
|
|
|
* @LastEditTime : 2020-01-17 11:48:21
|
|
|
|
|
*/
|
|
|
|
|
import './index.scss';
|
|
|
|
|
import React, {useState, useEffect, useRef} from 'react';
|
|
|
|
@ -12,7 +12,7 @@ import MonacoEditor from '@monaco-editor/react';
|
|
|
|
|
import { Input, Icon } from 'antd';
|
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
import actions from '../../redux/actions';
|
|
|
|
|
import cookie from 'react-cookies';
|
|
|
|
|
import cookie from 'react-cookies'
|
|
|
|
|
|
|
|
|
|
const { TextArea } = Input;
|
|
|
|
|
const App = (props) => {
|
|
|
|
@ -41,13 +41,15 @@ const App = (props) => {
|
|
|
|
|
// 获取路径参数
|
|
|
|
|
const _params = window.location.search;
|
|
|
|
|
if (_params) {
|
|
|
|
|
let _cookie = '';
|
|
|
|
|
let _search = _params.split('?')[1];
|
|
|
|
|
if(_search.split('=')) {
|
|
|
|
|
_cookie = _search.split('=')[1];
|
|
|
|
|
cookie.save('_educoder_session', _cookie);
|
|
|
|
|
}
|
|
|
|
|
console.log(_cookie);
|
|
|
|
|
_search.split('&').forEach(item => {
|
|
|
|
|
console.log(item);
|
|
|
|
|
const _arr = item.split('=');
|
|
|
|
|
cookie.save(_arr[0], _arr[1], {
|
|
|
|
|
path: '/',
|
|
|
|
|
domain: '.educoder.net'
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
const [isActive, setIsActive] = useState(-1);
|
|
|
|
|
// const [isVisible, setIsVisible] = useState(false);
|
|
|
|
|