添加审核状态

This commit is contained in:
浅念
2026-03-11 11:45:30 +08:00
parent 5114ac0d70
commit 12bc0f8ba9
3 changed files with 75 additions and 8 deletions
+67 -2
View File
@@ -1,8 +1,11 @@
<template>
<view class="car-card-pro">
<view class="heard">
<view class="" @click="handleCardTap">
编号:{{item.code?item.code:'~'}}
<view class="heard-left" @click="handleCardTap">
<text class="code-text">编号:{{item.code?item.code:'~'}}</text>
<view class="status-tag" :class="'status-' + item.status">
<text class="status-text">{{ getStatusText(item.status) }}</text>
</view>
</view>
<view v-if="ismy">
<u-icon @click="editfn(item)" name="edit-pen-fill" size="25" />
@@ -79,6 +82,17 @@
}
},
computed: {
// 获取状态文本
getStatusText() {
return (status) => {
const statusMap = {
0: '待审核',
1: '审核通过',
2: '审核拒绝'
}
return statusMap[status] || '未知'
}
},
// 计算视频数量
videoCount() {
if (!this.item.intro_video) return 0
@@ -295,6 +309,57 @@
justify-content: space-between;
}
.heard-left {
display: flex;
align-items: center;
gap: 10rpx;
flex: 1;
min-width: 0;
}
.code-text {
flex-shrink: 0;
}
.status-tag {
padding: 4rpx 12rpx;
border-radius: 8rpx;
font-size: 20rpx;
flex-shrink: 0;
&.status-0 {
background: #FFF7E6;
border: 1px solid #FFD591;
.status-text {
color: #FA8C16;
}
}
&.status-1 {
background: #F6FFED;
border: 1px solid #B7EB8F;
.status-text {
color: #52C41A;
}
}
&.status-2 {
background: #FFF2F0;
border: 1px solid #FFCCC7;
.status-text {
color: #F5222D;
}
}
}
.status-text {
font-size: 20rpx;
font-weight: 500;
}
.car-card-pro {
padding-bottom: 6rpx;
border-radius: 18rpx;