|
|
@@ -106,40 +106,13 @@ export default {
|
|
|
{ text: '音频', link: '/audio' },
|
|
|
{ text: '图片', link: '/image' },
|
|
|
{ text: '文章', link: '/article' }
|
|
|
- ],
|
|
|
- links: [
|
|
|
- '直播',
|
|
|
- '状态'
|
|
|
- /* '知乎',
|
|
|
- '草榴'*/
|
|
|
]
|
|
|
- /*,
|
|
|
- headItem: [
|
|
|
- { icon: 'mdi-head', text: '个人中心', link: '/user/:userId', id: 0 },
|
|
|
- { icon: 'mdi-wrench', text: '创作中心', link: '/studio', id: 1 },
|
|
|
- { icon: 'mdi-logout', text: '退出', link: '/logout', id: 2 }
|
|
|
- ]*/
|
|
|
}),
|
|
|
- mounted() {
|
|
|
- },
|
|
|
created() {
|
|
|
this.userInfo = this.$store.state.user.userInfo
|
|
|
this.$vuetify.theme.dark = this.$store.state.darkThemOpen
|
|
|
},
|
|
|
methods: {
|
|
|
- goToLink() {
|
|
|
- console.log('跳转到页面')
|
|
|
- // this.$router.push('/studio1')
|
|
|
- },
|
|
|
- /* headClick(value) {
|
|
|
- if (value === 0) {
|
|
|
- this.$router.push('/user/' + this.userInfo.userId)
|
|
|
- } else if (value === 1) {
|
|
|
- this.$router.push('/studio')
|
|
|
- } else {
|
|
|
- this.logout()
|
|
|
- }
|
|
|
- },*/
|
|
|
logout() {
|
|
|
// 调用 store/modules/user.js 中的 login 方法
|
|
|
this.$store.dispatch('user/logout').then(() => {
|
|
|
@@ -160,18 +133,6 @@ export default {
|
|
|
},
|
|
|
goToPublish() {
|
|
|
this.$router.push('/studio/upload')
|
|
|
- },
|
|
|
- goToHome() {
|
|
|
- if (this.$route.path === '/') {
|
|
|
- return
|
|
|
- }
|
|
|
- this.$router.push('/')
|
|
|
- },
|
|
|
- goToUserHome() {
|
|
|
- if (this.$route.path === '/user/' + this.$store.state.user.userInfo.userId) {
|
|
|
- return
|
|
|
- }
|
|
|
- this.$router.push('/user/' + this.$store.state.user.userInfo.userId)
|
|
|
}
|
|
|
}
|
|
|
}
|