Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
safe-campus-bbs
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
万成波
safe-campus-bbs
Commits
32a19360
Commit
32a19360
authored
Oct 14, 2025
by
yuwenwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG
parent
639084e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
safe-campus-bbs-uniapp/pages/mine/mine.vue
safe-campus-bbs-uniapp/pages/mine/mine.vue
+1
-1
safe-campus-bbs-uniapp/pages/topic-detail/topic-detail.vue
safe-campus-bbs-uniapp/pages/topic-detail/topic-detail.vue
+16
-2
No files found.
safe-campus-bbs-uniapp/pages/mine/mine.vue
View file @
32a19360
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<scroll-view
class=
"my-dynamics"
scroll-y
:show-scrollbar=
"false"
v-if=
"list.length >0"
<scroll-view
class=
"my-dynamics"
scroll-y
:show-scrollbar=
"false"
v-if=
"list.length >0"
@
scrolltolower=
"loadMore"
>
@
scrolltolower=
"loadMore"
>
<template
v-for=
"(item,index) in list"
>
<template
v-for=
"(item,index) in list"
>
<dynamic-item
:form=
"item"
@
refresh=
"handleRefresh"
:deleteable=
"true"
></dynamic-item>
<dynamic-item
:form=
"item"
@
refresh=
"handleRefresh"
@
deleteSuccess=
"handleRefresh"
:deleteable=
"true"
></dynamic-item>
</
template
>
</
template
>
</scroll-view>
</scroll-view>
<scroll-view
class=
"my-dynamics"
scroll-y
:show-scrollbar=
"false"
v-if=
"list.length==0"
>
<scroll-view
class=
"my-dynamics"
scroll-y
:show-scrollbar=
"false"
v-if=
"list.length==0"
>
...
...
safe-campus-bbs-uniapp/pages/topic-detail/topic-detail.vue
View file @
32a19360
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<scroll-view
class=
"scroll-view-topic"
scroll-y
:show-scrollbar=
"false"
v-if=
"list.length>0"
<scroll-view
class=
"scroll-view-topic"
scroll-y
:show-scrollbar=
"false"
v-if=
"list.length>0"
@
scrolltolower=
"loadMore"
>
@
scrolltolower=
"loadMore"
>
<template
v-for=
"(item,index) in list"
>
<template
v-for=
"(item,index) in list"
>
<dynamic-item
:form=
"item"
@
refresh=
"handleRefresh"
@
deleteSuccess=
"handleRefresh"
></dynamic-item>
<dynamic-item
:form=
"item"
@
refresh=
"handleRefresh"
@
deleteSuccess=
"handleRefresh"
@
refreshCurrent=
"refreshCurrent"
></dynamic-item>
</
template
>
</
template
>
</scroll-view>
</scroll-view>
<scroll-view
class=
"scroll-view-topic"
scroll-y
:show-scrollbar=
"false"
v-else
>
<scroll-view
class=
"scroll-view-topic"
scroll-y
:show-scrollbar=
"false"
v-else
>
...
@@ -31,7 +31,8 @@
...
@@ -31,7 +31,8 @@
import
DynamicItem
from
'
@/components/Dynamic-Item.vue
'
;
import
DynamicItem
from
'
@/components/Dynamic-Item.vue
'
;
import
ListEmpty
from
'
@/components/ListEmpty.vue
'
;
import
ListEmpty
from
'
@/components/ListEmpty.vue
'
;
import
{
import
{
topicDynamics
topicDynamics
,
dynamicDetail
}
from
'
@/api/api.js
'
;
}
from
'
@/api/api.js
'
;
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -101,6 +102,19 @@
...
@@ -101,6 +102,19 @@
this
.
getDetail
()
this
.
getDetail
()
}
}
},
},
// 指定更新
refreshCurrent
(
momentId
)
{
dynamicDetail
(
momentId
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
const
targetIndex
=
this
.
list
.
findIndex
(
item
=>
item
.
id
===
momentId
);
if
(
targetIndex
===
-
1
)
return
;
// 未找到则退出
// 使用 Vue.set 或展开运算符确保响应式
this
.
list
.
splice
(
targetIndex
,
1
,
{
...
res
.
data
});
}
})
}
}
}
}
}
</
script
>
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment