From db893c10ab4a4175541a7f941dc4c532f31038c1 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, 30 Dec 2019 19:18:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=AE=9E=E8=AE=AD=E6=8E=A7?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modal/GotoQQgroup.js | 10 ++++++ public/react/src/modules/tpm/NewHeader.js | 44 +++++++++++++++++++++-- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/public/react/src/modal/GotoQQgroup.js b/public/react/src/modal/GotoQQgroup.js index 3543f26f2..740f8c365 100644 --- a/public/react/src/modal/GotoQQgroup.js +++ b/public/react/src/modal/GotoQQgroup.js @@ -14,10 +14,20 @@ class GotoQQgroup extends Component { } modalCancel=()=>{ + try { + this.props.setgoshowqqgtounp(false); + }catch (e) { + + } } setDownload=()=>{ //立即联系 + try { + this.props.setgoshowqqgtounp(false); + }catch (e) { + + } } diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 95813c28c..f1dea8331 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -19,7 +19,9 @@ import Addcourses from '../courses/coursesPublic/Addcourses'; import LoginDialog from '../login/LoginDialog'; -import Trialapplication from '../login/Trialapplication' +import Trialapplication from '../login/Trialapplication'; + +import GotoQQgroup from '../../modal/GotoQQgroup' import 'antd/lib/modal/style/index.css'; @@ -31,6 +33,8 @@ import 'antd/lib/input/style/index.css'; import './TPMIndex.css'; + + const $ = window.$ // TODO 这部分脚本从公共脚本中直接调用 @@ -69,6 +73,7 @@ class NewHeader extends Component { headtypesonClickbool:false, headtypess:"/", mygetHelmetapi2: null, + goshowqqgtounp:false, } console.log("176") // console.log(props); @@ -649,6 +654,18 @@ submittojoinclass=(value)=>{ return; } + + + if(this.props&&this.props.current_user&&this.props.current_user.is_shixun_marker===true){ + this.setgoshowqqgtounp(true); + return; + } + + + + + + if(url !== undefined || url!==""){ window.location.href = url; } @@ -790,6 +807,14 @@ submittojoinclass=(value)=>{ return false } } + + + // 处理弹框 + setgoshowqqgtounp=(bool)=>{ + this.setState({ + goshowqqgtounp:bool + }) + } render() { const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。 const {match} = this.props; @@ -808,6 +833,7 @@ submittojoinclass=(value)=>{ headtypesonClickbool, headtypess, mygetHelmetapi2, + goshowqqgtounp, }=this.state; /* 用户名称 用户头像url @@ -898,7 +924,9 @@ submittojoinclass=(value)=>{ }) } - + console.log("newHeadersnewHeaders"); + console.log(this.props); + // this.props.current_user.is_shixun_marker return (
@@ -914,6 +942,14 @@ submittojoinclass=(value)=>{ {...this.props} {...this.state} />:""} + + { + goshowqqgtounp===true? + this.setgoshowqqgtounp(bool)}> + : + "" + } + this.headtypesonClick("/",false)} className={"fl mr30 ml25 mt10"}> { mygetHelmetapi2 === null ? @@ -1287,7 +1323,9 @@ submittojoinclass=(value)=>{ {this.props.current_user&&this.props.current_user.user_identity==="学生"?"":coursestypes===false?
  • this.getUser("/courses/new")}>{this.props.user&&this.props.user.main_site===false?"新建课堂":"新建翻转课堂"}
  • :"" } - {shixuntype===true?"":
  • this.getUser("/shixuns/new")}>新建实训项目
  • } + {shixuntype===true?"": +
  • this.getUser("/shixuns/new")}>新建实训项目
  • + } {this.props.user&&this.props.user.main_site===false?"":this.props.Headertop===undefined?"":
  • this.getUser("/paths/new")} >新建实践课程
  • } {this.props.user&&this.props.user.main_site===true?"":this.props.Headertop===undefined?"": pathstype===true?"":this.props.user&&this.props.user.admin===true||this.props.user&&this.props.user.is_teacher===true||this.props.user&&this.props.user.business===true?
  • this.getUser("/paths/new")} >新建实践课程
  • :""