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
02090bd9
Commit
02090bd9
authored
Feb 10, 2025
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改黑名单
parent
b6dd800b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
23 deletions
+29
-23
index.js
api/user/index.js
+8
-0
blackList.vue
pagesme/set/blackList.vue
+21
-23
No files found.
api/user/index.js
View file @
02090bd9
...
...
@@ -173,4 +173,12 @@ export function getBlackList(data){
url
:
'/app/opmBlackList/list'
,
data
});
}
// 取消关注
export
function
deleteBlack
(
data
)
{
return
request
({
url
:
'/app/opmBlackList/delete/'
+
data
,
method
:
'delete'
,
})
}
\ No newline at end of file
pagesme/set/blackList.vue
View file @
02090bd9
...
...
@@ -17,6 +17,7 @@
:options=
"options"
v-for=
"(item, index) in blackList"
:key=
"index"
@
click=
"handleDelete(item.businessId)"
>
<view
class=
"swipe-action u-border-top"
...
...
@@ -40,7 +41,7 @@
</
template
>
<
script
>
import
{
addBlack
,
getBlackList
}
from
"../../api/user"
;
import
{
addBlack
,
deleteBlack
,
getBlackList
}
from
"../../api/user"
;
import
{
getOssUrl
}
from
"../../api/article"
;
export
default
{
...
...
@@ -52,27 +53,6 @@ export default {
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'
})
}
})
}
}
})
}
},
],
blackList
:
[],
...
...
@@ -97,7 +77,6 @@ export default {
getOssUrl
(
item
.
avatar
).
then
(
imgRes
=>
{
if
(
imgRes
.
data
.
data
!=
null
)
{
item
.
avatarUrl
=
imgRes
.
data
.
data
.
replace
(
/
\\
/g
,
"/"
);
console
.
log
(
'11111111'
,
item
.
avatarUrl
)
}
})
}
...
...
@@ -105,6 +84,25 @@ export default {
this
.
$refs
.
paging
.
completeByTotal
(
this
.
blackList
,
res
.
data
.
total
);
});
},
handleDelete
(
id
){
uni
.
showModal
({
title
:
'提示'
,
content
:
'确定移除吗?'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
deleteBlack
(
id
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
uni
.
showToast
({
title
:
'移除成功'
,
icon
:
'none'
});
this
.
getBlackList
(
1
,
10
);
}
})
}
}
})
}
}
};
</
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