home组件修改

master
aiyadc 5 years ago
parent e87ce052cb
commit 05faa04f93

@ -3,7 +3,7 @@
<el-container> <el-container>
<!-- 头部组件--> <!-- 头部组件-->
<el-header style="size: 20px;text-align: right;padding-top: 10px"> <el-header style="size: 20px;text-align: right;padding-top: 10px">
<drop-down-user :user="user" @back="backLogin" @goPersonal="goPersonal"></drop-down-user> <drop-down-user :user="user" ></drop-down-user>
</el-header> </el-header>
<!-- body部分--> <!-- body部分-->
<el-main class="main" > <el-main class="main" >
@ -54,17 +54,7 @@
}, },
methods:{ methods:{
async backLogin() {
await get('lb/user/logout')
await showSuccess("退出成功",this)
setTimeout(()=>{
this.$router.push('/login')
},1000)
},
goPersonal:function () {
this.$router.push('/teacher/personal')
}
} }
} }
</script> </script>

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<home :names="homePrarms" user="林大池" ></home> <home :names="homePrarms" user="林大池" @back="backLogin" @goPersonal="goPersonal"></home>
</div> </div>
</template> </template>
@ -30,10 +30,14 @@
methods:{ methods:{
async backLogin() { async backLogin() {
await get('lb/user/logout') await get('lb/user/logout')
await showSuccess('退出成功',this) await showSuccess("退出成功",this)
setTimeout(()=>{ setTimeout(()=>{
this.$router.push('/login') this.$router.push('/login')
},1000) },1000)
},
goPersonal:function () {
this.$router.push('/teacher/personal')
} }
}, },
mounted() { mounted() {

Loading…
Cancel
Save