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
73f559ca
Commit
73f559ca
authored
Sep 22, 2025
by
yuwenwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG
parent
f19b0480
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
169 additions
and
91 deletions
+169
-91
safe-campus-bbs-ui/src/api/moments/index.js
safe-campus-bbs-ui/src/api/moments/index.js
+9
-0
safe-campus-bbs-ui/src/views/moments/DetailDialog.vue
safe-campus-bbs-ui/src/views/moments/DetailDialog.vue
+69
-22
safe-campus-bbs-ui/src/views/pointsExchange/index.vue
safe-campus-bbs-ui/src/views/pointsExchange/index.vue
+1
-0
safe-campus-bbs-uniapp/components/Comment-Item.vue
safe-campus-bbs-uniapp/components/Comment-Item.vue
+13
-9
safe-campus-bbs-uniapp/components/Dynamic-Item.vue
safe-campus-bbs-uniapp/components/Dynamic-Item.vue
+2
-2
safe-campus-bbs-uniapp/pages/dynamic-detail/dynamic-detail.vue
...campus-bbs-uniapp/pages/dynamic-detail/dynamic-detail.vue
+0
-8
safe-campus-bbs-uniapp/pages/publish/publish.vue
safe-campus-bbs-uniapp/pages/publish/publish.vue
+2
-2
safe-campus-bbs-uniapp/pages/topic-detail/topic-detail.vue
safe-campus-bbs-uniapp/pages/topic-detail/topic-detail.vue
+8
-8
safe-campus-bbs-uniapp/pages/topics/topics.vue
safe-campus-bbs-uniapp/pages/topics/topics.vue
+65
-40
safe-campus-bbs-uniapp/static/images/publish-blue.png
safe-campus-bbs-uniapp/static/images/publish-blue.png
+0
-0
No files found.
safe-campus-bbs-ui/src/api/moments/index.js
View file @
73f559ca
...
...
@@ -24,4 +24,13 @@ export function delData(id) {
url
:
`/bbs/moment/
${
id
}
`
,
method
:
'
delete
'
})
}
// 动态评论
export
function
getMomentComments
(
momentId
,
params
)
{
return
request
({
url
:
`/bbs/moment/comment/moment/
${
momentId
}
`
,
method
:
'
get
'
,
params
})
}
\ No newline at end of file
safe-campus-bbs-ui/src/views/moments/DetailDialog.vue
View file @
73f559ca
...
...
@@ -13,10 +13,14 @@
</div>
<div
class=
"dynamic-content-box"
>
<div
class=
"text"
>
{{ form.content }}
</div>
<div
class=
"imgs"
v-if=
"form.attachments && form.attachments.length > 0"
>
<div
class=
"imgs"
v-if=
"form.
type == 'IMAGE' && form.
attachments && form.attachments.length > 0"
>
<
template
v-for=
"(item, index) in form.attachments"
>
<el-image
class=
"item"
:src=
"item.url"
:preview-src-list=
"[item.url]"
></el-image>
<!--
<img
class=
"item"
:src=
"item.url"
></img>
-->
</
template
>
</div>
<div
class=
"imgs"
v-if=
"form.type == 'VIDEO' && form.attachments && form.attachments.length > 0"
>
<
template
v-for=
"(item, index) in form.attachments"
>
<video
class=
"item"
:src=
"item.url"
></video>
</
template
>
</div>
</div>
...
...
@@ -52,14 +56,16 @@
</div>
<!-- 评论区 -->
<div
class=
"comment-box"
v-if=
"form.isEnableComment == 1"
>
<div
class=
"comment-display-box"
v-if=
"
form.comments && form.comments
.length > 0"
>
<div
class=
"comment-item"
v-for=
"(item, index) in
form.comments
"
>
<div
class=
"comment-display-box"
v-if=
"
commentList
.length > 0"
>
<div
class=
"comment-item"
v-for=
"(item, index) in
commentList
"
>
<div
class=
"user-info"
>
<div
class=
"username"
>
{{ item.nickName }}:
</div>
<div
class=
"datetime"
>
2025-07-01 04:21:21
</div>
<div
class=
"datetime"
>
{{ item.createTime }}
</div>
</div>
<div
class=
"content"
>
{{ item.content }}
</div>
<!-- <div class="tips">未精选,仅自己可见</div> -->
</div>
<div
class=
"show-more-box"
v-if=
"commentList.length < total"
@
click=
"loadMore"
>
加载更多
</div>
</div>
</div>
...
...
@@ -67,46 +73,72 @@
</el-dialog>
</template>
<
script
>
import
{
detailData
}
from
'
@/api/moments
'
import
{
detailData
,
getMomentComments
}
from
'
@/api/moments
'
export
default
{
data
()
{
return
{
visible
:
false
,
form
:
{}
form
:
{},
queryParams
:
{
pageNum
:
1
,
pageSize
:
5
},
commentList
:
[],
total
:
0
,
currentRow
:{}
}
},
methods
:
{
openModal
(
row
)
{
this
.
visible
=
true
;
this
.
getData
(
row
)
this
.
currentRow
=
{...
row
}
this
.
queryParams
.
pageNum
=
1
;
this
.
commentList
=
[];
this
.
getData
();
this
.
getComments
()
},
getData
(
row
)
{
detailData
(
row
.
id
).
then
(
res
=>
{
// 详情
getData
()
{
detailData
(
this
.
currentRow
.
id
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
form
=
{
...
res
.
data
}
})
}
},
// 动态评论
getComments
()
{
getMomentComments
(
this
.
currentRow
.
id
,
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
commentList
=
[...
this
.
commentList
,
...
res
.
rows
]
||
[]
this
.
total
=
res
.
total
})
},
loadMore
()
{
this
.
queryParams
.
pageNum
+=
1
;
this
.
getComments
()
},
}
}
</
script
>
<
style
lang=
"scss"
>
.detail-dialog
{
.el-dialog__body
{
.detail-dialog
{
.el-dialog__body
{
padding
:
0
20px
!
important
;
}
}
</
style
>
<
style
lang=
"scss"
scoped
>
.topic-box-common
{
height
:
26px
;
padding
:
0
10px
;
background-color
:
rgba
(
0
,
123
,
255
,
0
.1
);
color
:
rgba
(
52
,
132
,
253
,
1
);
border-radius
:
13px
;
line-height
:
26px
;
margin-right
:
10px
;
margin-bottom
:
5px
;
height
:
26px
;
padding
:
0
10px
;
background-color
:
rgba
(
0
,
123
,
255
,
0
.1
);
color
:
rgba
(
52
,
132
,
253
,
1
);
border-radius
:
13px
;
line-height
:
26px
;
margin-right
:
10px
;
margin-bottom
:
5px
;
}
.dynamic-item
{
background-color
:
white
;
width
:
100%
;
...
...
@@ -334,4 +366,19 @@ export default {
}
}
}
.show-more-box
{
height
:
30px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
color
:
#BBBBBB
;
font-size
:
12px
;
cursor
:
pointer
;
.icon
{
width
:
16px
;
height
:
16px
;
}
}
</
style
>
safe-campus-bbs-ui/src/views/pointsExchange/index.vue
View file @
73f559ca
...
...
@@ -122,6 +122,7 @@ export default {
pageNum
:
1
,
pageSize
:
10
}
this
.
dateRange
=
[]
this
.
getList
()
}
}
...
...
safe-campus-bbs-uniapp/components/Comment-Item.vue
View file @
73f559ca
...
...
@@ -16,16 +16,17 @@
<view
class=
"datetime"
>
{{
item
.
createTime
}}
</view>
</view>
<view
class=
"content"
>
<view
class=
"text"
v-if=
"!item.replyNi
keName
"
>
{{
item
.
content
}}
</view>
<view
class=
"text"
v-if=
"!item.replyNi
ckName"
@
click.stop=
"handleReplayComment(item)
"
>
{{
item
.
content
}}
</view>
<view
class=
"text"
v-else
@
click.stop=
"handleReplayComment(item)"
>
回复
<span
style=
"color: #0058B6;"
>
{{
item
.
replyNi
ke
Name
}}
:
</span>
{{
item
.
content
}}
回复
<span
style=
"color: #0058B6;"
>
{{
item
.
replyNi
ck
Name
}}
:
</span>
{{
item
.
content
}}
</view>
<view
class=
"operation-text"
>
<view
class=
"add-text
"
v-if=
"form.isSelf==1&&activeIndex==1 &&item.isFeatured==0
"
<view
class=
"add-text
mr10"
v-if=
"form.isSelf==1&&activeIndex==1 &&item.isFeatured==0 &&form.isEnableFeaturedComment==1
"
@
click=
"handleFeatured(item)"
>
加入精选
</view>
<view
v-if=
"form.isSelf==1&&activeIndex==1 &&item.isFeatured
==1"
@
click=
"handleFeatured(item)"
>
<view
class=
"mr10"
v-if=
"form.isSelf==1&&activeIndex==1 &&item.isFeatured==1&&form.isEnableFeaturedComment
==1"
@
click=
"handleFeatured(item)"
>
取消精选
</view>
<view
v-if=
"form.isSelf==1&&activeIndex==1"
@
click=
"handleDelete(item)"
>
删除
</view>
<view
v-if=
"activeIndex==0&&item.isFeatured==1"
style=
"color: #F2AC39;"
>
精选
</view>
</view>
</view>
</view>
...
...
@@ -77,6 +78,7 @@
console
.
log
(
newVal
,
oldVal
)
if
(
newVal
.
id
){
this
.
queryParams
.
momentId
=
newVal
.
id
;
this
.
commentList
=
[];
this
.
getCommentList
()
}
}
...
...
@@ -90,6 +92,7 @@
},
handleRefresh
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
commentList
=
[];
this
.
getCommentList
()
},
getCommentList
()
{
...
...
@@ -125,7 +128,7 @@
uni
.
showToast
({
title
:
`
${
text
}
成功`
})
_this
.
getCommentList
()
_this
.
handleRefresh
()
}
})
}
else
if
(
res
.
cancel
)
{
...
...
@@ -146,7 +149,7 @@
uni
.
showToast
({
title
:
`删除成功`
})
_this
.
getCommentList
()
_this
.
handleRefresh
()
}
})
}
else
if
(
res
.
cancel
)
{
...
...
@@ -245,10 +248,11 @@
font-size
:
28rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
flex-end
;
}
.mr10
{
margin-right
:
12rpx
;
}
.add-text
{
color
:
#0058B6
;
}
...
...
safe-campus-bbs-uniapp/components/Dynamic-Item.vue
View file @
73f559ca
...
...
@@ -100,10 +100,10 @@
<view
class=
"username"
>
{{item.nickName}}:
</view>
<view
class=
"datetime"
>
2025-07-01 04:21:21
</view>
</view>
<view
class=
"content"
v-if=
"!item.replyNi
ke
Name"
@
click.stop=
"handleReplayComment(item)"
>
<view
class=
"content"
v-if=
"!item.replyNi
ck
Name"
@
click.stop=
"handleReplayComment(item)"
>
{{item.content}}
</view>
<view
class=
"content"
v-else
@
click.stop=
"handleReplayComment(item)"
>
回复
<span
style=
"color: #0058B6;"
>
{{item.replyNi
ke
Name}}:
</span>
:{{item.content}}
回复
<span
style=
"color: #0058B6;"
>
{{item.replyNi
ck
Name}}:
</span>
:{{item.content}}
</view>
<!-- <view class="tips">未精选,仅自己可见</view> -->
</view>
...
...
safe-campus-bbs-uniapp/pages/dynamic-detail/dynamic-detail.vue
View file @
73f559ca
...
...
@@ -28,7 +28,6 @@
this
.
momentId
=
momentId
;
this
.
queryParams
.
momentId
=
momentId
this
.
getDetail
()
// this.getCommentList()
},
components
:
{
DynamicItem
,
...
...
@@ -37,7 +36,6 @@
methods
:
{
handleRefresh
(){
this
.
getDetail
();
this
.
getCommentList
()
},
getDetail
(){
dynamicDetail
(
this
.
momentId
).
then
(
res
=>
{
...
...
@@ -46,12 +44,6 @@
}
})
},
getCommentList
(){
dynamicDetailComments
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
commentList
=
res
.
rows
})
}
}
}
</
script
>
...
...
safe-campus-bbs-uniapp/pages/publish/publish.vue
View file @
73f559ca
...
...
@@ -60,11 +60,11 @@
<view
class=
"choice-box"
v-if=
"form.voteOptionType=='TEXT'"
>
<view
class=
"choice-item text-item"
>
<view
class=
"label"
>
选项1
</view>
<input
class=
"text"
v-model=
"form.voteOptions[0].name"
placeholder=
"请输入选项1(4字以内)"
/>
<input
class=
"text"
maxlength=
"4"
v-model=
"form.voteOptions[0].name"
placeholder=
"请输入选项1(4字以内)"
/>
</view>
<view
class=
"choice-item text-item"
>
<view
class=
"label"
>
选项2
</view>
<input
class=
"text"
v-model=
"form.voteOptions[1].name"
placeholder=
"请输入选项2(4字以内)"
/>
<input
class=
"text"
maxlength=
"4"
v-model=
"form.voteOptions[1].name"
placeholder=
"请输入选项2(4字以内)"
/>
</view>
</view>
</view>
...
...
safe-campus-bbs-uniapp/pages/topic-detail/topic-detail.vue
View file @
73f559ca
...
...
@@ -20,7 +20,7 @@
</scroll-view>
<view
class=
"publisb-box"
>
<view
class=
"publish-btn"
@
click=
"handleToPublish"
>
<image
src=
"/static/images/publish-
gray
.png"
class=
"icon"
></image>
<image
src=
"/static/images/publish-
blue
.png"
class=
"icon"
></image>
<view
class=
"text"
>
发表动态
</view>
</view>
</view>
...
...
@@ -93,10 +93,10 @@
.topic-detail-page
{
background-color
:
white
;
overflow
:
hidden
;
.topic-box
{
padding
:
32rpx
34rpx
0
32rpx
;
padding
:
32rpx
34rpx
2rpx
32rpx
;
.topic-container
{
width
:
92vw
;
height
:
180rpx
;
...
...
@@ -137,9 +137,9 @@
}
.publisb-box
{
height
:
12
2
rpx
;
background-color
:
white
;
border-top
:
1px
solid
#eee
;
height
:
12
4
rpx
;
background-color
:
rgba
(
244
,
244
,
244
,
1
)
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
...
...
@@ -162,7 +162,7 @@
}
.text
{
color
:
rgba
(
187
,
187
,
187
,
1
);
color
:
rgba
(
0
,
0
,
0
,
1
);
font-size
:
32rpx
;
}
}
...
...
safe-campus-bbs-uniapp/pages/topics/topics.vue
View file @
73f559ca
...
...
@@ -2,51 +2,63 @@
<view
class=
"page-container topics-page"
>
<view
class=
"search-box-common"
>
<image
src=
"/static/images/search-icon.png"
class=
"search-icon"
></image>
<input
placeholder=
"搜索"
style=
"width: 100%;"
v-model=
"topicName"
@
keypress.enter=
"getList"
placeholder-class=
"placeholder-class"
/>
<input
placeholder=
"搜索"
style=
"width: 100%;"
v-model=
"topicName"
@
keypress.enter=
"getList"
placeholder-class=
"placeholder-class"
/>
</view>
<view
class=
"hot-container"
>
<view
class=
"hot-tag-box"
>
<image
src=
"/static/images/hot-searchs.png"
class=
"tag"
></image>
</view>
<view
class=
"hot-item"
v-for=
"(item,index) in hotList"
:class=
"
{'first':index==0,'second':index==1,'third':index==2}">
<view
class=
"index"
>
{{
index
+
1
}}
</view>
<view
class=
"text"
>
{{
item
.
name
}}
</view>
<view
class=
"more"
@
click=
"topTopicDetailPage(item)"
>
<view>
详情
</view>
<image
src=
"/static/images/detail-icon.png"
class=
"icon"
></image>
<view
v-if=
"hotList.length > 0"
>
<view
class=
"hot-item"
v-for=
"(item,index) in hotList"
:class=
"
{'first':index==0,'second':index==1,'third':index==2}">
<view
class=
"index"
>
{{
index
+
1
}}
</view>
<view
class=
"text"
>
{{
item
.
name
}}
</view>
<view
class=
"more"
@
click=
"topTopicDetailPage(item)"
>
<view>
详情
</view>
<image
src=
"/static/images/detail-icon.png"
class=
"icon"
></image>
</view>
</view>
</view>
<list-empty
v-else
text=
"暂无匹配话题~"
></list-empty>
</view>
</view>
</
template
>
<
script
>
import
{
hotTopicRanking
}
from
'
@/api/api.js
'
;
import
{
hotTopicRanking
}
from
'
@/api/api.js
'
;
import
ListEmpty
from
'
@/components/ListEmpty.vue
'
export
default
{
data
()
{
return
{
hotList
:[],
topicName
:
''
hotList
:
[],
topicName
:
''
}
},
components
:
{
ListEmpty
},
onShow
()
{
this
.
getList
()
},
methods
:
{
// 话题热搜榜
getList
(){
getList
()
{
let
params
=
{
name
:
this
.
topicName
name
:
this
.
topicName
}
hotTopicRanking
(
params
).
then
(
res
=>
{
hotTopicRanking
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
hotList
=
res
.
data
})
},
topTopicDetailPage
(
item
){
topTopicDetailPage
(
item
)
{
uni
.
navigateTo
({
url
:
'
/pages/topic-detail/topic-detail?topicId=
'
+
item
.
id
+
'
&topicName=
'
+
item
.
name
url
:
'
/pages/topic-detail/topic-detail?topicId=
'
+
item
.
id
+
'
&topicName=
'
+
item
.
name
})
}
}
...
...
@@ -55,28 +67,32 @@
<
style
lang=
"scss"
scoped
>
@import
'@/static/styles/common.scss'
;
.topics-page
{
.topics-page
{
background-color
:
white
;
}
.search-box-common
{
.search-box-common
{
background-color
:
rgba
(
244
,
244
,
244
,
1
);
}
.hot-container
{
.hot-container
{
padding
:
0
34rpx
;
box-sizing
:
border-box
;
.hot-tag-box
{
.hot-tag-box
{
margin-bottom
:
32rpx
;
.tag
{
.tag
{
width
:
120rpx
;
height
:
30rpx
;
}
}
.hot-item
{
.hot-item
{
height
:
76rpx
;
border-radius
:
12rpx
;
background
:
linear-gradient
(
93
.14deg
,
rgba
(
149
,
153
,
167
,
0
.1
)
3
.32%
,
rgba
(
255
,
255
,
255
,
0
)
98
.5%
);
background
:
linear-gradient
(
93
.14deg
,
rgba
(
149
,
153
,
167
,
0
.1
)
3
.32%
,
rgba
(
255
,
255
,
255
,
0
)
98
.5%
);
color
:
rgba
(
0
,
0
,
0
,
1
);
font-size
:
28rpx
;
margin-bottom
:
20rpx
;
...
...
@@ -85,47 +101,56 @@
justify-content
:
space-between
;
padding
:
0
24rpx
;
box-sizing
:
border-box
;
.index
{
.index
{
color
:
rgba
(
149
,
153
,
167
,
1
);
font-size
:
30rpx
;
width
:
40rpx
;
line-height
:
30rpx
;
}
.text
{
.text
{
font-size
:
28rpx
;
width
:
calc
(
100%
-
142rpx
);
}
.more
{
.more
{
width
:
90rpx
;
color
:
rgba
(
187
,
187
,
187
,
1
);
font-size
:
24rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
.icon
{
.icon
{
width
:
36rpx
;
height
:
36rpx
;
}
}
}
.first
{
background
:
linear-gradient
(
93
.14deg
,
rgba
(
254
,
68
,
91
,
0
.1
)
3
.32%
,
rgba
(
255
,
255
,
255
,
0
)
98
.5%
);
.index
{
.first
{
background
:
linear-gradient
(
93
.14deg
,
rgba
(
254
,
68
,
91
,
0
.1
)
3
.32%
,
rgba
(
255
,
255
,
255
,
0
)
98
.5%
);
.index
{
color
:
#FE445B
;
}
}
.second
{
background
:
linear-gradient
(
93
.14deg
,
rgba
(
255
,
122
,
31
,
0
.1
)
3
.32%
,
rgba
(
255
,
255
,
255
,
0
)
98
.5%
);
.index
{
.second
{
background
:
linear-gradient
(
93
.14deg
,
rgba
(
255
,
122
,
31
,
0
.1
)
3
.32%
,
rgba
(
255
,
255
,
255
,
0
)
98
.5%
);
.index
{
color
:
#FF7A1F
;
}
}
.third
{
background
:
linear-gradient
(
93
.14deg
,
rgba
(
250
,
174
,
26
,
0
.1
)
3
.32%
,
rgba
(
255
,
255
,
255
,
0
)
98
.5%
);
.index
{
.third
{
background
:
linear-gradient
(
93
.14deg
,
rgba
(
250
,
174
,
26
,
0
.1
)
3
.32%
,
rgba
(
255
,
255
,
255
,
0
)
98
.5%
);
.index
{
color
:
#FAAE1A
;
}
}
}
</
style
>
</
style
>
\ No newline at end of file
safe-campus-bbs-uniapp/static/images/publish-blue.png
0 → 100644
View file @
73f559ca
876 Bytes
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