修改页面无操作退出

This commit is contained in:
red-deng-deng 2021-11-08 15:41:00 +08:00
parent b6ea2e5e0c
commit 870c053042
4 changed files with 38 additions and 7 deletions

View File

@ -0,0 +1,30 @@
import ReactDOM from 'react-dom';
import React, { Component } from 'react';
import { HashRouter as Router, Route, Link } from "react-router-dom";
import "./add.less"
import { Card,Button } from 'zent';
import "../../../assets/comm.css"
export default class accadd extends React.Component{
constructor(props){
super(props)
this.state={
pagetitle:'新建兑换码'
}
}
componentWillMount(){
let pagetitle=JSON.parse(sessionStorage.getItem('breaknav'))[0].pagetitle;
this.setState({pagetitle:pagetitle+'兑换码'});
}
render(){
return(
<div id="accadd" className="maincenter">
<Card style={{ width:'100%' }} title={this.state.pagetitle}>
<p className="addaccount">
</p>
</Card>
</div>
)
}
}

View File

View File

@ -123,15 +123,15 @@ export default class acclist extends React.Component{
}
}
clickFn(){
this.props.history.push('/distributor-add');
sessionStorage.setItem('pathname2','/system/distributor-add')
let activerou=[{items:[
this.props.history.push('/exchangecode-add');
sessionStorage.setItem('pathname2','/exchangecode-add')
let activerou=[{pagetitle:'新建',items:[
{
"path": "/system/distributor-list",
"path": "/exchangecode-list",
"name": "兑换码管理"
},
{
"path": "/system/distributor-add",
"path": "/exchangecode-add",
"name": "新建兑换码"
}
]}]

View File

@ -14,6 +14,7 @@ import newplan from '../newplan/main';
import distributor from '../distributor/main/main';
import exchangecode from '../exchangecode/main/main';
import exchangecodelist from '../exchangecode/list/list';
import exchangecodeadd from '../exchangecode/add/add';
import exchangepage from '../exchangepage/main/main';
import order from '../order/main/main';
@ -39,7 +40,6 @@ export default class App extends Component {
pathname:'',
navlist:[{
name:'系统管理',
// childmenu:[],
childmenu:[{
group:'账号管理',
items:[{path:'/system/account-list',name:'账号管理'},{path:'/system/role-list',name:'角色管理'},
@ -89,7 +89,7 @@ export default class App extends Component {
}],
lastTime:new Date().getTime(),
currentTime: new Date().getTime(),
timeOut:2 * 60 * 1000, //设置超时时间: 1分
timeOut:15 * 60 * 1000, //设置超时时间: 1分
};
componentWillMount(){
const pathname=window.location.href.lastIndexOf('\/');
@ -167,6 +167,7 @@ export default class App extends Component {
<Route path="/distributor-list" exact={true} component={distributorlist} />
<Route path="/distributor-add" exact={true} component={distributoradd} />
<Route path="/exchangecode-list" exact={true} component={exchangecodelist} />
<Route path="/exchangecode-add" exact={true} component={exchangecodeadd} />
</div>
</aside>
</div>