Commit ffac116b by lijiabin

【需求 17679】 fix: 修复用户页面切换的bug

parent 4e84bdcb
...@@ -106,7 +106,7 @@ const { list, loading, searchParams, total, refresh, goToPage, changePageSize } ...@@ -106,7 +106,7 @@ const { list, loading, searchParams, total, refresh, goToPage, changePageSize }
getSelfCollectList, getSelfCollectList,
{ {
defaultParams: { defaultParams: {
type: ArticleTypeEnum.POST, type: filterArticleType.value[0]!.value,
}, },
}, },
) )
...@@ -119,6 +119,11 @@ const handleView = (item: SelfCollectDetailDto) => { ...@@ -119,6 +119,11 @@ const handleView = (item: SelfCollectDetailDto) => {
} }
} }
onActivated(() => {
searchParams.value.type = filterArticleType.value[0]!.value
refresh()
})
defineExpose({ defineExpose({
refresh: () => { refresh: () => {
searchParams.value.type = filterArticleType.value[0]!.value searchParams.value.type = filterArticleType.value[0]!.value
......
...@@ -124,7 +124,7 @@ const { list, loading, searchParams, total, refresh, goToPage, changePageSize } ...@@ -124,7 +124,7 @@ const { list, loading, searchParams, total, refresh, goToPage, changePageSize }
immediate: false, immediate: false,
defaultParams: { defaultParams: {
messageType: CommentTypeEnum.COMMNET_TO_OTHER, messageType: CommentTypeEnum.COMMNET_TO_OTHER,
type: ArticleTypeEnum.POST, type: filterArticleType.value[0]!.value,
}, },
}, },
) )
...@@ -151,6 +151,8 @@ const handleView = (item: SelfCommentItemDto) => { ...@@ -151,6 +151,8 @@ const handleView = (item: SelfCommentItemDto) => {
onActivated(() => { onActivated(() => {
if (route.query.type) { if (route.query.type) {
searchParams.value.type = route.query.type as ArticleTypeEnum searchParams.value.type = route.query.type as ArticleTypeEnum
} else {
searchParams.value.type = filterArticleType.value[0]!.value
} }
if (route.query.messageType) { if (route.query.messageType) {
searchParams.value.messageType = Number(route.query.messageType) searchParams.value.messageType = Number(route.query.messageType)
......
...@@ -109,11 +109,16 @@ const { list, loading, searchParams, total, refresh, goToPage, changePageSize } ...@@ -109,11 +109,16 @@ const { list, loading, searchParams, total, refresh, goToPage, changePageSize }
getSelfDraftList, getSelfDraftList,
{ {
defaultParams: { defaultParams: {
type: ArticleTypeEnum.POST, type: filterArticleType.value[0]!.value,
}, },
}, },
) )
onActivated(() => {
searchParams.value.type = filterArticleType.value[0]!.value
refresh()
})
defineExpose({ defineExpose({
refresh: () => { refresh: () => {
searchParams.value.type = filterArticleType.value[0]!.value searchParams.value.type = filterArticleType.value[0]!.value
......
...@@ -104,11 +104,16 @@ const { list, loading, searchParams, total, refresh, goToPage, changePageSize } ...@@ -104,11 +104,16 @@ const { list, loading, searchParams, total, refresh, goToPage, changePageSize }
getSelfPraiseList, getSelfPraiseList,
{ {
defaultParams: { defaultParams: {
type: ArticleTypeEnum.POST, type: filterArticleType.value[0]!.value,
}, },
}, },
) )
onActivated(() => {
searchParams.value.type = filterArticleType.value[0]!.value
refresh()
})
const handleView = (item: SelfPraiseDetailDto) => { const handleView = (item: SelfPraiseDetailDto) => {
if (item.type === ArticleTypeEnum.VIDEO) { if (item.type === ArticleTypeEnum.VIDEO) {
window.open(`/videoDetail/${item.id}`) window.open(`/videoDetail/${item.id}`)
......
...@@ -105,11 +105,16 @@ const { list, loading, searchParams, total, refresh, goToPage, changePageSize } ...@@ -105,11 +105,16 @@ const { list, loading, searchParams, total, refresh, goToPage, changePageSize }
getSelfPublishList, getSelfPublishList,
{ {
defaultParams: { defaultParams: {
type: ArticleTypeEnum.POST, type: filterArticleType.value[0]!.value,
}, },
}, },
) )
onActivated(() => {
searchParams.value.type = filterArticleType.value[0]!.value
refresh()
})
const handleView = (item: SelfPublishDetailDto) => { const handleView = (item: SelfPublishDetailDto) => {
if (item.type === ArticleTypeEnum.VIDEO) { if (item.type === ArticleTypeEnum.VIDEO) {
window.open(`/videoDetail/${item.id}`) window.open(`/videoDetail/${item.id}`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment