diff --git a/public/images/educoder/xcx/wxshare.png b/public/images/educoder/xcx/wxshare.png
index 84e106395..eab40228d 100644
Binary files a/public/images/educoder/xcx/wxshare.png and b/public/images/educoder/xcx/wxshare.png differ
diff --git a/public/react/public/index.html b/public/react/public/index.html
index eb7950446..de176398c 100755
--- a/public/react/public/index.html
+++ b/public/react/public/index.html
@@ -17,7 +17,7 @@
-
+
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index 8e2660a7f..f5279573b 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -38,14 +38,6 @@ function setCookier(){
}
}
-function setCookie(key, value) {
- const d = new Date();
- d.setTime(d.getTime() + (30 * 24 * 60 * 60 * 1000));
- const expires = "expires=" + d.toGMTString();
- document.cookie = `_educoder_session=${key}; domain=.educoder.net; path=/; expires=${expires}`;
-}
-
-
// TODO 开发期多个身份切换
let debugType =""
if (isDev) {
@@ -109,26 +101,27 @@ export function initAxiosInterceptors(props) {
// proxy="https://test-jupyterweb.educoder.net"
//proxy="http://192.168.2.63:3001"
try {
- const str =window.location.pathname;
- if(str.indexOf("/wxcode") !== -1){
- // console.log("开始重写cookis");
- const _params = window.location.search;
- // console.log("1111");
- if (_params) {
- // console.log("22222");
- let _search = _params.split('?')[1];
- _search.split('&').forEach(item => {
- const _arr = item.split('=');
- if(_arr[0]==='_educoder_session'){
- cookie.save('_educoder_session',_arr[1],{ path: '/' });
- cookie.save('_educoder_session',_arr[1], { domain: '.educoder.net', path: '/'});
- }else{
- cookie.save('autologin_trustie',_arr[1],{ path: '/' });
- cookie.save('autologin_trustie',_arr[1], { domain: '.educoder.net', path: '/'});
- }
- });
- }
+ const str =window.location.pathname;
+ if(str.indexOf("/wxcode") !== -1){
+ // console.log("开始重写cookis");
+ const _params = window.location.search;
+ // console.log("1111");
+ if (_params) {
+ // console.log("22222");
+ let _search = _params.split('?')[1];
+ _search.split('&').forEach(item => {
+ const _arr = item.split('=');
+ if(_arr[0]==='_educoder_session'){
+ cookie.save('_educoder_session',_arr[1],{ path: '/' });
+ cookie.save('_educoder_session',_arr[1], { domain: '.educoder.net', path: '/'});
+
+ }else{
+ cookie.save('autologin_trustie',_arr[1],{ path: '/' });
+ cookie.save('autologin_trustie',_arr[1], { domain: '.educoder.net', path: '/'});
+ }
+ });
}
+ }
}catch (e) {
}
diff --git a/public/react/src/modules/wxcode/index.js b/public/react/src/modules/wxcode/index.js
index 37241660a..75aa1beeb 100644
--- a/public/react/src/modules/wxcode/index.js
+++ b/public/react/src/modules/wxcode/index.js
@@ -4,7 +4,7 @@
* @Github:
* @Date: 2020-01-15 09:56:34
* @LastEditors : tangjiang
- * @LastEditTime : 2020-01-18 11:51:42
+ * @LastEditTime : 2020-01-18 15:07:09
*/
import './index.scss';
import React, {useState, useEffect, useRef} from 'react';
@@ -44,30 +44,24 @@ const App = (props) => {
const {identifier} = props.match.params;
// 获取路径参数
- const _params = window.location.search;
- const setCookier = () => {
- // var u = navigator.userAgent;
- // var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
- // if (isIOS) {
- // }else{
- // if (_params) {
- // let _cookie = '';
- // let _search = _params.split('?')[1];
- // if(_search.split('=')) {
- // _cookie = _search.split('=')[1];
- // cookie.save('_educoder_session', _cookie);
- // }
- // _search.split('&').forEach(item => {
- // const _arr = item.split('=');
- // cookie.save(_arr[0], _arr[1], {
- // path: '/',
- // domain: '.educoder.net'
- // });
- // });
- // }
- // }
- }
-
+ const setCookier = () => {
+ const _params = window.location.search;
+ if (_params) {
+ let _search = _params.split('?')[1];
+ _search.split('&').forEach(item => {
+ // console.log(item);
+ const _arr = item.split('=');
+ cookie.remove(_arr[0], {
+ path: '/',
+ domain: '.educoder.net'
+ });
+ cookie.save(_arr[0], _arr[1], {
+ path: '/',
+ domain: '.educoder.net'
+ });
+ });
+ }
+ }
setCookier();
const [isActive, setIsActive] = useState(-1);
const [tip, setTip] = useState('');
@@ -198,7 +192,7 @@ const App = (props) => {
options={{
selectOnLineNumbers: true,
automaticLayout: true,
- fontSize: `36px`
+ fontSize: `42px`
}}
theme='dark'
editorDidMount={handleEditorChange}
@@ -247,12 +241,12 @@ const App = (props) => {
测试集{i + 1}
{
- is_public
+ is_public
? compile_success > 0
? result ?
:
: ''
- :
+ :
隐藏测试集,暂不支持解锁和查看
// is_public
// ? result ?
diff --git a/public/react/src/modules/wxcode/index.scss b/public/react/src/modules/wxcode/index.scss
index dd47b3f7a..a81150988 100644
--- a/public/react/src/modules/wxcode/index.scss
+++ b/public/react/src/modules/wxcode/index.scss
@@ -30,8 +30,8 @@
// font-size: 24px !important;
// transform: scale(2.4);
// line-height: 2;
- font-size: 32px !important;
- transform: scale(2);
+ font-size: 34px !important;
+ transform: scale(1.8);
position: relative;
// top: 10px;
}
@@ -47,7 +47,7 @@
}
.icon-txt{
// margin-top: 5px;
- font-size: 28px;
+ font-size: 32px;
}
}
}
@@ -106,11 +106,11 @@
.header-title{
color:#637DA6;
// font-size: 24px;
- font-size: 36px;
+ font-size: 48px;
}
.header-close{
- // font-size: 36px;
- font-size: 36px;
+ // font-size: 42px;
+ font-size: 48px;
color: #2EA4FF;
}
}
@@ -129,14 +129,14 @@
color: rgba(196, 79, 78, 1);
}
.icon{
- font-size: 36px !important;
+ font-size: 48px !important;
position: relative;
// top: -8px;
margin-right: 10px;
}
.result-txt{
// font-size: 34px;
- font-size: 36px;
+ font-size: 48px;
}
.result-txt-desc{
max-width: 500px;
@@ -193,19 +193,19 @@
}
.case-item-tips{
color: #C67676;
- font-size: 22px;
+ font-size: 38px;
}
}
.item-header-desc{
- font-size: 36px;
+ font-size: 48px;
color: #405D8C;
line-height: 1.5;
// background: gold;
.icon{
position: relative;
top: -4px;
- font-size: 36px !important;
+ font-size: 42px !important;
margin-right: 10px;
}
&.active{
@@ -214,12 +214,12 @@
}
.case-item-tips{
- font-size: 36px;
+ font-size: 42px;
}
.case-item-desc{
display: none;
flex-direction: column;
- font-size: 36px;
+ font-size: 42px;
line-height: 1.5;
&.active{
@@ -229,11 +229,12 @@
.desc-title{
color: #637DA6;
line-height: 2;
+ font-size: 48px;
}
.text-area-style{
background:#010E1F !important;
color: #fff;
- font-size: 36px;
+ font-size: 48px;
line-height: 1.5;
border: none;
}
@@ -283,7 +284,7 @@
font-size: 100px !important;
}
.loading-txt{
- font-size: 36px;
+ font-size: 42px;
}
}
}
@@ -315,7 +316,7 @@
.pass-value,
.pass-btn .btn,
.pass-btn-all .btn{
- font-size: 36px;
+ font-size: 42px;
line-height: 1.5;
}
.pass-value{
diff --git a/public/react/src/services/wxcodeService.js b/public/react/src/services/wxcodeService.js
index 74a57d703..3b281bee0 100644
--- a/public/react/src/services/wxcodeService.js
+++ b/public/react/src/services/wxcodeService.js
@@ -10,31 +10,21 @@ import axios from 'axios';
import cookie from 'react-cookies'
// axios.defaults.withCredentials = true;
+
const setCookier = () => {
- // var u = navigator.userAgent;
- // var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
- // if (isIOS) {
- //
- // }else{
- // const _params = window.location.search;
- // if (_params) {
- // let _search = _params.split('?')[1];
- // _search.split('&').forEach(item => {
- // // console.log(item);
- // const _arr = item.split('=');
- // cookie.remove(_arr[0], {
- // domain: '.educoder.net',
- // path: '/',
- //
- // });
- // cookie.save(_arr[0], _arr[1], {
- // path: '/',
- // domain: '.educoder.net'
- // });
- // });
- // }
- //
- // }
+ const _params = window.location.search;
+ if (_params) {
+ let _search = _params.split('?')[1];
+ _search.split('&').forEach(item => {
+ // console.log(item);
+ const _arr = item.split('=');
+ cookie.remove(_arr[0], {
+ path: '/',
+ domain: '.educoder.net'
+ });
+ cookie.save(_arr[0], _arr[1], { domain: '.educoder.net', path: '/'});
+ });
+ }
}
// 获取代码块