diff --git a/public/editormd/plugins/image-dialog/image-dialog.js b/public/editormd/plugins/image-dialog/image-dialog.js index da691e168..6da63f1e5 100644 --- a/public/editormd/plugins/image-dialog/image-dialog.js +++ b/public/editormd/plugins/image-dialog/image-dialog.js @@ -65,8 +65,8 @@ "" + "" + "
" + - "" + - "" + + "" + + "" + "
" + ( (settings.imageUpload) ? "" : ""); diff --git a/public/react/public/index.html b/public/react/public/index.html index a2d09dedc..da91b33bb 100755 --- a/public/react/public/index.html +++ b/public/react/public/index.html @@ -1,8 +1,11 @@ + - + + + diff --git a/public/react/src/App.css b/public/react/src/App.css index 557768eef..1c8ce15e1 100644 --- a/public/react/src/App.css +++ b/public/react/src/App.css @@ -72,6 +72,13 @@ html, body { /* 某些情况下,被cm盖住了 */ z-index: 99; } +/* 图片点击放大的场景,隐藏图片链接 */ +.editormd-image-click-expand .editormd-image-dialog { + height: 234px !important; +} + .editormd-image-click-expand .editormd-image-dialog .image-link { + display: none; + } /* 解决鼠标框选时,左边第一列没高亮的问题 */ .CodeMirror .CodeMirror-lines pre.CodeMirror-line, .CodeMirror .CodeMirror-lines pre.CodeMirror-line-like { padding: 0 12px ; diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 56ae40e2d..bd765eaa9 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -2,7 +2,7 @@ import React,{Component} from "React"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip,Spin, Pagination} from "antd"; import {Link} from 'react-router-dom'; import locale from 'antd/lib/date-picker/locale/zh_CN'; -import { WordsBtn, ConditionToolTip, queryString,getImageUrl, on, off} from 'educoder'; +import { WordsBtn, ConditionToolTip, queryString,getImageUrl, on, off, NoneData} from 'educoder'; import axios from 'axios'; import Modals from '../../modals/Modals'; import CoursesListType from '../coursesPublic/CoursesListType'; @@ -817,10 +817,8 @@ class CommonWorkList extends Component{
-
- -

暂时还没有相关数据哦!

