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
3a981ab2
Commit
3a981ab2
authored
Sep 01, 2025
by
万成波
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
66e41680
5810f480
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1189 additions
and
10 deletions
+1189
-10
safe-campus-bbs-ui/.env.development
safe-campus-bbs-ui/.env.development
+1
-1
safe-campus-bbs-ui/src/api/comment/index.js
safe-campus-bbs-ui/src/api/comment/index.js
+27
-0
safe-campus-bbs-ui/src/api/pointsMall/index.js
safe-campus-bbs-ui/src/api/pointsMall/index.js
+45
-0
safe-campus-bbs-ui/src/api/pointsManage/index.js
safe-campus-bbs-ui/src/api/pointsManage/index.js
+55
-0
safe-campus-bbs-ui/src/api/sensitives/index.js
safe-campus-bbs-ui/src/api/sensitives/index.js
+62
-0
safe-campus-bbs-ui/src/api/userLevel/index.js
safe-campus-bbs-ui/src/api/userLevel/index.js
+45
-0
safe-campus-bbs-ui/src/components/ImageUpload/index.vue
safe-campus-bbs-ui/src/components/ImageUpload/index.vue
+9
-2
safe-campus-bbs-ui/src/views/comment/index.vue
safe-campus-bbs-ui/src/views/comment/index.vue
+113
-0
safe-campus-bbs-ui/src/views/login.vue
safe-campus-bbs-ui/src/views/login.vue
+1
-1
safe-campus-bbs-ui/src/views/pointsMall/FormDialog.vue
safe-campus-bbs-ui/src/views/pointsMall/FormDialog.vue
+136
-0
safe-campus-bbs-ui/src/views/pointsMall/index.vue
safe-campus-bbs-ui/src/views/pointsMall/index.vue
+143
-0
safe-campus-bbs-ui/src/views/pointsManage/index.vue
safe-campus-bbs-ui/src/views/pointsManage/index.vue
+140
-0
safe-campus-bbs-ui/src/views/register.vue
safe-campus-bbs-ui/src/views/register.vue
+1
-1
safe-campus-bbs-ui/src/views/sensitives/FormDialog.vue
safe-campus-bbs-ui/src/views/sensitives/FormDialog.vue
+91
-0
safe-campus-bbs-ui/src/views/sensitives/index.vue
safe-campus-bbs-ui/src/views/sensitives/index.vue
+86
-4
safe-campus-bbs-ui/src/views/topic/FormDialog.vue
safe-campus-bbs-ui/src/views/topic/FormDialog.vue
+1
-1
safe-campus-bbs-ui/src/views/userLevel/FormDialog.vue
safe-campus-bbs-ui/src/views/userLevel/FormDialog.vue
+105
-0
safe-campus-bbs-ui/src/views/userLevel/index.vue
safe-campus-bbs-ui/src/views/userLevel/index.vue
+128
-0
No files found.
safe-campus-bbs-ui/.env.development
View file @
3a981ab2
...
...
@@ -5,7 +5,7 @@ VUE_APP_TITLE = 一站式高校轻享平台
ENV = 'development'
# 若依管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.
1.44
:8080'
VUE_APP_BASE_API = 'http://192.168.
5.177
:8080'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
safe-campus-bbs-ui/src/api/comment/index.js
0 → 100644
View file @
3a981ab2
import
request
from
'
@/utils/request
'
// 评论列表
export
function
listData
(
params
)
{
return
request
({
url
:
'
/bbs/moment/comment/list
'
,
method
:
'
get
'
,
params
})
}
// 评论详情
export
function
detailData
(
id
)
{
return
request
({
url
:
`/bbs/moment/comment/
${
id
}
`
,
method
:
'
get
'
})
}
// 删除评论
export
function
delData
(
id
)
{
return
request
({
url
:
`/bbs/moment/comment/
${
id
}
`
,
method
:
'
delete
'
})
}
\ No newline at end of file
safe-campus-bbs-ui/src/api/pointsMall/index.js
0 → 100644
View file @
3a981ab2
import
request
from
'
@/utils/request
'
// 积分商城列表
export
function
listData
(
params
)
{
return
request
({
url
:
'
/bbs/points/goods/list
'
,
method
:
'
get
'
,
params
})
}
// 积分商城详情
export
function
detailData
(
id
)
{
return
request
({
url
:
`/bbs/points/goods/
${
id
}
`
,
method
:
'
get
'
})
}
// 新增积分商城
export
function
addData
(
data
)
{
return
request
({
url
:
'
/bbs/points/goods
'
,
method
:
'
post
'
,
data
})
}
// 修改积分商城
export
function
editData
(
data
)
{
return
request
({
url
:
'
/bbs/points/goods
'
,
method
:
'
put
'
,
data
})
}
// 删除积分商城
export
function
delData
(
id
)
{
return
request
({
url
:
`/bbs/points/goods/
${
id
}
`
,
method
:
'
delete
'
})
}
\ No newline at end of file
safe-campus-bbs-ui/src/api/pointsManage/index.js
0 → 100644
View file @
3a981ab2
import
request
from
'
@/utils/request
'
// 积分管理列表
export
function
listData
(
params
)
{
return
request
({
url
:
'
/bbs/points/user/points/list
'
,
method
:
'
get
'
,
params
})
}
// 积分明细
export
function
detailData
(
params
)
{
return
request
({
url
:
`/bbs/points/user/points/details`
,
method
:
'
get
'
,
params
})
}
// 导出用户
export
function
exportUser
(
data
){
return
request
({
url
:
'
/bbs/points/user/points/export
'
,
method
:
'
post
'
,
data
})
}
// 增加积分
export
function
addData
(
data
)
{
return
request
({
url
:
'
/bbs/points/user/points/incr
'
,
method
:
'
put
'
,
data
})
}
// 扣减积分
export
function
editData
(
data
)
{
return
request
({
url
:
'
/bbs/points/user/points/decr
'
,
method
:
'
put
'
,
data
})
}
// 删除积分管理
export
function
delData
(
id
)
{
return
request
({
url
:
`/bbs/points/goods/
${
id
}
`
,
method
:
'
delete
'
})
}
\ No newline at end of file
safe-campus-bbs-ui/src/api/sensitives/index.js
0 → 100644
View file @
3a981ab2
import
request
from
'
@/utils/request
'
// 敏感词列表
export
function
listData
(
params
)
{
return
request
({
url
:
'
/bbs/moment/sensitive/word/list
'
,
method
:
'
get
'
,
params
})
}
// 敏感词详情
export
function
detailData
(
id
)
{
return
request
({
url
:
`/bbs/moment/sensitive/word/
${
id
}
`
,
method
:
'
get
'
})
}
// 新增敏感词
export
function
addData
(
data
)
{
return
request
({
url
:
'
/bbs/moment/sensitive/word
'
,
method
:
'
post
'
,
data
})
}
// 修改敏感词
export
function
editData
(
data
)
{
return
request
({
url
:
'
/bbs/moment/sensitive/word
'
,
method
:
'
put
'
,
data
})
}
// 刷新敏感词缓存
export
function
refresh
(
data
)
{
return
request
({
url
:
'
/bbs/moment/sensitive/word/refresh
'
,
method
:
'
put
'
,
data
})
}
// 删除敏感词
export
function
delData
(
id
)
{
return
request
({
url
:
`/bbs/moment/sensitive/word/
${
id
}
`
,
method
:
'
delete
'
})
}
// 导入敏感词
export
function
importWords
(
data
){
return
request
({
url
:
'
/bbs/moment/sensitive/word/import
'
,
method
:
'
post
'
,
data
})
}
\ No newline at end of file
safe-campus-bbs-ui/src/api/userLevel/index.js
0 → 100644
View file @
3a981ab2
import
request
from
'
@/utils/request
'
// 用户等级列表
export
function
listData
(
params
)
{
return
request
({
url
:
'
/bbs/moment/grade/list
'
,
method
:
'
get
'
,
params
})
}
// 用户等级详情
export
function
detailData
(
id
)
{
return
request
({
url
:
`/bbs/moment/grade/
${
id
}
`
,
method
:
'
get
'
})
}
// 新增用户等级
export
function
addData
(
data
)
{
return
request
({
url
:
'
/bbs/moment/grade
'
,
method
:
'
post
'
,
data
})
}
// 修改用户等级
export
function
editData
(
data
)
{
return
request
({
url
:
'
/bbs/moment/grade
'
,
method
:
'
put
'
,
data
})
}
// 删除用户等级
export
function
delData
(
id
)
{
return
request
({
url
:
`/bbs/moment/grade/
${
id
}
`
,
method
:
'
delete
'
})
}
\ No newline at end of file
safe-campus-bbs-ui/src/components/ImageUpload/index.vue
View file @
3a981ab2
...
...
@@ -155,7 +155,7 @@ export default {
// 上传成功回调
handleUploadSuccess
(
res
,
file
)
{
if
(
res
.
code
===
200
)
{
this
.
uploadList
.
push
({
name
:
res
.
fileName
,
url
:
res
.
fileName
});
this
.
uploadList
.
push
({
name
:
res
.
fileName
,
url
:
res
.
url
});
this
.
uploadedSuccessfully
();
}
else
{
this
.
number
--
;
...
...
@@ -199,7 +199,7 @@ export default {
separator
=
separator
||
"
,
"
;
for
(
let
i
in
list
)
{
if
(
list
[
i
].
url
)
{
strs
+=
list
[
i
].
url
.
replace
(
this
.
baseUrl
,
""
)
+
separator
;
strs
+=
list
[
i
].
url
+
separator
;
}
}
return
strs
!=
''
?
strs
.
substr
(
0
,
strs
.
length
-
1
)
:
''
;
...
...
@@ -209,8 +209,15 @@ export default {
</
script
>
<
style
scoped
lang=
"scss"
>
// .el-upload--picture-card 控制加号部分
::v-deep
.el-upload--picture-card
{
width
:
104px
;
height
:
104px
;
line-height
:
104px
;
}
::v-deep
.hide
.el-upload--picture-card
{
display
:
none
;
width
:
104px
;
height
:
104px
;
}
// 去掉动画效果
::v-deep
.el-list-enter-active
,
...
...
safe-campus-bbs-ui/src/views/comment/index.vue
0 → 100644
View file @
3a981ab2
<
template
>
<div
class=
"app-container"
>
<div
class=
"page-container"
>
<el-form
:model=
"queryParams"
:inline=
"true"
label-width=
"80px"
>
<el-form-item
label=
"评论内容"
>
<el-input
v-model=
"queryParams.content"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"姓名"
>
<el-input
v-model=
"queryParams.nikeName"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"账号"
>
<el-input
v-model=
"queryParams.userName"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
@
click=
"handleReset"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
class=
"mb10"
>
</el-row>
<el-table
:data=
"tableList"
>
<el-table-column
label=
"序号"
width=
"55"
type=
"index"
align=
"center"
></el-table-column>
<el-table-column
label=
"评论内容"
prop=
"content"
align=
"center"
></el-table-column>
<el-table-column
label=
"所属动态"
prop=
"momentContent"
align=
"center"
></el-table-column>
<el-table-column
label=
"账号"
prop=
"userName"
align=
"center"
></el-table-column>
<el-table-column
label=
"姓名"
prop=
"nikeName"
align=
"center"
></el-table-column>
<el-table-column
label=
"创建时间"
prop=
"createTime"
align=
"center"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
>
<template
#default
="
{ row }">
<el-button
type=
"text"
@
click=
"handleDelete(row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNum"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</div>
</div>
</template>
<
script
>
import
{
listData
,
delData
}
from
'
@/api/comment
'
;
export
default
{
name
:
'
Sensitives
'
,
data
()
{
return
{
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
},
tableList
:
[],
total
:
0
}
},
created
()
{
},
mounted
()
{
this
.
getList
()
},
methods
:
{
// 列表数据
getList
()
{
listData
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
tableList
=
res
.
rows
;
this
.
total
=
res
.
total
})
},
// 删除
handleDelete
(
row
)
{
this
.
$modal
.
confirm
(
'
确认要删除评论内容为:
'
+
row
.
content
+
'
的数据吗?
'
).
then
(
function
()
{
return
delData
(
row
.
id
);
}).
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
this
.
getList
()
})
},
// 查询
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
()
},
// 重置
handleReset
()
{
this
.
queryParams
=
{
pageNum
:
1
,
pageSize
:
10
}
this
.
getList
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.app-container
{
background-color
:
rgba
(
241
,
242
,
247
,
1
);
height
:
calc
(
100vh
-
50px
);
.page-container
{
background-color
:
white
;
height
:
100%
;
border-radius
:
6px
;
padding
:
20px
30px
;
box-sizing
:
border-box
;
overflow
:
auto
;
}
}
</
style
>
\ No newline at end of file
safe-campus-bbs-ui/src/views/login.vue
View file @
3a981ab2
<
template
>
<div
class=
"login"
>
<el-form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
<h3
class=
"title"
>
若依后台管理系统
</h3>
<h3
class=
"title"
>
一站式高校轻享平台
</h3>
<el-form-item
prop=
"username"
>
<el-input
v-model=
"loginForm.username"
...
...
safe-campus-bbs-ui/src/views/pointsMall/FormDialog.vue
0 → 100644
View file @
3a981ab2
<
template
>
<el-dialog
:visible.sync=
"visible"
v-if=
"visible"
:title=
"dialogTitle"
width=
"58%"
class=
"dialog"
@
close=
"handleClose"
>
<el-form
:model=
"form"
ref=
"formRef"
:rules=
"rules"
label-position=
"top"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"商品名称"
prop=
"name"
>
<el-input
placeholder=
"请输入"
v-model=
"form.name"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"兑换所需积分"
prop=
"exchangePoints"
>
<el-input-number
placeholder=
"请输入兑换所需积分"
:min=
"0"
v-model=
"form.exchangePoints"
style=
"width: 100%;"
></el-input-number>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"商品参考价"
prop=
"salesPrice"
>
<el-input-number
style=
"width: 100%;"
placeholder=
"请输入商品参考价"
:min=
"0"
v-model=
"form.salesPrice"
></el-input-number>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"商品总数量"
prop=
"stockNum"
>
<el-input-number
style=
"width: 100%;"
placeholder=
"请输入商品总数量"
:min=
"0"
v-model=
"form.stockNum"
></el-input-number>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"商品状态"
prop=
"showStatus"
>
<el-radio-group
v-model=
"form.showStatus"
>
<el-radio
:label=
"1"
>
上架
</el-radio>
<el-radio
:label=
"0"
>
下架
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"商品图片"
prop=
"imgsUrl"
>
<ImageUpload
v-model=
"form.imgsUrl"
:limit=
"1"
></ImageUpload>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template
#footer
>
<el-button
@
click=
"handleClose"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
确认
</el-button>
</
template
>
</el-dialog>
</template>
<
script
>
import
{
addData
,
detailData
,
editData
}
from
'
@/api/pointsMall
'
;
export
default
{
name
:
'
FormDialog
'
,
data
()
{
return
{
visible
:
false
,
dialogTitle
:
'
新增商品
'
,
form
:
{
showStatus
:
1
},
rules
:
{
name
:
[{
required
:
true
,
message
:
'
请输入商品
'
,
trigger
:
'
blur
'
}],
exchangePoints
:
[{
required
:
true
,
message
:
'
请输入兑换所需积分
'
,
trigger
:
'
blur
'
}],
salesPrice
:
[{
required
:
true
,
message
:
'
请输入商品参考价
'
,
trigger
:
'
blur
'
}],
stockNum
:
[{
required
:
true
,
message
:
'
请输入商品总数量
'
,
trigger
:
'
blur
'
}],
showStatus
:
[{
required
:
true
,
message
:
'
请选择商品状态
'
,
trigger
:
'
change
'
}],
imgsUrl
:[{
required
:
true
,
message
:
'
请上传商品图片
'
,
trigger
:
'
change
'
}]
}
}
},
methods
:
{
openModal
(
row
)
{
this
.
visible
=
true
;
if
(
row
)
{
this
.
dialogTitle
=
'
修改商品
'
;
this
.
getDetail
(
row
)
}
else
{
this
.
dialogTitle
=
'
新增商品
'
}
},
// 查详情
getDetail
(
row
)
{
detailData
(
row
.
id
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
form
=
{
...
res
.
data
}
})
},
// 提交
handleSubmit
()
{
console
.
log
(
this
.
form
)
debugger
this
.
$refs
.
formRef
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
)
{
editData
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
handleClose
()
this
.
$emit
(
'
handleOk
'
)
}
else
{
this
.
$modal
.
msgError
(
res
.
msg
||
"
修改失败
"
);
this
.
handleClose
()
}
})
}
else
{
addData
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
handleClose
()
this
.
$emit
(
'
handleOk
'
)
}
else
{
this
.
$modal
.
msgError
(
res
.
msg
||
"
新增失败
"
);
this
.
handleClose
()
}
})
}
}
})
},
// 关闭
handleClose
()
{
this
.
form
=
{
showStatus
:
1
};
this
.
visible
=
false
}
}
}
</
script
>
<
style
lang=
"scss"
>
.dialog
{
.el-dialog__body
{
padding
:
0
20px
!
important
;
}
}
</
style
>
\ No newline at end of file
safe-campus-bbs-ui/src/views/pointsMall/index.vue
0 → 100644
View file @
3a981ab2
<
template
>
<div
class=
"app-container"
>
<div
class=
"page-container"
>
<el-form
:model=
"queryParams"
:inline=
"true"
label-width=
"80px"
>
<el-form-item
label=
"商品名称"
>
<el-input
v-model=
"queryParams.name"
placeholder=
"请输入"
style=
"width: 220px;"
></el-input>
</el-form-item>
<el-form-item
label=
"商品状态"
>
<el-select
v-model=
"queryParams.showStatus"
placeholder=
"请选择"
style=
"width: 220px;"
>
<el-option
label=
"已上架"
value=
"1"
></el-option>
<el-option
label=
"已下架"
value=
"0"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
@
click=
"handleReset"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
class=
"mb10"
>
<el-col
:span=
"2"
>
<el-button
type=
"primary"
@
click=
"handleAdd"
>
新增商品
</el-button>
</el-col>
</el-row>
<el-table
:data=
"tableList"
>
<el-table-column
label=
"序号"
width=
"55"
type=
"index"
align=
"center"
></el-table-column>
<!--
<el-table-column
label=
"商品ID"
prop=
"name"
align=
"center"
></el-table-column>
-->
<el-table-column
label=
"商品名称"
prop=
"name"
align=
"center"
></el-table-column>
<el-table-column
label=
"商品图片"
align=
"center"
>
<template
#default
="
{ row }">
<el-image
:src=
"row.imgsUrl"
style=
"width: 40px;height: 40px;"
></el-image>
</
template
>
</el-table-column>
<el-table-column
label=
"商品状态"
prop=
"showStatus"
align=
"center"
>
<
template
#default
="{
row
}"
>
<span
v-if=
"row.showStatus == 0"
style=
"color:#FF645F ;"
>
已下架
</span>
<span
v-if=
"row.showStatus == 1"
style=
"color:#007BFF ;"
>
已上架
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"兑换所需积分"
prop=
"exchangePoints"
align=
"center"
></el-table-column>
<el-table-column
label=
"商品参考价"
prop=
"salesPrice"
align=
"center"
></el-table-column>
<el-table-column
label=
"商品总数量"
prop=
"stockNum"
align=
"center"
></el-table-column>
<el-table-column
label=
"已兑换数量"
prop=
"salesNum"
align=
"center"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
>
<
template
#default
="{
row
}"
>
<el-button
type=
"text"
@
click=
"handleUpdate(row)"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNum"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</div>
<!-- 表单 -->
<form-dialog
ref=
"formDialogRef"
@
handleOk=
"handleReset"
></form-dialog>
</div>
</template>
<
script
>
import
{
listData
,
setTop
,
delData
}
from
'
@/api/pointsMall
'
;
import
FormDialog
from
'
./FormDialog.vue
'
;
export
default
{
name
:
'
PointsMall
'
,
data
()
{
return
{
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
},
tableList
:
[],
total
:
0
}
},
components
:
{
FormDialog
},
created
()
{
},
mounted
()
{
this
.
getList
()
},
methods
:
{
// 列表数据
getList
()
{
listData
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
tableList
=
res
.
rows
;
this
.
total
=
res
.
total
})
},
// 新增
handleAdd
()
{
this
.
$refs
.
formDialogRef
.
openModal
()
},
// 修改
handleUpdate
(
row
)
{
this
.
$refs
.
formDialogRef
.
openModal
(
row
)
},
// 删除
handleDelete
(
row
)
{
this
.
$modal
.
confirm
(
'
确认要删除商品名称为:
'
+
row
.
name
+
'
的数据吗?
'
).
then
(
function
()
{
return
delData
(
row
.
id
);
}).
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
this
.
getList
()
})
},
// 查询
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
()
},
// 重置
handleReset
()
{
this
.
queryParams
=
{
pageNum
:
1
,
pageSize
:
10
}
this
.
getList
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.app-container
{
background-color
:
rgba
(
241
,
242
,
247
,
1
);
height
:
calc
(
100vh
-
50px
);
.page-container
{
background-color
:
white
;
height
:
100%
;
border-radius
:
6px
;
padding
:
20px
30px
;
box-sizing
:
border-box
;
overflow
:
auto
;
}
}
</
style
>
\ No newline at end of file
safe-campus-bbs-ui/src/views/pointsManage/index.vue
0 → 100644
View file @
3a981ab2
<
template
>
<div
class=
"app-container"
>
<div
class=
"page-container"
>
<el-form
:model=
"queryParams"
:inline=
"true"
label-width=
"80px"
>
<el-form-item
label=
"商品名称"
>
<el-input
v-model=
"queryParams.name"
placeholder=
"请输入"
style=
"width: 220px;"
></el-input>
</el-form-item>
<el-form-item
label=
"商品状态"
>
<el-select
v-model=
"queryParams.showStatus"
placeholder=
"请选择"
style=
"width: 220px;"
>
<el-option
label=
"已上架"
value=
"1"
></el-option>
<el-option
label=
"已下架"
value=
"0"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
@
click=
"handleReset"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
class=
"mb10"
>
<el-col
:span=
"2"
>
<el-button
type=
"primary"
@
click=
"handleAdd"
>
新增商品
</el-button>
</el-col>
</el-row>
<el-table
:data=
"tableList"
>
<el-table-column
label=
"序号"
width=
"55"
type=
"index"
align=
"center"
></el-table-column>
<!--
<el-table-column
label=
"商品ID"
prop=
"name"
align=
"center"
></el-table-column>
-->
<el-table-column
label=
"商品名称"
prop=
"name"
align=
"center"
></el-table-column>
<el-table-column
label=
"商品图片"
align=
"center"
>
<template
#default
="
{ row }">
<el-image
:src=
"row.imgsUrl"
style=
"width: 40px;height: 40px;"
></el-image>
</
template
>
</el-table-column>
<el-table-column
label=
"商品状态"
prop=
"showStatus"
align=
"center"
>
<
template
#default
="{
row
}"
>
<span
v-if=
"row.showStatus == 0"
style=
"color:#FF645F ;"
>
已下架
</span>
<span
v-if=
"row.showStatus == 1"
style=
"color:#007BFF ;"
>
已上架
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"兑换所需积分"
prop=
"exchangePoints"
align=
"center"
></el-table-column>
<el-table-column
label=
"商品参考价"
prop=
"salesPrice"
align=
"center"
></el-table-column>
<el-table-column
label=
"商品总数量"
prop=
"stockNum"
align=
"center"
></el-table-column>
<el-table-column
label=
"已兑换数量"
prop=
"salesNum"
align=
"center"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
>
<
template
#default
="{
row
}"
>
<el-button
type=
"text"
@
click=
"handleUpdate(row)"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNum"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</div>
</div>
</template>
<
script
>
import
{
listData
,
delData
}
from
'
@/api/pointsManage
'
;
export
default
{
name
:
'
PointsMall
'
,
data
()
{
return
{
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
},
tableList
:
[],
total
:
0
}
},
created
()
{
},
mounted
()
{
this
.
getList
()
},
methods
:
{
// 列表数据
getList
()
{
listData
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
tableList
=
res
.
rows
;
this
.
total
=
res
.
total
})
},
// 新增
handleAdd
()
{
this
.
$refs
.
formDialogRef
.
openModal
()
},
// 修改
handleUpdate
(
row
)
{
this
.
$refs
.
formDialogRef
.
openModal
(
row
)
},
// 删除
handleDelete
(
row
)
{
this
.
$modal
.
confirm
(
'
确认要删除商品名称为:
'
+
row
.
name
+
'
的数据吗?
'
).
then
(
function
()
{
return
delData
(
row
.
id
);
}).
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
this
.
getList
()
})
},
// 查询
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
()
},
// 重置
handleReset
()
{
this
.
queryParams
=
{
pageNum
:
1
,
pageSize
:
10
}
this
.
getList
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.app-container
{
background-color
:
rgba
(
241
,
242
,
247
,
1
);
height
:
calc
(
100vh
-
50px
);
.page-container
{
background-color
:
white
;
height
:
100%
;
border-radius
:
6px
;
padding
:
20px
30px
;
box-sizing
:
border-box
;
overflow
:
auto
;
}
}
</
style
>
\ No newline at end of file
safe-campus-bbs-ui/src/views/register.vue
View file @
3a981ab2
<
template
>
<div
class=
"register"
>
<el-form
ref=
"registerForm"
:model=
"registerForm"
:rules=
"registerRules"
class=
"register-form"
>
<h3
class=
"title"
>
若依后台管理系统
</h3>
<h3
class=
"title"
>
一站式高校轻享平台
</h3>
<el-form-item
prop=
"username"
>
<el-input
v-model=
"registerForm.username"
type=
"text"
auto-complete=
"off"
placeholder=
"账号"
>
<svg-icon
slot=
"prefix"
icon-class=
"user"
class=
"el-input__icon input-icon"
/>
...
...
safe-campus-bbs-ui/src/views/sensitives/FormDialog.vue
0 → 100644
View file @
3a981ab2
<
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-item
label=
"敏感词"
prop=
"name"
>
<el-input
placeholder=
"请输入"
v-model=
"form.name"
></el-input>
</el-form-item>
</el-form>
<template
#footer
>
<el-button
@
click=
"handleClose"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
确认
</el-button>
</
template
>
</el-dialog>
</template>
<
script
>
import
{
addData
,
detailData
,
editData
}
from
'
@/api/sensitives
'
;
export
default
{
name
:
'
FormDialog
'
,
data
()
{
return
{
visible
:
false
,
dialogTitle
:
'
新增敏感词
'
,
form
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
'
请输入敏感词
'
,
trigger
:
'
blur
'
}]
}
}
},
methods
:
{
openModal
(
row
)
{
this
.
visible
=
true
;
if
(
row
)
{
this
.
dialogTitle
=
'
修改敏感词
'
;
this
.
getDetail
(
row
)
}
else
{
this
.
dialogTitle
=
'
新增敏感词
'
}
},
// 查详情
getDetail
(
row
)
{
detailData
(
row
.
id
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
form
=
{
...
res
.
data
}
})
},
// 提交
handleSubmit
()
{
this
.
$refs
.
formRef
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
)
{
editData
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
handleClose
()
this
.
$emit
(
'
handleOk
'
)
}
else
{
this
.
$modal
.
msgError
(
res
.
msg
||
"
修改失败
"
);
this
.
handleClose
()
}
})
}
else
{
addData
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
handleClose
()
this
.
$emit
(
'
handleOk
'
)
}
else
{
this
.
$modal
.
msgError
(
res
.
msg
||
"
新增失败
"
);
this
.
handleClose
()
}
})
}
}
})
},
// 关闭
handleClose
()
{
this
.
form
=
{};
this
.
visible
=
false
}
}
}
</
script
>
<
style
lang=
"scss"
>
.dialog
{
.el-dialog__body
{
padding
:
0
20px
!
important
;
}
}
</
style
>
\ No newline at end of file
safe-campus-bbs-ui/src/views/sensitives/index.vue
View file @
3a981ab2
<
template
>
<div
class=
"app-container"
>
<div
class=
"page-container"
></div>
<div
class=
"page-container"
>
<el-form
:model=
"queryParams"
:inline=
"true"
label-width=
"90"
>
<el-form-item
label=
"敏感词"
>
<el-input
v-model=
"queryParams.name"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
@
click=
"handleReset"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
class=
"mb10"
>
<el-col
:span=
"2"
>
<el-button
type=
"primary"
@
click=
"handleAdd"
>
新增敏感词
</el-button>
</el-col>
<el-col
:span=
"2"
>
<el-button
type=
"primary"
plain
>
批量导入敏感词
</el-button>
</el-col>
</el-row>
<el-table
:data=
"tableList"
>
<el-table-column
label=
"序号"
width=
"55"
type=
"index"
align=
"center"
></el-table-column>
<el-table-column
label=
"敏感词"
prop=
"name"
align=
"center"
></el-table-column>
<el-table-column
label=
"创建时间"
prop=
"createTime"
align=
"center"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
>
<template
#default
="
{ row }">
<el-button
type=
"text"
@
click=
"handleUpdate(row)"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNum"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</div>
<!-- 表单 -->
<form-dialog
ref=
"formDialogRef"
@
handleOk=
"handleReset"
></form-dialog>
</div>
</template>
<
script
>
import
{
listData
,
setTop
,
delData
}
from
'
@/api/sensitives
'
;
import
FormDialog
from
'
./FormDialog.vue
'
;
export
default
{
name
:
'
Sensitives
'
,
data
()
{
return
{
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
},
tableList
:
[],
total
:
0
}
},
components
:
{
FormDialog
},
created
()
{
},
mounted
()
{
this
.
getList
()
},
methods
:
{
// 列表数据
getList
()
{
listData
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
tableList
=
res
.
rows
;
this
.
total
=
res
.
total
})
},
// 新增
handleAdd
()
{
this
.
$refs
.
formDialogRef
.
openModal
()
},
// 修改
handleUpdate
(
row
)
{
this
.
$refs
.
formDialogRef
.
openModal
(
row
)
},
// 删除
handleDelete
(
row
)
{
this
.
$modal
.
confirm
(
'
确认要删除敏感词为:
'
+
row
.
name
+
'
的数据吗?
'
).
then
(
function
()
{
return
delData
(
row
.
id
);
}).
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
this
.
getList
()
})
},
// 查询
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
()
},
// 重置
handleReset
()
{
this
.
queryParams
=
{
pageNum
:
1
,
pageSize
:
10
}
this
.
getList
()
}
}
}
</
script
>
...
...
safe-campus-bbs-ui/src/views/topic/FormDialog.vue
View file @
3a981ab2
<
template
>
<el-dialog
:visible.sync=
"visible"
:title=
"dialogTitle"
width=
"28%"
class=
"dialog"
@
close=
"handleClose"
>
<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-item
label=
"话题名称"
prop=
"name"
>
<el-input
placeholder=
"请输入"
v-model=
"form.name"
></el-input>
...
...
safe-campus-bbs-ui/src/views/userLevel/FormDialog.vue
0 → 100644
View file @
3a981ab2
<
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"
label-position=
"top"
>
<el-form-item
label=
"等级名称"
prop=
"name"
>
<el-input
placeholder=
"请输入"
v-model=
"form.name"
></el-input>
</el-form-item>
<el-form-item
label=
"积分范围"
prop=
"minPoints"
>
<div
style=
"display: flex;justify-content: space-between;"
>
<el-input-number
placeholder=
"起始积分"
:min=
"0"
v-model=
"form.minPoints"
></el-input-number>
<span>
至
</span>
<el-input-number
placeholder=
"结束积分"
:min=
"0"
v-model=
"form.maxPoints"
></el-input-number>
</div>
</el-form-item>
<el-form-item
label=
"排序"
prop=
"sort"
>
<el-input-number
placeholder=
"请输入"
style=
"width: 100%;"
v-model=
"form.sort"
:min=
"0"
:step=
"1"
:step-strictly=
"true"
></el-input-number>
</el-form-item>
</el-form>
<template
#footer
>
<el-button
@
click=
"handleClose"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
确认
</el-button>
</
template
>
</el-dialog>
</template>
<
script
>
import
{
addData
,
detailData
,
editData
}
from
'
@/api/userLevel
'
;
export
default
{
name
:
'
FormDialog
'
,
data
()
{
return
{
visible
:
false
,
dialogTitle
:
'
新增会员等级
'
,
form
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
'
请输入会员等级
'
,
trigger
:
'
blur
'
}],
minPoints
:[{
required
:
true
,
message
:
'
请输入积分范围
'
,
trigger
:
'
blur
'
}],
sort
:[{
required
:
true
,
message
:
'
请输入排序号
'
,
trigger
:
'
blur
'
}]
}
}
},
methods
:
{
openModal
(
row
)
{
this
.
visible
=
true
;
if
(
row
)
{
this
.
dialogTitle
=
'
修改会员等级
'
;
this
.
getDetail
(
row
)
}
else
{
this
.
dialogTitle
=
'
新增会员等级
'
}
},
// 查详情
getDetail
(
row
)
{
detailData
(
row
.
id
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
form
=
{
...
res
.
data
}
})
},
// 提交
handleSubmit
()
{
this
.
$refs
.
formRef
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
)
{
editData
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
handleClose
()
this
.
$emit
(
'
handleOk
'
)
}
else
{
this
.
$modal
.
msgError
(
res
.
msg
||
"
修改失败
"
);
this
.
handleClose
()
}
})
}
else
{
addData
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
handleClose
()
this
.
$emit
(
'
handleOk
'
)
}
else
{
this
.
$modal
.
msgError
(
res
.
msg
||
"
新增失败
"
);
this
.
handleClose
()
}
})
}
}
})
},
// 关闭
handleClose
()
{
this
.
form
=
{};
this
.
visible
=
false
}
}
}
</
script
>
<
style
lang=
"scss"
>
.dialog
{
.el-dialog__body
{
padding
:
0
20px
!
important
;
}
}
</
style
>
\ No newline at end of file
safe-campus-bbs-ui/src/views/userLevel/index.vue
0 → 100644
View file @
3a981ab2
<
template
>
<div
class=
"app-container"
>
<div
class=
"page-container"
>
<el-form
:model=
"queryParams"
:inline=
"true"
label-width=
"90"
>
<el-form-item
label=
"会员等级"
>
<el-input
v-model=
"queryParams.name"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
@
click=
"handleReset"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
class=
"mb10"
>
<el-col
:span=
"2"
>
<el-button
type=
"primary"
@
click=
"handleAdd"
>
新增等级
</el-button>
</el-col>
</el-row>
<el-table
:data=
"tableList"
>
<el-table-column
label=
"序号"
width=
"55"
type=
"index"
align=
"center"
></el-table-column>
<el-table-column
label=
"等级名称"
prop=
"name"
align=
"center"
></el-table-column>
<el-table-column
label=
"积分范围"
align=
"center"
>
<template
#default
="
{row}">
<span>
{{
row
.
minPoints
}}
~
{{
row
.
maxPoints
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"排序"
prop=
"sort"
align=
"center"
></el-table-column>
<el-table-column
label=
"创建时间"
prop=
"createTime"
align=
"center"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
>
<
template
#default
="{
row
}"
>
<!--
<el-button
type=
"text"
>
会员权限设置
</el-button>
-->
<el-button
type=
"text"
@
click=
"handleUpdate(row)"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNum"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</div>
<!-- 表单 -->
<form-dialog
ref=
"formDialogRef"
@
handleOk=
"handleReset"
></form-dialog>
</div>
</template>
<
script
>
import
{
listData
,
setTop
,
delData
}
from
'
@/api/userLevel
'
;
import
FormDialog
from
'
./FormDialog.vue
'
;
export
default
{
name
:
'
UserLevel
'
,
data
()
{
return
{
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
},
tableList
:
[],
total
:
0
}
},
components
:
{
FormDialog
},
created
()
{
},
mounted
()
{
this
.
getList
()
},
methods
:
{
// 列表数据
getList
()
{
listData
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
tableList
=
res
.
rows
;
this
.
total
=
res
.
total
})
},
// 新增
handleAdd
()
{
this
.
$refs
.
formDialogRef
.
openModal
()
},
// 修改
handleUpdate
(
row
)
{
this
.
$refs
.
formDialogRef
.
openModal
(
row
)
},
// 删除
handleDelete
(
row
)
{
this
.
$modal
.
confirm
(
'
确认要删除等级名称为:
'
+
row
.
name
+
'
的数据吗?
'
).
then
(
function
()
{
return
delData
(
row
.
id
);
}).
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
this
.
getList
()
})
},
// 查询
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
()
},
// 重置
handleReset
()
{
this
.
queryParams
=
{
pageNum
:
1
,
pageSize
:
10
}
this
.
getList
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.app-container
{
background-color
:
rgba
(
241
,
242
,
247
,
1
);
height
:
calc
(
100vh
-
50px
);
.page-container
{
background-color
:
white
;
height
:
100%
;
border-radius
:
6px
;
padding
:
20px
30px
;
box-sizing
:
border-box
;
overflow
:
auto
;
}
}
</
style
>
\ No newline at end of file
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