Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
李伟
cust-app
Commits
3e53f13e
Commit
3e53f13e
authored
Feb 12, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了留言限制
parent
8f5ba615
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
10 deletions
+54
-10
info.vue
pagesme/message/info.vue
+54
-10
No files found.
pagesme/message/info.vue
View file @
3e53f13e
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
<view
style=
"background-color: #F4F5F9;min-height: 100vh;"
>
<view
style=
"background-color: #F4F5F9;min-height: 100vh;"
>
<!-- 页头 -->
<!-- 页头 -->
<u-navbar
@
leftClick=
"backbar"
bgColor=
"#F4F5F9"
title=
"个人留言"
></u-navbar>
<u-navbar
@
leftClick=
"backbar"
bgColor=
"#F4F5F9"
title=
"个人留言"
></u-navbar>
<view
class=
"fixed-buttons"
>
<view
class=
"fixed-buttons"
:style=
"
{'top':navHeight+'px','position': 'relative'}"
>
<view
class=
"button-item"
@
click=
"addBlack"
>
拉黑
</view>
<view
class=
"button-item"
@
click=
"addBlack"
>
拉黑
</view>
<view
class=
"vertical-line"
style=
"width: 1px; height: 50rpx; background-color: #808080;"
></view>
<view
class=
"vertical-line"
style=
"width: 1px; height: 50rpx; background-color: #808080;"
></view>
<view
class=
"button-item"
>
关注
</view>
<view
class=
"button-item"
>
要微信
</view>
</view>
</view>
<view
style=
"height: 80rpx;"
></view>
<view
style=
"height: 80rpx;"
></view>
<z-paging
ref=
"paging"
empty-view-text=
" "
<z-paging
ref=
"paging"
empty-view-text=
" "
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
addBlack
,
addMessage
,
telMessage
}
from
"../../api/user"
;
import
{
addBlack
,
addMessage
,
deleteFollow
,
telMessage
}
from
"../../api/user"
;
import
{
getOssUrl
}
from
"../../api/article"
;
import
{
getOssUrl
}
from
"../../api/article"
;
export
default
{
export
default
{
...
@@ -68,12 +68,32 @@ export default {
...
@@ -68,12 +68,32 @@ export default {
chatList
:
[],
chatList
:
[],
inputTemp
:
''
,
inputTemp
:
''
,
targetId
:
''
,
targetId
:
''
,
menuButtonInfo
:
''
,
navHeight
:
0
,
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
this
.
targetId
=
options
.
targetId
this
.
targetId
=
options
.
targetId
//导航栏高度
this
.
menuButtonInfo
=
uni
.
getMenuButtonBoundingClientRect
()
const
{
top
,
width
,
height
,
right
}
=
this
.
menuButtonInfo
uni
.
getSystemInfo
({
success
:
(
res
)
=>
{
const
{
statusBarHeight
}
=
res
;
const
margin
=
top
-
statusBarHeight
this
.
navHeight
=
(
height
+
statusBarHeight
+
(
margin
*
2
))
//导航栏总高
}
})
},
},
onShow
(){
onShow
(){
this
.
userInfo
=
uni
.
getStorageSync
(
'userInfo'
)
// 滚动到页面底部
// 滚动到页面底部
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
pageScrollToBottom
()
this
.
pageScrollToBottom
()
...
@@ -141,19 +161,45 @@ export default {
...
@@ -141,19 +161,45 @@ export default {
return
return
}
}
const
data
=
{
const
data
=
{
targetId
:
this
.
targetId
,
targetId
:
this
.
targetId
,
//目标id
content
:
inputValue
content
:
inputValue
,
//输入的内容
isPay
:
'0'
,
//1花费 0不花费,
wxOpenid
:
this
.
userInfo
.
wxOpenid
}
}
addMessage
(
data
).
then
(
res
=>
{
addMessage
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
){
this
.
getMessageList
()
this
.
getMessageList
()
this
.
inputTemp
=
''
this
.
inputTemp
=
''
}
else
{
}
else
if
(
res
.
data
.
code
===
1001
){
//留言超出限制 是否采用金币进行留言
uni
.
showModal
({
title
:
'提示'
,
content
:
'已超出留言次数,是否花费1金币再进行留言'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
const
form
=
{
targetId
:
this
.
targetId
,
//目标id
content
:
inputValue
,
//输入的内容
isPay
:
'1'
,
//1花费 0不花费
wxOpenid
:
this
.
userInfo
.
wxOpenid
}
addMessage
(
form
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
this
.
getMessageList
()
this
.
inputTemp
=
''
}
})
}
else
if
(
res
.
cancel
)
{
}
}
});
this
.
inputTemp
=
''
}
else
if
(
res
.
data
.
code
===
1002
){
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
data
.
message
,
title
:
res
.
data
.
message
,
icon
:
'none'
icon
:
'none'
})
})
this
.
inputTemp
=
''
}
}
})
})
// 滚动到页面底部
// 滚动到页面底部
...
@@ -346,8 +392,6 @@ export default {
...
@@ -346,8 +392,6 @@ export default {
.fixed-buttons
{
.fixed-buttons
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-evenly
;
justify-content
:
space-evenly
;
position
:
fixed
;
top
:
120rpx
;
width
:
100%
;
width
:
100%
;
z-index
:
99
;
z-index
:
99
;
}
}
...
@@ -359,4 +403,4 @@ export default {
...
@@ -359,4 +403,4 @@ export default {
background-color
:
#cbcbcb
;
background-color
:
#cbcbcb
;
color
:
black
;
color
:
black
;
}
}
</
style
>
</
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