|
|
@@ -42,7 +42,7 @@
|
|
|
<el-autocomplete
|
|
|
v-model="keyword"
|
|
|
:fetch-suggestions="querySearchAsync"
|
|
|
- :placeholder="placeholder"
|
|
|
+ :placeholder="searchHint"
|
|
|
clearable
|
|
|
suffix-icon="el-icon-search"
|
|
|
size="medium"
|
|
|
@@ -64,10 +64,10 @@
|
|
|
>
|
|
|
<el-dropdown-menu v-if="user" slot="dropdown" class="iconsize">
|
|
|
<el-dropdown-item
|
|
|
- icon="el-icon-user-solid"
|
|
|
+ icon="el-icon-s-home"
|
|
|
class="size"
|
|
|
- @click.native="goToProfile"
|
|
|
- >我的帐号</el-dropdown-item>
|
|
|
+ @click.native="goToUserHome"
|
|
|
+ >我的主页</el-dropdown-item>
|
|
|
<el-dropdown-item
|
|
|
icon="el-icon-collection"
|
|
|
class="size"
|
|
|
@@ -80,36 +80,15 @@
|
|
|
>历史记录
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item
|
|
|
- icon="el-icon-s-home"
|
|
|
+ icon="el-icon-menu"
|
|
|
class="size"
|
|
|
- @click.native="goToUserHome"
|
|
|
- >我的主页</el-dropdown-item>
|
|
|
+ @click.native="goToBackground"
|
|
|
+ >进入后台</el-dropdown-item>
|
|
|
<el-dropdown-item
|
|
|
icon="el-icon-error"
|
|
|
class="size"
|
|
|
@click.native="goToLogout"
|
|
|
- >退出</el-dropdown-item>
|
|
|
- <el-divider />
|
|
|
- <el-dropdown-item
|
|
|
- icon="el-icon-s-home"
|
|
|
- class="size"
|
|
|
- @click.native="goToExam"
|
|
|
- >我的考试</el-dropdown-item>
|
|
|
- <el-dropdown-item
|
|
|
- icon="el-icon-map-location"
|
|
|
- class="size"
|
|
|
- @click.native="goToMap"
|
|
|
- >我的地图</el-dropdown-item>
|
|
|
- <el-dropdown-item
|
|
|
- icon="el-icon-goods"
|
|
|
- class="size"
|
|
|
- @click.native="goToMall"
|
|
|
- >我的商城</el-dropdown-item>
|
|
|
- <el-dropdown-item
|
|
|
- icon="el-icon-chat-dot-round"
|
|
|
- class="size"
|
|
|
- @click.native="goToChat"
|
|
|
- >我的IM</el-dropdown-item>
|
|
|
+ >登出</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
<span
|
|
|
@@ -172,7 +151,7 @@
|
|
|
type="primary"
|
|
|
:loading="isLoading"
|
|
|
@click.native="loginBtn"
|
|
|
- >登 录</el-button>
|
|
|
+ >登 入</el-button>
|
|
|
<el-button type="plain" @click="register">注册/忘记密码?</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
@@ -194,7 +173,8 @@ export default {
|
|
|
user: null,
|
|
|
activeIndex: '1',
|
|
|
restaurants: [],
|
|
|
- placeholder: '想要搜点神马呢',
|
|
|
+ searchHint: '想要搜点神马呢',
|
|
|
+ searchType: '1',
|
|
|
keyword: '',
|
|
|
statusCount: 0,
|
|
|
msgCount: 0
|
|
|
@@ -294,101 +274,62 @@ export default {
|
|
|
console.log('帐号注册')
|
|
|
},
|
|
|
// ****************************************************************************************************************
|
|
|
- goToPlaylist() {
|
|
|
- const path = '/post/album'
|
|
|
+ goToUserHome() {
|
|
|
+ const path = '/user/' + this.user.userId
|
|
|
if (this.$route.path === path) {
|
|
|
this.$router.go(0)
|
|
|
return
|
|
|
}
|
|
|
this.$router.push(path)
|
|
|
},
|
|
|
- goToDisk() {
|
|
|
- const path = '/disk'
|
|
|
+ goToPlaylist() {
|
|
|
+ const path = '/background/my/album'
|
|
|
if (this.$route.path === path) {
|
|
|
this.$router.go(0)
|
|
|
return
|
|
|
}
|
|
|
this.$router.push(path)
|
|
|
},
|
|
|
- goToProfile() {
|
|
|
- const path = '/my'
|
|
|
+ goToHistory() {
|
|
|
+ const path = '/background/my/history'
|
|
|
if (this.$route.path === path) {
|
|
|
this.$router.go(0)
|
|
|
return
|
|
|
}
|
|
|
this.$router.push(path)
|
|
|
},
|
|
|
- goToTimeline() {
|
|
|
- const path = '/timeline'
|
|
|
+ goToBackground() {
|
|
|
+ const path = '/background'
|
|
|
if (this.$route.path === path) {
|
|
|
this.$router.go(0)
|
|
|
return
|
|
|
}
|
|
|
this.$router.push(path)
|
|
|
},
|
|
|
- goToUserHome() {
|
|
|
- const path = '/user/' + this.user.userId
|
|
|
+ goToTimeline() {
|
|
|
+ const path = '/timeline'
|
|
|
if (this.$route.path === path) {
|
|
|
this.$router.go(0)
|
|
|
return
|
|
|
}
|
|
|
this.$router.push(path)
|
|
|
},
|
|
|
- goToHistory() {
|
|
|
- if (this.$route.path === '/post/history') {
|
|
|
- this.$router.go(0)
|
|
|
- return
|
|
|
- }
|
|
|
- this.$router.push('/post/history')
|
|
|
- },
|
|
|
goToMessage() {
|
|
|
- if (this.$route.path === '/my/message') {
|
|
|
+ const path = '/background/my/message'
|
|
|
+ if (this.$route.path === path) {
|
|
|
this.$router.go(0)
|
|
|
return
|
|
|
}
|
|
|
- this.$router.push('/my/message')
|
|
|
+ this.$router.push(path)
|
|
|
},
|
|
|
goToPublish() {
|
|
|
- if (this.$route.path === '/post/video/list') {
|
|
|
- this.$router.go(0)
|
|
|
- return
|
|
|
- }
|
|
|
- this.$router.push('/post/video/list')
|
|
|
- },
|
|
|
- // ************************************************************************
|
|
|
- // 我的考试
|
|
|
- goToExam() {
|
|
|
- if (this.$route.path === '/exam') {
|
|
|
- this.$router.go(0)
|
|
|
- return
|
|
|
- }
|
|
|
- this.$router.push('/exam')
|
|
|
- },
|
|
|
- // 我的地图
|
|
|
- goToMap() {
|
|
|
- if (this.$route.path === '/map') {
|
|
|
- this.$router.go(0)
|
|
|
- return
|
|
|
- }
|
|
|
- this.$router.push('/map')
|
|
|
- },
|
|
|
- // 我的商城
|
|
|
- goToMall() {
|
|
|
- if (this.$route.path === '/mall') {
|
|
|
- this.$router.go(0)
|
|
|
- return
|
|
|
- }
|
|
|
- this.$router.push('/mall')
|
|
|
- },
|
|
|
- // 我的IM
|
|
|
- goToChat() {
|
|
|
- if (this.$route.path === '/chat') {
|
|
|
+ const path = '/background/post/video'
|
|
|
+ if (this.$route.path === path) {
|
|
|
this.$router.go(0)
|
|
|
return
|
|
|
}
|
|
|
- this.$router.push('/chat')
|
|
|
+ this.$router.push(path)
|
|
|
}
|
|
|
- // ************************************************************************
|
|
|
}
|
|
|
}
|
|
|
</script>
|