第 3 阶段:租号发布与审核
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user