feat: 分端显示

This commit is contained in:
FlowerWater
2025-12-17 17:01:46 +08:00
parent 5e3d3708c6
commit 3c21b074c4
16 changed files with 1723 additions and 119 deletions

View File

@@ -0,0 +1,121 @@
<script lang="ts" setup>
definePage({
style: {
navigationBarTitleText: '审核列表',
},
})
// 模拟审核数据
const auditList = ref([
{ id: '1', merchantName: '广州数字科技有限公司', amount: 50000.00, status: 'pending', time: '2小时前' },
{ id: '2', merchantName: '深圳智慧商贸公司', amount: 128000.00, status: 'pending', time: '3小时前' },
{ id: '3', merchantName: '佛山电子商务公司', amount: 35000.00, status: 'approved', time: '昨天' },
])
const statusMap: Record<string, { text: string; color: string }> = {
pending: { text: '待审核', color: '#ff8f0d' },
approved: { text: '已通过', color: '#00c05a' },
rejected: { text: '已拒绝', color: '#fa4350' },
}
function handleAudit(id: string) {
uni.navigateTo({ url: `/pagesBank/audit/detail?id=${id}` })
}
</script>
<template>
<view class="audit-list-page">
<view class="audit-list">
<view
v-for="item in auditList"
:key="item.id"
class="audit-card"
@click="handleAudit(item.id)"
>
<view class="audit-header">
<text class="merchant-name">{{ item.merchantName }}</text>
<text class="audit-status" :style="{ color: statusMap[item.status].color }">
{{ statusMap[item.status].text }}
</text>
</view>
<view class="audit-body">
<text class="amount">申请金额¥{{ item.amount.toFixed(2) }}</text>
</view>
<view class="audit-footer">
<text class="time">{{ item.time }}</text>
<text class="action" v-if="item.status === 'pending'">去审核 </text>
</view>
</view>
</view>
</view>
</template>
<style lang="scss" scoped>
.audit-list-page {
min-height: 100vh;
background: #f5f5f5;
padding: 20rpx;
}
.audit-list {
display: flex;
flex-direction: column;
gap: 20rpx;
}
.audit-card {
background: #fff;
border-radius: 16rpx;
padding: 24rpx;
.audit-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16rpx;
.merchant-name {
font-size: 28rpx;
font-weight: 600;
color: #333;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.audit-status {
font-size: 24rpx;
font-weight: 500;
margin-left: 16rpx;
}
}
.audit-body {
margin-bottom: 12rpx;
.amount {
font-size: 30rpx;
font-weight: 600;
color: #00c05a;
}
}
.audit-footer {
display: flex;
justify-content: space-between;
align-items: center;
.time {
font-size: 24rpx;
color: #999;
}
.action {
font-size: 24rpx;
color: #00c05a;
font-weight: 500;
}
}
}
</style>