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/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( -
diff --git a/public/react/src/modules/courses/ListPageIndex.js b/public/react/src/modules/courses/ListPageIndex.js index a1fef5de8..9f12f6434 100644 --- a/public/react/src/modules/courses/ListPageIndex.js +++ b/public/react/src/modules/courses/ListPageIndex.js @@ -104,19 +104,17 @@ 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)}*/} + {/* >*/} + {/* */} + {/* :""*/} + {/* )*/} + {/* :""*/} + {/*}*/}
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: '提示', diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index b89d59fe7..d197bc9c4 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/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index eb0a3a5c2..ff03b11ea 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -359,6 +359,12 @@ class LoginRegisterComponent extends Component { if(weekArray===undefined){ weekArray="/"; } + 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 8f147957a..e50d162a6 100644 --- a/public/react/src/modules/user/Notcompletedysl.js +++ b/public/react/src/modules/user/Notcompletedysl.js @@ -37,6 +37,12 @@ class Notcompletedysl extends Component { if(weekArray===undefined){ weekArray="/"; } + if(weekArray===null){ + weekArray="/"; + } + if(weekArray==="null"){ + weekArray="/"; + } window.location.href = weekArray; } 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;}