第 3 阶段:租号发布与审核

This commit is contained in:
yml
2026-05-22 15:53:50 +08:00
parent b3205cf2a5
commit 9ac65ffad9
18 changed files with 1130 additions and 10 deletions
@@ -1,9 +1,48 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import { useRoute } from 'vue-router'
import { fetchListing, type Listing } from '@/api/listings'
const route = useRoute()
const loading = ref(false)
const listing = ref<Listing | null>(null)
onMounted(async () => {
loading.value = true
try {
listing.value = await fetchListing(String(route.params.id))
} finally {
loading.value = false
}
})
</script>
<template>
<section class="page">
<div class="page-header">
<p class="eyebrow">Listing Detail</p>
<h1>租号详情</h1>
<p>展示账号资产哈夫币快照租金押金号主信用和风险提示</p>
<section class="page" v-loading="loading">
<div v-if="listing" class="page-header">
<p class="eyebrow">{{ listing.server_region }} / {{ listing.login_platform }}</p>
<h1>{{ listing.title }}</h1>
<p>{{ listing.description || '号主暂未填写详细说明。' }}</p>
</div>
<div v-if="listing" class="detail-grid">
<div class="metric-card">
<span>哈夫币</span>
<strong>{{ listing.haf_coin_amount }}</strong>
</div>
<div class="metric-card">
<span>时租</span>
<strong>¥{{ listing.price_hourly }}</strong>
</div>
<div class="metric-card">
<span>押金</span>
<strong>¥{{ listing.deposit_amount }}</strong>
</div>
<div class="metric-card">
<span>租期</span>
<strong>{{ listing.min_rent_hours }}-{{ listing.max_rent_hours }} 小时</strong>
</div>
</div>
</section>
</template>