hookehuyr

feat(我的车辆): 添加车辆审核状态样式和显示逻辑

添加审核状态相关的样式和显示逻辑,包括审核状态标签样式、审核原因展示区域
只有当审核状态为3时才显示上架/下架按钮
...@@ -83,6 +83,10 @@ ...@@ -83,6 +83,10 @@
83 &.offline { 83 &.offline {
84 background: linear-gradient(135deg, #ef4444, #dc2626); 84 background: linear-gradient(135deg, #ef4444, #dc2626);
85 } 85 }
86 +
87 + &.review {
88 + background: linear-gradient(135deg, #f59e0b, #d97706);
89 + }
86 } 90 }
87 91
88 .status-icon { 92 .status-icon {
...@@ -130,11 +134,28 @@ ...@@ -130,11 +134,28 @@
130 border-radius: 16rpx; 134 border-radius: 16rpx;
131 } 135 }
132 136
133 -.car-description { 137 +/* 审核原因样式 */
134 - font-size: 28rpx; 138 +.review-reason {
135 - color: #666;
136 - line-height: 1.5;
137 margin-bottom: 32rpx; 139 margin-bottom: 32rpx;
140 + padding: 24rpx;
141 + background: #fef3c7;
142 + border-radius: 16rpx;
143 + border-left: 8rpx solid #f59e0b;
144 +}
145 +
146 +.review-reason-label {
147 + font-size: 24rpx;
148 + color: #92400e;
149 + font-weight: 500;
150 + margin-bottom: 12rpx;
151 +}
152 +
153 +.review-reason-content {
154 + font-size: 28rpx;
155 + color: #451a03;
156 + line-height: 1.6;
157 + word-wrap: break-word;
158 + word-break: break-all;
138 } 159 }
139 160
140 .price-section { 161 .price-section {
......
...@@ -46,15 +46,21 @@ ...@@ -46,15 +46,21 @@
46 <view v-if="car.verification_status" class="status-badge verified"> 46 <view v-if="car.verification_status" class="status-badge verified">
47 <text>{{ verifyStatus[car.verification_status] }}</text> 47 <text>{{ verifyStatus[car.verification_status] }}</text>
48 </view> 48 </view>
49 - <view v-if="car.status === 5" class="status-badge offline"> 49 + <!-- 审核状态为3时显示上架/下架状态,否则显示审核状态 -->
50 + <view v-if="car.review_status === 3 && car.status === 5" class="status-badge offline">
50 <text>{{ carStatus[car.status] }}</text> 51 <text>{{ carStatus[car.status] }}</text>
51 </view> 52 </view>
53 + <view v-else-if="car.review_status && car.review_status !== 3" class="status-badge review">
54 + <text>{{ reviewStatus[car.review_status] }}</text>
55 + </view>
52 </view> 56 </view>
53 <view class="car-details"> 57 <view class="car-details">
54 <text class="detail-item">续航 {{ car.range_km }}km | 最高时速 {{ car.max_speed_kmh }}km/h</text> 58 <text class="detail-item">续航 {{ car.range_km }}km | 最高时速 {{ car.max_speed_kmh }}km/h</text>
55 </view> 59 </view>
56 - <view class="car-description"> 60 + <!-- 审核原因 -->
57 - <nut-ellipsis direction="end" :content="car.note" :rows="2"></nut-ellipsis> 61 + <view v-if="car.review_reason" class="review-reason">
62 + <view class="review-reason-label">审核结果:</view>
63 + <view class="review-reason-content">{{ car.review_reason }}</view>
58 </view> 64 </view>
59 <view class="price-section"> 65 <view class="price-section">
60 <view v-if="car.price" class="current-price">¥{{ car.price }}</view> 66 <view v-if="car.price" class="current-price">¥{{ car.price }}</view>
...@@ -67,7 +73,9 @@ ...@@ -67,7 +73,9 @@
67 <!-- 操作按钮 --> 73 <!-- 操作按钮 -->
68 <view class="action-buttons mt-4"> 74 <view class="action-buttons mt-4">
69 <nut-button size="small" type="default" @click="editCar(car.id)">编辑</nut-button> 75 <nut-button size="small" type="default" @click="editCar(car.id)">编辑</nut-button>
76 + <!-- 只有审核状态为3时才显示上架/下架按钮 -->
70 <nut-button 77 <nut-button
78 + v-if="car.review_status === 3"
71 size="small" 79 size="small"
72 :type="car.status === 5 ? 'success' : 'warning'" 80 :type="car.status === 5 ? 'success' : 'warning'"
73 @click="toggleOffline(car)" 81 @click="toggleOffline(car)"
...@@ -134,6 +142,13 @@ const carStatus = ref({ ...@@ -134,6 +142,13 @@ const carStatus = ref({
134 5: '已下架', 142 5: '已下架',
135 }) 143 })
136 144
145 +// 审核状态映射
146 +const reviewStatus = ref({
147 + 1: '待审核',
148 + 3: '审核成功',
149 + 5: '审核失败'
150 +})
151 +
137 /** 152 /**
138 * 滚动样式 - 考虑header和TabBar的高度 153 * 滚动样式 - 考虑header和TabBar的高度
139 */ 154 */
......