From dee235ce192c1f1ff6932e096949a9d23d10b188 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, 27 Jul 2019 16:23:29 +0800 Subject: [PATCH 1/7] =?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/ListPageIndex.js | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/public/react/src/modules/courses/ListPageIndex.js b/public/react/src/modules/courses/ListPageIndex.js index a1fef5de8..95342bb13 100644 --- a/public/react/src/modules/courses/ListPageIndex.js +++ b/public/react/src/modules/courses/ListPageIndex.js @@ -103,20 +103,18 @@ class ListPageIndex extends Component{
{/*头部banner*/} - - - - {yslGuideone===null||yslGuideone===undefined||yslGuideone===false? - ( - this.props.isAdmin()===true? - this.setwindowlocal(b)} - > - - :"" - ) - :"" - } + + {/*{yslGuideone===null||yslGuideone===undefined||yslGuideone===false?*/} + {/* (*/} + {/* this.props.isAdmin()===true?*/} + {/* this.setwindowlocal(b)}*/} + {/* >*/} + {/* */} + {/* :""*/} + {/* )*/} + {/* :""*/} + {/*}*/}
From a48bda6bd6297ec18edc8813b433e679809d45ed 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, 27 Jul 2019 17:25:24 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E8=B0=83=E6=95=B4logo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/public/css/edu-all.css | 2 +- public/react/src/modules/tpm/NewHeader.js | 15 ++++++++------- public/stylesheets/educoder/edu-all.css | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css index 258aa4a4c..da28fb736 100644 --- a/public/react/public/css/edu-all.css +++ b/public/react/public/css/edu-all.css @@ -6,7 +6,7 @@ float: left; width: 97px;} .head-nav{float: left;width: 780px;text-align: center;height: 60px;box-sizing: border-box; min-width: 400px;} -.head-nav ul#header-nav{position: absolute;top: 0px;z-index: 3;height: 60px;box-sizing: border-box;padding-left: 30px;} +.head-nav ul#header-nav{position: absolute;top: 0px;z-index: 3;height: 60px;box-sizing: border-box;} .head-nav ul#header-nav li{float: left;height: 60px;line-height: 60px;margin-right: 30px;cursor: pointer;position: relative;font-size: 16px} .head-nav ul#header-nav li a{display: block;height: 100%;width: 100%;color: #fff} .head-nav ul#header-nav li a:hover{color: #cccccc;} diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index b89d59fe7..133f47037 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -649,20 +649,21 @@ submittojoinclass=(value)=>{ {...this.state} {...this.props} />:""} - -
+ + 高校智能化教学与实训平台 + +
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/} - - 高校智能化教学与实训平台 - +
    - {/*
  • 首页
  • */} +
  • 首页
  • {/*
  • 实训路径
  • */}
  • - 实践课程
  • + 实践课程 + {/*
  • 课堂
  • */}
  • diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index 9ab0a3948..0b2ebc103 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -6,7 +6,7 @@ float: left; width: 97px;} .head-nav{float: left;width: 780px;text-align: center;height: 60px;box-sizing: border-box; min-width: 400px;} -.head-nav ul#header-nav{position: absolute;top: 0px;z-index: 3;height: 60px;box-sizing: border-box;padding-left: 30px;} +.head-nav ul#header-nav{position: absolute;top: 0px;z-index: 3;height: 60px;box-sizing: border-box;} .head-nav ul#header-nav li{float: left;height: 60px;line-height: 60px;margin-right: 30px;cursor: pointer;position: relative;font-size: 16px} .head-nav ul#header-nav li a{display: block;height: 100%;width: 100%;color: #fff} .head-nav ul#header-nav li a:hover{color: #cccccc;} From 18c2446b99cb07cad7ee47d462c593b27f24df12 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, 27 Jul 2019 18:10:23 +0800 Subject: [PATCH 3/7] b --- public/react/src/modules/tpm/NewHeader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 133f47037..d197bc9c4 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -649,7 +649,7 @@ submittojoinclass=(value)=>{ {...this.state} {...this.props} />:""} - + 高校智能化教学与实训平台
    From d33eca5486fb518e2ddd06336dde6934862d6224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sun, 28 Jul 2019 10:12:04 +0800 Subject: [PATCH 4/7] =?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/courses/ListPageIndex.js | 2 +- public/react/src/modules/user/LoginRegisterComponent.js | 3 +++ public/react/src/modules/user/Notcompletedysl.js | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/ListPageIndex.js b/public/react/src/modules/courses/ListPageIndex.js index 95342bb13..9f12f6434 100644 --- a/public/react/src/modules/courses/ListPageIndex.js +++ b/public/react/src/modules/courses/ListPageIndex.js @@ -103,7 +103,7 @@ class ListPageIndex extends Component{
    {/*头部banner*/} - + {/*{yslGuideone===null||yslGuideone===undefined||yslGuideone===false?*/} {/* (*/} {/* this.props.isAdmin()===true?*/} diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index eb0a3a5c2..ebb099b2e 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -359,6 +359,9 @@ class LoginRegisterComponent extends Component { if(weekArray===undefined){ weekArray="/"; } + if(weekArray===null){ + weekArray="/"; + } window.location.href = weekArray; } } diff --git a/public/react/src/modules/user/Notcompletedysl.js b/public/react/src/modules/user/Notcompletedysl.js index 8f147957a..5f180af48 100644 --- a/public/react/src/modules/user/Notcompletedysl.js +++ b/public/react/src/modules/user/Notcompletedysl.js @@ -37,6 +37,9 @@ class Notcompletedysl extends Component { if(weekArray===undefined){ weekArray="/"; } + if(weekArray===null){ + weekArray="/"; + } window.location.href = weekArray; } From 4db7e1e058b4da33234d51405b7dd0f745c02c6c Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 29 Jul 2019 09:08:29 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E8=AF=95=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/common/TextUtil.js | 7 ++++++- .../common/components/markdown/MarkdownToHtml.css | 6 ++++++ .../common/components/markdown/MarkdownToHtml.js | 13 ++++++++----- 3 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 public/react/src/common/components/markdown/MarkdownToHtml.css diff --git a/public/react/src/common/TextUtil.js b/public/react/src/common/TextUtil.js index 82a848cac..8aef0adbd 100644 --- a/public/react/src/common/TextUtil.js +++ b/public/react/src/common/TextUtil.js @@ -10,7 +10,8 @@ export function markdownToHTML(oldContent, selector) { window.$(selector).html(oldContent) } else { try { - var markdwonParser = window.editormd.markdownToHTML("md_div", { + // selector || + var markdwonParser = window.editormd.markdownToHTML(selector || "md_div", { markdown: oldContent, // .replace(/▁/g,"▁▁▁"), emoji: true, htmlDecode: "style,script,iframe", // you can filter tags decode @@ -23,6 +24,10 @@ export function markdownToHTML(oldContent, selector) { } catch(e) { console.error(e) } + // selector = '.' + selector + if (selector) { + return; + } const content = window.$('#md_div').html() if (selector) { diff --git a/public/react/src/common/components/markdown/MarkdownToHtml.css b/public/react/src/common/components/markdown/MarkdownToHtml.css new file mode 100644 index 000000000..affba12cd --- /dev/null +++ b/public/react/src/common/components/markdown/MarkdownToHtml.css @@ -0,0 +1,6 @@ +.markdownToHtml.editormd-html-preview, .markdownToHtml.editormd-preview-container { + overflow: hidden; +} +.markdownToHtml.editormd-html-preview p.editormd-tex, .markdownToHtml.editormd-preview-container p.editormd-tex { + text-align: left; +} \ No newline at end of file diff --git a/public/react/src/common/components/markdown/MarkdownToHtml.js b/public/react/src/common/components/markdown/MarkdownToHtml.js index 0780fc789..c7d15cf64 100644 --- a/public/react/src/common/components/markdown/MarkdownToHtml.js +++ b/public/react/src/common/components/markdown/MarkdownToHtml.js @@ -1,5 +1,6 @@ import React,{ Component } from "react"; import { markdownToHTML } from 'educoder' +import './MarkdownToHtml.css' /** selector 需要传入唯一的selector作为id,不然会引起冲突 delay 如果有公式,需要传入delay={true} @@ -14,9 +15,9 @@ class MarkdownToHtml extends Component{ if (this.props.delay == true) { (function(content, selector) { // console.log('selector: ', selector) - setTimeout(() => { + // setTimeout(() => { markdownToHTML(content, selector) - }, 600) + // }, 600) })(content, selector) } else { markdownToHTML(content, selector) @@ -25,18 +26,20 @@ class MarkdownToHtml extends Component{ componentDidUpdate = (prevProps) => { if (this.props.content) { if ( prevProps.content != this.props.content ) { - this._markdownToHTML(this.props.content, `.markdown_to_html_${this.props.selector || ''}`) + this._markdownToHTML(this.props.content, `markdown_to_html_${this.props.selector || ''}`) } } } componentDidMount () { - this.props.content && this._markdownToHTML(this.props.content, `.markdown_to_html_${this.props.selector || ''}`) + this.props.content && this._markdownToHTML(this.props.content, `markdown_to_html_${this.props.selector || ''}`) } render(){ const { style, className } = this.props + let _selector = `markdown_to_html_${this.props.selector || ''}` + return( -
    From 7b610c9c95c5e0d7e3e3d2e1b53fa5b1761a9fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 29 Jul 2019 09:15:16 +0800 Subject: [PATCH 6/7] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index 50038366d..2db1929b9 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -360,7 +360,7 @@ class LoginDialog extends Component { if(response.status===200){ if (response.data.status === 402) { - window.location.href = response.data.url; + // window.location.href = response.data.url; }else if (response.data.status === -2) { notification.open({ message: '提示', From bfe5e24935a20fe42a37410f509ee5289ef5037f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 29 Jul 2019 09:18:05 +0800 Subject: [PATCH 7/7] =?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/LoginRegisterComponent.js | 3 +++ public/react/src/modules/user/Notcompletedysl.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index ebb099b2e..ff03b11ea 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -362,6 +362,9 @@ class LoginRegisterComponent extends Component { if(weekArray===null){ weekArray="/"; } + if(weekArray==="null"){ + weekArray="/"; + } window.location.href = weekArray; } } diff --git a/public/react/src/modules/user/Notcompletedysl.js b/public/react/src/modules/user/Notcompletedysl.js index 5f180af48..e50d162a6 100644 --- a/public/react/src/modules/user/Notcompletedysl.js +++ b/public/react/src/modules/user/Notcompletedysl.js @@ -40,6 +40,9 @@ class Notcompletedysl extends Component { if(weekArray===null){ weekArray="/"; } + if(weekArray==="null"){ + weekArray="/"; + } window.location.href = weekArray; }