|
@@ -46,6 +46,7 @@ import HotVideo from '@/components/card/HotVideo'
|
|
|
import HotSearch from '@/components/card/HotSearch'
|
|
import HotSearch from '@/components/card/HotSearch'
|
|
|
import { getUserInfo } from '@/utils/auth'
|
|
import { getUserInfo } from '@/utils/auth'
|
|
|
import { statusTimeline, videoTimeline } from '@/api/timeline'
|
|
import { statusTimeline, videoTimeline } from '@/api/timeline'
|
|
|
|
|
+import {getMyInfo} from "@/api/user";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'Timeline',
|
|
name: 'Timeline',
|
|
@@ -55,6 +56,7 @@ export default {
|
|
|
// 屏幕宽度, 为了控制分页条的大小
|
|
// 屏幕宽度, 为了控制分页条的大小
|
|
|
screenWidth: document.body.clientWidth,
|
|
screenWidth: document.body.clientWidth,
|
|
|
nextId: 0,
|
|
nextId: 0,
|
|
|
|
|
+ userInfo: null,
|
|
|
videoInfo: null,
|
|
videoInfo: null,
|
|
|
statusList: [],
|
|
statusList: [],
|
|
|
videoList: [],
|
|
videoList: [],
|
|
@@ -62,11 +64,12 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
- const userInfo = getUserInfo()
|
|
|
|
|
- if (userInfo != null) {
|
|
|
|
|
- document.title = userInfo.screenName + '的时间线'
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ getMyInfo().then(res => {
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ this.userInfo = res.data
|
|
|
|
|
+ document.title = this.userInfo.screenName + '的时间线'
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
this.videoTimelineWrapper(this.nextId)
|
|
this.videoTimelineWrapper(this.nextId)
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|