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
2dc614da
Commit
2dc614da
authored
Nov 07, 2025
by
万成波
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
3f1dfa85
a659c077
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
380 additions
and
43 deletions
+380
-43
safe-campus-bbs-ui/src/api/comment/index.js
safe-campus-bbs-ui/src/api/comment/index.js
+9
-0
safe-campus-bbs-ui/src/api/pointsExchange/index.js
safe-campus-bbs-ui/src/api/pointsExchange/index.js
+10
-1
safe-campus-bbs-ui/src/api/pointsManage/index.js
safe-campus-bbs-ui/src/api/pointsManage/index.js
+9
-0
safe-campus-bbs-ui/src/components/UserSelect/index.vue
safe-campus-bbs-ui/src/components/UserSelect/index.vue
+2
-5
safe-campus-bbs-ui/src/components/UserSelect/input.vue
safe-campus-bbs-ui/src/components/UserSelect/input.vue
+1
-1
safe-campus-bbs-ui/src/views/comment/index.vue
safe-campus-bbs-ui/src/views/comment/index.vue
+17
-1
safe-campus-bbs-ui/src/views/moments/index.vue
safe-campus-bbs-ui/src/views/moments/index.vue
+9
-3
safe-campus-bbs-ui/src/views/pointsExchange/BatchExchange.vue
...-campus-bbs-ui/src/views/pointsExchange/BatchExchange.vue
+115
-0
safe-campus-bbs-ui/src/views/pointsExchange/index.vue
safe-campus-bbs-ui/src/views/pointsExchange/index.vue
+14
-8
safe-campus-bbs-ui/src/views/pointsManage/BatchAddPoints.vue
safe-campus-bbs-ui/src/views/pointsManage/BatchAddPoints.vue
+113
-0
safe-campus-bbs-ui/src/views/pointsManage/index.vue
safe-campus-bbs-ui/src/views/pointsManage/index.vue
+14
-2
safe-campus-bbs-uniapp/components/Comment-Item.vue
safe-campus-bbs-uniapp/components/Comment-Item.vue
+2
-0
safe-campus-bbs-uniapp/components/Dynamic-Item.vue
safe-campus-bbs-uniapp/components/Dynamic-Item.vue
+1
-1
safe-campus-bbs-uniapp/pages/index/index.vue
safe-campus-bbs-uniapp/pages/index/index.vue
+57
-21
safe-campus-bbs-uniapp/static/styles/index.scss
safe-campus-bbs-uniapp/static/styles/index.scss
+7
-0
No files found.
safe-campus-bbs-ui/src/api/comment/index.js
View file @
2dc614da
...
@@ -24,4 +24,13 @@ export function delData(id) {
...
@@ -24,4 +24,13 @@ export function delData(id) {
url
:
`/bbs/moment/comment/
${
id
}
`
,
url
:
`/bbs/moment/comment/
${
id
}
`
,
method
:
'
delete
'
method
:
'
delete
'
})
})
}
// 置顶/取消置顶
export
function
isTopData
(
data
){
return
request
({
url
:
'
/bbs/moment/comment/top
'
,
method
:
'
post
'
,
data
})
}
}
\ No newline at end of file
safe-campus-bbs-ui/src/api/pointsExchange/index.js
View file @
2dc614da
...
@@ -41,4 +41,13 @@ export function exchange(data){
...
@@ -41,4 +41,13 @@ export function exchange(data){
method
:
'
post
'
,
method
:
'
post
'
,
data
data
})
})
}
}
\ No newline at end of file
// 批量兑换
export
function
batchExchange
(
data
){
return
request
({
url
:
'
/bbs/points/exchange/batch/exchange
'
,
method
:
'
post
'
,
data
})
}
safe-campus-bbs-ui/src/api/pointsManage/index.js
View file @
2dc614da
...
@@ -70,3 +70,12 @@ export function updatePointsSetting(data){
...
@@ -70,3 +70,12 @@ export function updatePointsSetting(data){
data
data
})
})
}
}
// 批量增加积分
export
function
batchAddPoints
(
data
){
return
request
({
url
:
'
/bbs/points/user/points/batch/incr
'
,
method
:
'
put
'
,
data
})
}
safe-campus-bbs-ui/src/components/UserSelect/index.vue
View file @
2dc614da
...
@@ -13,13 +13,13 @@
...
@@ -13,13 +13,13 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
v-if=
"selectDataList.length > 0"
class=
"mb20"
>
<div
v-if=
"selectDataList.length > 0"
class=
"mb20"
>
<el-tag
v-for=
"tag in selectDataList"
:key=
"tag.userName"
closable
>
<el-tag
v-for=
"tag in selectDataList"
:key=
"tag.userName"
closable
style=
"margin-right: 5px;"
>
{{
tag
.
nickName
}}
{{
tag
.
nickName
}}
</el-tag>
</el-tag>
</div>
</div>
<el-table
ref=
"tableRef"
row-key=
"userName"
:data=
"list"
@
selection-change=
"handleCheckboxChange"
<el-table
ref=
"tableRef"
row-key=
"userName"
:data=
"list"
@
selection-change=
"handleCheckboxChange"
v-loading=
"loading"
>
v-loading=
"loading"
>
<el-table-column
type=
"selection"
width=
"60"
></el-table-column>
<el-table-column
type=
"selection"
width=
"60"
align=
"center"
></el-table-column>
<el-table-column
label=
"姓名"
prop=
"nickName"
align=
"center"
></el-table-column>
<el-table-column
label=
"姓名"
prop=
"nickName"
align=
"center"
></el-table-column>
<el-table-column
label=
"用户名"
prop=
"userName"
align=
"center"
></el-table-column>
<el-table-column
label=
"用户名"
prop=
"userName"
align=
"center"
></el-table-column>
</el-table>
</el-table>
...
@@ -126,9 +126,6 @@ export default {
...
@@ -126,9 +126,6 @@ export default {
}
}
},
},
handleClose
()
{
handleClose
()
{
// this.selectDataList = [];
// this.list = [];
// this.total = 0;
this
.
visible
=
false
this
.
visible
=
false
},
},
handleConfirm
()
{
handleConfirm
()
{
...
...
safe-campus-bbs-ui/src/components/UserSelect/input.vue
View file @
2dc614da
...
@@ -71,7 +71,7 @@ export default {
...
@@ -71,7 +71,7 @@ export default {
},
},
handleUserChange
(
val
)
{
handleUserChange
(
val
)
{
pointsDetail
(
val
).
then
(
res
=>
{
pointsDetail
(
val
).
then
(
res
=>
{
if
(
val
)
{
if
(
val
&&
res
.
data
)
{
this
.
selectName
=
res
.
data
.
nickName
;
this
.
selectName
=
res
.
data
.
nickName
;
}
}
})
})
...
...
safe-campus-bbs-ui/src/views/comment/index.vue
View file @
2dc614da
...
@@ -29,6 +29,8 @@
...
@@ -29,6 +29,8 @@
<el-table-column
label=
"操作"
align=
"center"
>
<el-table-column
label=
"操作"
align=
"center"
>
<template
#default
="
{ row }">
<template
#default
="
{ row }">
<el-button
type=
"text"
@
click=
"handleDelete(row)"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(row)"
>
删除
</el-button>
<el-button
type=
"text"
v-if=
"!row.isTop"
@
click=
"handleTop(row, 1)"
>
置顶
</el-button>
<el-button
type=
"text"
v-if=
"row.isTop == 1"
@
click=
"handleTop(row, 0)"
>
取消置顶
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -41,7 +43,7 @@
...
@@ -41,7 +43,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
listData
,
delData
}
from
'
@/api/comment
'
;
import
{
listData
,
delData
,
isTopData
}
from
'
@/api/comment
'
;
export
default
{
export
default
{
name
:
'
Sensitives
'
,
name
:
'
Sensitives
'
,
...
@@ -91,6 +93,20 @@ export default {
...
@@ -91,6 +93,20 @@ export default {
pageSize
:
10
pageSize
:
10
}
}
this
.
getList
()
this
.
getList
()
},
// 置顶/取消置顶
handleTop
(
row
,
isTop
)
{
let
text
=
isTop
==
'
0
'
?
'
取消置顶
'
:
'
置顶
'
let
data
=
{
isTop
,
commentId
:
row
.
id
}
this
.
$modal
.
confirm
(
`确认要
${
text
}
评论内容为:
${
row
.
content
}
的数据吗?`
).
then
(
function
()
{
return
isTopData
(
data
);
}).
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
text
+
"
成功
"
);
this
.
getList
()
})
}
}
}
}
}
}
...
...
safe-campus-bbs-ui/src/views/moments/index.vue
View file @
2dc614da
...
@@ -3,10 +3,16 @@
...
@@ -3,10 +3,16 @@
<div
class=
"page-container"
>
<div
class=
"page-container"
>
<el-form
:model=
"queryParams"
:inline=
"true"
label-width=
"80px"
>
<el-form
:model=
"queryParams"
:inline=
"true"
label-width=
"80px"
>
<el-form-item
label=
"动态内容"
>
<el-form-item
label=
"动态内容"
>
<el-input
placeholder=
"请输入"
v-model=
"queryParams.content"
style=
"width: 2
0
0px;"
></el-input>
<el-input
placeholder=
"请输入"
v-model=
"queryParams.content"
style=
"width: 2
4
0px;"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"话题"
>
<el-form-item
label=
"话题"
>
<el-input
placeholder=
"请输入"
v-model=
"queryParams.topicNames"
style=
"width: 200px;"
></el-input>
<el-input
placeholder=
"请输入"
v-model=
"queryParams.topicNames"
style=
"width: 240px;"
></el-input>
</el-form-item>
<el-form-item
label=
"姓名"
>
<el-input
placeholder=
"请输入"
v-model=
"queryParams.nickName"
style=
"width: 240px;"
></el-input>
</el-form-item>
<el-form-item
label=
"学工号"
>
<el-input
placeholder=
"请输入"
v-model=
"queryParams.userName"
style=
"width: 240px;"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"创建时间"
>
<el-form-item
label=
"创建时间"
>
<el-date-picker
placeholder=
"请选择"
type=
"daterange"
format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
<el-date-picker
placeholder=
"请选择"
type=
"daterange"
format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
...
@@ -42,7 +48,7 @@
...
@@ -42,7 +48,7 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"话题"
align=
"center"
prop=
"topicNames"
width=
"200"
></el-table-column>
<el-table-column
label=
"话题"
align=
"center"
prop=
"topicNames"
width=
"200"
></el-table-column>
<el-table-column
label=
"
帐
号"
prop=
"userName"
align=
"center"
width=
"140"
></el-table-column>
<el-table-column
label=
"
学工
号"
prop=
"userName"
align=
"center"
width=
"140"
></el-table-column>
<el-table-column
label=
"姓名"
prop=
"nickName"
align=
"center"
width=
"120"
></el-table-column>
<el-table-column
label=
"姓名"
prop=
"nickName"
align=
"center"
width=
"120"
></el-table-column>
<el-table-column
label=
"部门(班级)"
prop=
"deptName"
align=
"center"
width=
"120"
></el-table-column>
<el-table-column
label=
"部门(班级)"
prop=
"deptName"
align=
"center"
width=
"120"
></el-table-column>
<el-table-column
label=
"上级部门(学院)"
prop=
"fullDeptName"
align=
"center"
width=
"160"
></el-table-column>
<el-table-column
label=
"上级部门(学院)"
prop=
"fullDeptName"
align=
"center"
width=
"160"
></el-table-column>
...
...
safe-campus-bbs-ui/src/views/pointsExchange/BatchExchange.vue
0 → 100644
View file @
2dc614da
<
template
>
<el-dialog
:visible.sync=
"visible"
v-if=
"visible"
title=
"批量兑换"
:close-on-click-modal=
"false"
width=
"36%"
class=
"dialog"
@
close=
"handleClose"
>
<el-form
:model=
"form"
ref=
"formRef"
label-position=
"top"
:rules=
"rules"
>
<el-form-item
label=
"用户名"
prop=
"userName"
>
<UserSelectInput
v-model=
"form.userName"
:value.sync=
"form.userName"
:multiple=
"true"
@
getValue=
"getNickName"
placeholder=
"请选择用户"
></UserSelectInput>
</el-form-item>
<el-form-item
label=
"商品"
prop=
"goodsCode"
>
<GoodsSelectInput
:value.sync=
"form.goodsCode"
placeholder=
"请选择兑换商品"
></GoodsSelectInput>
</el-form-item>
</el-form>
<template
#footer
>
<el-button
@
click=
"handleClose"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
</
template
>
</el-dialog>
</template>
<
script
>
// import { pointsExchange, exchange } from '@/api/pointsExchange'
import
{
batchExchange
}
from
'
@/api/pointsExchange
'
;
import
UserSelectInput
from
'
@/components/UserSelect/input
'
import
GoodsSelectInput
from
'
@/components/GoodsSelect/input
'
export
default
{
data
()
{
return
{
visible
:
false
,
form
:
{},
userList
:
[],
optionList
:
[],
rules
:
{
userName
:
[{
required
:
true
,
message
:
'
请选择用户
'
,
trigger
:
[
'
blur
'
,
'
change
'
]
}],
goodsCode
:
[{
required
:
true
,
message
:
'
请选择商品
'
,
trigger
:
[
'
blur
'
,
'
change
'
]
}]
},
disabled
:
false
}
},
components
:
{
UserSelectInput
,
GoodsSelectInput
},
// watch: {
// "form.userName": {
// handler: function (val, oVal) {
// console.log(val, oVal)
// if (val) {
// this.formatData(val)
// }
// }
// },
// deep: true,
// immediate: true
// },
methods
:
{
// 打开兑换窗口
openModal
(
row
)
{
this
.
visible
=
true
;
},
getNickName
(
val
,
name
)
{
this
.
formatData
(
val
,
name
);
},
formatData
(
val
,
name
)
{
let
users
=
[];
let
userNames
=
val
.
split
(
'
,
'
)
let
nickNames
=
name
.
split
(
'
,
'
)
userNames
.
forEach
((
item
,
index
)
=>
{
users
.
push
({
nickName
:
nickNames
[
index
],
userName
:
item
})
})
if
(
users
.
length
>
0
)
{
this
.
form
.
users
=
users
;
}
},
handleConfirm
()
{
let
{
users
,
goodsCode
}
=
this
.
form
;
let
data
=
{
users
,
goodsCode
}
this
.
$refs
.
formRef
.
validate
((
valid
)
=>
{
if
(
valid
)
{
batchExchange
(
data
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
.
length
==
0
)
{
this
.
$modal
.
msgSuccess
(
'
批量兑换商品成功
'
)
}
else
{
let
userName
=
res
.
data
.
map
((
item
)
=>
{
return
item
.
userName
;
}).
join
(
'
,
'
)
let
msg
=
`失败:
${
res
.
data
.
length
}
条,失败用户:
${
userName
}
`
this
.
$alert
(
"
<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>
"
+
msg
+
"
</div>
"
,
"
结果
"
,
{
dangerouslyUseHTMLString
:
true
});
}
this
.
handleClose
()
this
.
$emit
(
'
handleOk
'
);
}
else
{
this
.
$modal
.
msgError
(
res
.
msg
||
"
批量兑换商品失败
"
);
}
})
}
})
},
handleClose
()
{
this
.
form
=
{}
this
.
visible
=
false
}
}
}
</
script
>
<
style
lang=
"scss"
>
.dialog
{
.el-dialog__body
{
padding
:
0
20px
!
important
;
}
}
</
style
>
safe-campus-bbs-ui/src/views/pointsExchange/index.vue
View file @
2dc614da
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<el-input
placeholder=
"请输入"
v-model=
"queryParams.nickName"
style=
"width: 220px;"
></el-input>
<el-input
placeholder=
"请输入"
v-model=
"queryParams.nickName"
style=
"width: 220px;"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"兑换商品"
>
<el-form-item
label=
"兑换商品"
>
<el-input
placeholder=
"请输入"
v-model=
"queryParams.goodsName"
style=
"width: 220px;"
></el-input>
<el-input
placeholder=
"请输入"
v-model=
"queryParams.goodsName"
style=
"width: 220px;"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"handleQuery"
>
查询
</el-button>
...
@@ -18,11 +18,10 @@
...
@@ -18,11 +18,10 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-row
class=
"mb10"
>
<el-row
class=
"mb10"
>
<el-col
:span=
"2"
>
<el-col
:span=
"2
4
"
>
<el-button
type=
"primary"
@
click=
"handleAdd"
>
积分兑换
</el-button>
<el-button
type=
"primary"
@
click=
"handleAdd"
>
积分兑换
</el-button>
</el-col>
<el-col
:span=
"2"
>
<el-button
type=
"primary"
plain
@
click=
"handleExport"
>
导出积分明细
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleExport"
>
导出积分明细
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleBatchExchange"
>
批量兑换
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
<el-table
:data=
"tableList"
>
<el-table
:data=
"tableList"
>
...
@@ -40,12 +39,15 @@
...
@@ -40,12 +39,15 @@
</div>
</div>
<!-- 积分兑换 -->
<!-- 积分兑换 -->
<exchange-dialog
ref=
"exchangeDialogRef"
@
handleOk=
"handleReset"
></exchange-dialog>
<exchange-dialog
ref=
"exchangeDialogRef"
@
handleOk=
"handleReset"
></exchange-dialog>
<!-- 批量兑换 -->
<batch-exchange
ref=
"batchExchangeRef"
@
handleOk=
"handleReset"
></batch-exchange>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
listData
,
pointsExchange
}
from
'
@/api/pointsExchange
'
;
import
{
listData
,
pointsExchange
}
from
'
@/api/pointsExchange
'
;
import
ExchangeDialog
from
'
../pointsManage/ExchangeDialog.vue
'
;
import
ExchangeDialog
from
'
../pointsManage/ExchangeDialog.vue
'
;
import
BatchExchange
from
'
./BatchExchange.vue
'
;
export
default
{
export
default
{
name
:
'
PointsExchange
'
,
name
:
'
PointsExchange
'
,
data
()
{
data
()
{
...
@@ -61,7 +63,8 @@ export default {
...
@@ -61,7 +63,8 @@ export default {
}
}
},
},
components
:
{
components
:
{
ExchangeDialog
ExchangeDialog
,
BatchExchange
},
},
created
()
{
created
()
{
...
@@ -105,8 +108,8 @@ export default {
...
@@ -105,8 +108,8 @@ export default {
},
`积分明细_
${
new
Date
().
getTime
()}
.xlsx`
)
},
`积分明细_
${
new
Date
().
getTime
()}
.xlsx`
)
},
},
// 时间段选择
// 时间段选择
dateChange
(
val
){
dateChange
(
val
)
{
if
(
val
.
length
>
0
)
{
if
(
val
.
length
>
0
)
{
this
.
queryParams
[
'
params[startTime]
'
]
=
val
[
0
]
this
.
queryParams
[
'
params[startTime]
'
]
=
val
[
0
]
this
.
queryParams
[
'
params[endTime]
'
]
=
val
[
1
]
this
.
queryParams
[
'
params[endTime]
'
]
=
val
[
1
]
}
}
...
@@ -124,7 +127,10 @@ export default {
...
@@ -124,7 +127,10 @@ export default {
}
}
this
.
dateRange
=
[]
this
.
dateRange
=
[]
this
.
getList
()
this
.
getList
()
}
},
handleBatchExchange
(){
this
.
$refs
.
batchExchangeRef
.
openModal
()
},
}
}
}
}
</
script
>
</
script
>
...
...
safe-campus-bbs-ui/src/views/pointsManage/BatchAddPoints.vue
0 → 100644
View file @
2dc614da
<
template
>
<el-dialog
:visible.sync=
"visible"
v-if=
"visible"
title=
"批量增加积分"
:close-on-click-modal=
"false"
width=
"36%"
class=
"dialog"
@
close=
"handleClose"
>
<el-form
:model=
"form"
ref=
"formRef"
label-position=
"top"
:rules=
"rules"
>
<el-form-item
label=
"用户名"
prop=
"userName"
>
<UserSelectInput
v-model=
"form.userName"
:value.sync=
"form.userName"
:multiple=
"true"
@
getValue=
"getNickName"
placeholder=
"请选择用户"
></UserSelectInput>
</el-form-item>
<el-form-item
label=
"积分"
prop=
"points"
>
<el-input
v-model=
"form.points"
placeholder=
"请输入"
></el-input>
</el-form-item>
</el-form>
<template
#footer
>
<el-button
@
click=
"handleClose"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
</
template
>
</el-dialog>
</template>
<
script
>
// import { pointsExchange, exchange } from '@/api/pointsExchange'
import
{
batchAddPoints
}
from
'
@/api/pointsManage
'
;
import
UserSelectInput
from
'
@/components/UserSelect/input
'
export
default
{
data
()
{
return
{
visible
:
false
,
form
:
{},
userList
:
[],
optionList
:
[],
rules
:
{
userName
:
[{
required
:
true
,
message
:
'
请选择用户
'
,
trigger
:
[
'
blur
'
,
'
change
'
]
}],
points
:
[{
required
:
true
,
message
:
'
请输入积分
'
,
trigger
:
[
'
blur
'
,
'
change
'
]
}]
},
disabled
:
false
}
},
components
:
{
UserSelectInput
,
},
// watch: {
// "form.userName": {
// handler: function (val, oVal) {
// console.log(val, oVal)
// if (val) {
// this.formatData(val)
// }
// }
// },
// deep: true,
// immediate: true
// },
methods
:
{
// 打开兑换窗口
openModal
(
row
)
{
this
.
visible
=
true
;
},
getNickName
(
val
,
name
)
{
this
.
formatData
(
val
,
name
);
},
formatData
(
val
,
name
)
{
let
users
=
[];
let
userNames
=
val
.
split
(
'
,
'
)
let
nickNames
=
name
.
split
(
'
,
'
)
userNames
.
forEach
((
item
,
index
)
=>
{
users
.
push
({
nickName
:
nickNames
[
index
],
userName
:
item
})
})
if
(
users
.
length
>
0
)
{
this
.
form
.
users
=
users
;
}
},
handleConfirm
()
{
let
{
users
,
points
}
=
this
.
form
;
let
data
=
{
users
,
points
}
this
.
$refs
.
formRef
.
validate
((
valid
)
=>
{
if
(
valid
)
{
batchAddPoints
(
data
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
.
length
==
0
)
{
this
.
$modal
.
msgSuccess
(
'
批量添加积分成功
'
)
}
else
{
let
userName
=
res
.
data
.
map
((
item
)
=>
{
return
item
.
userName
;
}).
join
(
'
,
'
)
let
msg
=
`失败:
${
res
.
data
.
length
}
条,失败用户:
${
userName
}
`
this
.
$alert
(
"
<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>
"
+
msg
+
"
</div>
"
,
"
结果
"
,
{
dangerouslyUseHTMLString
:
true
});
}
this
.
handleClose
()
this
.
$emit
(
'
handleOk
'
);
}
else
{
this
.
$modal
.
msgError
(
res
.
msg
||
"
批量添加积分失败
"
);
}
})
}
})
},
handleClose
()
{
this
.
form
=
{}
this
.
visible
=
false
}
}
}
</
script
>
<
style
lang=
"scss"
>
.dialog
{
.el-dialog__body
{
padding
:
0
20px
!
important
;
}
}
</
style
>
safe-campus-bbs-ui/src/views/pointsManage/index.vue
View file @
2dc614da
...
@@ -14,8 +14,12 @@
...
@@ -14,8 +14,12 @@
<el-col
:span=
"2"
>
<el-col
:span=
"2"
>
<el-button
type=
"primary"
@
click=
"handleAdd"
>
积分规则设置
</el-button>
<el-button
type=
"primary"
@
click=
"handleAdd"
>
积分规则设置
</el-button>
</el-col>
</el-col>
<el-col
:span=
"2"
>
<el-button
type=
"primary"
@
click=
"handleBatchAddPonits"
plain
>
批量增加积分
</el-button>
</el-col>
</el-row>
</el-row>
<el-table
:data=
"tableList"
>
<el-table
:data=
"tableList"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
></el-table-column>
-->
<el-table-column
label=
"序号"
width=
"55"
type=
"index"
align=
"center"
></el-table-column>
<el-table-column
label=
"序号"
width=
"55"
type=
"index"
align=
"center"
></el-table-column>
<el-table-column
label=
"用户姓名"
prop=
"nickName"
align=
"center"
></el-table-column>
<el-table-column
label=
"用户姓名"
prop=
"nickName"
align=
"center"
></el-table-column>
<el-table-column
label=
"用户名"
prop=
"userName"
align=
"center"
></el-table-column>
<el-table-column
label=
"用户名"
prop=
"userName"
align=
"center"
></el-table-column>
...
@@ -40,7 +44,9 @@
...
@@ -40,7 +44,9 @@
<!-- 积分明细 -->
<!-- 积分明细 -->
<detail-dialog
ref=
"detailDialogRef"
></detail-dialog>
<detail-dialog
ref=
"detailDialogRef"
></detail-dialog>
<!-- 积分规则设置 -->
<!-- 积分规则设置 -->
<points-rules-dialog
ref=
"pointsRulesDialogRef"
></points-rules-dialog>
<points-rules-dialog
ref=
"pointsRulesDialogRef"
></points-rules-dialog>
<!-- 批量增加积分 -->
<batch-add-points
ref=
"batchAddPointsRef"
@
handleOk=
"handleReset"
></batch-add-points>
</div>
</div>
</template>
</template>
...
@@ -49,6 +55,7 @@ import { listData, delData, addData, editData } from '@/api/pointsManage';
...
@@ -49,6 +55,7 @@ import { listData, delData, addData, editData } from '@/api/pointsManage';
import
ExchangeDialog
from
'
./ExchangeDialog.vue
'
;
import
ExchangeDialog
from
'
./ExchangeDialog.vue
'
;
import
DetailDialog
from
'
./DetailDialog.vue
'
;
import
DetailDialog
from
'
./DetailDialog.vue
'
;
import
PointsRulesDialog
from
'
./PointsRulesDialog.vue
'
;
import
PointsRulesDialog
from
'
./PointsRulesDialog.vue
'
;
import
BatchAddPoints
from
'
./BatchAddPoints.vue
'
;
export
default
{
export
default
{
name
:
'
PointsMall
'
,
name
:
'
PointsMall
'
,
data
()
{
data
()
{
...
@@ -64,7 +71,8 @@ export default {
...
@@ -64,7 +71,8 @@ export default {
components
:
{
components
:
{
ExchangeDialog
,
ExchangeDialog
,
DetailDialog
,
DetailDialog
,
PointsRulesDialog
PointsRulesDialog
,
BatchAddPoints
},
},
created
()
{
created
()
{
...
@@ -162,6 +170,10 @@ export default {
...
@@ -162,6 +170,10 @@ export default {
pageSize
:
10
pageSize
:
10
}
}
this
.
getList
()
this
.
getList
()
},
// 批量增加积分弹窗
handleBatchAddPonits
()
{
this
.
$refs
.
batchAddPointsRef
.
openModal
()
}
}
}
}
}
}
...
...
safe-campus-bbs-uniapp/components/Comment-Item.vue
View file @
2dc614da
...
@@ -251,6 +251,8 @@
...
@@ -251,6 +251,8 @@
.text
{
.text
{
width
:
calc
(
100%
-
180rpx
);
width
:
calc
(
100%
-
180rpx
);
word-wrap
:
break-word
;
word-break
:
break-all
;
}
}
...
...
safe-campus-bbs-uniapp/components/Dynamic-Item.vue
View file @
2dc614da
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
</view>
</view>
<view
class=
"dynamic-content-box"
>
<view
class=
"dynamic-content-box"
>
<rich-text
v-if=
"preNodes.length > 0"
:nodes=
"preNodes"
></rich-text>
<rich-text
v-if=
"preNodes.length > 0"
:nodes=
"preNodes"
class=
"text"
></rich-text>
<view
class=
"imgs"
v-if=
"form.type=='IMAGE'&&form.attachments && form.attachments.length > 0"
>
<view
class=
"imgs"
v-if=
"form.type=='IMAGE'&&form.attachments && form.attachments.length > 0"
>
<
template
v-for=
"(item,index) in form.attachments"
>
<
template
v-for=
"(item,index) in form.attachments"
>
<image
class=
"item"
:src=
"item.url"
@
click.stop=
"preview(form.attachments,index)"
></image>
<image
class=
"item"
:src=
"item.url"
@
click.stop=
"preview(form.attachments,index)"
></image>
...
...
safe-campus-bbs-uniapp/pages/index/index.vue
View file @
2dc614da
...
@@ -11,19 +11,26 @@
...
@@ -11,19 +11,26 @@
<scroll-view
class=
"scroll-view-index"
scroll-y
:show-scrollbar=
"false"
v-if=
"list.length>0"
<scroll-view
class=
"scroll-view-index"
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=
"refreshContentList"
@
refreshCurrent=
"refreshCurrent"
></dynamic-item>
<dynamic-item
:form=
"item"
@
refresh=
"refreshContentList"
@
refreshCurrent=
"refreshCurrent"
></dynamic-item>
</
template
>
</
template
>
</scroll-view>
</scroll-view>
<scroll-view
class=
"scroll-view-index"
scroll-y
:show-scrollbar=
"false"
v-else
>
<scroll-view
class=
"scroll-view-index"
scroll-y
:show-scrollbar=
"false"
v-else
>
<list-empty></list-empty>
<list-empty></list-empty>
</scroll-view>
</scroll-view>
<!-- 发布按钮 -->
<!-- 发布按钮 -->
<movable-area
class=
"movable-area"
>
<
!-- <
movable-area class="movable-area">
<movable-view class="add-dynamic-box move-button" :x="area.x+'rpx'" :y="area.y + 'rpx'" direction="all"
<movable-view class="add-dynamic-box move-button" :x="area.x+'rpx'" :y="area.y + 'rpx'" direction="all"
@change="onChange" damping="30" @click="toPublishPage">
@change="onChange" damping="30" @click="toPublishPage">
<image class="icon" src="/static/images/publish-icon.png"></image>
<image class="icon" src="/static/images/publish-icon.png"></image>
</movable-view>
</movable-view>
</movable-area>
</movable-area> -->
<!-- 发布按钮 -->
<view
class=
"add-dynamic-box"
@
click=
"toPublishPage"
:style=
"{ left: iconLeft + 'px', top: iconTop + 'px' }"
@
touchstart=
"handleTouchStart"
@
touchmove=
"handleTouchMove"
@
touchend=
"handleTouchEnd"
>
<image
class=
"icon"
src=
"/static/images/publish-icon.png"
></image>
</view>
</view>
</view>
</template>
</template>
...
@@ -49,7 +56,10 @@
...
@@ -49,7 +56,10 @@
y
:
1060
y
:
1060
},
},
emotions
,
emotions
,
scrollTop
:
0
scrollTop
:
0
,
iconLeft
:
310
,
iconTop
:
480
,
isMoving
:
false
}
}
},
},
components
:
{
components
:
{
...
@@ -141,6 +151,49 @@
...
@@ -141,6 +151,49 @@
});
});
}
}
})
})
},
// 触摸开始
handleTouchStart
(
e
)
{
this
.
isMoving
=
true
;
// 记录触摸起点(相对于屏幕)
this
.
startX
=
e
.
touches
[
0
].
clientX
;
this
.
startY
=
e
.
touches
[
0
].
clientY
;
// 记录图标当前位置
this
.
initialLeft
=
this
.
iconLeft
;
this
.
initialTop
=
this
.
iconTop
;
},
// 触摸移动
handleTouchMove
(
e
)
{
if
(
!
this
.
isMoving
)
return
;
// 防止页面滚动
e
.
preventDefault
();
// 计算当前触摸位置与起点的偏移量
const
moveX
=
e
.
touches
[
0
].
clientX
-
this
.
startX
;
const
moveY
=
e
.
touches
[
0
].
clientY
-
this
.
startY
;
// 计算新位置(初始位置 + 偏移量)
let
newLeft
=
this
.
initialLeft
+
moveX
;
let
newTop
=
this
.
initialTop
+
moveY
;
// 限制图标在屏幕内(可选)
const
windowWidth
=
uni
.
getSystemInfoSync
().
windowWidth
;
const
windowHeight
=
uni
.
getSystemInfoSync
().
windowHeight
;
const
iconSize
=
50
;
// 图标宽高(根据实际调整)
// 左右边界
newLeft
=
Math
.
max
(
0
,
Math
.
min
(
newLeft
,
windowWidth
-
iconSize
));
// 上下边界
newTop
=
Math
.
max
(
0
,
Math
.
min
(
newTop
,
windowHeight
-
iconSize
));
// 更新位置
this
.
iconLeft
=
newLeft
;
this
.
iconTop
=
newTop
;
},
// 触摸结束
handleTouchEnd
()
{
this
.
isMoving
=
false
;
}
}
}
}
}
}
...
@@ -148,21 +201,4 @@
...
@@ -148,21 +201,4 @@
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
'@/static/styles/index.scss'
;
@import
'@/static/styles/index.scss'
;
.movable-area
{
position
:
fixed
;
height
:
calc
(
100vh
-
3
.75rem
);
width
:
100%
;
z-index
:
998
;
pointer-events
:
none
;
left
:
0
;
top
:
0
;
.move-button
{
pointer-events
:
auto
;
pointer-events
:
auto
;
}
}
</
style
>
</
style
>
\ No newline at end of file
safe-campus-bbs-uniapp/static/styles/index.scss
View file @
2dc614da
...
@@ -43,6 +43,8 @@
...
@@ -43,6 +43,8 @@
color
:
rgba
(
16
,
16
,
16
,
1
);
color
:
rgba
(
16
,
16
,
16
,
1
);
font-size
:
32rpx
;
font-size
:
32rpx
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
word-wrap
:
break-word
;
word-break
:
break-all
;
}
}
.imgs
{
.imgs
{
// display: grid;
// display: grid;
...
@@ -100,6 +102,8 @@
...
@@ -100,6 +102,8 @@
.text
{
.text
{
color
:
rgba
(
142
,
153
,
171
,
1
);
color
:
rgba
(
142
,
153
,
171
,
1
);
font-size
:
28rpx
;
font-size
:
28rpx
;
word-wrap
:
break-word
;
word-break
:
break-all
;
}
}
}
}
}
}
...
@@ -265,6 +269,8 @@
...
@@ -265,6 +269,8 @@
display
:
flex
;
display
:
flex
;
.text
{
.text
{
width
:
100%
;
width
:
100%
;
word-wrap
:
break-word
;
word-break
:
break-all
;
}
}
...
@@ -285,6 +291,7 @@
...
@@ -285,6 +291,7 @@
}
}
.add-dynamic-box
{
.add-dynamic-box
{
position
:
fixed
;
width
:
76rpx
;
width
:
76rpx
;
height
:
76rpx
;
height
:
76rpx
;
border-radius
:
50%
;
border-radius
:
50%
;
...
...
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