-
+ +
diff --git a/public/react/src/modules/courses/common/comments/CommonReply.js b/public/react/src/modules/courses/common/comments/CommonReply.js index dae21949c..8b7817e85 100644 --- a/public/react/src/modules/courses/common/comments/CommonReply.js +++ b/public/react/src/modules/courses/common/comments/CommonReply.js @@ -250,7 +250,7 @@ class CommonReply extends Component{ } `} diff --git a/public/react/src/modules/forums/MemoDetailMDEditor.js b/public/react/src/modules/forums/MemoDetailMDEditor.js index 78aa54182..6e2563b9b 100644 --- a/public/react/src/modules/forums/MemoDetailMDEditor.js +++ b/public/react/src/modules/forums/MemoDetailMDEditor.js @@ -130,7 +130,7 @@ class MemoDetailMDEditor extends Component { } } render() { - const { match, history, memo, placeholder, className } = this.props + const { match, history, memo, placeholder, className, imageExpand } = this.props const { isInited, errorMsg } = this.state if (!memo) { return
@@ -185,7 +185,8 @@ class MemoDetailMDEditor extends Component { ` } */} -
diff --git a/public/react/src/modules/modals/Modals.js b/public/react/src/modules/modals/Modals.js index b67bc0ddc..552e34017 100644 --- a/public/react/src/modules/modals/Modals.js +++ b/public/react/src/modules/modals/Modals.js @@ -1,47 +1,56 @@ -import React, { Component } from 'react'; -import {getImageUrl} from 'educoder'; -import { Spin, Icon , Modal} from 'antd'; -class Modals extends Component { - constructor(props) { - super(props); - this.state = { - funmodalsType:false, - istype:false - } - } -render() { - const antIcons = - return( - - -
-

{this.props.modalsTopval}

-

{this.props.modalsBottomval}

- {this.props.loadtype===true? -
- 知道啦 -
- : - - } -
-
-
- ) - } -} - +import React, { Component } from 'react'; +import {getImageUrl} from 'educoder'; +import { Spin, Icon , Modal} from 'antd'; +class Modals extends Component { + constructor(props) { + super(props); + this.state = { + funmodalsType:false, + istype:false + } + } +render() { + const antIcons = + return( + + {this.props.modalsType===true?:""} + +
+

{this.props.modalsTopval}

+

{this.props.modalsBottomval}

+ {this.props.loadtype===true? +
+ 知道啦 +
+ : + + } +
+
+
+ ) + } +} + export default Modals; \ No newline at end of file diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index 6c4fb9a09..2a0ad15ea 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -495,7 +495,7 @@ class DetailCards extends Component{ :
  • { - showparagraphkey===key&&showparagraphindex===index?
    + showparagraphkey===key&&showparagraphindex===index?this.props.detailInfoList&&this.props.detailInfoList.allow_statistics===false&&this.props.MenuItemsindextype===2?""::"" diff --git a/public/react/src/modules/paths/PathDetail/DetailTop.js b/public/react/src/modules/paths/PathDetail/DetailTop.js index 9a460d696..eddf7f62a 100644 --- a/public/react/src/modules/paths/PathDetail/DetailTop.js +++ b/public/react/src/modules/paths/PathDetail/DetailTop.js @@ -26,7 +26,9 @@ class DetailTop extends Component{ MenuItemskey:1, courseslist:[], Pathcourseid:undefined, - OpenCourseTypes:false + OpenCourseTypes:false, + putappointmenttype:false, + getappointmenttype:false } } componentDidMount(){ @@ -74,7 +76,9 @@ class DetailTop extends Component{ }) } + this.props.getMenuItemsindex(keys,courseslist[0].course_status.status) } + this.setState({ courseslist:courseslist, MenuItemskey:keys, @@ -156,7 +160,8 @@ class DetailTop extends Component{ Modalstype:false, Modalsbottomval:'', loadtype:false, - deletepathtype:false + deletepathtype:false, + putappointmenttype:false }) } @@ -219,6 +224,8 @@ class DetailTop extends Component{ ) } }) + + this.props.getMenuItemsindex(keys,courseslist[0].course_status.status) this.setState({ MenuItemskey:keys, courseslist:courseslist, @@ -245,6 +252,20 @@ class DetailTop extends Component{ pathcousestypeid:typeid }) } + + putappointment=()=>{ + this.setState({ + Modalstype:true, + Modalstopval:"是否确认立即预约?", + Modalsbottomval:"", + cardsModalcancel:()=>this.cardsModalcancel(), + putappointmenttype:true, + loadtype:false + }) + } + + + ysljoinmodalCancel=()=>{ this.setState({ yslJointhe:false @@ -267,9 +288,34 @@ class DetailTop extends Component{ OpenCourseTypes:false }) } + + getappointment=()=>{ + let pathid=this.props.match.params.pathId; + let url=`/paths/${pathid}/appointment.json` + axios.post(url).then((response) => { + + if (response.status === 200) { + + if(response.data.status===0){ + this.setState({ + getappointmenttype:true + }) + this.cardsModalcancel() + // this.props.getlistdatas() + this.props.showNotification(response.data.message) + }else{ + this.props.showNotification(response.data.message) + } + + } + }).catch((error) => { + console.log(error) + this.cardsModalcancel() + }) + } render(){ let{detailInfoList}=this.props; - let{Modalstype,Modalstopval,cardsModalcancel,OpenCourseTypes,Modalsbottomval,cardsModalsavetype,loadtype}=this.state; + let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype}=this.state; const radioStyle = { display: 'block', height: '30px', @@ -292,6 +338,9 @@ class DetailTop extends Component{ + let applypath=this.props.detailInfoList&&this.props.detailInfoList.participant_count!=undefined&&this.props.detailInfoList&&this.props.detailInfoList.allow_statistics===false; + + // console.log(this.props.courses) return(
    @@ -300,7 +349,7 @@ class DetailTop extends Component{ modalsTopval={Modalstopval} modalsBottomval={Modalsbottomval} modalCancel={cardsModalcancel} - modalSave={cardsModalsavetype===true?this.reovkissuePaths:this.cardsModalsave} + modalSave={cardsModalsavetype===true?()=>this.reovkissuePaths():putappointmenttype===true?()=>this.getappointment():()=>this.cardsModalsave()} loadtype={loadtype} > @@ -428,12 +477,12 @@ class DetailTop extends Component{
    - {this.props.courses===undefined||this.props.courses.length===0?"":
    + {this.props.courses===undefined||this.props.courses.length===0?"":
    -
  • - - - - {this.props.courses===undefined?"":this.state.courseslist.map((item,key)=>{ - if(item.course_identity<4){ - return( - - - - - - )}}) - } + } + - - - 第 {this.state.MenuItemskey} 次开课 - - -
  • - -
  • - {this.state.courseslist.map((item,key)=>{ - return( -
    + } + +
  • + {this.state.courseslist.map((item,key)=>{ + return( +
    @@ -512,7 +561,7 @@ class DetailTop extends Component{
    - +
    结课时间: @@ -524,7 +573,7 @@ class DetailTop extends Component{
    - +
    报名人数: @@ -534,17 +583,17 @@ class DetailTop extends Component{
    -
    - ) - }) - } +
    + ) + }) + } -
  • + -
  • - - {this.state.courseslist.map((item,key)=>{ + } + + + {/* + height: 158px; + }*/} + {this.state.courseslist.map((item,key)=>{ + + return( +
    + {/*{item.course_status.status===0?
    即将开课
    :""}*/} + {item.course_status.status===1?
    {item.course_status.time}
    :""} + {item.course_status.status===2&&item.course_identity<6?
    已结束
    :""} + + {item.course_status.status===0? + item.course_identity<5? + 进入课堂 + :item.course_identity<6?
    报名成功
    + :this.JoinnowCourse(item.course_id)}>立即报名:""} + + {item.course_status.status===1? + item.course_identity<5? + 进入课堂 + :item.course_identity<6? + 立即学习 + :this.JoinnowCourse(item.course_id,item.course_status.status)}>立即加入:""} + + {item.course_status.status===2? + item.course_identity<6? + 进入课堂 + :
    已结束
    :""} + +
    + )})} + + +
  • + + {applypath===false?"":this.state.MenuItemskey===this.props.courses.length?
    :""} + {applypath===false?"":this.state.MenuItemskey===this.props.courses.length? + 当前预约报名人数:{getappointmenttype===true?this.props.detailInfoList&&this.props.detailInfoList.participant_count+1:this.props.detailInfoList&&this.props.detailInfoList.participant_count} + 当预约报名人数达到 {this.props.detailInfoList&&this.props.detailInfoList.student_count} 人时即将开课 + {this.props.detailInfoList&&this.props.detailInfoList.has_participate===false? + getappointmenttype===true?预约报名成功:this.putappointment()}>期待开课并预约报名: + 预约报名成功} + :""} - return( -
    - {item.course_status.status===0?
    即将开课
    :""} - {item.course_status.status===1?
    {item.course_status.time}
    :""} - {item.course_status.status===2&&item.course_identity<6?
    已结束
    :""} - - {item.course_status.status===0? - item.course_identity<5? - 进入课堂 - :item.course_identity<6?
    报名成功
    - :this.JoinnowCourse(item.course_id)}>立即报名:""} - - {item.course_status.status===1? - item.course_identity<5? - 进入课堂 - :item.course_identity<6? - 立即学习 - :this.JoinnowCourse(item.course_id,item.course_status.status)}>立即加入:""} - - {item.course_status.status===2? - item.course_identity<6? - 进入课堂 - :
    已结束
    :""} - -
    - )})} - - -
    }
    diff --git a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js index 883ed6875..7129b820f 100644 --- a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js +++ b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js @@ -85,6 +85,8 @@ class PathDetailIndex extends Component{ items: getItems(10), pathtopskey:1, dataquerys:{}, + MenuItemsindex:1, + MenuItemsindextype:2 } this.onDragEnd = this.onDragEnd.bind(this); @@ -147,7 +149,10 @@ class PathDetailIndex extends Component{ } componentDidMount(){ + this.getlistdatas() + } + getlistdatas=()=>{ const query = this.props.location.search; // const type = query.split('?chinaoocTimestamp='); // console.log("Eduinforms12345"); @@ -254,7 +259,13 @@ class PathDetailIndex extends Component{ console.log(error); }) }; + getMenuItemsindex=(key,status)=>{ + this.setState({ + MenuItemsindex:key, + MenuItemsindextype:status + }) + } getdatasindex=(key)=>{ // yslwebobject 后端需要的接口 let pathid=this.props.match.params.pathId; @@ -460,9 +471,13 @@ class PathDetailIndex extends Component{ members, tags, courses, + MenuItemsindex, + MenuItemsindextype } = this.state + // console.log(MenuItemsindex) + // console.log(MenuItemsindextype===2&&detailInfoList&&detailInfoList.allow_statistics===false) return(