This commit is contained in:
王子琦
2026-01-16 13:26:57 +08:00
parent f006ed4c89
commit 0446cc184b
17 changed files with 276 additions and 24 deletions

View File

@@ -8,7 +8,7 @@
<p>里程{{ car.mileage }} km</p>
<p>{{ car.description }}</p>
<a-tag v-if="car.isSpecial" color="red">特价</a-tag>
<a-tag v-if="car.status !== 'AVAILABLE'" color="orange">不可租</a-tag>
<a-tag v-if="car.status !== 'AVAILABLE'" color="orange">{{ mapText(carStatusMap, car.status) }}</a-tag>
<div style="margin-top: 12px; display: flex; gap: 12px;">
<a-button type="primary" @click="toggleFavorite">
{{ isFavorite ? '取消收藏' : '加入收藏' }}
@@ -37,6 +37,7 @@ import { useRoute, useRouter } from 'vue-router'
import { Message } from '@arco-design/web-vue'
import http from '../api/http'
import { useAuthStore } from '../store/auth'
import { carStatusMap, mapText } from '../utils/format'
const route = useRoute()
const router = useRouter()