Commit a05cccab by wangshufen

fixed:修改路由控制

parent 01c80356
......@@ -37,7 +37,6 @@ class HeaderBar extends React.Component {
}
logout = () => {
this.props.appStore.toggleLogin(true)
// debugger
console.log(this.props.location);
// this.props.history.push(this.props.location.pathname)
this.props.history.push('/login')
......
......@@ -176,7 +176,6 @@ export default class SearchDetails extends Component {
listData.ligand = '';
listData.resolution = 0;
this.setState({ listData });
// debugger;
let pdbLink = 'http://52.83.169.190:3004/?id=' + JSON.stringify(listData);
this.setState({
pdbLink,
......
......@@ -375,7 +375,6 @@ class Home extends React.Component {
//首页启动调用接口 先checkToken == localStorage.getItem('token')
getTargetSelectList = () => {
// debugger
localStorage.getItem('token') &&
request
.get('/kinase/target_class/target')
......
......@@ -71,6 +71,7 @@ request.interceptors.request.use((config) => {
checkToken(config);
} else {
console.log('token为空....');
localStorage.removeItem('token');
window.open('http://69.235.144.91:3048/#/login', '_self');
}
});
......
......@@ -68,7 +68,6 @@ export function preloadingImages(arr) {
/**
* 获取URL中指定的参数
*/
export function getQueryString(name) {
let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
let r = window.location.hash.split('?')[1] && window.location.hash.split('?')[1].match(reg); //获取url中"?"符后的字符串并正则匹配
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment