|
@@ -9,7 +9,7 @@ import {apiApplyPermission} from '@/api/user'
|
|
|
import SelfList from '@/components/SelfList.vue'
|
|
|
import VideoComment from '@/components/VideoComment.vue'
|
|
|
import VideoBox from '@/components/VideoBox.vue'
|
|
|
-import { useRoute, useRouter } from 'vue-router'
|
|
|
+import { useRoute, useRouter,onBeforeRouteUpdate } from 'vue-router'
|
|
|
import { useStore } from 'vuex'
|
|
|
|
|
|
import CollectBox from '@/components/CollectBox.vue'
|
|
@@ -101,7 +101,12 @@ const getVideoList=async ()=>{
|
|
|
}
|
|
|
if(res.code===200){
|
|
|
let arr=res.data.list||[]
|
|
|
- listState.list=[...listState.list,...arr]
|
|
|
+ if(!videoId.value){
|
|
|
+ listState.list=[...listState.list,...arr]
|
|
|
+ }else{
|
|
|
+ listState.list = arr
|
|
|
+ }
|
|
|
+
|
|
|
if(res.data.paging.is_end){
|
|
|
listState.finished=true
|
|
|
}
|
|
@@ -293,8 +298,29 @@ onActivated(()=>{
|
|
|
//无权限时每次进页面都刷新列表
|
|
|
getVideoList()
|
|
|
}
|
|
|
+ //从报告详情跳转进入页面
|
|
|
+ const {fromPage} = route.query
|
|
|
+ if(fromPage=='reportDetail'){
|
|
|
+ videoId.value = route.query.videoId
|
|
|
+ permissionState.sFirst=''
|
|
|
+ listState.list=[]
|
|
|
+ getVideoList()
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
+/* onBeforeRouteUpdate((to,from)=>{
|
|
|
+ //console.log('update','to',to,'from',from)
|
|
|
+ console.log('beforeRouteUpdate')
|
|
|
+ //从报告详情跳转进入页面
|
|
|
+ const {fromPage} = to.query
|
|
|
+ if(fromPage=='reportDetail'){
|
|
|
+ videoId.value = to.query.videoId
|
|
|
+ permissionState.sFirst=''
|
|
|
+ listState.list=[]
|
|
|
+ getVideoList()
|
|
|
+ }
|
|
|
+}) */
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<template>
|