|
|
@@ -47,17 +47,7 @@ export default {
|
|
|
const permission = permissionStore()
|
|
|
return { nav, user, permission }
|
|
|
},
|
|
|
- created () {
|
|
|
- this.getPermission()
|
|
|
- },
|
|
|
methods: {
|
|
|
- getPermission () {
|
|
|
- this.$api.login.getPermission().then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.permission.addPermission(res.data)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
dropDown (res) {
|
|
|
if (res === 'info') {
|
|
|
this.$router.push('/user')
|
|
|
@@ -65,7 +55,12 @@ export default {
|
|
|
this.$api.login.logout().then(res => {
|
|
|
if (res.success === 'true') {
|
|
|
this.nav.cleanMenu()
|
|
|
- this.permission.cleanPermission()
|
|
|
+ try {
|
|
|
+ // this.permission.cleanPermission()
|
|
|
+ } catch (err) {
|
|
|
+ console.log(err)
|
|
|
+ }
|
|
|
+
|
|
|
this.$message.success('退出登录')
|
|
|
this.$router.replace('/login')
|
|
|
} else {
|