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
11870677
Commit
11870677
authored
Feb 10, 2025
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改黑名单
parent
2d5732e0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
134 additions
and
97 deletions
+134
-97
index.js
api/user/index.js
+21
-0
info.vue
pagesme/message/info.vue
+41
-4
blackList.vue
pagesme/set/blackList.vue
+72
-93
No files found.
api/user/index.js
View file @
11870677
...
...
@@ -153,3 +153,24 @@ export function getBalance(data){
});
}
/**
* 拉黑
*/
export
function
addBlack
(
data
){
return
request
({
method
:
"post"
,
url
:
'/app/opmBlackList/add'
,
data
,
});
}
/**
* 黑名单
*/
export
function
getBlackList
(
data
){
return
request
({
method
:
"get"
,
url
:
'/app/opmBlackList/list'
,
data
});
}
\ No newline at end of file
pagesme/message/info.vue
View file @
11870677
...
...
@@ -2,10 +2,10 @@
<view
style=
"background-color: #F4F5F9;min-height: 100vh;"
>
<!-- 页头 -->
<u-navbar
@
leftClick=
"backbar"
bgColor=
"#F4F5F9"
title=
"个人留言"
></u-navbar>
<view
class=
"fixed-buttons"
style=
"display: flex; justify-content: space-evenly; position: fixed; top: 120rpx; width: 100%; z-index: 99;"
>
<view
class=
"button-item"
style=
"width: 50%; text-align: center; height: 50rpx; background-color: #cbcbcb; color: black;
"
>
拉黑
</view>
<view
class=
"fixed-buttons"
>
<view
class=
"button-item"
@
click=
"addBlack
"
>
拉黑
</view>
<view
class=
"vertical-line"
style=
"width: 1px; height: 50rpx; background-color: #808080;"
></view>
<view
class=
"button-item"
style=
"width: 50%; text-align: center; height: 50rpx; background-color: #cbcbcb; color: black;"
>
关注
</view>
<view
class=
"button-item"
>
关注
</view>
</view>
<view
style=
"height: 80rpx;"
></view>
<view
class=
"page-layout"
>
...
...
@@ -43,7 +43,7 @@
</
template
>
<
script
>
import
{
addMessage
,
telMessage
}
from
"../../api/user"
;
import
{
add
Black
,
add
Message
,
telMessage
}
from
"../../api/user"
;
import
{
getOssUrl
}
from
"../../api/article"
;
export
default
{
...
...
@@ -91,6 +91,27 @@ export default {
})
})
},
addBlack
()
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'确定拉黑该用户吗?'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
const
form
=
{
targetId
:
this
.
targetId
}
addBlack
(
form
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
uni
.
showToast
({
title
:
'已拉黑'
,
icon
:
'none'
})
}
})
}
}
})
},
/**
* 发送
*/
...
...
@@ -296,4 +317,20 @@ export default {
margin-right
:
10rpx
;
}
.fixed-buttons
{
display
:
flex
;
justify-content
:
space-evenly
;
position
:
fixed
;
top
:
120rpx
;
width
:
100%
;
z-index
:
99
;
}
.button-item
{
width
:
50%
;
text-align
:
center
;
height
:
50rpx
;
background-color
:
#cbcbcb
;
color
:
black
;
}
</
style
>
\ No newline at end of file
pagesme/set/blackList.vue
View file @
11870677
<
template
>
<view>
<u-swipe-action>
<u-swipe-action-item
:options=
"options"
v-for=
"(item, index) in options4"
:key=
"index"
>
<view
class=
"swipe-action u-border-top"
:class=
"[index === options4.length - 1 && 'u-border-bottom']"
<z-paging
ref=
"paging"
:data=
"blackList"
@
query=
"getBlackList"
>
<u-swipe-action>
<u-swipe-action-item
:options=
"options"
v-for=
"(item, index) in blackList"
:key=
"index"
>
<view
class=
"swipe-action__content"
>
<view
class=
"avatar"
>
<u--image
:src=
"item.avatar"
width=
"40px"
height=
"40px"
mode=
"aspectFill"
shape=
"circle"
></u--image>
</view>
<view
class=
"content"
>
<view
class=
"title"
>
<text
class=
"name"
>
{{
item
.
name
}}
</text>
<!--
<text
class=
"time"
>
{{
item
.
time
}}
</text>
-->
<view
class=
"swipe-action u-border-top"
:class=
"[index === blackList.length - 1 && 'u-border-bottom']"
>
<view
class=
"swipe-action__content"
>
<view
class=
"avatar"
>
<u--image
:src=
"item.avatarUrl"
width=
"40px"
height=
"40px"
mode=
"aspectFill"
shape=
"circle"
></u--image>
</view>
<view
class=
"content"
>
<view
class=
"title"
>
<text
class=
"name"
>
{{
item
.
memNickName
}}
</text>
</view>
</view>
<!--
<view
class=
"txt"
>
{{
item
.
msg
}}
</view>
-->
</view>
</view>
</
view
>
</u-swipe-action
-item
>
</
u-swipe-action
>
</
u-swipe-action-item
>
</u-swipe-action>
</
z-paging
>
</view>
</
template
>
<
script
>
import
{
addBlack
,
getBlackList
}
from
"../../api/user"
;
import
{
getOssUrl
}
from
"../../api/article"
;
export
default
{
data
()
{
return
{
...
...
@@ -37,83 +40,59 @@ export default {
text
:
'移除'
,
style
:
{
backgroundColor
:
'#3c9cff'
,
},
onClick
:
(
index
,
item
)
=>
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'确定移除该用户吗?'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
const
form
=
{
targetId
:
this
.
targetId
}
addBlack
(
form
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
uni
.
showToast
({
title
:
'已拉黑'
,
icon
:
'none'
})
}
})
}
}
})
}
},
],
options4
:
[
{
avatar
:
'http://192.168.1.23/upload/CmsNotice/20250210/00429923A8CE495ABA38CC2F527EADF5.jpg'
,
name
:
'杨涛'
,
read
:
1
,
time
:
'23:59'
,
msg
:
'没有消息就是最好的消息'
},
{
avatar
:
'http://192.168.1.23/upload/CmsNotice/20250210/00429923A8CE495ABA38CC2F527EADF5.jpg'
,
name
:
'雨中漫步'
,
read
:
1
,
time
:
'23:59'
,
msg
:
'没有消息就是最好的消息'
},
{
avatar
:
'http://192.168.1.23/upload/CmsNotice/20250210/00429923A8CE495ABA38CC2F527EADF5.jpg'
,
name
:
'糖果梦境'
,
read
:
1
,
time
:
'23:59'
,
msg
:
'没有消息就是最好的消息'
},
{
avatar
:
'http://192.168.1.23/upload/CmsNotice/20250210/00429923A8CE495ABA38CC2F527EADF5.jpg'
,
name
:
'海上日落'
,
read
:
1
,
time
:
'23:59'
,
msg
:
'没有消息就是最好的消息'
},
{
avatar
:
'http://192.168.1.23/upload/CmsNotice/20250210/00429923A8CE495ABA38CC2F527EADF5.jpg'
,
name
:
'男朋友'
,
read
:
1
,
time
:
'23:59'
,
msg
:
'没有消息就是最好的消息'
},
{
avatar
:
'http://192.168.1.23/upload/CmsNotice/20250210/00429923A8CE495ABA38CC2F527EADF5.jpg'
,
name
:
'女朋友'
,
read
:
1
,
time
:
'23:59'
,
msg
:
'没有消息就是最好的消息'
},
{
avatar
:
'http://192.168.1.23/upload/CmsNotice/20250210/00429923A8CE495ABA38CC2F527EADF5.jpg'
,
name
:
'静谧之夜'
,
read
:
1
,
time
:
'23:59'
,
msg
:
'没有消息就是最好的消息'
},
{
avatar
:
'http://192.168.1.23/upload/CmsNotice/20250210/00429923A8CE495ABA38CC2F527EADF5.jpg'
,
name
:
'风吹麦浪'
,
read
:
0
,
time
:
'23:59'
,
msg
:
'没有消息就是最好的消息'
},
{
avatar
:
'http://192.168.1.23/upload/CmsNotice/20250210/00429923A8CE495ABA38CC2F527EADF5.jpg'
,
name
:
'路过岁月'
,
read
:
0
,
time
:
'23:59'
,
msg
:
'没有消息就是最好的消息'
},
{
avatar
:
'http://192.168.1.23/upload/CmsNotice/20250210/00429923A8CE495ABA38CC2F527EADF5.jpg'
,
name
:
'繁星点点'
,
read
:
0
,
time
:
'23:59'
,
msg
:
'没有消息就是最好的消息'
}
],
blackList
:
[],
};
},
onshow
()
{
},
methods
:
{
getBlackList
(
pageNo
,
pageSize
)
{
const
form
=
{
pageNo
:
pageNo
,
pageSize
:
pageSize
};
getBlackList
(
form
).
then
(
res
=>
{
this
.
blackList
=
res
.
data
.
data
;
this
.
blackList
.
forEach
(
item
=>
{
//处理头像
if
(
item
.
avatar
!=
null
&&
item
.
avatar
!=
''
){
getOssUrl
(
item
.
avatar
).
then
(
imgRes
=>
{
if
(
imgRes
.
data
.
data
!=
null
)
{
item
.
avatarUrl
=
imgRes
.
data
.
data
.
replace
(
/
\\
/g
,
"/"
);
console
.
log
(
'11111111'
,
item
.
avatarUrl
)
}
})
}
})
this
.
$refs
.
paging
.
completeByTotal
(
this
.
blackList
,
res
.
data
.
total
);
});
},
}
};
</
script
>
...
...
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