|
|
@@ -62,6 +62,7 @@ import StatusCard from '@/components/card/StatusCard'
|
|
|
import VideoCard from '@/components/card/VideoCard'
|
|
|
import { getUserInfo } from "@/api/user";
|
|
|
import { userVideoList } from "@/api/video";
|
|
|
+import { userStatus } from "@/api/status";
|
|
|
|
|
|
export default {
|
|
|
name: 'Profile',
|
|
|
@@ -117,19 +118,16 @@ export default {
|
|
|
scrollTo(0, 0)
|
|
|
},
|
|
|
tabClick(tab) {
|
|
|
- const index = tab.index
|
|
|
- if (index === 0) {
|
|
|
- const path = '/user/' + this.userId + '/status'
|
|
|
- this.$router.push({path: path});
|
|
|
- } else if (index === 1) {
|
|
|
- const path = '/user/' + this.userId + '/video'
|
|
|
- this.$router.push({path: path});
|
|
|
- } else if (index === 2) {
|
|
|
- this.$router.push({path: '/user/' + this.userId + '/audio'});
|
|
|
- } else if (index === 3) {
|
|
|
- this.$router.push({path: '/user/' + this.userId + '/image'});
|
|
|
- } else if (index === 4) {
|
|
|
- this.$router.push({path: '/user/' + this.userId + '/article'});
|
|
|
+ const tabName = tab.name
|
|
|
+ if (tabName === 'home') {
|
|
|
+ console.log('获取主页')
|
|
|
+ } else if (tabName === 'status') {
|
|
|
+ console.log('获取状态')
|
|
|
+ userStatus(this.userId, 1).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ } else if (tabName === 'video') {
|
|
|
+ console.log('获取视频')
|
|
|
}
|
|
|
},
|
|
|
userVideoListWrapper(pageNumber, userId) {
|