chromesetting
杨树明 5 years ago
parent eff1241372
commit 71d5e571c1

@ -353,9 +353,15 @@ class NewHeader extends Component {
// this.setState({
// isRender:true
// })
// let newTPMsettings=this.props.user&&this.props.user.user_id+'newTPMsettings'
// let shixunopenprocess=this.props.user&&this.props.user.user_id+'shixunopenprocess'
// let openopenpublictype=this.props.user&&this.props.user.user_id+'openopenpublictype'
var url = `/accounts/logout.json`;
// let storage=window.localStorage;
axios.get((url)).then((result) => {
// storage.removeItem(newTPMsettings);
// storage.removeItem(shixunopenprocess);
// storage.removeItem( openopenpublictype);
if(result!==undefined){
// this.setState({
// isRender:true

@ -99,7 +99,8 @@ class TPMBanner extends Component {
this.setState({
openknow:false
})
storage.setItem("shixunopenprocess",true);
let shixunopenprocess=this.props.user&&this.props.user.user_id+'shixunopenprocess';
storage.setItem(shixunopenprocess,true);
}
openshowpublic=()=>{
@ -107,7 +108,8 @@ class TPMBanner extends Component {
this.setState({
openshowpublictype:false
})
storage.setItem("openopenpublictype",true);
let openopenpublictype=this.props.user&&this.props.user.user_id+'openopenpublictype';
storage.setItem(openopenpublictype,true);
}
@ -121,13 +123,14 @@ class TPMBanner extends Component {
})
}
}
let shixunopenprocess=window.localStorage.shixunopenprocess;
let openopenpublictype=window.localStorage.openopenpublictype;
let getshixunopenprocess=this.props.user&&this.props.user.user_id+'shixunopenprocess';
let getopenopenpublictype=this.props.user&&this.props.user.user_id+'openopenpublictype';
let shixunopenprocess=window.localStorage.getItem(getshixunopenprocess)
let openopenpublictype=window.localStorage.getItem(getopenopenpublictype)
if(this.props.status===0&&this.props.openknows===false){
if(this.props.shixunsDetails&&this.props.shixunsDetails.shixun_status === 0 && this.props.identity < 5){
if(shixunopenprocess===undefined||shixunopenprocess===false){
if(shixunopenprocess===undefined||shixunopenprocess===false||shixunopenprocess===null){
this.setState({
openknow:true
})
@ -147,7 +150,7 @@ class TPMBanner extends Component {
if(this.props.public===0&&this.props.status>1&&this.props.openknows===false){
if(this.props.shixunsDetails&&this.props.shixunsDetails.shixun_status === 2 && this.props.shixunsDetails&&this.props.shixunsDetails.public===0 && this.props.identity < 5){
if(openopenpublictype===undefined||openopenpublictype===false){
if(openopenpublictype===undefined||openopenpublictype===false||openopenpublictype===null){
this.setState({
openshowpublictype:true
})

@ -157,11 +157,13 @@ class TPMIndex extends Component {
this.setState({
openknows:false
})
storage.setItem("newTPMsettings",true);
let newTPMsettings=this.props.user&&this.props.user.user_id+'newTPMsettings'
storage.setItem(newTPMsettings,true);
}
componentDidMount = () => {
let newTPMsettings=window.localStorage.newTPMsettings;
let getnewTPMsettings=this.props.user&&this.props.user.user_id+'newTPMsettings'
let newTPMsettings=window.localStorage.getItem(getnewTPMsettings)
let id = this.props.match.params.shixunId;
// console.log('props', this.props);
// let collaborators = `/shixuns/` + id + `/propaedeutics.json`;
@ -214,7 +216,7 @@ class TPMIndex extends Component {
if(response.data.identity <4){
if(newTPMsettings===undefined||newTPMsettings===false){
if(newTPMsettings===undefined||newTPMsettings===false||newTPMsettings===null){
this.setState({
openknows:true
})

@ -528,7 +528,7 @@ class Collaborators extends Component {
{Collaboratorslist&&Collaboratorslist.length===0?<span>
请先将新的管理员通过 <a className={"color-blue"} onClick={() => this.showCollaboratorsvisible("cooperation")}>"添加合作者"</a>
</span>:""}
<RadioGroup onChange={this.onChange} value={this.state.value}>
<RadioGroup onChange={this.onChange}>
{
Collaboratorslist.length === 0 ? "" : Collaboratorslist.map((item, key) => {
return (

Loading…
Cancel
Save