第 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
+34 -1
View File
@@ -1,9 +1,42 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import { fetchListings, type Listing } from '@/api/listings'
const loading = ref(false)
const listings = ref<Listing[]>([])
onMounted(loadListings)
async function loadListings() {
loading.value = true
try {
listings.value = await fetchListings()
} finally {
loading.value = false
}
}
</script>
<template>
<section class="page">
<div class="page-header">
<p class="eyebrow">Listings</p>
<h1>租号列表</h1>
<p>后续支持区服平台价格押金段位和哈夫币数量筛选</p>
<p>支持区服平台价格押金段位和哈夫币数量展示</p>
</div>
<el-empty v-if="!loading && listings.length === 0" description="暂无已上架租号" />
<div v-else v-loading="loading" class="listing-grid">
<RouterLink v-for="item in listings" :key="item.id" class="listing-card" :to="`/listings/${item.id}`">
<span>{{ item.server_region }} / {{ item.login_platform }}</span>
<strong>{{ item.title }}</strong>
<p>{{ item.rank_level || '未填写段位' }} · 哈夫币 {{ item.haf_coin_amount }}</p>
<div class="listing-price">
<b>¥{{ item.price_hourly }}/小时</b>
<em>押金 ¥{{ item.deposit_amount }}</em>
</div>
</RouterLink>
</div>
</section>
</template>