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
51a7dd2c
Commit
51a7dd2c
authored
Dec 03, 2025
by
yuwenwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移动端BUG修复
parent
688ebc98
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
16 deletions
+48
-16
safe-campus-bbs-uniapp/components/Dynamic-Item.vue
safe-campus-bbs-uniapp/components/Dynamic-Item.vue
+6
-1
safe-campus-bbs-uniapp/pages/pk-detail/pk-detail.vue
safe-campus-bbs-uniapp/pages/pk-detail/pk-detail.vue
+26
-12
safe-campus-bbs-uniapp/pages/publish/publish.vue
safe-campus-bbs-uniapp/pages/publish/publish.vue
+2
-2
safe-campus-bbs-uniapp/static/styles/index.scss
safe-campus-bbs-uniapp/static/styles/index.scss
+14
-1
No files found.
safe-campus-bbs-uniapp/components/Dynamic-Item.vue
View file @
51a7dd2c
...
@@ -5,6 +5,10 @@
...
@@ -5,6 +5,10 @@
<image
class=
"avatar"
v-if=
"form.faceImg"
:src=
"form.faceImg"
@
error=
"imgLoadFail"
></image>
<image
class=
"avatar"
v-if=
"form.faceImg"
:src=
"form.faceImg"
@
error=
"imgLoadFail"
></image>
<!--
<image
class=
"avatar"
v-else
src=
"/static/images/default-avatar.png"
></image>
-->
<!--
<image
class=
"avatar"
v-else
src=
"/static/images/default-avatar.png"
></image>
-->
<view
class=
"user-name"
>
{{
form
.
nickName
}}
</view>
<view
class=
"user-name"
>
{{
form
.
nickName
}}
</view>
<view
class=
"top-icon"
v-if=
"form.isTop==1"
>
<image
class=
"icon"
src=
"/static/images/is-top.png"
></image>
</view>
<image
v-if=
"deleteable || userInfo.bbsAdmin || form.isSelf==1"
class=
"more-icon"
<image
v-if=
"deleteable || userInfo.bbsAdmin || form.isSelf==1"
class=
"more-icon"
@
click.stop=
"handleDelDynamics"
src=
"/static/images/more-icon.png"
></image>
@
click.stop=
"handleDelDynamics"
src=
"/static/images/more-icon.png"
></image>
<image
v-else
class=
"more-icon"
src=
"/static/images/more-icon.png"
></image>
<image
v-else
class=
"more-icon"
src=
"/static/images/more-icon.png"
></image>
...
@@ -391,8 +395,9 @@
...
@@ -391,8 +395,9 @@
},
},
// 预览图片
// 预览图片
preview
(
list
,
index
)
{
preview
(
list
,
index
)
{
console
.
log
(
list
,
index
)
let
urls
=
list
.
map
((
item
)
=>
{
let
urls
=
list
.
map
((
item
)
=>
{
return
item
.
u
rl
;
return
item
.
imageU
rl
;
})
})
if
(
urls
.
length
>
0
)
{
if
(
urls
.
length
>
0
)
{
uni
.
previewImage
({
uni
.
previewImage
({
...
...
safe-campus-bbs-uniapp/pages/pk-detail/pk-detail.vue
View file @
51a7dd2c
...
@@ -2,11 +2,14 @@
...
@@ -2,11 +2,14 @@
<view
class=
"detail-page-container pk-detail-page"
>
<view
class=
"detail-page-container pk-detail-page"
>
<view
class=
"pk-tab-box"
v-if=
"voteOptions.length>0"
>
<view
class=
"pk-tab-box"
v-if=
"voteOptions.length>0"
>
<view
class=
"tab-item"
v-for=
"(item,index) in voteOptions"
@
click=
"handleChange(item,index)"
>
<view
class=
"tab-item"
v-for=
"(item,index) in voteOptions"
@
click=
"handleChange(item,index)"
>
<view
class=
"text"
:class=
"
{'active':index==activeIndex}">
{{
item
.
name
}}
(
{{
item
.
voteCount
}}
)
</view>
<view
class=
"text"
:class=
"
{'active-red':(index==0
&&
index==activeIndex),'active':(index==1
&&
index==activeIndex)}">
{{
optionText
[
index
].
text
}}
(
{{
item
.
voteCount
}}
)
</view>
</view>
</view>
</view>
</view>
<scroll-view
class=
"scroll-view-pk"
scroll-y
:show-scrollbar=
"false"
v-if=
"list.length>0"
@
scrolltolower=
"loadMore"
>
<scroll-view
class=
"scroll-view-pk"
scroll-y
:show-scrollbar=
"false"
v-if=
"list.length>0"
@
scrolltolower=
"loadMore"
>
<view
class=
"list-item"
v-for=
"(item,index) in list"
>
<view
class=
"list-item"
v-for=
"(item,index) in list"
>
<image
src=
"/static/images/default-avatar.png"
class=
"avatar"
></image>
<image
src=
"/static/images/default-avatar.png"
class=
"avatar"
></image>
<view
class=
"name"
>
{{
item
.
nickName
}}
</view>
<view
class=
"name"
>
{{
item
.
nickName
}}
</view>
...
@@ -32,15 +35,20 @@
...
@@ -32,15 +35,20 @@
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
momentId
:
''
,
momentId
:
''
,
optionCode
:
undefined
optionCode
:
undefined
},
},
total
:
0
,
total
:
0
,
activeIndex
:
0
,
activeIndex
:
0
,
voteOptions
:
[],
voteOptions
:
[],
list
:[]
list
:
[],
optionText
:
[{
text
:
'
红方
'
},
{
text
:
'
蓝方
'
}]
}
}
},
},
components
:{
components
:
{
ListEmpty
ListEmpty
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
...
@@ -58,16 +66,16 @@
...
@@ -58,16 +66,16 @@
methods
:
{
methods
:
{
getList
()
{
getList
()
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'
加载中...
'
title
:
'
加载中...
'
})
})
voteList
(
this
.
queryParams
).
then
(
res
=>
{
voteList
(
this
.
queryParams
).
then
(
res
=>
{
this
.
list
=
[...
this
.
list
,...
res
.
rows
];
this
.
list
=
[...
this
.
list
,
...
res
.
rows
];
this
.
total
=
res
.
total
;
this
.
total
=
res
.
total
;
}).
finally
(()
=>
{
}).
finally
(()
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
})
})
},
},
handleChange
(
item
,
index
)
{
handleChange
(
item
,
index
)
{
this
.
activeIndex
=
index
this
.
activeIndex
=
index
this
.
queryParams
.
optionCode
=
item
.
code
;
this
.
queryParams
.
optionCode
=
item
.
code
;
this
.
queryParams
.
pageNum
=
1
;
this
.
queryParams
.
pageNum
=
1
;
...
@@ -75,7 +83,7 @@
...
@@ -75,7 +83,7 @@
this
.
getList
()
this
.
getList
()
},
},
loadMore
()
{
loadMore
()
{
if
(
this
.
list
.
length
<
this
.
total
)
{
if
(
this
.
list
.
length
<
this
.
total
)
{
this
.
queryParams
.
pageNum
+=
1
;
this
.
queryParams
.
pageNum
+=
1
;
this
.
getList
()
this
.
getList
()
}
}
...
@@ -89,6 +97,7 @@
...
@@ -89,6 +97,7 @@
.pk-detail-page
{
.pk-detail-page
{
background-color
:
white
;
background-color
:
white
;
.pk-tab-box
{
.pk-tab-box
{
height
:
92rpx
;
height
:
92rpx
;
display
:
flex
;
display
:
flex
;
...
@@ -113,6 +122,11 @@
...
@@ -113,6 +122,11 @@
color
:
#3484FD
;
color
:
#3484FD
;
border-bottom
:
4rpx
solid
#3484FD
;
border-bottom
:
4rpx
solid
#3484FD
;
}
}
.active-red
{
color
:
#ff645f
;
border-bottom
:
4rpx
solid
#ff645f
;
}
}
}
}
}
...
@@ -149,4 +163,4 @@
...
@@ -149,4 +163,4 @@
}
}
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
safe-campus-bbs-uniapp/pages/publish/publish.vue
View file @
51a7dd2c
...
@@ -48,8 +48,8 @@
...
@@ -48,8 +48,8 @@
<view
class=
"choice-box"
v-if=
"form.voteOptionType=='IMAGE'"
>
<view
class=
"choice-box"
v-if=
"form.voteOptionType=='IMAGE'"
>
<view
class=
"choice-item"
>
<view
class=
"choice-item"
>
<image-upload
v-model=
"voteOptionsAffirmative"
:limit=
"1"
:width=
"120"
:height=
"120"
<image-upload
v-model=
"voteOptionsAffirmative"
:
mediaType=
"['image']"
:
limit=
"1"
:width=
"120"
:height=
"120"
:showIcons=
"false"
></image-upload>
:showIcons=
"false"
></image-upload>
<input
class=
"text"
maxlength=
"16"
v-model=
"form.voteOptions[0].name"
<input
class=
"text"
maxlength=
"16"
v-model=
"form.voteOptions[0].name"
placeholder=
"请输入选项1(16字以内)"
/>
placeholder=
"请输入选项1(16字以内)"
/>
</view>
</view>
...
...
safe-campus-bbs-uniapp/static/styles/index.scss
View file @
51a7dd2c
...
@@ -22,9 +22,22 @@
...
@@ -22,9 +22,22 @@
border-radius
:
50%
;
border-radius
:
50%
;
}
}
.user-name
{
.user-name
{
width
:
calc
(
100%
-
16
8rpx
);
width
:
calc
(
100%
-
20
8rpx
);
color
:
rgba
(
16
,
16
,
16
,
1
);
color
:
rgba
(
16
,
16
,
16
,
1
);
}
}
.top-icon
{
width
:
40rpx
;
height
:
40rpx
;
border-radius
:
6rpx
;
background-color
:
rgba
(
242
,
172
,
57
,
0
.1
);
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.icon
{
width
:
24rpx
;
height
:
24rpx
;
}
}
.more-icon
{
.more-icon
{
width
:
48rpx
;
width
:
48rpx
;
height
:
48rpx
;
height
:
48rpx
;
...
...
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