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

@ -353,9 +353,15 @@ class NewHeader extends Component {
// this.setState({ // this.setState({
// isRender:true // 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`; var url = `/accounts/logout.json`;
// let storage=window.localStorage;
axios.get((url)).then((result) => { axios.get((url)).then((result) => {
// storage.removeItem(newTPMsettings);
// storage.removeItem(shixunopenprocess);
// storage.removeItem( openopenpublictype);
if(result!==undefined){ if(result!==undefined){
// this.setState({ // this.setState({
// isRender:true // isRender:true

@ -99,7 +99,8 @@ class TPMBanner extends Component {
this.setState({ this.setState({
openknow:false openknow:false
}) })
storage.setItem("shixunopenprocess",true); let shixunopenprocess=this.props.user&&this.props.user.user_id+'shixunopenprocess';
storage.setItem(shixunopenprocess,true);
} }
openshowpublic=()=>{ openshowpublic=()=>{
@ -107,7 +108,8 @@ class TPMBanner extends Component {
this.setState({ this.setState({
openshowpublictype:false 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 getshixunopenprocess=this.props.user&&this.props.user.user_id+'shixunopenprocess';
let shixunopenprocess=window.localStorage.shixunopenprocess; let getopenopenpublictype=this.props.user&&this.props.user.user_id+'openopenpublictype';
let openopenpublictype=window.localStorage.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.status===0&&this.props.openknows===false){
if(this.props.shixunsDetails&&this.props.shixunsDetails.shixun_status === 0 && this.props.identity < 5){ 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({ this.setState({
openknow:true 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.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(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({ this.setState({
openshowpublictype:true openshowpublictype:true
}) })

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

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

Loading…
Cancel
Save