修改举报信息

master
于肖磊 2026-02-12 11:37:13 +08:00
parent 8731e4c9d7
commit 59f1991a44
1 changed files with 235 additions and 105 deletions

View File

@ -151,29 +151,57 @@
</view>
</view>
</view>
<!-- 举报弹窗 -->
<component-popup :propShow="popup_report_status" propPosition="bottom" @onclose="popup_close_event">
<view class="report-content">
<view class="report-header">
<view class="report-btn cancel-btn" @tap="popup_close_event"></view>
<view>举报评论</view>
<view class="report-btn submit-btn" @tap="submit_report"></view>
<component-popup :propShow="popup_report_status" propPosition="bottom" @onclose="close_new_report_popup">
<view class="new-report-content">
<!-- 顶部按钮区域 -->
<view class="new-report-header flex-row align-c justify-sb">
<view class="new-report-btn cancel-btn" @tap="close_new_report_popup"></view>
<view class="new-report-title">举报原因</view>
<view class="new-report-btn submit-btn" @tap="submit_new_report"></view>
</view>
<view class="report-content">
<view class="flex-col gap-10">
<view class="report-name">举报原因<text>*</text></view>
<radio-group>
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
<view>
<radio :value="item.value" :checked="index === current" />
<!-- 主要内容区域 -->
<view class="new-report-body">
<!-- 第一层举报原因选择 -->
<view class="report-section">
<view class="report-label">举报原因<text>*</text></view>
<view class="radio-group-flex">
<view v-for="(mainItem, mainIndex) in report_type_list" :key="mainIndex" class="radio-item flex-row align-c" @tap="selectMainReason(mainIndex)">
<view class="flex-row align-c">
<radio :value="mainItem" :checked="current_main_index === mainIndex" class="radio"/>
<view class="ml-10">{{mainItem.name}}</view>
</view>
<view>{{item.name}}</view>
</label>
</radio-group>
</view>
</view>
</view>
<!-- 第二层具体类型选择当有主类别选中时显示 -->
<view class="report-section mt-20" v-if="current_main_index >= 0">
<view class="report-label">请选择具体的类型<text>*</text></view>
<view class="radio-group-flex">
<view
v-for="(subItem, subIndex) in report_type_list[current_main_index].data"
:key="subIndex"
class="radio-item flex-row align-c"
@tap="selectSubReason(subIndex)"
>
<view class="flex-row align-c">
<radio
:value="subIndex.toString()"
:checked="current_sub_index === subIndex"
class="radio"
/>
<view class="ml-10">{{subItem}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</component-popup>
<!-- 分享弹窗 -->
<component-share-popup ref="share"></component-share-popup>
</view>
@ -237,107 +265,32 @@
comment_item_loading: false,
comment_start_y: 0, //
comment_current_y: 0, //
move_distance: 0,
move_distance: 0, //
current_video_id: '', // ID
is_slide_start: false,
swiper_key: get_math(),
comment_scroll_top: 0,
comment_scroll_top: 0, //
input_placeholder: '请输入您的精彩评论',
comment_input_value: '',
propMaxNum: 1,
form_images_list: [],
menu_button_info: '',
share_info: {},
params: {},
header_padding_left: '',
report_type_list: [
{
"name": "谩骂攻击",
"data": [
"言语辱骂",
"人身攻击",
"歧视言论"
]
},
{
"name": "色情低俗",
"data": [
"性暗示内容",
"不雅暴露",
"性暴力"
]
},
{
"name": "网络暴力",
"data": [
"人肉搜索",
"恶意骚扰",
"冒充他人"
]
},
{
"name": "违法违规",
"data": [
"诈骗信息",
"赌博内容",
"涉毒信息"
]
},
{
"name": "政治敏感",
"data": [
"敏感话题",
"虚假信息",
"煽动言论"
]
},
{
"name": "垃圾广告",
"data": [
"垃圾营销",
"虚假广告",
"误导信息"
]
},
{
"name": "未成年相关",
"data": [
"儿童剥削",
"不当内容",
"隐私侵犯"
]
},
{
"name": "危害人身安全",
"data": [
"威胁恐吓",
"自残内容",
"暴力行为"
]
},
{
"name": "其他",
"data": [
"引人不适",
"价值导向不良"
]
}
], //
popup_report_status: false, //
menu_button_info: '',
direction: 'direction',
base_config_data: {
is_video_auto_play: 0,
is_video_detail_show_goods: 1,
is_video_detail_show_goods_modal: 0,
is_video_give_thumbs: 1,
is_video_comments_show: 1,
is_video_comments_add: 1
},
base_config_data: {},
video_switch_debounce_timer: null, //
video_cleanup_timer: null, //
//
active_dropdown_id: null, // ID
}
params: {},
header_padding_left: '',
report_type_list: [], //
popup_report_status: false, //
current_main_index: 0, //
current_sub_index: 0, //
selected_main_reason: '',
selected_sub_reason: ''
};
},
computed: {
swiperStyle() {
@ -1399,7 +1352,82 @@
//
popup_close_event() {
this.popup_report_status = false;
}
},
//
onMainReasonChange(e) {
const value = parseInt(e.detail.value);
this.setData({
current_main_index: value,
selected_main_reason: this.report_type_list[value].name,
current_sub_index: -1,
selected_sub_reason: ''
});
},
onSubReasonChange(e) {
const value = parseInt(e.detail.value);
if (this.current_main_index >= 0) {
this.setData({
current_sub_index: value,
selected_sub_reason: this.report_type_list[this.current_main_index].data[value]
});
}
},
//
selectMainReason(index) {
if (index !== this.current_main_index) {
this.setData({
current_main_index: index,
selected_main_reason: this.report_type_list[index].name,
current_sub_index: 0, //
selected_sub_reason: this.report_type_list[index].data[0]
});
}
},
//
selectSubReason(index) {
if (index !== this.current_sub_index) {
this.setData({
current_sub_index: index,
selected_sub_reason: this.report_type_list[this.current_main_index].data[index]
});
}
},
close_report_popup() {
this.setData({
popup_report_status: false,
current_main_index: -1,
current_sub_index: -1,
selected_main_reason: '',
selected_sub_reason: ''
});
},
submit_new_report() {
if (this.current_main_index < 0) {
uni.showToast({ title: '请选择举报原因', icon: 'none' });
return;
}
if (this.current_sub_index < 0) {
uni.showToast({ title: '请选择具体类型', icon: 'none' });
return;
}
//
console.log('举报提交:', {
main_reason: this.selected_main_reason,
sub_reason: this.selected_sub_reason
});
//
this.close_new_report_popup();
// API
// this.submitReportToServer();
},
},
mounted() {
//
@ -1710,6 +1738,108 @@
height: 50rpx;
}
/* 新的举报弹窗样式 */
.new-report-content {
width: 100%;
max-width: 750rpx;
background-color: #fff;
border-radius: 20rpx;
}
.new-report-header {
padding: 30rpx 40rpx;
border-bottom: 1rpx solid #eee;
background-color: #f8f8f8;
}
.new-report-btn {
font-size: 32rpx;
padding: 12rpx 30rpx;
border-radius: 6rpx;
color: #333;
font-weight: 500;
}
.cancel-btn {
background-color: #f5f5f5;
border: 1rpx solid #ddd;
}
.submit-btn {
background-color: #e74c3c;
color: #fff;
border: 1rpx solid #d32f2f;
}
.new-report-title {
font-size: 36rpx;
font-weight: bold;
color: #333;
}
.new-report-body {
padding: 30rpx 40rpx;
}
.report-section {
margin-bottom: 30rpx;
}
.report-label {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 20rpx;
color: #333;
}
.report-label text {
color: #e74c3c;
font-size: 30rpx;
vertical-align: middle;
}
.radio-group-flex {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
}
.radio-item {
flex: 0 0 calc(33.333% - 20rpx);
min-width: 200rpx;
}
.radio {
width: 36rpx;
height: 36rpx;
margin-right: 20rpx;
}
.ml-10 {
margin-left: 10rpx;
}
.mt-20 {
margin-top: 20rpx;
}
.flex-row {
display: flex;
flex-direction: row;
}
.flex-col {
display: flex;
flex-direction: column;
}
.align-c {
align-items: center;
}
.justify-sb {
justify-content: space-between;
}
//
.header-top {
padding-left: 12px;