chore: establish V1.1 recovery baseline

This commit is contained in:
2026-09-09 22:05:00 +08:00
commit b46b48eb33
947 changed files with 155471 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
/**
* 我的举报页
* 展示用户提交的举报记录列表
*/
const api = require('../../utils/api');
Page({
data: {
reports: [],
loading: true,
empty: false
},
onLoad() {},
onShow() {
this.loadReports();
},
async loadReports() {
this.setData({ loading: true });
try {
const token = wx.getStorageSync('accessToken');
const res = await api.get('/risk/reports/my', {}, {
Authorization: `Bearer ${token}`
});
this.setData({
reports: res || [],
empty: !(res && res.length > 0),
loading: false
});
} catch (err) {
this.setData({ loading: false });
}
},
onRefresh() {
this.loadReports();
},
getStatusTag(status) {
const map = {
pending: { text: '待处理', type: 'warning' },
processing: { text: '处理中', type: 'warning' },
resolved: { text: '已处理', type: 'success' },
rejected: { text: '未受理', type: 'info' },
dismissed: { text: '已驳回', type: 'default' }
};
return map[status] || { text: status, type: 'default' };
}
});
+4
View File
@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "我的举报",
"usingComponents": {}
}
+29
View File
@@ -0,0 +1,29 @@
<!-- 我的举报 -->
<view class="page">
<view class="header">
<text class="title">我的举报</text>
</view>
<view wx:if="{{loading}}" class="loading-state">
<text>加载中...</text>
</view>
<view wx:if="{{empty && !loading}}" class="empty-state">
<text class="empty-icon">📋</text>
<text>暂无举报记录</text>
</view>
<view wx:if="{{!loading && reports.length > 0}}" class="report-list">
<view class="report-card" wx:for="{{reports}}" wx:key="id">
<view class="card-header">
<text class="reason">{{item.reasonText}}</text>
<el-tag class="status-tag" type="{{item.status}}">{{item.statusText}}</el-tag>
</view>
<text class="desc" wx:if="{{item.description}}">{{item.description}}</text>
<text class="time">{{formatTime(item.createdAt)}}</text>
<text class="result" wx:if="{{item.processResult}}">处理结果:{{item.processResultText}}</text>
</view>
</view>
<button class="btn-refresh" bindtap="onRefresh" wx:if="{{!loading}}">刷新</button>
</view>
+94
View File
@@ -0,0 +1,94 @@
.page {
padding: 32rpx;
background: #FFF8F7;
min-height: 100vh;
}
.header {
text-align: center;
margin-bottom: 32rpx;
}
.title {
font-size: 36rpx;
font-weight: bold;
color: #1A1A1A;
}
.loading-state, .empty-state {
text-align: center;
padding: 100rpx 32rpx;
color: #999;
}
.empty-icon {
font-size: 80rpx;
display: block;
margin-bottom: 24rpx;
}
.report-list {
display: flex;
flex-direction: column;
gap: 20rpx;
}
.report-card {
background: #fff;
border-radius: 20rpx;
padding: 24rpx;
box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.04);
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12rpx;
}
.reason {
font-size: 28rpx;
font-weight: bold;
color: #1A1A1A;
}
.status-tag {
font-size: 22rpx;
padding: 4rpx 16rpx;
border-radius: 12rpx;
background: #FFF3F2;
color: #E96B6B;
}
.desc {
font-size: 26rpx;
color: #666;
display: block;
margin-bottom: 12rpx;
line-height: 1.5;
}
.time {
font-size: 22rpx;
color: #BBB;
display: block;
}
.result {
font-size: 24rpx;
color: #E59A32;
display: block;
margin-top: 8rpx;
}
.btn-refresh {
margin-top: 32rpx;
background: transparent;
color: #999;
border: 1rpx solid #DDD;
border-radius: 44rpx;
height: 72rpx;
line-height: 72rpx;
font-size: 26rpx;
}