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
4eda70c0
Commit
4eda70c0
authored
Sep 18, 2025
by
yuwenwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG
parent
b26f2218
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
191 additions
and
77 deletions
+191
-77
safe-campus-bbs-ui/src/components/UserSelect/index.vue
safe-campus-bbs-ui/src/components/UserSelect/index.vue
+21
-6
safe-campus-bbs-ui/src/views/comment/index.vue
safe-campus-bbs-ui/src/views/comment/index.vue
+1
-1
safe-campus-bbs-ui/src/views/moments/index.vue
safe-campus-bbs-ui/src/views/moments/index.vue
+14
-6
safe-campus-bbs-ui/src/views/pointsExchange/index.vue
safe-campus-bbs-ui/src/views/pointsExchange/index.vue
+5
-8
safe-campus-bbs-ui/src/views/pointsMall/FormDialog.vue
safe-campus-bbs-ui/src/views/pointsMall/FormDialog.vue
+1
-1
safe-campus-bbs-ui/src/views/pointsManage/ExchangeDialog.vue
safe-campus-bbs-ui/src/views/pointsManage/ExchangeDialog.vue
+3
-10
safe-campus-bbs-ui/src/views/sensitives/BatchImport.vue
safe-campus-bbs-ui/src/views/sensitives/BatchImport.vue
+69
-0
safe-campus-bbs-ui/src/views/sensitives/index.vue
safe-campus-bbs-ui/src/views/sensitives/index.vue
+6
-2
safe-campus-bbs-uniapp/pages/publish/publish.vue
safe-campus-bbs-uniapp/pages/publish/publish.vue
+65
-41
safe-campus-bbs-uniapp/pages/topics/topics.vue
safe-campus-bbs-uniapp/pages/topics/topics.vue
+6
-2
No files found.
safe-campus-bbs-ui/src/components/UserSelect/index.vue
View file @
4eda70c0
...
...
@@ -8,8 +8,8 @@
<el-input
placeholder=
"请输入"
v-model=
"queryParams.userName"
></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"
>
...
...
@@ -17,7 +17,8 @@
{{
tag
.
nickName
}}
</el-tag>
</div>
<el-table
ref=
"tableRef"
row-key=
"userName"
:data=
"list"
@
selection-change=
"handleCheckboxChange"
v-loading=
"loading"
>
<el-table
ref=
"tableRef"
row-key=
"userName"
:data=
"list"
@
selection-change=
"handleCheckboxChange"
v-loading=
"loading"
>
<el-table-column
type=
"selection"
width=
"60"
></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>
...
...
@@ -42,11 +43,12 @@ export default {
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
nickName
:
''
nickName
:
''
,
userName
:
''
},
total
:
0
,
selectDataList
:
[],
loading
:
false
loading
:
false
}
},
props
:
{
...
...
@@ -69,6 +71,19 @@ export default {
this
.
getList
(
data
)
},
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
()
},
handleReset
()
{
this
.
queryParams
=
{
pageNum
:
1
,
pageSize
:
10
,
nickName
:
''
,
userName
:
''
}
this
.
getList
()
},
getList
(
data
)
{
this
.
loading
=
true
;
listData
(
this
.
queryParams
).
then
(
res
=>
{
...
...
@@ -77,7 +92,7 @@ export default {
if
(
data
)
{
this
.
getDetail
(
data
)
}
}).
finally
(()
=>
{
}).
finally
(()
=>
{
this
.
loading
=
false
})
},
...
...
safe-campus-bbs-ui/src/views/comment/index.vue
View file @
4eda70c0
...
...
@@ -3,7 +3,7 @@
<div
class=
"page-container"
>
<el-form
:model=
"queryParams"
:inline=
"true"
label-width=
"80px"
>
<el-form-item
label=
"评论内容"
>
<el-input
v-model=
"queryParams.
c
ontent"
placeholder=
"请输入"
></el-input>
<el-input
v-model=
"queryParams.
momentC
ontent"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"姓名"
>
<el-input
v-model=
"queryParams.nickName"
placeholder=
"请输入"
></el-input>
...
...
safe-campus-bbs-ui/src/views/moments/index.vue
View file @
4eda70c0
...
...
@@ -7,8 +7,9 @@
<el-input
placeholder=
"请输入"
v-model=
"queryParams.content"
style=
"width: 220px;"
></el-input>
</el-form-item>
<el-form-item
label=
"创建时间"
>
<el-date-picker
placeholder=
"请选择"
format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
v-model=
"queryParams.createTime"
></el-date-picker>
<el-date-picker
placeholder=
"请选择"
type=
"daterange"
format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
v-model=
"dateRange"
range-separator=
"至"
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
@
change=
"dateChange"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleQuery"
>
查询
</el-button>
...
...
@@ -43,7 +44,7 @@
</template>
<
script
>
import
{
listData
,
delData
}
from
'
@/api/moments
'
;
import
{
listData
,
delData
}
from
'
@/api/moments
'
;
import
DetailDialog
from
'
./DetailDialog.vue
'
;
export
default
{
name
:
'
Moments
'
,
...
...
@@ -58,7 +59,7 @@ export default {
dateRange
:
[],
}
},
components
:{
components
:
{
DetailDialog
},
created
()
{
...
...
@@ -90,6 +91,12 @@ export default {
this
.
getList
()
})
},
dateChange
(
val
){
if
(
val
.
length
>
0
){
this
.
queryParams
[
'
params[startTime]
'
]
=
val
[
0
]
this
.
queryParams
[
'
params[endTime]
'
]
=
val
[
1
]
}
},
// 查询
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
...
...
@@ -101,6 +108,7 @@ export default {
pageNum
:
1
,
pageSize
:
10
}
this
.
dateRange
=
[]
this
.
getList
()
}
}
...
...
safe-campus-bbs-ui/src/views/pointsExchange/index.vue
View file @
4eda70c0
...
...
@@ -4,16 +4,13 @@
<el-form
:model=
"queryParams"
:inline=
"true"
label-width=
"80px"
>
<el-form-item
label=
"兑换时间"
>
<el-date-picker
v-model=
"dateRange"
type=
"daterange"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
style=
"width: 2
20px;"
value-format=
"YYYY-MM-DD
"
@
change=
"dateChange"
></el-date-picker>
style=
"width: 2
40px;"
value-format=
"yyyy-MM-dd
"
@
change=
"dateChange"
></el-date-picker>
</el-form-item>
<el-form-item
label=
"兑换人"
>
<el-input
placeholder=
"请输入"
v-model=
"queryParams.userName"
style=
"width: 220px;"
></el-input>
</el-form-item>
<el-form-item
label=
"兑换商品"
>
<el-select
v-model=
"queryParams.goodsCode"
placeholder=
"请选择"
style=
"width: 220px;"
>
<el-option
v-for=
"(item, index) in optionList"
:label=
"item.name"
:value=
"item.code"
:key=
"index"
></el-option>
</el-select>
<el-input
placeholder=
"请输入"
v-model=
"queryParams.goodsName"
style=
"width: 220px;"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleQuery"
>
查询
</el-button>
...
...
@@ -109,9 +106,9 @@ export default {
},
// 时间段选择
dateChange
(
val
){
if
(
val
){
this
.
queryParams
.
startTime
=
val
[
0
]
this
.
queryParams
.
endTime
=
val
[
1
]
if
(
val
.
length
>
0
){
this
.
queryParams
[
'
params[startTime]
'
]
=
val
[
0
]
this
.
queryParams
[
'
params[endTime]
'
]
=
val
[
1
]
}
},
// 查询
...
...
safe-campus-bbs-ui/src/views/pointsMall/FormDialog.vue
View file @
4eda70c0
...
...
@@ -78,7 +78,7 @@ export default {
},
// 查详情
getDetail
(
row
)
{
detailData
(
row
.
id
).
then
(
res
=>
{
detailData
(
row
.
code
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
form
=
{
...
res
.
data
}
})
...
...
safe-campus-bbs-ui/src/views/pointsManage/ExchangeDialog.vue
View file @
4eda70c0
<
template
>
<el-dialog
:visible.sync=
"visible"
v-if=
"visible"
title=
"积分兑换"
width=
"36%"
class=
"dialog"
@
close=
"handleClose"
>
<el-form
:model=
"form"
ref=
"formRef"
label-position=
"top"
:rules=
"rules"
>
<el-form-item
label=
"兑换人"
>
<UserSelectInput
:value.sync=
"form.userName"
placeholder=
"请选择兑换人"
></UserSelectInput>
<el-form-item
label=
"兑换人"
prop=
"userName"
>
<UserSelectInput
v-model=
"form.userName"
:value.sync=
"form.userName"
placeholder=
"请选择兑换人"
></UserSelectInput>
</el-form-item>
<el-form-item
label=
"会员等级"
>
<el-input
v-model=
"form.gradeName"
:readonly=
"true"
placeholder=
"请输入"
></el-input>
...
...
@@ -33,6 +33,7 @@ export default {
userList
:
[],
optionList
:
[],
rules
:
{
userName
:[{
required
:
true
,
message
:
'
请选择兑换人
'
,
trigger
:[
'
blur
'
,
'
change
'
]}],
goodsCode
:
[{
required
:
true
,
message
:
'
请选择兑换商品
'
,
trigger
:
[
'
blur
'
,
'
change
'
]
}]
},
disabled
:
false
...
...
@@ -80,14 +81,6 @@ export default {
goodsCode
,
currentPoints
}
if
(
!
userName
)
{
this
.
$modal
.
msgError
(
"
请选择兑换人
"
);
return
;
}
// if (!code) {
// this.$modal.msgError("请选择兑换商品");
// return;
// }
this
.
$refs
.
formRef
.
validate
((
valid
)
=>
{
if
(
valid
)
{
exchange
(
data
).
then
(
res
=>
{
...
...
safe-campus-bbs-ui/src/views/sensitives/BatchImport.vue
0 → 100644
View file @
4eda70c0
<
template
>
<el-dialog
:title=
"upload.title"
:visible.sync=
"upload.open"
width=
"400px"
append-to-body
>
<el-upload
ref=
"upload"
:limit=
"1"
accept=
".txt"
:headers=
"upload.headers"
:action=
"upload.url + '?updateSupport=' + upload.updateSupport"
:disabled=
"upload.isUploading"
:on-progress=
"handleFileUploadProgress"
:on-success=
"handleFileSuccess"
:auto-upload=
"false"
drag
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__tip text-center"
slot=
"tip"
>
<span>
导入文件格式:导入txt文件,每个敏感词占一行
</span>
<!--
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size:12px;vertical-align: baseline;"
@
click=
"importTemplate"
>
下载模板
</el-link>
-->
</div>
</el-upload>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitFileForm"
>
确 定
</el-button>
<el-button
@
click=
"upload.open = false"
>
取 消
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
getToken
}
from
"
@/utils/auth
"
;
export
default
{
data
()
{
return
{
// 用户导入参数
upload
:
{
// 是否显示弹出层(用户导入)
open
:
false
,
// 弹出层标题(用户导入)
title
:
"
批量导入敏感词
"
,
// 是否禁用上传
isUploading
:
false
,
// 是否更新已经存在的用户数据
updateSupport
:
0
,
// 设置上传的请求头部
headers
:
{
Authorization
:
"
Bearer
"
+
getToken
()
},
// 上传的地址
url
:
process
.
env
.
VUE_APP_BASE_API
+
"
/bbs/moment/sensitive/word/import
"
},
}
},
created
()
{
},
methods
:
{
openModal
(){
this
.
upload
.
open
=
true
},
// 文件上传中处理
handleFileUploadProgress
(
event
,
file
,
fileList
)
{
this
.
upload
.
isUploading
=
true
;
},
// 文件上传成功处理
handleFileSuccess
(
response
,
file
,
fileList
)
{
this
.
upload
.
open
=
false
;
this
.
upload
.
isUploading
=
false
;
this
.
$refs
.
upload
.
clearFiles
();
this
.
$alert
(
"
<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>
"
+
response
.
msg
+
"
</div>
"
,
"
导入结果
"
,
{
dangerouslyUseHTMLString
:
true
});
this
.
$emit
(
'
handleOk
'
)
},
// 提交上传文件
submitFileForm
()
{
this
.
$refs
.
upload
.
submit
();
}
}
}
</
script
>
\ No newline at end of file
safe-campus-bbs-ui/src/views/sensitives/index.vue
View file @
4eda70c0
...
...
@@ -35,12 +35,15 @@
<!-- 表单 -->
<form-dialog
ref=
"formDialogRef"
@
handleOk=
"handleReset"
></form-dialog>
<!-- 批量导入 -->
<batch-import
ref=
"batchImportRef"
@
handleOk=
"handleReset"
></batch-import>
</div>
</template>
<
script
>
import
{
listData
,
setTop
,
delData
}
from
'
@/api/sensitives
'
;
import
FormDialog
from
'
./FormDialog.vue
'
;
import
BatchImport
from
'
./BatchImport.vue
'
;
export
default
{
name
:
'
Sensitives
'
,
data
()
{
...
...
@@ -54,7 +57,8 @@ export default {
}
},
components
:
{
FormDialog
FormDialog
,
BatchImport
},
created
()
{
...
...
@@ -104,7 +108,7 @@ export default {
},
// 导入敏感词
handleImport
(){
this
.
$refs
.
batchImportRef
.
openModal
()
},
}
}
...
...
safe-campus-bbs-uniapp/pages/publish/publish.vue
View file @
4eda70c0
...
...
@@ -8,27 +8,32 @@
<view
class=
"publish-box"
>
<textarea
class=
"textarea"
v-model=
"form.content"
placeholder=
"分享有趣事~"
placeholder-class=
"placeholder-class"
/>
<image-upload
v-model=
"form.attachments"
:limit=
"9"
:showIcons=
"true"
@
componentsType=
"handleSetComponentsType"
@
handleTopic=
"handleOpenTopicSelection"
></image-upload>
<image-upload
v-model=
"form.attachments"
:limit=
"9"
:showIcons=
"true"
@
componentsType=
"handleSetComponentsType"
@
handleTopic=
"handleOpenTopicSelection"
></image-upload>
</view>
<view
class=
"permission-box"
>
<view
class=
"item"
>
<view
class=
"text"
>
允许评论
</view>
<switch
color=
"#00E165"
@
change=
"(val)=>handleChange(val,'isEnableComment')"
:checked=
"form.isEnableComment==1"
/>
<switch
color=
"#00E165"
@
change=
"(val)=>handleChange(val,'isEnableComment')"
:checked=
"form.isEnableComment==1"
/>
</view>
<view
class=
"item"
>
<view
class=
"text"
>
开启评论精选
</view>
<switch
color=
"#00E165"
@
change=
"(val)=>handleChange(val,'isEnableFeaturedComment')"
:checked=
"form.isEnableFeaturedComment==1"
/>
<switch
color=
"#00E165"
@
change=
"(val)=>handleChange(val,'isEnableFeaturedComment')"
:checked=
"form.isEnableFeaturedComment==1"
/>
</view>
<view
class=
"item"
>
<view
class=
"text"
>
开启PK
</view>
<switch
color=
"#00E165"
@
change=
"(val)=>handleChange(val,'isEnableVote')"
:checked=
"form.isEnableVote==1"
/>
<switch
color=
"#00E165"
@
change=
"(val)=>handleChange(val,'isEnableVote')"
:checked=
"form.isEnableVote==1"
/>
</view>
</view>
<!-- pk数据编辑 -->
<view
class=
"pk-edit-box"
v-if=
"form.isEnableVote==1"
>
<view
class=
"textarea-box"
>
<textarea
class=
"textarea"
v-model=
"form.voteTitle"
placeholder=
"请输入PK标题~(0/12)"
placeholder-class=
"placeholder-class"
/>
<textarea
class=
"textarea"
v-model=
"form.voteTitle"
placeholder=
"请输入PK标题~(0/12)"
placeholder-class=
"placeholder-class"
/>
</view>
<view
class=
"pk-type-box"
>
<radio-group
v-model=
"form.voteOptionType"
@
change=
"radioChange"
>
...
...
@@ -42,11 +47,13 @@
<view
class=
"choice-box"
v-if=
"form.voteOptionType=='IMAGE'"
>
<view
class=
"choice-item"
>
<image-upload
v-model=
"voteOptionsAffirmative"
:limit=
"1"
:width=
"120"
:height=
"120"
:showIcons=
"false"
></image-upload>
<image-upload
v-model=
"voteOptionsAffirmative"
:limit=
"1"
:width=
"120"
:height=
"120"
:showIcons=
"false"
></image-upload>
<input
class=
"text"
v-model=
"form.voteOptions[0].name"
placeholder=
"请输入选项1(4字以内)"
/>
</view>
<view
class=
"choice-item"
>
<image-upload
v-model=
"voteOptionsOpposing"
:limit=
"1"
:width=
"120"
:height=
"120"
:showIcons=
"false"
></image-upload>
<image-upload
v-model=
"voteOptionsOpposing"
:limit=
"1"
:width=
"120"
:height=
"120"
:showIcons=
"false"
></image-upload>
<input
class=
"text"
v-model=
"form.voteOptions[1].name"
placeholder=
"请输入选项2(4字以内)"
/>
</view>
</view>
...
...
@@ -134,82 +141,99 @@
voteTitle
:
''
,
voteOptionType
:
'
TEXT
'
,
voteOptions
:
[{
name
:
''
,
imageUrl
:
''
},{
name
:
''
,
imageUrl
:
''
name
:
''
,
imageUrl
:
''
},
{
name
:
''
,
imageUrl
:
''
}],
},
voteOptionsAffirmative
:[],
voteOptionsOpposing
:[]
voteOptionsAffirmative
:
[],
voteOptionsOpposing
:
[]
}
},
components
:
{
ImageUpload
},
onLoad
(
options
)
{
let
{
topicId
,
topicName
}
=
options
;
if
(
topicId
){
this
.
topicList
.
push
({
name
:
topicName
,
id
:
topicId
})
let
{
topicId
,
topicName
}
=
options
;
if
(
topicId
)
{
this
.
topicList
.
push
({
name
:
topicName
,
id
:
topicId
,
})
}
},
methods
:
{
// 允许评论,开启精选等操作
handleChange
(
e
,
field
)
{
console
.
log
(
e
,
field
)
this
.
form
[
field
]
=
e
.
detail
.
value
?
1
:
0
handleChange
(
e
,
field
)
{
console
.
log
(
e
,
field
)
this
.
form
[
field
]
=
e
.
detail
.
value
?
1
:
0
},
// 图文PK或者文字PK
radioChange
(
e
)
{
console
.
log
(
e
)
this
.
form
.
voteOptionType
=
e
.
detail
.
value
},
handleSetComponentsType
(
type
){
if
(
type
&&
this
.
form
.
attachments
.
length
>
0
)
{
handleSetComponentsType
(
type
)
{
if
(
type
&&
this
.
form
.
attachments
.
length
>
0
)
{
this
.
form
.
type
=
type
}
else
{
}
else
{
this
.
form
.
type
=
'
TEXT
'
}
},
// 发布动态
handleSubmit
(){
if
(
this
.
topicList
.
length
>
0
)
{
handleSubmit
()
{
if
(
this
.
topicList
.
length
>
0
)
{
this
.
form
.
topicNames
=
[];
this
.
form
.
topicIds
=
[];
this
.
topicList
.
forEach
((
item
)
=>
{
this
.
topicList
.
forEach
((
item
)
=>
{
this
.
form
.
topicNames
.
push
(
item
.
name
);
this
.
form
.
topicIds
.
push
(
item
.
id
)
})
}
if
(
this
.
form
.
voteOptionType
==
'
IMAGE
'
){
if
(
this
.
voteOptionsAffirmative
.
length
==
0
){
// 开启PK校验
if
(
this
.
form
.
isEnableVote
==
'
1
'
)
{
if
(
this
.
form
.
voteOptionType
==
'
IMAGE
'
)
{
if
(
this
.
voteOptionsAffirmative
.
length
==
0
||
this
.
voteOptionsOpposing
.
length
==
0
)
{
uni
.
showToast
({
title
:
'
请上传PK图片
'
title
:
'
请上传PK图片
'
,
icon
:
'
error
'
})
return
;
}
if
(
this
.
voteOptionsOpposing
.
length
==
0
){
}
if
(
this
.
form
.
voteOptionType
==
'
IMAGE
'
)
{
this
.
$set
(
this
.
form
.
voteOptions
[
0
],
'
imageUrl
'
,
this
.
voteOptionsAffirmative
[
0
].
url
);
this
.
$set
(
this
.
form
.
voteOptions
[
1
],
'
imageUrl
'
,
this
.
voteOptionsOpposing
[
0
].
url
);
}
if
(
!
this
.
form
.
voteTitle
){
uni
.
showToast
({
title
:
'
请上传PK图片
'
title
:
'
请输入PK标题
'
,
icon
:
'
error
'
})
return
;
}
if
(
!
this
.
form
.
voteOptions
[
0
].
name
||
!
this
.
form
.
voteOptions
[
1
].
name
)
{
uni
.
showToast
({
title
:
'
请输入PK选项
'
,
icon
:
'
error
'
})
return
;
}
if
(
this
.
form
.
voteOptionType
==
'
IMAGE
'
){
this
.
$set
(
this
.
form
.
voteOptions
[
0
],
'
imageUrl
'
,
this
.
voteOptionsAffirmative
[
0
].
url
);
this
.
$set
(
this
.
form
.
voteOptions
[
1
],
'
imageUrl
'
,
this
.
voteOptionsOpposing
[
0
].
url
);
}
console
.
log
(
this
.
form
)
crateNewDynamic
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
crateNewDynamic
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
uni
.
showToast
({
title
:
'
创建成功
'
,
title
:
'
创建成功
'
,
})
uni
.
$emit
(
'
hanldeDynamicRefresh
'
)
uni
.
switchTab
({
url
:
'
/pages/index/index
'
url
:
'
/pages/index/index
'
})
}
})
...
...
safe-campus-bbs-uniapp/pages/topics/topics.vue
View file @
4eda70c0
...
...
@@ -2,7 +2,7 @@
<view
class=
"page-container topics-page"
>
<view
class=
"search-box-common"
>
<image
src=
"/static/images/search-icon.png"
class=
"search-icon"
></image>
<input
placeholder=
"搜索"
style=
"width: 100%;"
placeholder-class=
"placeholder-class"
/>
<input
placeholder=
"搜索"
style=
"width: 100%;"
v-model=
"topicName"
@
keypress.enter=
"getList"
placeholder-class=
"placeholder-class"
/>
</view>
<view
class=
"hot-container"
>
<view
class=
"hot-tag-box"
>
...
...
@@ -27,6 +27,7 @@
data
()
{
return
{
hotList
:[],
topicName
:
''
}
},
onShow
()
{
...
...
@@ -35,7 +36,10 @@
methods
:
{
// 话题热搜榜
getList
(){
hotTopicRanking
().
then
(
res
=>
{
let
params
=
{
name
:
this
.
topicName
}
hotTopicRanking
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
hotList
=
res
.
data
})
...
...
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