diff --git a/public/react/src/modules/paths/PathDetail/Addshixuns.js b/public/react/src/modules/paths/PathDetail/Addshixuns.js index 6bf60080a..0c1a194e5 100644 --- a/public/react/src/modules/paths/PathDetail/Addshixuns.js +++ b/public/react/src/modules/paths/PathDetail/Addshixuns.js @@ -30,8 +30,22 @@ class Addshixuns extends Component { this.props.modalCancel() } + //判断是否为空 + getshixunname( str ){ + if ( str == "" ) return true; + var regu = "^[ ]+$"; + var re = new RegExp(regu); + return re.test(str); + } + modalSave=()=>{ let {shixunname}=this.state; + if(this.getshixunname(shixunname)===true){ + this.setState({ + shixunzero:true + }) + return + } if(shixunname===undefined||shixunname.length===0){ this.setState({ shixunzero:true diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index 6bc972a03..309dd98ee 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -471,8 +471,36 @@ class DetailCards extends Component{
- { - item.shixuns_list && item.shixuns_list.map((line,index)=>{ + {this.props.current_user&&this.props.current_user.admin===true||this.props.current_user&&this.props.current_user.business===true? + item.shixuns_list && item.shixuns_list.map((line,index)=>{ + return( +
this.showparagraph(key,index)} onMouseLeave={this.hideparagraph}> + +
  • + + + { + line.complete_status === 1 ? + : + } + + + {key+1}-{index+1}  {line.shixun_name} + + +
  • + + +
  • + { + showparagraphkey===key&&showparagraphindex===index?
    + 查看详情 +
    :"" + } +
  • + +
    ) + }):item.shixuns_list && item.shixuns_list.map((line,index)=>{ return(
    this.showparagraph(key,index)} onMouseLeave={this.hideparagraph}>