diff --git a/public/react/src/App.css b/public/react/src/App.css
index 7b0455bea..50bccfb60 100644
--- a/public/react/src/App.css
+++ b/public/react/src/App.css
@@ -58,4 +58,9 @@ html, body {
/* resize */
.editormd .CodeMirror {
border-right: none !important;
+}
+.editormd-preview {
+ border-left: 1px solid rgb(221, 221, 221);
+ /* 某些情况下,被cm盖住了 */
+ z-index: 99;
}
\ No newline at end of file
diff --git a/public/react/src/common/components/LinkAfterLogin.js b/public/react/src/common/components/LinkAfterLogin.js
new file mode 100644
index 000000000..d0df08f0a
--- /dev/null
+++ b/public/react/src/common/components/LinkAfterLogin.js
@@ -0,0 +1,23 @@
+import React, { Component } from 'react';
+
+// 登录后才能跳转
+class LinkAfterLogin extends Component {
+
+ constructor(props) {
+ super(props);
+ }
+ checkAuth = () => {
+ if (this.props.checkIfLogin()) {
+ this.props.history.push(this.props.to)
+ } else {
+ this.props.showLoginDialog()
+ }
+ }
+ render() {
+ return(
+ {this.props.children}
+ )
+ }
+}
+
+export default LinkAfterLogin;
\ No newline at end of file
diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js
index 2afbca8d1..2074e495a 100644
--- a/public/react/src/common/educoder.js
+++ b/public/react/src/common/educoder.js
@@ -36,6 +36,7 @@ export { ModalHOC } from './components/ModalHOC'
export { SetAppModel } from './components/SetAppModel'
+export { default as LinkAfterLogin } from './components/LinkAfterLogin'
export { default as Cropper } from './components/Cropper'
export { default as ConditionToolTip } from './components/ConditionToolTip'
export { default as DragValidator } from './components/DragValidator'
diff --git a/public/react/src/modules/comment/CommentContainer.js b/public/react/src/modules/comment/CommentContainer.js
index 0e12d0e7d..b02f4094f 100644
--- a/public/react/src/modules/comment/CommentContainer.js
+++ b/public/react/src/modules/comment/CommentContainer.js
@@ -15,6 +15,7 @@ class CommentContainer extends Component {
+
this.gotohome()}>{data === undefined ? "" :data.course_name===undefined?"": data.course_name} > - {data === undefined ? "" :data.category===undefined?"":data.category.category_name} > 作业详情 @@ -142,7 +143,7 @@ class CommitSummary extends Component{
修改总结
+{this.state.description ? '修改总结' : '提交总结'}
this.gotohome()} className="color-grey-6 fr font-16 ml30 mt10">返回
-
- {fileName}{filesize? ` ${filesize}` : ''}
+
diff --git a/public/react/src/modules/forums/RightMyPublish.js b/public/react/src/modules/forums/RightMyPublish.js
index 94a09f7d9..fc101ae30 100644
--- a/public/react/src/modules/forums/RightMyPublish.js
+++ b/public/react/src/modules/forums/RightMyPublish.js
@@ -7,7 +7,7 @@ import PropTypes from 'prop-types';
import classNames from 'classnames'
-import { getImageUrl, toPath } from 'educoder'
+import { getImageUrl, toPath, LinkAfterLogin } from 'educoder'
import match_adImg from '../../images/ad/match_ad.jpg'
const $ = window.$
@@ -58,7 +58,7 @@ class RightMyPublish extends Component {
我的发布
教学案例
-
diff --git a/public/react/src/modules/forums/RecommendShixun.js b/public/react/src/modules/forums/RecommendShixun.js
index af0ca0007..535b027cc 100644
--- a/public/react/src/modules/forums/RecommendShixun.js
+++ b/public/react/src/modules/forums/RecommendShixun.js
@@ -32,7 +32,7 @@ class RecommendShixun extends Component {
{my_memos_count}
diff --git a/public/react/src/modules/forums/shixun/ShiXunPostItem.js b/public/react/src/modules/forums/shixun/ShiXunPostItem.js
index 961e16ff1..765591c6c 100644
--- a/public/react/src/modules/forums/shixun/ShiXunPostItem.js
+++ b/public/react/src/modules/forums/shixun/ShiXunPostItem.js
@@ -44,7 +44,9 @@ class ShiXunPostItem extends Component
{memo.subject}
diff --git a/public/react/src/modules/page/tpiPage.css b/public/react/src/modules/page/tpiPage.css
index 55e75059d..fe71de64f 100644
--- a/public/react/src/modules/page/tpiPage.css
+++ b/public/react/src/modules/page/tpiPage.css
@@ -13,9 +13,11 @@
margin-top: -20px;
margin-left: -17px;
left: 50%;
- top: 50%;
+ top: 50%;
+ /* .editormd-preview 有个 z-index 99 某些情况下,被cm盖住了 */
z-index: 50;
}
+
.b-label>.resize-helper button{
width: 24px;
height: 24px;
@@ -64,6 +66,7 @@
,#game_show_content #tab_con_5 .editormd-preview {
width: 100% !important;
height: 100% !important;
+ z-index: 20;
}
/* tab 样式覆盖 */
diff --git a/public/react/src/modules/paths/PathNew.js b/public/react/src/modules/paths/PathNew.js
index 3acad7eed..04e391732 100644
--- a/public/react/src/modules/paths/PathNew.js
+++ b/public/react/src/modules/paths/PathNew.js
@@ -71,7 +71,7 @@ function create_editorMD(id, width, high, placeholder, imageUrl,initValue, callb
}
});
// 一个页面有多个md时,onload方法只执行了一次
- window.md_elocalStorage(editorName, `MemoQuestion_${id}`, `${id}`);
+ // window.md_elocalStorage(editorName, `MemoQuestion_${id}`, `${id}`);
return editorName;
}
diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js
index bbb2eb97d..0361b090f 100644
--- a/public/react/src/modules/tpm/TPMIndexHOC.js
+++ b/public/react/src/modules/tpm/TPMIndexHOC.js
@@ -9,6 +9,7 @@ import { getUrl } from 'educoder'
import axios from 'axios';
import './TPMIndex.css'
+import LoginDialog from '../login/LoginDialog';
import Trialapplication from "../login/Trialapplication";
// import "antd/dist/antd.css";
// import '../../css/educoder/edu-common.css'
@@ -74,6 +75,8 @@ export function TPMIndexHOC(WrappedComponent) {
Headertop:undefined,
Footerdown:undefined,
coursedata: {},
+
+ isRender: false
}
}
@@ -286,9 +289,22 @@ export function TPMIndexHOC(WrappedComponent) {
}).catch((error) => {
console.log(error)
})
+ }
+ hideLoginDialog = () => {
+ this.setState({
+ isRender: false
+ })
+ }
+ showLoginDialog = () => {
+ this.setState({
+ isRender: true
+ })
+ }
+ checkIfLogin = () => {
+ return this.state.current_user && this.state.current_user.login != ''
}
render() {
- let{Headertop,Footerdown}=this.state;
+ let{Headertop,Footerdown, isRender}=this.state;
const common = {
isSuperAdmin:this.isSuperAdmin,
isAdminOrCreator:this.isAdminOrCreator,
@@ -299,11 +315,18 @@ export function TPMIndexHOC(WrappedComponent) {
isAdminOrStudent: this.isAdminOrStudent,
isNotMember: this.isNotMember,
isUserid:this.state.coursedata&&this.state.coursedata.userid,
- fetchUser: this.fetchUser
+ fetchUser: this.fetchUser,
+
+ showLoginDialog: this.showLoginDialog,
+ checkIfLogin: this.checkIfLogin,
}
return (