home组件修改

master
aiyadc 5 years ago
parent e87ce052cb
commit 05faa04f93

@ -3,7 +3,7 @@
<el-container>
<!-- 头部组件-->
<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>
<!-- body部分-->
<el-main class="main" >
@ -54,17 +54,7 @@
},
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>

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

Loading…
Cancel
Save