Commit e971214d by liangjianmin

js

parent bf8d8f51
Showing with 15 additions and 4 deletions
......@@ -23,9 +23,8 @@
<a href="#" class="fl"><span class="icon iconfont fl"></span></a>
<div class="line"></div>
<div class="login-v fl">
<img class="fl" src="http://img.ichunt.com/test/images/ichunt/9f/34/9f349b1400f659e5ad270412d4dbe160.jpg"
alt="">
<div class="fl namex">460053411@qq.com</div>
<img class="fl" :src="userinfo.avatar" alt="">
<div class="fl namex">{{userinfo.contacts_name}}</div>
<div class="fl lo-box-drop">
<span class="icon iconfont"></span>
<div class="drop-box">
......@@ -161,10 +160,11 @@
name: 'menus',
props: {},
created() {
this.getData();
},
data() {
return {
userinfo: {},
collapse: false,
isIndexTab: true,
tabSure: "",
......@@ -200,6 +200,13 @@
this.tabss(this.$route.path)
},
methods: {
getData() {
this.$http('get', "/api/user/getuserinfo").then(res => {
this.userinfo = res.data;
}).catch(err => {
})
},
changePwd() {
this.dialogVisible = true;
},
......
......@@ -60,6 +60,10 @@ router.afterEach((to, from, next) => {
});
axios.interceptors.response.use(res => {
if (res.data.err_code === 101) {
window.location.href = '/#/login?referer=' + encodeURI(to.path);
history.go(0);
}
return res.data;
}, error => {
// 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