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
8f5ba615
Commit
8f5ba615
authored
Feb 11, 2025
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改留言
parent
b5d9307b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
17 deletions
+53
-17
addMessage.vue
pagesUser/addMessage.vue
+1
-1
info.vue
pagesme/message/info.vue
+35
-13
message.vue
pagesme/message/message.vue
+17
-3
No files found.
pagesUser/addMessage.vue
View file @
8f5ba615
...
...
@@ -52,7 +52,7 @@
this
.
tipMsg
=
"发送成功"
;
this
.
$refs
.
elm
.
showDialog
();
}
else
{
this
.
tipMsg
=
res
.
data
.
m
sg
;
this
.
tipMsg
=
res
.
data
.
m
essage
;
this
.
$refs
.
elm
.
showDialog
();
}
})
...
...
pagesme/message/info.vue
View file @
8f5ba615
...
...
@@ -8,6 +8,18 @@
<view
class=
"button-item"
>
关注
</view>
</view>
<view
style=
"height: 80rpx;"
></view>
<z-paging
ref=
"paging"
empty-view-text=
" "
:empty-view-title-style=
"
{
'font-size': '32rpx',
'color': '#C9C9D0',
'position': 'absolute',
'width': '100vw',
}" :empty-view-img="baseUrl+'/common/empty.png'" :empty-view-img-style="{
'position': 'absolute',
'top': '210rpx',
'width': '447rpx',
'height': '375rpx'
}" v-model="chatList" @query="getMessageList" :fixed="true" :auto-show-back-to-top="true" :back-to-top-with-animate="false">
<view
class=
"page-layout"
>
<view
class=
"page-body"
id=
"x_chat"
>
<view
v-for=
"(item, index) in chatList"
:key=
"index"
>
...
...
@@ -17,7 +29,7 @@
<view
class=
"chat-inner-layout"
>
<view
class=
"chat-item-name"
>
{{
item
.
memNickName
}}
</view>
<view
class=
"chat-item-msg-layout"
>
<image
class=
"chat-item-photo"
:src=
"item.avatarUrl"
mode=
"aspectFit"
></image>
<image
class=
"chat-item-photo"
:src=
"item.avatarUrl"
></image>
<view
class=
"chat-inner-msg-left"
>
{{
item
.
content
}}
</view>
</view>
</view>
...
...
@@ -27,7 +39,7 @@
<view
class=
"chat-item-name-right"
>
{{
item
.
memNickName
}}
</view>
<view
class=
"chat-item-msg-layout"
>
<view
class=
"chat-inner-msg-right"
>
{{
item
.
content
}}
</view>
<image
class=
"chat-item-photo"
:src=
"item.avatarUrl"
mode=
"aspectFit"
></image>
<image
class=
"chat-item-photo"
:src=
"item.avatarUrl"
></image>
</view>
</view>
</view>
...
...
@@ -39,6 +51,7 @@
<view
class=
"submit-submit"
type=
"submit"
size=
"mini"
@
tap=
"submitTo"
>
发送
</view>
</view>
</view>
</z-paging>
</view>
</
template
>
...
...
@@ -50,6 +63,8 @@ export default {
name
:
"info"
,
data
()
{
return
{
//图片路径
baseUrl
:
this
.
$IMG_URL
,
chatList
:
[],
inputTemp
:
''
,
targetId
:
''
,
...
...
@@ -59,19 +74,12 @@ export default {
this
.
targetId
=
options
.
targetId
},
onShow
(){
this
.
getMessageList
()
// 滚动到页面底部
this
.
$nextTick
(()
=>
{
this
.
pageScrollToBottom
()
})
},
methods
:
{
/**
* 输入监听
*/
bindKeyInput
(
e
)
{
this
.
inputTemp
=
e
.
detail
.
value
},
getMessageList
()
{
const
form
=
{
page
:
1
,
...
...
@@ -85,14 +93,20 @@ export default {
if
(
item
.
avatar
!=
null
&&
item
.
avatar
!=
''
){
getOssUrl
(
item
.
avatar
).
then
(
imgRes
=>
{
if
(
imgRes
.
data
.
data
!=
null
)
{
imgRes
.
data
.
data
=
imgRes
.
data
.
data
.
replace
(
/
\\
/g
,
"/"
);
item
.
avatarUrl
=
imgRes
.
data
.
data
item
.
avatarUrl
=
imgRes
.
data
.
data
.
replace
(
/
\\
/g
,
"/"
);
}
})
}
})
this
.
$refs
.
paging
.
completeByTotal
(
this
.
chatList
,
res
.
data
.
total
);
})
},
/**
* 输入监听
*/
bindKeyInput
(
e
)
{
this
.
inputTemp
=
e
.
detail
.
value
},
addBlack
()
{
uni
.
showModal
({
title
:
'提示'
,
...
...
@@ -131,8 +145,16 @@ export default {
content
:
inputValue
}
addMessage
(
data
).
then
(
res
=>
{
this
.
getMessageList
()
this
.
inputTemp
=
''
if
(
res
.
data
.
code
==
200
){
this
.
getMessageList
()
this
.
inputTemp
=
''
}
else
{
uni
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'none'
})
this
.
inputTemp
=
''
}
})
// 滚动到页面底部
this
.
$nextTick
(()
=>
{
...
...
pagesme/message/message.vue
View file @
8f5ba615
...
...
@@ -2,6 +2,18 @@
<view
style=
"background-color: #F4F5F9;min-height: 100vh;"
>
<!-- 页头-->
<u-navbar
@
leftClick=
"backbar"
bgColor=
"#F4F5F9"
title=
"个人留言"
></u-navbar>
<z-paging
ref=
"paging"
empty-view-text=
" "
:empty-view-title-style=
"
{
'font-size': '32rpx',
'color': '#C9C9D0',
'position': 'absolute',
'width': '100vw',
}" :empty-view-img="baseUrl+'/common/empty.png'" :empty-view-img-style="{
'position': 'absolute',
'top': '210rpx',
'width': '447rpx',
'height': '375rpx'
}" v-model="userList" @query="getUserList" :fixed="true" :auto-show-back-to-top="true" :back-to-top-with-animate="false">
<view
class=
"recommendation"
:style=
"
{'top':navHeight+'px'}">
<view
v-if=
"isdata"
class=
"nodatacard"
>
<view
class=
"text"
>
暂无数据
</view>
...
...
@@ -29,7 +41,10 @@
</view>
</view>
</view>
</u-swipe-action-item>
</u-swipe-action>
</view>
</z-paging>
</view>
</
template
>
...
...
@@ -82,7 +97,6 @@ export default {
this
.
navHeight
=
(
height
+
statusBarHeight
+
(
margin
*
3
))
//导航栏总高
}
})
this
.
getUserList
()
},
methods
:
{
getUserList
(){
...
...
@@ -97,12 +111,12 @@ export default {
if
(
item
.
avatar
!=
null
&&
item
.
avatar
!=
''
){
getOssUrl
(
item
.
avatar
).
then
(
imgRes
=>
{
if
(
imgRes
.
data
.
data
!=
null
)
{
imgRes
.
data
.
data
=
imgRes
.
data
.
data
.
replace
(
/
\\
/g
,
"/"
);
item
.
avatarUrl
=
imgRes
.
data
.
data
item
.
avatarUrl
=
imgRes
.
data
.
data
.
replace
(
/
\\
/g
,
"/"
);
}
})
}
})
this
.
$refs
.
paging
.
completeByTotal
(
this
.
userList
,
res
.
data
.
total
);
})
},
gotoBusinessDetail
(
item
){
...
...
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