Commit cf90e32a by liangjianmin

js

parent ac9c65bb
Showing with 2 additions and 6 deletions
......@@ -15,7 +15,7 @@ export let NODE_ENVS = "/";
switch (envs) {
case 'development':
//开发环境
NODE_ENVS = 'http://192.168.2.164:8080';
NODE_ENVS = 'http://192.168.2.142:8080';
break;
case 'test':
//测试环境
......
......@@ -213,7 +213,7 @@
} else {
this.$http('get', "/api/user/getuserinfo").then(res => {
this.userinfo = res.data;
if(res.data){
if (res.data) {
sessionStorage.setItem('userInfox', JSON.stringify(res.data));
}
......@@ -301,13 +301,9 @@
logout() {
this.$http('post', "/auth/logout").then(res => {
Util.delCookie('token');
if (res.err_code === 0) {
window.location.href = '/#/login';
sessionStorage.removeItem('userInfox')
history.go(0);
} else {
Message(res.err_msg);
}
}).catch(err => {
console.log(err.message);
})
......
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 sign in to comment