From 9960ba3e646d4d9aee0b3048e88abd8f14d28f7b 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 20:05:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=96=B0=E5=BB=BA=E5=AE=9E?= =?UTF-8?q?=E8=AE=AD=E5=89=8D=E7=AB=AF=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modal/GotoQQgroup.js | 2 +- .../paths/PathDetail/DetailCardsEditAndAdd.js | 31 +++- .../PathDetail/DetailCardsEditAndEdit.js | 25 ++- public/react/src/modules/tpm/NewHeader.js | 6 +- .../src/modules/tpm/shixuns/ShixunCardList.js | 26 +++- .../src/modules/user/usersInfo/InfosShixun.js | 22 ++- .../modules/user/usersInfo/publicCreatNew.js | 144 +++++++++++------- 7 files changed, 182 insertions(+), 74 deletions(-) diff --git a/public/react/src/modal/GotoQQgroup.js b/public/react/src/modal/GotoQQgroup.js index 740f8c365..f55fad998 100644 --- a/public/react/src/modal/GotoQQgroup.js +++ b/public/react/src/modal/GotoQQgroup.js @@ -46,7 +46,7 @@ class GotoQQgroup extends Component { >

您可以在QQ服务群向管理员申请,获得继续操作的权限

- +

群号:612934990

diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js index c296899f2..cd78ceaa2 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js +++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js @@ -7,6 +7,8 @@ import Addshixuns from './Addshixuns'; import '../ShixunPaths.css'; import axios from 'axios'; import NewShixunModel from '../../courses/coursesPublic/NewShixunModel'; +import GotoQQgroup from "../../../modal/GotoQQgroup"; + const $ = window.$; const Search = Input.Search; @@ -54,8 +56,10 @@ class DetailCardsEditAndAdd extends Component{ ChooseShixunListshixun_list:undefined, stage_nametype:false, descriptiontype:false, - Addshixunstype:false - } + Addshixunstype:false, + goshowqqgtounp:false, + + } this.onDragEnd = this.onDragEnd.bind(this); } //选择实训弹框 @@ -315,6 +319,12 @@ class DetailCardsEditAndAdd extends Component{ } Addshixuns=()=>{ + // debugger + // console.log("点击了新建实训Addshixuns"); + if(this.props&&this.props.current_user&&this.props.current_user.is_shixun_marker===false){ + this.setgoshowqqgtounp(true); + return; + } this.setState({ Addshixunstype:true, }) @@ -349,7 +359,12 @@ class DetailCardsEditAndAdd extends Component{ console.log(error) }); } - + // 处理弹框 + setgoshowqqgtounp=(bool)=>{ + this.setState({ + goshowqqgtounp:bool + }) + } render(){ let {selectShixun, @@ -368,11 +383,19 @@ class DetailCardsEditAndAdd extends Component{ Modalsbottomval, ChooseShixunListshixun_list, stage_nametype, - descriptiontype} = this.state + descriptiontype, + goshowqqgtounp + } = this.state return(
+ { + goshowqqgtounp===true? + this.setgoshowqqgtounp(bool)}> + : + "" + } { + if(this.props&&this.props.current_user&&this.props.current_user.is_shixun_marker===false){ + this.setgoshowqqgtounp(true); + return; + } this.setState({ Addshixunstype:true, }) @@ -349,7 +356,12 @@ class DetailCardsEditAndEdit extends Component{ console.log(error) }); } - + // 处理弹框 + setgoshowqqgtounp=(bool)=>{ + this.setState({ + goshowqqgtounp:bool + }) + } render(){ let {selectShixun, @@ -369,11 +381,18 @@ class DetailCardsEditAndEdit extends Component{ delectfunvalue, ChooseShixunListshixun_list, stage_nametype, - descriptiontype + descriptiontype, + goshowqqgtounp } = this.state return(
+ { + goshowqqgtounp===true? + this.setgoshowqqgtounp(bool)}> + : + "" + } { - if(this.props&&this.props.current_user&&this.props.current_user.is_shixun_marker===true){ + if(this.props&&this.props.current_user&&this.props.current_user.is_shixun_marker===false){ this.setgoshowqqgtounp(true); return; } @@ -924,8 +924,8 @@ submittojoinclass=(value)=>{ }) } - console.log("newHeadersnewHeaders"); - console.log(this.props); + // console.log("newHeadersnewHeaders"); + // console.log(this.props); // this.props.current_user.is_shixun_marker return ( diff --git a/public/react/src/modules/tpm/shixuns/ShixunCardList.js b/public/react/src/modules/tpm/shixuns/ShixunCardList.js index 937e96894..948bbed48 100644 --- a/public/react/src/modules/tpm/shixuns/ShixunCardList.js +++ b/public/react/src/modules/tpm/shixuns/ShixunCardList.js @@ -12,6 +12,7 @@ import classNames from 'classnames' import 'antd/lib/switch/style/index.css' import './shixunCss/ShixunCardList.css'; +import GotoQQgroup from '../../../modal/GotoQQgroup' import { on, off } from 'educoder' @@ -33,6 +34,7 @@ class ShixunCardList extends Component { shixunid:"", upcircle:false, typekeyid:undefined, + goshowqqgtounp:false, } } @@ -52,7 +54,7 @@ class ShixunCardList extends Component { componentWillUnmount = () => { off('searchKeywordChange') } - + latestHot=(e,key)=>{ @@ -171,6 +173,10 @@ class ShixunCardList extends Component { this.props.showProfileCompleteDialog() return } + if(this.props&&this.props.current_user&&this.props.current_user.is_shixun_marker===false){ + this.setgoshowqqgtounp(true); + return; + } if(url !== undefined || url!==""){ window.location.href = url; @@ -178,8 +184,15 @@ class ShixunCardList extends Component { } + + // 处理弹框 + setgoshowqqgtounp=(bool)=>{ + this.setState({ + goshowqqgtounp:bool + }) + } render(){ - let {mine,InputValue,upcircle}=this.state; + let {mine,InputValue,upcircle,goshowqqgtounp}=this.state; // console.log("NewHeadermygetHelmetapi123123123123"); let shixuntype=false; @@ -196,10 +209,19 @@ class ShixunCardList extends Component { } }) } + + return (
+ { + goshowqqgtounp===true? + this.setgoshowqqgtounp(bool)}> + : + "" + } + {/*
this.latestHot(e,1)}>全部*/} diff --git a/public/react/src/modules/user/usersInfo/InfosShixun.js b/public/react/src/modules/user/usersInfo/InfosShixun.js index b5811e44f..b45ba65f6 100644 --- a/public/react/src/modules/user/usersInfo/InfosShixun.js +++ b/public/react/src/modules/user/usersInfo/InfosShixun.js @@ -9,6 +9,7 @@ import { setImagesUrl } from 'educoder'; import "./usersInfo.css" import Create from './publicCreatNew' +import GotoQQgroup from "../../../modal/GotoQQgroup"; class InfosShixun extends Component{ constructor(props){ @@ -22,7 +23,8 @@ class InfosShixun extends Component{ sort_by: "updated_at", sort_direction: "desc", totalCount:undefined, - data:undefined + data:undefined, + goshowqqgtounp:false, } } @@ -144,6 +146,13 @@ class InfosShixun extends Component{ this.getCourses(category, status, sort_by, page, sort_directiony); } + // 处理弹框 + setgoshowqqgtounp=(bool)=>{ + this.setState({ + goshowqqgtounp:bool + }) + } + render(){ let{ @@ -154,7 +163,8 @@ class InfosShixun extends Component{ data, totalCount, sort_direction, - isSpin + isSpin, + goshowqqgtounp } = this.state; let is_current=this.props.is_current; @@ -171,6 +181,12 @@ class InfosShixun extends Component{ ); return(
+ { + goshowqqgtounp===true? + this.setgoshowqqgtounp(bool)}> + : + "" + }