|
|
|
@ -53,6 +53,8 @@ class TPMBanner extends Component {
|
|
|
|
|
isSpin: false,
|
|
|
|
|
Senttothevcaluetype: false,
|
|
|
|
|
jupyterbool: false,
|
|
|
|
|
openknow:false,
|
|
|
|
|
openshowpublictype:false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -95,7 +97,54 @@ class TPMBanner extends Component {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
openknow=()=>{
|
|
|
|
|
let storage=window.localStorage;
|
|
|
|
|
this.setState({
|
|
|
|
|
openknow:false
|
|
|
|
|
})
|
|
|
|
|
storage.setItem("shixunopenprocess",true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
openshowpublic=()=>{
|
|
|
|
|
let storage=window.localStorage;
|
|
|
|
|
this.setState({
|
|
|
|
|
openshowpublictype:false
|
|
|
|
|
})
|
|
|
|
|
storage.setItem("openopenpublictype",true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
componentDidUpdate(prevProps, prevState) {
|
|
|
|
|
if (prevProps != this.props) {
|
|
|
|
|
let shixunopenprocess=window.localStorage.shixunopenprocess;
|
|
|
|
|
let openopenpublictype=window.localStorage.openopenpublictype;
|
|
|
|
|
if(this.props.shixunsDetails.shixun_status === 0 && this.props.identity < 5){
|
|
|
|
|
if(shixunopenprocess===undefined||shixunopenprocess===false){
|
|
|
|
|
this.setState({
|
|
|
|
|
openknow:true
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
openknow:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(this.props.shixunsDetails.shixun_status === 2 && this.props.shixunsDetails.public===0 && this.props.identity < 5){
|
|
|
|
|
if(openopenpublictype===undefined||openopenpublictype===false){
|
|
|
|
|
this.setState({
|
|
|
|
|
openshowpublictype:true
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
openshowpublictype:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
|
|
|
|
|
let thiisie = this.IEVersion();
|
|
|
|
|
if (thiisie != -1) {
|
|
|
|
|
this.setState({
|
|
|
|
@ -951,16 +1000,15 @@ class TPMBanner extends Component {
|
|
|
|
|
{shixunsDetails.shixun_status === 0 && this.props.identity < 5 ?
|
|
|
|
|
<Popover
|
|
|
|
|
content={
|
|
|
|
|
<pre className={"pd20"}>
|
|
|
|
|
<pre className={"bannerpd201"}>
|
|
|
|
|
<div>您编辑完成后,可以马上使用到自</div>
|
|
|
|
|
<div className={"wechatcenter mt10"}>己的课堂和实训课程哦</div>
|
|
|
|
|
<div className={"wechatcenter mt15"}> <Button type="primary" >我知道了</Button></div>
|
|
|
|
|
<div className={"wechatcenter mt15"}><Button type="primary" onClick={this.openknow} >我知道了</Button></div>
|
|
|
|
|
</pre>
|
|
|
|
|
}
|
|
|
|
|
trigger="click"
|
|
|
|
|
placement="bottom"
|
|
|
|
|
visible={false}
|
|
|
|
|
onVisibleChange={this.handleVisibleChange}
|
|
|
|
|
visible={this.state.openknow}
|
|
|
|
|
>
|
|
|
|
|
<a onClick={this.applyrelease} className="fr user_default_btn user_blue_btn mr20 font-18 height39"
|
|
|
|
|
id="challenge_begin">发布</a>
|
|
|
|
@ -1028,9 +1076,22 @@ class TPMBanner extends Component {
|
|
|
|
|
</Modal>
|
|
|
|
|
|
|
|
|
|
{shixunsDetails.shixun_status === 2 && shixunsDetails.public===0 && this.props.identity < 5 ?
|
|
|
|
|
<Button type="primary" ghost id="challenge_begin" onClick={this.openpublic} className="fr user_default_btn user_blue_btn mr20 font-18 height39">
|
|
|
|
|
申请公开
|
|
|
|
|
</Button>: ""
|
|
|
|
|
<Popover
|
|
|
|
|
content={
|
|
|
|
|
<pre className={"bannerpd201"}>
|
|
|
|
|
<div>申请公开成功后,您的实训将会展示实训列表</div>
|
|
|
|
|
<div className={"wechatcenter mt10"}>平台审核通过,您将获得<span className={"FF6802"}> 1000 </span>金币~</div>
|
|
|
|
|
<div className={"wechatcenter mt15"}><Button type="primary" onClick={this.openshowpublic} >我知道了</Button></div>
|
|
|
|
|
</pre>
|
|
|
|
|
}
|
|
|
|
|
trigger="click"
|
|
|
|
|
placement="bottom"
|
|
|
|
|
visible={this.state.openshowpublictype}
|
|
|
|
|
>
|
|
|
|
|
<Button type="primary" ghost id="challenge_begin" onClick={this.openpublic} className="fr user_default_btn user_blue_btn mr20 font-18 height39">
|
|
|
|
|
申请公开
|
|
|
|
|
</Button>
|
|
|
|
|
</Popover>: ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{shixunsDetails.shixun_status === 2 && shixunsDetails.public===1 && this.props.identity < 5 ?
|
|
|
|
|