Commit d3051cd6 by chehuidong

bug

parent 01073dec
......@@ -5,8 +5,7 @@
</template>
<script>
import pageTags from './pageTags.vue'
import { logout } from '@/common/api/login'
import { setToken, setUser } from '@/utils/auth'
import { mapState } from 'vuex'
export default {
......@@ -15,21 +14,7 @@ export default {
computed: {
...mapState(['userInfo']),
},
methods: {
async logout() {
try {
await logout()
} catch (e) {
console.error(e)
}
setUser(null)
setToken('')
localStorage.setItem('tags', null)
this.$store.commit('tags/removeAllTags')
this.$router.push('/login')
},
},
methods: {},
}
</script>
<style lang="scss" scoped>
......@@ -42,5 +27,4 @@ export default {
flex: 1;
overflow: auto hidden;
}
</style>
......@@ -60,6 +60,8 @@
</template>
<script>
import { mapGetters } from 'vuex'
import { logout } from '@/common/api/login'
import { setToken, setUser } from '@/utils/auth'
export default {
name: 'navMenu',
data() {
......@@ -136,6 +138,19 @@ export default {
},
},
methods: {
async logout() {
try {
await logout()
} catch (e) {
console.error(e)
}
setUser(null)
setToken('')
localStorage.setItem('tags', null)
this.$store.commit('tags/removeAllTags')
this.$router.push('/login')
},
onClickMenus() {},
},
}
......
......@@ -417,6 +417,7 @@ export default {
display: flex;
flex-direction: column;
padding: 10px 20px 0;
overflow: hidden;
}
.table-wrap {
......
......@@ -385,25 +385,25 @@ export default {
this.addcurrencyform2 = JSON.parse(
JSON.stringify(this.addcurrencyform),
)
axios.get('sysRole/role_option')
.then((res) => {
if (res.code === 200) {
this.roleOptions = res.data
}
})
.catch((err) => {
console.log(err)
})
axios.get('sysRole/all_list').then((res) => {
this.roleList = res.data
})
axios.get('platform/user/employeePlatformList')
.then((res) => {
this.platforms = res.data
})
.catch((err) => {
console.log(err)
})
// axios.get('sysRole/role_option')
// .then((res) => {
// if (res.code === 200) {
// this.roleOptions = res.data
// }
// })
// .catch((err) => {
// console.log(err)
// })
// axios.get('sysRole/all_list').then((res) => {
// this.roleList = res.data
// })
// axios.get('platform/user/employeePlatformList')
// .then((res) => {
// this.platforms = res.data
// })
// .catch((err) => {
// console.log(err)
// })
},
computed: {
...mapState(['reqMenu', 'employee']),
......
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 to comment