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
b26f2218
Commit
b26f2218
authored
Sep 12, 2025
by
yuwenwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改部分BUG,修改登录背景图
parent
ae2aba8a
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
216 additions
and
73 deletions
+216
-73
safe-campus-bbs-ui/src/assets/images/login-background.jpg
safe-campus-bbs-ui/src/assets/images/login-background.jpg
+0
-0
safe-campus-bbs-ui/src/components/ImageUpload/index.vue
safe-campus-bbs-ui/src/components/ImageUpload/index.vue
+5
-1
safe-campus-bbs-ui/src/views/login.vue
safe-campus-bbs-ui/src/views/login.vue
+2
-1
safe-campus-bbs-ui/src/views/moments/DetailDialog.vue
safe-campus-bbs-ui/src/views/moments/DetailDialog.vue
+2
-1
safe-campus-bbs-ui/src/views/moments/index.vue
safe-campus-bbs-ui/src/views/moments/index.vue
+1
-1
safe-campus-bbs-ui/src/views/pointsManage/DetailDialog.vue
safe-campus-bbs-ui/src/views/pointsManage/DetailDialog.vue
+1
-1
safe-campus-bbs-ui/src/views/pointsManage/index.vue
safe-campus-bbs-ui/src/views/pointsManage/index.vue
+2
-2
safe-campus-bbs-ui/src/views/sensitives/FormDialog.vue
safe-campus-bbs-ui/src/views/sensitives/FormDialog.vue
+1
-1
safe-campus-bbs-ui/src/views/sensitives/index.vue
safe-campus-bbs-ui/src/views/sensitives/index.vue
+8
-4
safe-campus-bbs-uniapp/api/api.js
safe-campus-bbs-uniapp/api/api.js
+8
-0
safe-campus-bbs-uniapp/components/Comment-Item.vue
safe-campus-bbs-uniapp/components/Comment-Item.vue
+71
-33
safe-campus-bbs-uniapp/components/Dynamic-Item.vue
safe-campus-bbs-uniapp/components/Dynamic-Item.vue
+98
-20
safe-campus-bbs-uniapp/components/ImageUpload.vue
safe-campus-bbs-uniapp/components/ImageUpload.vue
+1
-1
safe-campus-bbs-uniapp/components/PublishComment.vue
safe-campus-bbs-uniapp/components/PublishComment.vue
+2
-2
safe-campus-bbs-uniapp/pages/dynamic-detail/dynamic-detail.vue
...campus-bbs-uniapp/pages/dynamic-detail/dynamic-detail.vue
+2
-2
safe-campus-bbs-uniapp/pages/mine/mine.vue
safe-campus-bbs-uniapp/pages/mine/mine.vue
+9
-1
safe-campus-bbs-uniapp/pages/topics/topics.vue
safe-campus-bbs-uniapp/pages/topics/topics.vue
+1
-1
safe-campus-bbs-uniapp/static/images/down.png
safe-campus-bbs-uniapp/static/images/down.png
+0
-0
safe-campus-bbs-uniapp/static/styles/index.scss
safe-campus-bbs-uniapp/static/styles/index.scss
+2
-1
No files found.
safe-campus-bbs-ui/src/assets/images/login-background.jpg
View replaced file @
ae2aba8a
View file @
b26f2218
509 KB
|
W:
|
H:
482 KB
|
W:
|
H:
2-up
Swipe
Onion skin
safe-campus-bbs-ui/src/components/ImageUpload/index.vue
View file @
b26f2218
...
...
@@ -87,13 +87,15 @@ export default {
watch
:
{
value
:
{
handler
(
val
)
{
debugger
if
(
val
)
{
// 首先将值转为数组
const
list
=
Array
.
isArray
(
val
)
?
val
:
this
.
value
.
split
(
'
,
'
);
// 然后将数组转为对象数组
this
.
fileList
=
list
.
map
(
item
=>
{
debugger
if
(
typeof
item
===
"
string
"
)
{
if
(
item
.
indexOf
(
this
.
baseUrl
)
===
-
1
)
{
if
(
item
.
indexOf
(
'
http
'
)
===
-
1
)
{
item
=
{
name
:
this
.
baseUrl
+
item
,
url
:
this
.
baseUrl
+
item
};
}
else
{
item
=
{
name
:
item
,
url
:
item
};
...
...
@@ -154,6 +156,8 @@ export default {
},
// 上传成功回调
handleUploadSuccess
(
res
,
file
)
{
console
.
log
(
res
,
file
)
debugger
if
(
res
.
code
===
200
)
{
this
.
uploadList
.
push
({
name
:
res
.
fileName
,
url
:
res
.
url
});
this
.
uploadedSuccessfully
();
...
...
safe-campus-bbs-ui/src/views/login.vue
View file @
b26f2218
...
...
@@ -158,7 +158,7 @@ export default {
<
style
rel=
"stylesheet/scss"
lang=
"scss"
>
.login
{
display
:
flex
;
justify-content
:
center
;
justify-content
:
flex-end
;
align-items
:
center
;
height
:
100%
;
background-image
:
url("../assets/images/login-background.jpg")
;
...
...
@@ -175,6 +175,7 @@ export default {
background
:
#ffffff
;
width
:
400px
;
padding
:
25px
25px
5px
25px
;
margin-right
:
240px
;
.el-input
{
height
:
38px
;
input
{
...
...
safe-campus-bbs-ui/src/views/moments/DetailDialog.vue
View file @
b26f2218
...
...
@@ -15,7 +15,8 @@
<div
class=
"text"
>
{{ form.content }}
</div>
<div
class=
"imgs"
v-if=
"form.attachments && form.attachments.length > 0"
>
<
template
v-for=
"(item, index) in form.attachments"
>
<img
class=
"item"
:src=
"item.url"
></img>
<el-image
class=
"item"
:src=
"item.url"
:preview-src-list=
"[item.url]"
></el-image>
<!--
<img
class=
"item"
:src=
"item.url"
></img>
-->
</
template
>
</div>
</div>
...
...
safe-campus-bbs-ui/src/views/moments/index.vue
View file @
b26f2218
...
...
@@ -7,7 +7,7 @@
<el-input
placeholder=
"请输入"
v-model=
"queryParams.content"
style=
"width: 220px;"
></el-input>
</el-form-item>
<el-form-item
label=
"创建时间"
>
<el-date-picker
placeholder=
"请选择"
value-format=
"YYYY-MM-DD
"
<el-date-picker
placeholder=
"请选择"
format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd
"
v-model=
"queryParams.createTime"
></el-date-picker>
</el-form-item>
<el-form-item>
...
...
safe-campus-bbs-ui/src/views/pointsManage/DetailDialog.vue
View file @
b26f2218
<
template
>
<el-dialog
:visible.sync=
"visible"
title=
"
兑换
明细"
width=
"70%"
>
<el-dialog
:visible.sync=
"visible"
title=
"
积分
明细"
width=
"70%"
>
<el-table
:data=
"tableList"
v-loading=
"loading"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"55"
align=
"center"
></el-table-column>
<el-table-column
label=
"明细名称"
prop=
"detailName"
align=
"center"
width=
"150"
></el-table-column>
...
...
safe-campus-bbs-ui/src/views/pointsManage/index.vue
View file @
b26f2218
...
...
@@ -91,7 +91,7 @@ export default {
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
inputPattern
:
/^
[
1-9
]\d
*$/
,
inputErrorMessage
:
'
增加积分需
大于0
'
inputErrorMessage
:
'
增加积分需
为大于0的正整数
'
}).
then
(({
value
})
=>
{
let
data
=
{
userName
:
row
.
userName
,
...
...
@@ -115,7 +115,7 @@ export default {
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
inputPattern
:
/^
[
1-9
]\d
*$/
,
inputErrorMessage
:
'
扣减积分需
大于0
'
inputErrorMessage
:
'
扣减积分需
为大于0的正整数
'
}).
then
(({
value
})
=>
{
let
data
=
{
userName
:
row
.
userName
,
...
...
safe-campus-bbs-ui/src/views/sensitives/FormDialog.vue
View file @
b26f2218
<
template
>
<el-dialog
:visible.sync=
"visible"
v-if=
"visible"
:title=
"dialogTitle"
width=
"28%"
class=
"dialog"
@
close=
"handleClose"
>
<el-form
:model=
"form"
ref=
"formRef"
:rules=
"rules"
>
<el-form
:model=
"form"
ref=
"formRef"
:rules=
"rules"
@
submit
.
native
.
prevent
>
<el-form-item
label=
"敏感词"
prop=
"name"
>
<el-input
placeholder=
"请输入"
v-model=
"form.name"
></el-input>
</el-form-item>
...
...
safe-campus-bbs-ui/src/views/sensitives/index.vue
View file @
b26f2218
<
template
>
<div
class=
"app-container"
>
<div
class=
"page-container"
>
<el-form
:model=
"queryParams"
:inline=
"true"
label-width=
"90"
>
<el-form
:model=
"queryParams"
:inline=
"true"
label-width=
"90"
@
submit
.
native
.
prevent
>
<el-form-item
label=
"敏感词"
>
<el-input
v-model=
"queryParams.name"
placeholder=
"请输入"
></el-input>
<el-input
v-model=
"queryParams.name"
placeholder=
"请输入"
@
keyup.enter.native=
"handleQuery"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleQuery"
>
查询
</el-button>
...
...
@@ -15,7 +15,7 @@
<el-button
type=
"primary"
@
click=
"handleAdd"
>
新增敏感词
</el-button>
</el-col>
<el-col
:span=
"2"
>
<el-button
type=
"primary"
plain
>
批量导入敏感词
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleImport"
>
批量导入敏感词
</el-button>
</el-col>
</el-row>
<el-table
:data=
"tableList"
>
...
...
@@ -101,7 +101,11 @@ export default {
pageSize
:
10
}
this
.
getList
()
}
},
// 导入敏感词
handleImport
(){
},
}
}
</
script
>
...
...
safe-campus-bbs-uniapp/api/api.js
View file @
b26f2218
...
...
@@ -146,4 +146,12 @@ export function delComment(commentId){
url
:
`moment/comment/delete/
${
commentId
}
`
,
method
:
'
delete
'
})
}
// 删除动态
export
function
delMonment
(
momentId
){
return
request
({
url
:
`moment/delete/
${
momentId
}
`
,
method
:
'
delete
'
})
}
\ No newline at end of file
safe-campus-bbs-uniapp/components/Comment-Item.vue
View file @
b26f2218
...
...
@@ -5,12 +5,12 @@
<view
class=
"item"
v-if=
"form.isSelf==1"
:class=
"
{'active':activeIndex==1}" @click="handleChange(1)">管理全部评论
</view>
</view>
<view
class=
"empty-box"
v-if=
"
l
ist.length == 0"
>
<view
class=
"empty-box"
v-if=
"
commentL
ist.length == 0"
>
<image
src=
"/static/images/empty.png"
class=
"icon"
></image>
<view
class=
"text"
>
期待您的经常评论~
</view>
</view>
<view
class=
"comment-display-box"
v-else
>
<view
class=
"comment-item"
v-for=
"(item,index) in
l
ist"
>
<view
class=
"comment-item"
v-for=
"(item,index) in
commentL
ist"
>
<view
class=
"user-info"
>
<view
class=
"username"
>
{{
item
.
nickName
}}
:
</view>
<view
class=
"datetime"
>
{{
item
.
createTime
}}
</view>
...
...
@@ -23,12 +23,15 @@
<view
class=
"operation-text"
>
<view
class=
"add-text"
v-if=
"form.isSelf==1&&activeIndex==1 &&item.isFeatured==0"
@
click=
"handleFeatured(item)"
>
加入精选
</view>
<view
v-if=
"form.isSelf==1&&activeIndex==1 &&item.isFeatured==1"
@
click=
"handleFeatured(item)"
>
取消精选
</view>
<view
v-if=
"form.isSelf==1&&activeIndex==1 &&item.isFeatured==1"
@
click=
"handleFeatured(item)"
>
取消精选
</view>
<view
v-if=
"form.isSelf==1&&activeIndex==1"
@
click=
"handleDelete(item)"
>
删除
</view>
</view>
</view>
</view>
<view
class=
"show-more-box"
v-if=
"commentList.length
<
total
"
@
click=
"loadMore"
>
加载更多
<image
src=
"/static/images/down.png"
class=
"icon"
></image>
</view>
</view>
...
...
@@ -41,26 +44,27 @@
import
PublishComment
from
'
./PublishComment.vue
'
;
import
{
commentFeatured
,
delComment
delComment
,
dynamicDetailComments
}
from
'
@/api/api.js
'
export
default
{
name
:
"
Comment-Item
"
,
data
()
{
return
{
commentList
:
[],
activeIndex
:
0
activeIndex
:
0
,
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
momentId
:
''
},
total
:
0
};
},
components
:
{
PublishComment
},
props
:
{
list
:
{
type
:
Object
,
default
:
()
=>
{
return
[]
}
},
form
:
{
type
:
Object
,
default
:
()
=>
{
...
...
@@ -68,39 +72,60 @@
}
}
},
watch
:
{
form
(
newVal
,
oldVal
){
console
.
log
(
newVal
,
oldVal
)
if
(
newVal
.
id
){
this
.
queryParams
.
momentId
=
newVal
.
id
;
this
.
getCommentList
()
}
}
},
onLoad
()
{
},
methods
:
{
handleChange
(
index
)
{
this
.
activeIndex
=
index
},
handleRefresh
()
{
console
.
log
(
'
222
'
)
this
.
$emit
(
'
refresh
'
)
this
.
queryParams
.
pageNum
=
1
;
this
.
getCommentList
()
},
getCommentList
()
{
dynamicDetailComments
(
this
.
queryParams
).
then
(
res
=>
{
this
.
commentList
=
[...
this
.
commentList
,...
res
.
rows
]
this
.
total
=
res
.
total
})
},
loadMore
(){
this
.
queryParams
.
pageNum
+=
1
;
this
.
getCommentList
()
},
// 回复评论
handleReplayComment
(
item
)
{
this
.
$refs
.
publishCommentRef
.
openModal
(
item
)
},
// 加入精选,取消精选
handleFeatured
(
item
){
handleFeatured
(
item
)
{
let
_this
=
this
;
let
text
=
item
.
isFeatured
==
1
?
'
取消精选
'
:
'
加入精选
'
let
text
=
item
.
isFeatured
==
1
?
'
取消精选
'
:
'
加入精选
'
let
data
=
{
momentId
:
this
.
form
.
id
,
commentId
:
item
.
id
,
featuredStatus
:
item
.
isFeatured
==
1
?
0
:
1
momentId
:
this
.
form
.
id
,
commentId
:
item
.
id
,
featuredStatus
:
item
.
isFeatured
==
1
?
0
:
1
}
uni
.
showModal
({
title
:
'
提示
'
,
content
:
`是否将评论:
${
item
.
content
}${
text
}
`
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
commentFeatured
(
data
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
commentFeatured
(
data
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
uni
.
showToast
({
title
:
`
${
text
}
成功`
title
:
`
${
text
}
成功`
})
_this
.
$emit
(
'
refresh
'
)
_this
.
getCommentList
(
)
}
})
}
else
if
(
res
.
cancel
)
{
...
...
@@ -109,19 +134,19 @@
}
});
},
handleDelete
(
item
){
handleDelete
(
item
)
{
let
_this
=
this
;
uni
.
showModal
({
title
:
'
提示
'
,
content
:
`是否确认删除评论:
${
item
.
content
}
?`
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
delComment
(
item
.
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
delComment
(
item
.
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
uni
.
showToast
({
title
:
`删除成功`
title
:
`删除成功`
})
_this
.
$emit
(
'
refresh
'
)
_this
.
getCommentList
(
)
}
})
}
else
if
(
res
.
cancel
)
{
...
...
@@ -231,4 +256,17 @@
}
}
}
</
style
>
.show-more-box
{
height
:
60rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
color
:
#BBBBBB
;
font-size
:
24rpx
;
.icon
{
width
:
32rpx
;
height
:
32rpx
;
}
}
</
style
>
\ No newline at end of file
safe-campus-bbs-uniapp/components/Dynamic-Item.vue
View file @
b26f2218
<
template
>
<view>
<view
class=
"dynamic-item"
@
click=
"toDynamicDetailPage"
>
<view
class=
"user-info-box"
>
<view
class=
"user-info-box"
style=
"position: relative;"
>
<image
class=
"avatar"
src=
"/static/images/default-avatar.png"
></image>
<view
class=
"user-name"
>
{{
form
.
nickName
}}
</view>
<image
class=
"more-icon"
src=
"/static/images/more-icon.png"
></image>
<image
v-if=
"!deleteable"
class=
"more-icon"
src=
"/static/images/more-icon.png"
></image>
<image
v-if=
"deleteable"
class=
"more-icon"
@
click.stop=
"handleDelDynamics"
src=
"/static/images/more-icon.png"
></image>
<!-- 删除按钮 -->
<view
class=
"del-btn"
v-if=
"showDelBtn"
@
click.stop=
"handleDel"
:style=
"'left:' + clientX + 'rpx;' +'top:' + clientY + 'rpx'"
>
删除动态
</view>
</view>
<view
class=
"topics-box"
v-if=
"form.topicNames && form.topicNames.length >0"
>
<template
v-for=
"(name,index) in form.topicNames"
>
...
...
@@ -15,7 +20,7 @@
<view
class=
"text"
>
{{form.content}}
</view>
<view
class=
"imgs"
v-if=
"form.type=='IMAGE'&&form.attachments && form.attachments.length > 0"
>
<
template
v-for=
"(item,index) in form.attachments"
>
<image
class=
"item"
:src=
"item.url"
></image>
<image
class=
"item"
:src=
"item.url"
@
click.stop=
"preview(item.url)"
></image>
</
template
>
</view>
<view
class=
"imgs"
v-if=
"form.type=='VIDEO'&&form.attachments && form.attachments.length > 0"
>
...
...
@@ -46,33 +51,41 @@
</view>
<view
class=
"pk-imgs"
v-if=
"form.voteOptionType=='IMAGE' && form.voteOptions.length>0 "
>
<
template
v-for=
"(item,index) in form.voteOptions"
>
<image
:src=
"item.imageUrl"
class=
"img"
></image>
<image
:src=
"item.imageUrl"
@
click.stop=
"preview(item.imageUrl)"
class=
"img"
></image>
</
template
>
</view>
<!-- 未投票 -->
<view
v-if=
"form.isVote==0"
>
<view
class=
"pk-btns"
v-if=
"form.voteOptions.length>0 "
>
<view
class=
"btns red-btn"
@
click.stop=
"handleVote(form.voteOptions[0])"
>
{{form.voteOptions[0].name}}
</view>
{{form.voteOptions[0].name}}
</view>
<image
src=
"/static/images/pk-img.png"
class=
"img"
></image>
<view
class=
"btns blue-btn"
@
click.stop=
"handleVote(form.voteOptions[1])"
>
{{form.voteOptions[1].name}}
</view>
{{form.voteOptions[1].name}}
</view>
</view>
<view
class=
"pk-tips"
>
点击上方按钮,选择你的观点
</view>
</view>
<!-- 已投票,显示投票结果 -->
<view
v-if=
"form.isVote==1"
>
<view
class=
"pk-results"
>
<view
class=
"left"
@
click.stop=
"toPKDetailPage(0)"
>
<view
v-if=
"form.isVote==1"
>
<view
class=
"pk-results"
>
<view
class=
"left"
@
click.stop=
"toPKDetailPage(0)"
>
<view
class=
"left-num"
>
{{form.voteOptions[0].name}} {{form.voteOptions[0].voteCount}}
</view>
<view
class=
"results-item left-item"
></view>
</view>
<view
class=
"right"
@
click.stop=
"toPKDetailPage(1)"
>
<view
class=
"right-num"
>
{{form.voteOptions[1].name}} {{form.voteOptions[1].voteCount}}
</view>
<view
class=
"right-num"
>
{{form.voteOptions[1].name}} {{form.voteOptions[1].voteCount}}
</view>
</view>
</view>
<view
class=
"pk-results"
>
<view
class=
"left"
:style=
"'flex:' + form.voteOptions[0].voteCount"
@
click.stop=
"toPKDetailPage(0)"
>
<view
class=
"results-item left-item"
></view>
</view>
<view
class=
"right"
:style=
"'flex:' + form.voteOptions[1].voteCount"
@
click.stop=
"toPKDetailPage(1)"
>
<view
class=
"results-item right-item"
></view>
</view>
</view>
<view
class=
"results-sum"
@
click.stop=
"toPKDetailPage(0)"
>
<view>
{{form.voteCount}}人参与
</view>
<image
src=
"/static/images/detail-icon.png"
class=
"icon"
></image>
...
...
@@ -87,7 +100,8 @@
<view
class=
"username"
>
{{item.nickName}}:
</view>
<view
class=
"datetime"
>
2025-07-01 04:21:21
</view>
</view>
<view
class=
"content"
v-if=
"!item.replyNikeName"
@
click.stop=
"handleReplayComment(item)"
>
{{item.content}}
</view>
<view
class=
"content"
v-if=
"!item.replyNikeName"
@
click.stop=
"handleReplayComment(item)"
>
{{item.content}}
</view>
<view
class=
"content"
v-else
@
click.stop=
"handleReplayComment(item)"
>
回复
<span
style=
"color: #0058B6;"
>
{{item.replyNikeName}}:
</span>
:{{item.content}}
</view>
...
...
@@ -98,13 +112,15 @@
</view>
<!-- 发布评论区 -->
<publish-comment
:form=
"form"
ref=
"publishCommentRef"
@
refresh=
"$emit('refresh')"
></publish-comment>
</view>
</template>
<
script
>
import
{
dynamicLikeUnlike
,
delMonment
,
dynamicVote
}
from
'
@/api/api.js
'
import
PublishComment
from
'
./PublishComment.vue
'
;
...
...
@@ -115,15 +131,22 @@
commentList
:
[{},
{}],
showComment
:
false
,
commentContent
:
''
,
clientX
:
0
,
clientY
:
0
,
showDelBtn
:
false
};
},
components
:{
components
:
{
PublishComment
},
props
:
{
form
:
{
type
:
Object
,
default
:
{}
},
deleteable
:
{
type
:
Boolean
,
default
:
false
}
},
methods
:
{
...
...
@@ -133,9 +156,17 @@
momentId
:
this
.
form
.
id
,
likeStatus
}
if
(
likeStatus
==
'
1
'
){
this
.
form
.
likeCount
=
this
.
form
.
likeCount
+
1
this
.
form
.
isLike
=
1
}
if
(
likeStatus
==
'
0
'
){
this
.
form
.
likeCount
=
this
.
form
.
likeCount
-
1
this
.
form
.
isLike
=
0
}
dynamicLikeUnlike
(
data
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$emit
(
'
refresh
'
)
//
this.$emit('refresh')
}
})
...
...
@@ -146,11 +177,39 @@
this
.
$refs
.
publishCommentRef
.
openModal
()
},
// 回复评论
handleReplayComment
(
item
){
handleReplayComment
(
item
)
{
console
.
log
(
item
)
this
.
$refs
.
publishCommentRef
.
openModal
(
item
)
},
// 展示删除动态按钮
handleDelDynamics
(
e
)
{
this
.
showDelBtn
=
!
this
.
showDelBtn
this
.
clientX
=
(
e
.
target
.
offsetLeft
*
2
-
148
);
this
.
clientY
=
((
e
.
target
.
offsetTop
*
2
)
+
34
);
},
// 删除动态
handleDel
(){
let
_this
=
this
;
uni
.
showModal
({
title
:
'
提示
'
,
content
:
'
是否确认删除动态?
'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
delMonment
(
_this
.
form
.
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
uni
.
showToast
({
title
:
'
删除成功
'
,
})
_this
.
$emit
(
'
refresh
'
);
uni
.
$emit
(
'
hanldeDynamicRefresh
'
)
}
})
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'
用户点击取消
'
);
}
}
});
},
// 投票
handleVote
(
item
)
{
let
data
=
{
...
...
@@ -167,9 +226,15 @@
}
})
},
// 预览
preview
(
url
)
{
uni
.
previewImage
({
urls
:
[
url
]
});
},
toDynamicDetailPage
()
{
let
pathName
=
window
.
location
.
pathname
if
(
pathName
.
indexOf
(
'
/pages/dynamic-detail/dynamic-detail
'
)
>
-
1
)
{
if
(
pathName
.
indexOf
(
'
/pages/dynamic-detail/dynamic-detail
'
)
>
-
1
)
{
return
;
}
uni
.
navigateTo
({
...
...
@@ -195,4 +260,17 @@
<
style
lang=
"scss"
>
@import
'@/static/styles/index.scss'
;
</
style
>
.del-btn
{
position
:
absolute
;
width
:
168rpx
;
height
:
68rpx
;
line-height
:
68rpx
;
border-radius
:
6rpx
;
background-color
:
rgba
(
255
,
255
,
255
,
1
);
color
:
rgba
(
102
,
102
,
102
,
1
);
font-size
:
26rpx
;
text-align
:
center
;
box-shadow
:
0px
2px
12rpx
0px
rgba
(
0
,
0
,
0
,
0
.2
);
}
</
style
>
\ No newline at end of file
safe-campus-bbs-uniapp/components/ImageUpload.vue
View file @
b26f2218
...
...
@@ -405,7 +405,7 @@
width
:
20px
;
height
:
20px
;
border-radius
:
100%
;
z-index
:
9
99
;
z-index
:
9
00
;
}
}
...
...
safe-campus-bbs-uniapp/components/PublishComment.vue
View file @
b26f2218
<
template
>
<view
class=
"comment-dialog-shadow"
v-if=
"showComment"
>
<view
class=
"comment-edit-box"
>
<textarea
v-model=
"commentContent"
:placeholder=
"placeholder"
class=
"textarea"
></textarea>
<textarea
v-model=
"commentContent"
maxlength=
"120"
:placeholder=
"placeholder"
class=
"textarea"
></textarea>
<view
class=
"btns"
>
<button
class=
"btn"
size=
"mini"
@
click=
"handleCloseComment"
>
取消
</button>
<button
class=
"btn"
size=
"mini"
type=
"primary"
@
click=
"handlePublishComment"
>
确定
</button>
...
...
@@ -18,7 +18,7 @@
return
{
showComment
:
false
,
commentContent
:
''
,
placeholder
:
'
请输入评论
'
,
placeholder
:
'
请输入评论
(最多输入120字)
'
,
parentId
:
''
,
};
},
...
...
safe-campus-bbs-uniapp/pages/dynamic-detail/dynamic-detail.vue
View file @
b26f2218
...
...
@@ -2,7 +2,7 @@
<view
class=
"detail-page-container"
>
<dynamic-item
:form=
"form"
@
refresh=
"handleRefresh"
></dynamic-item>
<!-- 评论管理区 -->
<comment-item
:list=
"commentList"
:form=
"form"
@
refresh=
"getCommentList"
></comment-item>
<comment-item
:form=
"form"
></comment-item>
</view>
</
template
>
...
...
@@ -28,7 +28,7 @@
this
.
momentId
=
momentId
;
this
.
queryParams
.
momentId
=
momentId
this
.
getDetail
()
this
.
getCommentList
()
//
this.getCommentList()
},
components
:
{
DynamicItem
,
...
...
safe-campus-bbs-uniapp/pages/mine/mine.vue
View file @
b26f2218
...
...
@@ -31,7 +31,7 @@
<!-- 我发的动态 -->
<scroll-view
class=
"my-dynamics"
scroll-y
:show-scrollbar=
"false"
v-if=
"list.length >0"
@
scrolltolower=
"loadMore"
>
<template
v-for=
"(item,index) in list"
>
<dynamic-item
:form=
"item"
@
refresh=
"
getList
"
></dynamic-item>
<dynamic-item
:form=
"item"
@
refresh=
"
handleRefresh"
:deleteable=
"true
"
></dynamic-item>
</
template
>
</scroll-view>
<scroll-view
class=
"my-dynamics"
scroll-y
:show-scrollbar=
"false"
v-if=
"list.length==0"
>
...
...
@@ -72,6 +72,8 @@
},
onShow
()
{
this
.
getStatistics
();
this
.
list
=
[];
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
()
},
methods
:
{
...
...
@@ -88,6 +90,12 @@
this
.
analysisData
=
res
.
data
})
},
handleRefresh
(){
this
.
getStatistics
();
this
.
list
=
[];
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
()
},
// 获取当前用户动态列表
getList
()
{
uni
.
showLoading
({
...
...
safe-campus-bbs-uniapp/pages/topics/topics.vue
View file @
b26f2218
...
...
@@ -2,7 +2,7 @@
<view
class=
"page-container topics-page"
>
<view
class=
"search-box-common"
>
<image
src=
"/static/images/search-icon.png"
class=
"search-icon"
></image>
<input
placeholder=
"搜索"
placeholder-class=
"placeholder-class"
/>
<input
placeholder=
"搜索"
style=
"width: 100%;"
placeholder-class=
"placeholder-class"
/>
</view>
<view
class=
"hot-container"
>
<view
class=
"hot-tag-box"
>
...
...
safe-campus-bbs-uniapp/static/images/down.png
0 → 100644
View file @
b26f2218
362 Bytes
safe-campus-bbs-uniapp/static/styles/index.scss
View file @
b26f2218
...
...
@@ -193,7 +193,6 @@
.results-item
{
width
:
100%
;
height
:
12rpx
;
background-color
:
rgba
(
238
,
238
,
238
,
1
);
color
:
rgba
(
255
,
255
,
255
,
1
);
font-size
:
28rpx
;
...
...
@@ -201,10 +200,12 @@
.left-item
{
border-radius
:
6rpx
0
0
6rpx
;
margin-right
:
10rpx
;
background-color
:
rgba
(
255
,
100
,
95
,
1
);
}
.right-item
{
border-radius
:
0
6rpx
6rpx
0
;
margin-left
:
10rpx
;
background-color
:
rgba
(
52
,
132
,
253
,
1
);
}
}
...
...
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