update: 我的举报优化

This commit is contained in:
mixtan 2025-08-15 09:29:45 +08:00
parent 18dc692e53
commit 38c2e9a873
2 changed files with 234 additions and 82 deletions

View File

@ -1,101 +1,250 @@
<template> <template>
<view class="main"> <view class="my_tipoff">
<view class="list"> <view class="list">
<view class="item" v-for="item in list" :key="item.id"> <view class="item" v-for="item in list" :key="item.id">
<view class="header"> <view class="header">
<view class="username">{{ item.reportedNickname }}</view> <view class="username">{{ item.reporterNickname }}</view>
<view class="more">查看详情</view> <view class="more" @click="showResult(item, $event)"
</view> >查看详情<u-icon name="arrow-right" color="#666" size="12"></u-icon
<view class="body"> ></view>
<view class="left"> </view>
<image src="" class="img" /> <view class="body">
</view> <view class="left">
<view class="right"> <image :src="getThumb(item)" class="img" />
<view class="desc">{{ item.reportContent }}</view> </view>
<view class="type">{{ item.reportCategory }}</view> <view class="right">
<view class="time">{{ item.createdAt }}</view> <view class="desc">{{ item.reportContent }}</view>
</view> <view class="type"
</view> >举报原因{{
<view class="footer"> item.reportCategory && typeMap[item.reportCategory]
{{ item.processingResult }} }}</view
>
<view class="time">举报时间{{ item.createdAt }}</view>
</view>
</view>
<view class="footer">
<u-icon
name="error-circle-fill"
color="#F07C09"
size="20"
class="icon"
></u-icon>
<view class="text">{{ item.processingResult }}</view>
</view>
</view>
</view>
<u-popup :show="show" mode="center" @close="close" @open="open">
<view class="my_result">
<view class="btn_close">
<u-icon name="close" color="#ffffff" size="24"></u-icon>
</view>
<view class="item">
<view class="lable">举报对象ID</view>
<view class="value">{{currentInfo.reportedUserId}}</view>
</view>
<view class="item">
<view class="lable">举报对象昵称</view>
<view class="value">{{currentInfo.reportedNickname}}</view>
</view>
<view class="item">
<view class="lable">举报原因</view>
<view class="value">{{typeMap[currentInfo.reportCategory]}}</view>
</view>
<view class="item">
<view class="lable">举报内容</view>
<view class="value">{{currentInfo.reportContent}}</view>
</view>
<view class="item">
<view class="lable">举报凭证</view>
<view class="value">
<u-album :urls="getImageList()" keyName="url"></u-album>
</view> </view>
</view> </view>
</view> <view class="item">
</view> <view class="lable">举报时间</view>
<view class="value">{{currentInfo.createdAt}}</view>
</view>
<view class="item">
<view class="lable">举报结果</view>
<view class="value">{{resultType[currentInfo.processingStatus]}}</view>
</view>
<view class="item">
<view class="lable">举报反馈</view>
<view class="value">{{currentInfo.processingResult}}</view>
</view>
</view>
</u-popup>
</view>
</template> </template>
<script> <script>
import { apiGetTipOffList } from "@/api/user"; import { apiGetTipOffList } from "@/api/user";
export default { export default {
data(){ data() {
return { return {
list: [], list: [],
imgUrl: '' imgUrl: "",
} typeMap: {
}, 1: "该账号发布淫秽色情内容",
mounted(){ 2: "该账号发布违法违规内容",
this.getTipOffList() 3: "该账号存在欺诈骗钱行为",
}, 4: "该账号对我进行辱骂骚扰",
methods:{ 5: "该账号侵犯未成年人权益",
async getTipOffList(){ 6: "其他",
const res = await apiGetTipOffList(); },
this.list = res.records resultType: {
} 0: '待处理',
} 1: '处理中',
} 2: '已驳回',
3: '已完成',
},
show: false,
currentInfo: {}
};
},
mounted() {
this.getTipOffList();
},
methods: {
open() {
// console.log('open');
},
close() {
this.show = false;
// console.log('close');
},
showResult(data){
this.show = true
this.currentInfo = data
},
getThumb(item) {
const data = item?.evidenceImages
? JSON.parse(item?.evidenceImages)?.[0].url
: "";
return data;
},
getImageList() {
const data = this.currentInfo?.evidenceImages
? JSON.parse(this.currentInfo?.evidenceImages)
: [];
return data;
},
async getTipOffList() {
const res = await apiGetTipOffList();
this.list = res.records;
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.list{ .list {
padding: 30rpx;
font-size: 24rpx;
.item {
padding: 20rpx; padding: 20rpx;
.item{ background: #fff;
padding: 12rpx; margin-bottom: 24rpx;
.header{ .header {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom: 20rpx;
.username {
color: #222;
font-size: 28rpx;
}
.more {
color: #666;
display: flex;
align-items: center;
gap: 6rpx;
line-height: 1;
}
}
.body {
display: flex;
align-items: center;
height: 128rpx;
.left {
width: 128rpx;
height: 128rpx;
margin-right: 20rpx;
.img {
width: 100%;
height: 100%;
background: #eee;
border-radius: 8rpx;
} }
.body{ }
display: flex; .right {
align-items: center; width: calc(100% - 128rpx - 20rpx);
justify-content: space-between; .desc {
.left{ color: #222;
.img{ white-space: nowrap;
width: 128rpx; overflow: hidden;
height: 128rpx; text-overflow: ellipsis;
}
.username{
color: #222;
}
.more{
color: #666;
}
}
.right{
.desc{
color: #222;
}
.type{
color: #666;
}
.time{
color: #666;
}
}
} }
.footer{ .type {
display: flex; color: #666;
align-items: center; margin: 12rpx 0;
padding: 4rpx 8rpx; }
border-radius: 8rpx; .time {
background: #222; color: #666;
color: #666; }
}
}
.footer {
display: flex;
align-items: center;
padding: 8rpx;
border-radius: 8rpx;
line-height: 1;
margin-top: 24rpx;
background: #eee;
color: #666;
.icon{ .icon {
margin-right: 12rpx; margin-right: 8rpx;
} }
.text{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}
.my_result{
position: relative;
width: calc(100vw - 60rpx);
padding: 20rpx 0;
font-size: 24rpx;
.btn_close{
position: absolute;
left: 50%;
bottom: -100rpx;
transform: translateX(-50%);
pointer-events: none;
}
.item{
display: flex;
justify-content: space-between;
align-items: center;
padding: 12rpx 24rpx;
.lable{
width: 150rpx;
}
.value{
width: calc(100% - 160rpx);
display: flex;
justify-content: flex-end;
} }
} }
} }
</style> </style>

View File

@ -26,4 +26,7 @@
.u-loadmore-tips{ .u-loadmore-tips{
font-size: 24rpx; font-size: 24rpx;
}
.uni-system-preview-image{
z-index: 999999;
} }