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
3e5a4c60
Commit
3e5a4c60
authored
Oct 11, 2025
by
yuwenwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG
parent
11bf8faf
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
371 additions
and
78 deletions
+371
-78
safe-campus-bbs-ui/src/components/GoodsSelect/index.vue
safe-campus-bbs-ui/src/components/GoodsSelect/index.vue
+15
-6
safe-campus-bbs-ui/src/components/ImageUpload/index.vue
safe-campus-bbs-ui/src/components/ImageUpload/index.vue
+2
-1
safe-campus-bbs-ui/src/components/RightToolbar/index.vue
safe-campus-bbs-ui/src/components/RightToolbar/index.vue
+1
-1
safe-campus-bbs-ui/src/components/UserSelect/index.vue
safe-campus-bbs-ui/src/components/UserSelect/index.vue
+1
-1
safe-campus-bbs-ui/src/views/monitor/job/index.vue
safe-campus-bbs-ui/src/views/monitor/job/index.vue
+1
-1
safe-campus-bbs-ui/src/views/monitor/job/log.vue
safe-campus-bbs-ui/src/views/monitor/job/log.vue
+1
-1
safe-campus-bbs-ui/src/views/monitor/operlog/index.vue
safe-campus-bbs-ui/src/views/monitor/operlog/index.vue
+1
-1
safe-campus-bbs-ui/src/views/pointsMall/index.vue
safe-campus-bbs-ui/src/views/pointsMall/index.vue
+1
-1
safe-campus-bbs-ui/src/views/pointsManage/PointsRulesDialog.vue
...ampus-bbs-ui/src/views/pointsManage/PointsRulesDialog.vue
+46
-10
safe-campus-bbs-ui/src/views/system/config/index.vue
safe-campus-bbs-ui/src/views/system/config/index.vue
+1
-1
safe-campus-bbs-ui/src/views/system/dept/index.vue
safe-campus-bbs-ui/src/views/system/dept/index.vue
+1
-1
safe-campus-bbs-ui/src/views/system/dict/data.vue
safe-campus-bbs-ui/src/views/system/dict/data.vue
+1
-1
safe-campus-bbs-ui/src/views/system/dict/index.vue
safe-campus-bbs-ui/src/views/system/dict/index.vue
+1
-1
safe-campus-bbs-ui/src/views/system/menu/index.vue
safe-campus-bbs-ui/src/views/system/menu/index.vue
+1
-1
safe-campus-bbs-ui/src/views/system/notice/index.vue
safe-campus-bbs-ui/src/views/system/notice/index.vue
+1
-1
safe-campus-bbs-ui/src/views/system/post/index.vue
safe-campus-bbs-ui/src/views/system/post/index.vue
+1
-1
safe-campus-bbs-ui/src/views/system/role/index.vue
safe-campus-bbs-ui/src/views/system/role/index.vue
+2
-2
safe-campus-bbs-ui/src/views/system/role/selectUser.vue
safe-campus-bbs-ui/src/views/system/role/selectUser.vue
+1
-1
safe-campus-bbs-ui/src/views/system/user/index.vue
safe-campus-bbs-ui/src/views/system/user/index.vue
+2
-2
safe-campus-bbs-ui/src/views/system/user/profile/userAvatar.vue
...ampus-bbs-ui/src/views/system/user/profile/userAvatar.vue
+1
-1
safe-campus-bbs-ui/src/views/tool/build/IconsDialog.vue
safe-campus-bbs-ui/src/views/tool/build/IconsDialog.vue
+1
-0
safe-campus-bbs-ui/src/views/tool/gen/importTable.vue
safe-campus-bbs-ui/src/views/tool/gen/importTable.vue
+1
-1
safe-campus-bbs-ui/src/views/tool/gen/index.vue
safe-campus-bbs-ui/src/views/tool/gen/index.vue
+1
-1
safe-campus-bbs-uniapp/components/Comment-Item.vue
safe-campus-bbs-uniapp/components/Comment-Item.vue
+1
-1
safe-campus-bbs-uniapp/components/Dynamic-Item.vue
safe-campus-bbs-uniapp/components/Dynamic-Item.vue
+4
-3
safe-campus-bbs-uniapp/components/HelangCompress.vue
safe-campus-bbs-uniapp/components/HelangCompress.vue
+200
-0
safe-campus-bbs-uniapp/components/ImageUpload.vue
safe-campus-bbs-uniapp/components/ImageUpload.vue
+55
-14
safe-campus-bbs-uniapp/pages/index/index.vue
safe-campus-bbs-uniapp/pages/index/index.vue
+21
-13
safe-campus-bbs-uniapp/store/modules/user.js
safe-campus-bbs-uniapp/store/modules/user.js
+4
-8
safe-campus-bbs-uniapp/utils/request.js
safe-campus-bbs-uniapp/utils/request.js
+1
-1
No files found.
safe-campus-bbs-ui/src/components/GoodsSelect/index.vue
View file @
3e5a4c60
<
template
>
<el-dialog
:visible.sync=
"visible"
:title=
"title"
width=
"60%"
append-to-body
>
<el-dialog
:visible.sync=
"visible"
:title=
"title"
width=
"60%"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
:model=
"queryParams"
ref=
"formRef"
:inline=
"true"
@
submit
.
prevent
.
stop
>
<el-form-item
label=
"商品名称"
>
<el-input
placeholder=
"请输入"
v-model=
"queryParams.name"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
>
搜索
</el-button>
<el-button>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
@
click=
"handleReset"
>
重置
</el-button>
</el-form-item>
</el-form>
<div
v-if=
"selectDataList.length > 0"
class=
"mb20"
>
...
...
@@ -14,7 +14,8 @@
{{
tag
.
name
}}
</el-tag>
</div>
<el-table
ref=
"tableRef"
row-key=
"code"
:data=
"list"
@
selection-change=
"handleCheckboxChange"
v-loading=
"loading"
>
<el-table
ref=
"tableRef"
row-key=
"code"
:data=
"list"
@
selection-change=
"handleCheckboxChange"
v-loading=
"loading"
>
<el-table-column
type=
"selection"
width=
"60"
></el-table-column>
<el-table-column
label=
"商品名称"
prop=
"name"
align=
"center"
></el-table-column>
<el-table-column
label=
"商品图片"
align=
"center"
>
...
...
@@ -47,7 +48,7 @@ export default {
},
total
:
0
,
selectDataList
:
[],
loading
:
false
loading
:
false
}
},
props
:
{
...
...
@@ -69,6 +70,14 @@ export default {
this
.
visible
=
true
;
this
.
getList
(
data
)
},
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
()
},
handleReset
()
{
this
.
queryParams
.
name
=
''
;
this
.
handleQuery
()
},
getList
(
data
)
{
this
.
loading
=
true
listData
(
this
.
queryParams
).
then
(
res
=>
{
...
...
@@ -77,7 +86,7 @@ export default {
if
(
data
)
{
this
.
getDetail
(
data
)
}
}).
finally
(()
=>
{
}).
finally
(()
=>
{
this
.
loading
=
false
})
},
...
...
safe-campus-bbs-ui/src/components/ImageUpload/index.vue
View file @
3e5a4c60
...
...
@@ -33,7 +33,8 @@
title=
"预览"
width=
"800"
append-to-body
>
:close-on-click-modal=
"false"
>
<img
:src=
"dialogImageUrl"
style=
"display: block; max-width: 100%; margin: 0 auto"
...
...
safe-campus-bbs-ui/src/components/RightToolbar/index.vue
View file @
3e5a4c60
...
...
@@ -11,7 +11,7 @@
<el-button
size=
"mini"
circle
icon=
"el-icon-menu"
@
click=
"showColumn()"
/>
</el-tooltip>
</el-row>
<el-dialog
:title=
"title"
:visible.sync=
"open"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
append-to-body
:close-on-click-modal=
"false"
>
<el-transfer
:titles=
"['显示', '隐藏']"
v-model=
"value"
...
...
safe-campus-bbs-ui/src/components/UserSelect/index.vue
View file @
3e5a4c60
<
template
>
<el-dialog
:visible.sync=
"visible"
:title=
"title"
width=
"60%"
append-to-body
>
<el-dialog
:visible.sync=
"visible"
:title=
"title"
width=
"60%"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
:model=
"queryParams"
ref=
"formRef"
:inline=
"true"
@
submit
.
prevent
.
stop
>
<el-form-item
label=
"姓名"
>
<el-input
placeholder=
"请输入"
v-model=
"queryParams.nickName"
></el-input>
...
...
safe-campus-bbs-ui/src/views/monitor/job/index.vue
View file @
3e5a4c60
...
...
@@ -152,7 +152,7 @@
/>
<!-- 添加或修改定时任务对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"800px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"800px"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-row>
<el-col
:span=
"12"
>
...
...
safe-campus-bbs-ui/src/views/monitor/job/log.vue
View file @
3e5a4c60
...
...
@@ -144,7 +144,7 @@
/>
<!-- 调度日志详细 -->
<el-dialog
title=
"调度日志详细"
:visible.sync=
"open"
width=
"700px"
append-to-body
>
<el-dialog
title=
"调度日志详细"
:visible.sync=
"open"
width=
"700px"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"100px"
size=
"mini"
>
<el-row>
<el-col
:span=
"12"
>
...
...
safe-campus-bbs-ui/src/views/monitor/operlog/index.vue
View file @
3e5a4c60
...
...
@@ -151,7 +151,7 @@
/>
<!-- 操作日志详细 -->
<el-dialog
title=
"操作日志详细"
:visible.sync=
"open"
width=
"700px"
append-to-body
>
<el-dialog
title=
"操作日志详细"
:visible.sync=
"open"
width=
"700px"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"100px"
size=
"mini"
>
<el-row>
<el-col
:span=
"12"
>
...
...
safe-campus-bbs-ui/src/views/pointsMall/index.vue
View file @
3e5a4c60
...
...
@@ -28,7 +28,7 @@
<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>
<el-image
:src=
"row.imgsUrl"
:preview-src-list=
"[row.imgsUrl]"
style=
"width: 40px;height: 40px;"
></el-image>
</
template
>
</el-table-column>
<el-table-column
label=
"商品状态"
prop=
"showStatus"
align=
"center"
>
...
...
safe-campus-bbs-ui/src/views/pointsManage/PointsRulesDialog.vue
View file @
3e5a4c60
...
...
@@ -6,13 +6,15 @@
<el-table
:data=
"addList"
>
<el-table-column
label=
"加分行为"
prop=
"operateName"
align=
"center"
></el-table-column>
<el-table-column
label=
"分值"
prop=
"operatePoints"
align=
"center"
>
<template
#default
="
{ row }">
<el-input
v-model=
"row.operatePoints"
></el-input>
<template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.operatePoints"
@
input=
"handleInput(scope.$index, scope.row, addList)"
type=
"text"
></el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"每周上限次数"
prop=
"limitCount"
align=
"center"
>
<
template
#default
="{
row
}"
>
<el-input
v-model=
"row.limitCount"
></el-input>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.limitCount"
type=
"text"
@
input=
"handleInputLimit(scope.$index, scope.row, addList)"
></el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"启用"
prop=
"enableStatus"
align=
"center"
>
...
...
@@ -27,13 +29,15 @@
<el-table
:data=
"decreaseList"
>
<el-table-column
label=
"减分行为"
prop=
"operateName"
align=
"center"
></el-table-column>
<el-table-column
label=
"分值"
prop=
"operatePoints"
align=
"center"
>
<
template
#default
="{
row
}"
>
<el-input
v-model=
"row.operatePoints"
></el-input>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.operatePoints"
@
input=
"handleInput(scope.$index, scope.row, decreaseList)"
type=
"text"
></el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"每周上限次数"
prop=
"limitCount"
align=
"center"
>
<
template
#default
="{
row
}"
>
<el-input
v-model=
"row.limitCount"
></el-input>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.limitCount"
type=
"text"
@
input=
"handleInputLimit(scope.$index, scope.row, decreaseList)"
></el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"启用"
prop=
"enableStatus"
align=
"center"
>
...
...
@@ -83,12 +87,44 @@ export default {
updatePointsSetting
(
data
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$modal
.
msgSuccess
(
"
修改配置成功
"
);
this
.
visible
=
false
;
}
else
{
this
.
visible
=
false
;
}
else
{
this
.
$modal
.
msgError
(
res
.
msg
||
"
修改配置失败
"
);
}
})
},
handleInput
(
index
,
row
,
list
)
{
let
value
=
row
.
operatePoints
;
// 获取当前输入值
if
(
!
value
)
{
row
.
operatePoints
=
''
;
return
;
}
// 1. 过滤所有非数字字符
let
val
=
value
.
toString
().
replace
(
/
\D
/g
,
''
);
// 2. 若首位是0且长度>1,去除首位0(如 "0123" → "123")
if
(
val
.
length
>
1
&&
val
[
0
]
===
'
0
'
)
{
val
=
val
.
slice
(
1
);
}
if
(
val
!==
row
.
operatePoints
)
{
this
.
$set
(
list
,
index
,
{
...
row
,
operatePoints
:
val
});
}
},
handleInputLimit
(
index
,
row
,
list
)
{
let
value
=
row
.
limitCount
;
if
(
!
value
)
{
row
.
limitCount
=
''
;
return
;
}
let
val
=
value
.
toString
().
replace
(
/
\D
/g
,
''
);
if
(
val
.
length
>
1
&&
val
[
0
]
===
'
0
'
)
{
val
=
val
.
slice
(
1
);
}
if
(
val
!==
row
.
limitCount
)
{
this
.
$set
(
list
,
index
,
{
...
row
,
limitCount
:
val
});
}
}
}
}
</
script
>
...
...
safe-campus-bbs-ui/src/views/system/config/index.vue
View file @
3e5a4c60
...
...
@@ -148,7 +148,7 @@
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"参数名称"
prop=
"configName"
>
<el-input
v-model=
"form.configName"
placeholder=
"请输入参数名称"
/>
...
...
safe-campus-bbs-ui/src/views/system/dept/index.vue
View file @
3e5a4c60
...
...
@@ -97,7 +97,7 @@
</el-table>
<!-- 添加或修改部门对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"600px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"600px"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-row>
<el-col
:span=
"24"
v-if=
"form.parentId !== 0"
>
...
...
safe-campus-bbs-ui/src/views/system/dict/data.vue
View file @
3e5a4c60
...
...
@@ -141,7 +141,7 @@
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"字典类型"
>
<el-input
v-model=
"form.dictType"
:disabled=
"true"
/>
...
...
safe-campus-bbs-ui/src/views/system/dict/index.vue
View file @
3e5a4c60
...
...
@@ -158,7 +158,7 @@
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"字典名称"
prop=
"dictName"
>
<el-input
v-model=
"form.dictName"
placeholder=
"请输入字典名称"
/>
...
...
safe-campus-bbs-ui/src/views/system/menu/index.vue
View file @
3e5a4c60
...
...
@@ -103,7 +103,7 @@
</el-table>
<!-- 添加或修改菜单对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"680px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"680px"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-row>
<el-col
:span=
"24"
>
...
...
safe-campus-bbs-ui/src/views/system/notice/index.vue
View file @
3e5a4c60
...
...
@@ -123,7 +123,7 @@
/>
<!--
添加或修改公告对话框
-->
<
el
-
dialog
:
title
=
"
title
"
:
visible
.
sync
=
"
open
"
width
=
"
780px
"
append
-
to
-
body
>
<
el
-
dialog
:
title
=
"
title
"
:
visible
.
sync
=
"
open
"
width
=
"
780px
"
append
-
to
-
body
:
close
-
on
-
click
-
modal
=
"
false
"
>
<
el
-
form
ref
=
"
form
"
:
model
=
"
form
"
:
rules
=
"
rules
"
label
-
width
=
"
80px
"
>
<
el
-
row
>
<
el
-
col
:
span
=
"
12
"
>
...
...
safe-campus-bbs-ui/src/views/system/post/index.vue
View file @
3e5a4c60
...
...
@@ -124,7 +124,7 @@
/>
<!-- 添加或修改岗位对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"岗位名称"
prop=
"postName"
>
<el-input
v-model=
"form.postName"
placeholder=
"请输入岗位名称"
/>
...
...
safe-campus-bbs-ui/src/views/system/role/index.vue
View file @
3e5a4c60
...
...
@@ -156,7 +156,7 @@
/>
<!-- 添加或修改角色配置对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
label=
"角色名称"
prop=
"roleName"
>
<el-input
v-model=
"form.roleName"
placeholder=
"请输入角色名称"
/>
...
...
@@ -208,7 +208,7 @@
</el-dialog>
<!-- 分配角色数据权限对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"openDataScope"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"openDataScope"
width=
"500px"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
:model=
"form"
label-width=
"80px"
>
<el-form-item
label=
"角色名称"
>
<el-input
v-model=
"form.roleName"
:disabled=
"true"
/>
...
...
safe-campus-bbs-ui/src/views/system/role/selectUser.vue
View file @
3e5a4c60
<
template
>
<!-- 授权用户 -->
<el-dialog
title=
"选择用户"
:visible.sync=
"visible"
width=
"800px"
top=
"5vh"
append-to-body
>
<el-dialog
title=
"选择用户"
:visible.sync=
"visible"
width=
"800px"
top=
"5vh"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
>
<el-form-item
label=
"用户名称"
prop=
"userName"
>
<el-input
...
...
safe-campus-bbs-ui/src/views/system/user/index.vue
View file @
3e5a4c60
...
...
@@ -203,7 +203,7 @@
</el-row>
<!-- 添加或修改用户配置对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"600px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"600px"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-row>
<el-col
:span=
"12"
>
...
...
@@ -309,7 +309,7 @@
</el-dialog>
<!-- 用户导入对话框 -->
<el-dialog
:title=
"upload.title"
:visible.sync=
"upload.open"
width=
"400px"
append-to-body
>
<el-dialog
:title=
"upload.title"
:visible.sync=
"upload.open"
width=
"400px"
append-to-body
:close-on-click-modal=
"false"
>
<el-upload
ref=
"upload"
:limit=
"1"
...
...
safe-campus-bbs-ui/src/views/system/user/profile/userAvatar.vue
View file @
3e5a4c60
<
template
>
<div>
<div
class=
"user-info-head"
@
click=
"editCropper()"
><img
v-bind:src=
"options.img"
title=
"点击上传头像"
class=
"img-circle img-lg"
/></div>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"800px"
append-to-body
@
opened=
"modalOpened"
@
close=
"closeDialog"
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"800px"
:close-on-click-modal=
"false"
append-to-body
@
opened=
"modalOpened"
@
close=
"closeDialog"
>
<el-row>
<el-col
:xs=
"24"
:md=
"12"
:style=
"
{height: '350px'}">
<vue-cropper
...
...
safe-campus-bbs-ui/src/views/tool/build/IconsDialog.vue
View file @
3e5a4c60
...
...
@@ -7,6 +7,7 @@
v-on=
"$listeners"
@
open=
"onOpen"
@
close=
"onClose"
:close-on-click-modal=
"false"
>
<div
slot=
"title"
>
选择图标
...
...
safe-campus-bbs-ui/src/views/tool/gen/importTable.vue
View file @
3e5a4c60
<
template
>
<!-- 导入表 -->
<el-dialog
title=
"导入表"
:visible.sync=
"visible"
width=
"800px"
top=
"5vh"
append-to-body
>
<el-dialog
title=
"导入表"
:visible.sync=
"visible"
width=
"800px"
top=
"5vh"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
>
<el-form-item
label=
"表名称"
prop=
"tableName"
>
<el-input
...
...
safe-campus-bbs-ui/src/views/tool/gen/index.vue
View file @
3e5a4c60
...
...
@@ -158,7 +158,7 @@
@
pagination=
"getList"
/>
<!-- 预览界面 -->
<el-dialog
:title=
"preview.title"
:visible.sync=
"preview.open"
width=
"80%"
top=
"5vh"
append-to-body
class=
"scrollbar"
>
<el-dialog
:title=
"preview.title"
:visible.sync=
"preview.open"
width=
"80%"
top=
"5vh"
append-to-body
class=
"scrollbar"
:close-on-click-modal=
"false"
>
<el-tabs
v-model=
"preview.activeName"
>
<el-tab-pane
v-for=
"(value, key) in preview.data"
...
...
safe-campus-bbs-uniapp/components/Comment-Item.vue
View file @
3e5a4c60
...
...
@@ -86,7 +86,7 @@
if
(
newVal
.
id
){
this
.
queryParams
.
momentId
=
newVal
.
id
;
this
.
commentList
=
[];
this
.
userInfo
=
JSON
.
parse
(
getUserInfo
(
))
this
.
userInfo
=
JSON
.
parse
(
JSON
.
parse
(
getUserInfo
()
))
this
.
getCommentList
()
}
}
...
...
safe-campus-bbs-uniapp/components/Dynamic-Item.vue
View file @
3e5a4c60
...
...
@@ -4,9 +4,10 @@
<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
v-if=
"!deleteable"
class=
"more-icon"
src=
"/static/images/more-icon.png"
></image>
<image
v-if=
"deleteable"
class=
"more-icon"
@
click.stop=
"handleDelDynamics"
<image
v-if=
"deleteable || userInfo.bbsAdmin"
class=
"more-icon"
@
click.stop=
"handleDelDynamics"
src=
"/static/images/more-icon.png"
></image>
<image
v-else
class=
"more-icon"
src=
"/static/images/more-icon.png"
></image>
<!-- 删除按钮 -->
<view
class=
"del-btn"
v-if=
"showDelBtn"
@
click.stop=
"handleDel"
:style=
"'left:' + clientX + 'rpx;' +'top:' + clientY + 'rpx'"
>
...
...
@@ -179,7 +180,7 @@
if
(
val
===
oldVal
)
{
return
;
}
this
.
userInfo
=
JSON
.
parse
(
getUserInfo
(
))
this
.
userInfo
=
JSON
.
parse
(
JSON
.
parse
(
getUserInfo
()
))
this
.
preNodes
=
this
.
formatContent
(
val
)
}
}
...
...
safe-campus-bbs-uniapp/components/HelangCompress.vue
0 → 100644
View file @
3e5a4c60
<
template
>
<view
class=
"compress"
v-if=
"canvasId"
>
<canvas
:canvas-id=
"canvasId"
:style=
"
{ width: canvasSize.width, height: canvasSize.height }">
</canvas>
</view>
</
template
>
<
script
>
export
default
{
name
:
'
HelangCompress
'
,
data
()
{
return
{
pic
:
''
,
canvasSize
:
{
width
:
0
,
height
:
0
},
canvasId
:
''
};
},
mounted
()
{
// 创建 canvasId
if
(
!
uni
||
!
uni
.
_helang_compress_canvas
)
{
uni
.
_helang_compress_canvas
=
1
;
}
else
{
uni
.
_helang_compress_canvas
++
;
}
this
.
canvasId
=
`compress-canvas
${
uni
.
_helang_compress_canvas
}
`
;
},
methods
:
{
// 压缩
compressFun
(
params
)
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
// 等待图片信息
let
info
=
await
this
.
getImageInfo
(
params
.
src
)
.
then
((
info
)
=>
info
)
.
catch
(()
=>
null
);
if
(
!
info
)
{
reject
(
'
获取图片信息异常
'
);
return
;
}
// 设置最大 & 最小 尺寸
const
maxSize
=
params
.
maxSize
||
1080
;
const
minSize
=
params
.
minSize
||
640
;
// 当前图片尺寸
let
{
width
,
height
}
=
info
;
// 非 H5 平台进行最小尺寸校验
// #ifndef H5
if
(
width
<=
minSize
&&
height
<=
minSize
)
{
resolve
(
params
.
src
);
return
;
}
// #endif
// 最大尺寸计算
//(图像的宽度和高度是否超过最大尺寸。如果其中任一维度超过最大尺寸,代码将对图像进行调整,以使其适应最大尺寸并保持其宽高比。)
// 这样可以确保图像在调整大小后仍保持原始比例,并且不会超过指定的最大尺寸
if
(
width
>
maxSize
||
height
>
maxSize
)
{
if
(
width
>
height
)
{
height
=
Math
.
floor
(
height
/
(
width
/
maxSize
));
width
=
maxSize
;
}
else
{
width
=
Math
.
floor
(
width
/
(
height
/
maxSize
));
height
=
maxSize
;
}
}
// 设置画布尺寸
this
.
$set
(
this
,
'
canvasSize
'
,
{
width
:
`
${
width
}
px`
,
height
:
`
${
height
}
px`
});
// Vue.nextTick 回调在 App 有异常,则使用 setTimeout 等待DOM更新
setTimeout
(()
=>
{
// 创建 canvas 绘图上下文(指定 canvasId)。在自定义组件下,第二个参数传入组件实例this,以操作组件内
<
canvas
/>
组件
// Tip: 需要指定 canvasId,该绘图上下文只作用于对应的
<
canvas
/>
const
ctx
=
uni
.
createCanvasContext
(
this
.
canvasId
,
this
);
// 清除画布上在该矩形区域内的内容。(x,y,宽,高)
ctx
.
clearRect
(
0
,
0
,
width
,
height
);
// 绘制图像到画布。(所要绘制的图片资源,x,y,宽,高)
ctx
.
drawImage
(
info
.
path
,
0
,
0
,
width
,
height
);
// 将之前在绘图上下文中的描述(路径、变形、样式)画到 canvas 中。
// 本次绘制是否接着上一次绘制,即reserve参数为false,则在本次调用drawCanvas绘制之前native层应先清空画布再继续绘制;若reserver参数为true,则保留当前画布上的内容,本次调用drawCanvas绘制的内容覆盖在上面,默认 false
// 绘制完成后回调
ctx
.
draw
(
false
,
()
=>
{
// 把当前画布指定区域的内容导出生成指定大小的图片,并返回文件路径。在自定义组件下,第二个参数传入自定义组件实例,以操作组件内
<
canvas
>
组件。
uni
.
canvasToTempFilePath
(
{
x
:
0
,
//画布x轴起点(默认0)
y
:
0
,
//画布y轴起点(默认0)
width
:
width
,
//画布宽度(默认为canvas宽度-x)
height
:
height
,
//画布高度(默认为canvas高度-y
destWidth
:
width
,
//图片宽度(默认为 width * 屏幕像素密度)
destHeight
:
height
,
//输出图片高度(默认为 height * 屏幕像素密度)
canvasId
:
this
.
canvasId
,
//画布标识,传入
<
canvas
/>
的
canvas
-
id
(支付宝小程序是
id
、其他平台是
canvas
-
id
)
fileType
:
params
.
fileType
||
'
png
'
,
//目标文件的类型,只支持 'jpg' 或 'png'。默认为 'png'
quality
:
params
.
quality
||
0.9
,
//图片的质量,取值范围为 (0, 1],不在范围内时当作1.0处理
success
:
(
res
)
=>
{
// 在H5平台下,tempFilePath 为 base64
resolve
(
res
.
tempFilePath
);
},
fail
:
(
err
)
=>
{
reject
(
null
);
}
},
this
);
});
},
300
);
});
},
// 获取图片信息
getImageInfo
(
src
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
getImageInfo
({
src
,
success
:
(
info
)
=>
{
resolve
(
info
);
},
fail
:
(
err
)
=>
{
console
.
log
(
err
,
'
err===获取图片信息
'
);
reject
(
null
);
}
});
});
},
// 批量压缩
async
compress
(
params
)
{
// 初始化状态变量
let
[
index
,
done
,
fail
]
=
[
0
,
0
,
0
];
let
paths
=
[];
// 处理待压缩图片列表
let
waitList
=
Array
.
isArray
(
params
.
src
)
?
params
.
src
:
[
params
.
src
];
// 批量压缩方法
let
batch
=
async
()
=>
{
while
(
index
<
waitList
.
length
)
{
try
{
const
path
=
await
next
();
done
++
;
paths
.
push
(
path
);
params
.
progress
?.({
done
,
fail
,
count
:
waitList
.
length
});
}
catch
(
error
)
{
fail
++
;
params
.
progress
?.({
done
,
fail
,
count
:
waitList
.
length
});
}
index
++
;
}
};
// 单个图片压缩方法
let
next
=
()
=>
{
const
currentSrc
=
waitList
[
index
];
return
this
.
compressFun
({
src
:
currentSrc
,
maxSize
:
params
.
maxSize
,
fileType
:
params
.
fileType
,
quality
:
params
.
quality
,
minSize
:
params
.
minSize
});
};
// 返回Promise并处理结果
return
new
Promise
((
resolve
,
reject
)
=>
{
try
{
batch
()
.
then
(()
=>
{
if
(
typeof
params
.
src
===
'
string
'
)
{
resolve
(
paths
[
0
]);
}
else
{
resolve
(
paths
);
}
})
.
catch
((
error
)
=>
{
reject
(
error
);
});
}
catch
(
error
)
{
reject
(
error
);
}
});
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.compress
{
position
:
fixed
;
width
:
12px
;
height
:
12px
;
overflow
:
hidden
;
top
:
-99999px
;
left
:
0
;
}
</
style
>
\ No newline at end of file
safe-campus-bbs-uniapp/components/ImageUpload.vue
View file @
3e5a4c60
<
template
>
<view
class=
"ImagesUpload"
>
<helang-compress
ref=
"helangCompress"
></helang-compress>
<view
class=
"pic-box"
>
<block
v-if=
"fileList && fileList.length > 0"
>
<view
class=
"pic-list-item"
v-for=
"(img, i) in fileList"
:key=
"i"
>
...
...
@@ -73,7 +74,8 @@
}
from
'
@/utils/auth.js
'
;
import
$modal
from
'
@/utils/modal.js
'
import
VideoPreview
from
'
./VideoPreview.vue
'
;
import
emotions
from
'
@/utils/emjo
'
;
import
emotions
from
'
@/utils/emjo
'
;
import
HelangCompress
from
'
./HelangCompress.vue
'
;
export
default
{
name
:
'
BatchImageUpload
'
,
props
:
{
...
...
@@ -106,7 +108,8 @@
}
},
components
:
{
VideoPreview
VideoPreview
,
HelangCompress
},
data
()
{
return
{
...
...
@@ -203,13 +206,41 @@
// 从本地相册选择图片或使用相机拍照
uni
.
chooseImage
({
count
:
_this
.
limiData
,
sourceType
:
[
'
album
'
],
sourceType
:
[
'
album
'
,
'
camera
'
],
sizeType
:
[
'
original
'
,
'
compressed
'
],
success
(
res
)
{
const
tempFilePaths
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
tempFilePaths
));
if
(
tempFilePaths
.
length
<=
_this
.
limiData
)
{
console
.
log
(
'
选择完
'
,
new
Date
())
// 开始上传到api
$modal
.
loading
(
'
上传中...
'
);
_this
.
handleUploadPic
(
tempFilePaths
)
// _this.handleUploadPic(tempFilePaths)
_this
.
$refs
.
helangCompress
.
compress
({
src
:
tempFilePaths
,
maxSize
:
800
,
fileType
:
'
jpg
'
,
quality
:
0.80
,
progress
:
(
res
)
=>
{
// console.log('压缩进度');
// console.log(res);
}
}).
then
((
res
)
=>
{
let
tempFile
=
res
.
map
(
item
=>
_this
.
dataURLtoBlob
(
item
));
if
(
tempFile
.
length
<=
0
)
{
uni
.
hideLoading
();
uni
.
showToast
({
title
:
'
未识别到图片
'
})
return
;
}
_this
.
handleUploadPic
(
tempFile
);
}).
catch
((
err
)
=>
{
uni
.
hideLoading
();
uni
.
showToast
({
title
:
err
})
})
}
else
{
uni
.
showToast
({
title
:
`最多选择
${
_this
.
limiData
}
张`
,
...
...
@@ -220,13 +251,28 @@
}
});
},
//将base64转换为blob
dataURLtoBlob
(
dataurl
)
{
var
arr
=
dataurl
.
split
(
'
,
'
),
mime
=
arr
[
0
].
match
(
/:
(
.*
?)
;/
)[
1
],
bstr
=
atob
(
arr
[
1
]),
n
=
bstr
.
length
,
u8arr
=
new
Uint8Array
(
n
);
while
(
n
--
)
{
u8arr
[
n
]
=
bstr
.
charCodeAt
(
n
);
}
return
new
Blob
([
u8arr
],
{
type
:
mime
});
},
handleUploadPic
(
fileList
)
{
console
.
log
(
'
上传图片
'
,
new
Date
())
const
_this
=
this
;
let
uploadTasks
=
fileList
.
map
((
item
,
index
)
=>
{
return
uni
.
uploadFile
({
url
:
_this
.
baseUrl
+
_this
.
uploadUrl
,
file
Path
:
item
,
file
:
item
,
name
:
'
file
'
,
formData
:
{},
header
:
{
...
...
@@ -235,14 +281,8 @@
success
:
(
uploadFileRes
)
=>
{
const
data
=
JSON
.
parse
(
uploadFileRes
.
data
);
if
(
data
.
code
===
401
)
{
showConfirm
(
'
登录状态已过期,您可以继续留在该页面,或者重新登录?
'
).
then
((
res
)
=>
{
if
(
res
.
confirm
)
{
_this
.
$store
.
dispatch
(
'
LogOut
'
).
then
((
res
)
=>
{
uni
.
reLaunch
({
url
:
'
/pages/login/login
'
});
});
}
uni
.
reLaunch
({
url
:
'
/pages/login/login
'
});
}
else
if
(
data
.
code
===
200
)
{
// 上传成功
...
...
@@ -256,13 +296,14 @@
},
// 接口调用结束的回调函数(调用成功、失败都会执行)
complete
:
()
=>
{
console
.
log
(
'
上传完成
'
,
new
Date
())
$modal
.
closeLoading
();
}
});
})
Promise
.
all
(
uploadTasks
).
then
((
res
)
=>
{
console
.
log
(
'
所有图片上传完成
'
);
// 所有图片上传成功后执行的逻辑
//
console.log('所有图片上传完成'); // 所有图片上传成功后执行的逻辑
}).
catch
(
err
=>
{
console
.
error
(
'
有图片上传失败
'
,
err
);
// 如果有上传失败的情况处理的逻辑
});
...
...
safe-campus-bbs-uniapp/pages/index/index.vue
View file @
3e5a4c60
...
...
@@ -2,7 +2,8 @@
<view
class=
"page-container"
>
<view
class=
"search-box-common"
>
<image
src=
"/static/images/search-icon.png"
class=
"search-icon"
@
click=
"refreshContentList"
></image>
<input
placeholder=
"搜索"
style=
"width: 100%;"
v-model=
"queryParams.content"
@
keypress.enter=
"refreshContentList"
placeholder-class=
"placeholder-class"
/>
<input
placeholder=
"搜索"
style=
"width: 100%;"
v-model=
"queryParams.content"
@
keypress.enter=
"refreshContentList"
placeholder-class=
"placeholder-class"
/>
</view>
<scroll-view
class=
"scroll-view-index"
scroll-y
:show-scrollbar=
"false"
v-if=
"list.length>0"
...
...
@@ -16,8 +17,8 @@
</scroll-view>
<!-- 发布按钮 -->
<movable-area
class=
"movable-area"
>
<movable-view
class=
"add-dynamic-box move-button"
:x=
"area.x+'rpx'"
:y=
"area.y + 'rpx'"
direction=
"all"
@
change=
"onChange"
damping=
"30"
@
click=
"toPublishPage"
>
<movable-view
class=
"add-dynamic-box move-button"
:x=
"area.x+'rpx'"
:y=
"area.y + 'rpx'"
direction=
"all"
@
change=
"onChange"
damping=
"30"
@
click=
"toPublishPage"
>
<image
class=
"icon"
src=
"/static/images/publish-icon.png"
></image>
</movable-view>
</movable-area>
...
...
@@ -52,13 +53,19 @@
ListEmpty
},
onLoad
()
{
this
.
$store
.
dispatch
(
'
GetInfo
'
)
this
.
getList
()
let
_this
=
this
;
uni
.
$on
(
'
hanldeDynamicRefresh
'
,
function
()
{
_this
.
list
=
[];
_this
.
queryParams
.
pageNum
=
1
;
_this
.
getList
()
this
.
$store
.
dispatch
(
'
GetInfo
'
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
getList
()
let
_this
=
this
;
uni
.
$on
(
'
hanldeDynamicRefresh
'
,
function
()
{
_this
.
list
=
[];
_this
.
queryParams
.
pageNum
=
1
;
_this
.
getList
()
})
}
if
(
res
.
code
==
401
){
window
.
location
=
res
.
data
}
})
},
beforeDestroy
()
{
...
...
@@ -78,7 +85,7 @@
})
dynamicList
(
this
.
queryParams
).
then
(
res
=>
{
this
.
list
=
[...
this
.
list
,
...
res
.
rows
]
this
.
total
=
res
.
total
}).
finally
(()
=>
{
uni
.
hideLoading
()
...
...
@@ -108,6 +115,7 @@
})
},
onChange
(
e
)
{
console
.
log
(
e
)
this
.
area
.
y
=
e
.
detail
.
y
;
this
.
area
.
x
=
e
.
detail
.
x
}
...
...
@@ -120,7 +128,7 @@
.movable-area
{
position
:
fixed
;
height
:
100%
;
height
:
calc
(
100vh
-
3
.75rem
)
;
width
:
100%
;
z-index
:
998
;
pointer-events
:
none
;
...
...
@@ -129,7 +137,7 @@
.move-button
{
pointer-events
:
auto
;
pointer-events
:
auto
;
}
...
...
safe-campus-bbs-uniapp/store/modules/user.js
View file @
3e5a4c60
...
...
@@ -55,14 +55,10 @@ const user = {
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getInfo
().
then
(
res
=>
{
if
(
res
.
code
==
200
){
const
user
=
res
.
data
commit
(
'
SET_USER_INFO
'
,
JSON
.
stringify
(
user
))
resolve
(
res
)
}
if
(
res
.
code
==
401
){
window
.
location
=
res
.
data
}
const
user
=
res
.
data
commit
(
'
SET_USER_INFO
'
,
JSON
.
stringify
(
user
))
resolve
(
res
)
}).
catch
(
error
=>
{
reject
(
error
)
})
...
...
safe-campus-bbs-uniapp/utils/request.js
View file @
3e5a4c60
...
...
@@ -3,7 +3,7 @@ import {getToken,removeToken,setRedirectPath} from '@/utils/auth';
import
errorCode
from
'
@/utils/errorCode
'
;
import
{
toast
,
showConfirm
,
tansParams
}
from
'
@/utils/common
'
import
store
from
'
@/store
'
;
let
timeout
=
3
0000
let
timeout
=
6
0000
const
baseUrl
=
config
.
requestUrl
+
'
/bbs/mobile/
'
const
request
=
config
=>
{
...
...
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