Commit 02090bd9 authored by 罗林杰's avatar 罗林杰

修改黑名单

parent b6dd800b
......@@ -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
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment